An optical deflector comprising: a mirror part configured to have a reflective plane; a support part configured to support the mirror part; a piezoelectric actuator (10a, 10b) of which one end is connected to the mirror part, of which the other end is connected to the support part, and which is adapted to swing the mirror part about a predetermined axis relative to the support part by piezoelectric driving; a detecting piezoelectric element which outputs a detection voltage based on bending deformation due to vibration transmitted by the piezoelectric actuator (10a, 10b); and a control unit configured to control a drive voltage to be applied to the piezoelectric actuator (10a, 10b), wherein the control unit includes a natural frequency detecting unit configured to detect a mechanical natural frequency relevant to the swinging of the mirror part about the predetermined axis, a voltage signal generating unit configured to generate a voltage signal of a sawtooth waveform periodically repeating an increase and a decrease of a voltage value with a constant amplitude, and a removal unit configured to remove a predetermined frequency component, and wherein a voltage signal obtained by removing the natural frequency detected by the natural frequency detecting unit and a harmonic component of the natural frequency from the voltage signal generated by the voltage signal generating unit within a predetermined frequency range is applied as the drive voltage to the piezoelectric actuator (10a, 10b) and thereafter a frequency component which is equal to or greater than a predetermined value within the predetermined frequency range, out of the frequency components of the detection voltage output from the detecting piezoelectric element, is removed from the drive voltage; wherein the control unit includes a sinusoidal wave generating unit configured to generate a voltage signal of a sinusoidal waveform, wherein the sinusoidal wave generating unit is configured to generate a voltage signal of a sinusoidal waveform for each frequency in the range of a predetermined first frequency to a second frequency, and wherein the natural frequency detecting unit is configured to detect the frequency of the sinusoidal waveform, which is equal to or greater than a predetermined value out of the frequency components of the detection voltage output from the detecting piezoelectric element when the voltage signals of the sinusoidal waveform generated by the sinusoidal wave generating unit are applied to the piezoelectric actuator (10a, 10b), as the natural frequency. a mirror part configured to have a reflective plane; a support part configured to support the mirror part; a piezoelectric actuator (10a, 10b) of which one end is connected to the mirror part, of which the other end is connected to the support part, and which is adapted to swing the mirror part about a predetermined axis relative to the support part by piezoelectric driving; a detecting piezoelectric element which outputs a detection voltage based on bending deformation due to vibration transmitted by the piezoelectric actuator (10a, 10b); and a control unit configured to control a drive voltage to be applied to the piezoelectric actuator (10a, 10b), wherein the control unit includes a natural frequency detecting unit configured to detect a mechanical natural frequency relevant to the swinging of the mirror part about the predetermined axis, a voltage signal generating unit configured to generate a voltage signal of a sawtooth waveform periodically repeating an increase and a decrease of a voltage value with a constant amplitude, and a removal unit configured to remove a predetermined frequency component, and wherein a voltage signal obtained by removing the natural frequency detected by the natural frequency detecting unit and a harmonic component of the natural frequency from the voltage signal generated by the voltage signal generating unit within a predetermined frequency range is applied as the drive voltage to the piezoelectric actuator (10a, 10b) and thereafter a frequency component which is equal to or greater than a predetermined value within the predetermined frequency range, out of the frequency components of the detection voltage output from the detecting piezoelectric element, is removed from the drive voltage; wherein the control unit includes a sinusoidal wave generating unit configured to generate a voltage signal of a sinusoidal waveform, wherein the sinusoidal wave generating unit is configured to generate a voltage signal of a sinusoidal waveform for each frequency in the range of a predetermined first frequency to a second frequency, and wherein the natural frequency detecting unit is configured to detect the frequency of the sinusoidal waveform, which is equal to or greater than a predetermined value out of the frequency components of the detection voltage output from the detecting piezoelectric element when the voltage signals of the sinusoidal waveform generated by the sinusoidal wave generating unit are applied to the piezoelectric actuator (10a, 10b), as the natural frequency.