An FBG encoder as an optical waveguide device includes plural unit FBGs
respectively including a periodic refractive index modulation structure
in a longitudinal direction of an optical fiber and aligned in the
longitudinal direction of the optical fiber; and a phase shift section
formed between any two adjacent unit FBGs among the plural unit FBGs,
thereby producing a predetermined phase difference between the periodic
refractive index modulation structures of two adjacent unit FBGs, wherein
the unit FBGs respectively have a structure wherein a period of the
periodic refractive index modulation of the plural unit diffraction
grating sections gradually increases or decreases in the longitudinal
direction of the optical fiber or a structure wherein amplitude of the
periodic refractive index modulation is varied relative to the
longitudinal direction of the optical fiber so that an envelope of the
periodic refractive index modulation is a predetermined window function.