${\text{π }}$
-phase-shifted fiber Bragg grating with a short effective sensing length becomes one of research hotspots in ultrasonic sensing, because light undergoes strong localization centered at its phase shift position. To investigate the directional sensing characteristics of
${\text{π }}$
-phase-shifted fiber Bragg grating as hydrophone, the theory of sound propagation in layered media is used to calculate the strain of fiber core, then the transfer matrix method based on the coupled-mode theory in optics is used to calculate the shift of central wavelength in optical reflection spectrum. Results of strain and wavelength shift under obliquely incident ultrasonic from 1-10 MHz are divided into A area, B area, and C area, and analyzed by numerical calculation and simulation calculation. Axial strain and elasto-optical strain change the grating period and effective refractive index by the mechanical effect and elasto-optical effect, respectively, thereby resulting in wavelength shift. In A area (frequency below 5 MHz, incident angle below
$15^\circ $
), the axial strain nearly equals zero, thus elasto-optical effect plays a predominant role in wavelength shift. The maximal response occurs at vertical incidence, and then obviously declines with angle increasing. The maximum is essentially unchanged with grating length. In B area and C area (angle above
$15^\circ $
), both mechanical effect and elasto-optical effect contribute to wavelength shift. In B area (frequency below 5 MHz), the amplitude of strain is the largest in three areas. A peak of wavelength shift appears at the same angle of the peak of strain, where exists the interference of the guided wave in fiber with the direct ultrasonic wave form water. The peak amplitude of wavelength shift decreases with grating length increasing. In C area (frequency below 5 MHz), the amplitude of strain is larger than in A area, but the wavelength shift is smaller, which is correlated to its higher axial wave number. Comparing the results in three areas, it is clear that the wavelength shift is larger at lower frequency and at vertical incidence. Experiments on 3 MHz and 5 MHz are then performed with a π-phase-shifted fiber Bragg grating. The experimental result accords well with the theoretical result. The research is important in practically using the
${\text{π }}$
-phase-shifted fiber Bragg grating in ultrasonic sensing.