Lower hybrid instability in a tokamak under neutral beam injection and magnetic shear