1. A filament power supply for an electron accelerator, comprising:a rectifier circuit configured to convert a power frequency AC voltage signal into a DC voltage signal;
an inverter circuit configured to convert the DC voltage signal into an AC voltage signal and output the AC voltage signal;
a sampling circuit configured to sample at least one of a current or a voltage of the AC voltage signal to obtain at least one of a current sampling signal or a voltage sampling signal;
a pulse width modulation control chip configured to adjust a duty cycle of a pulse width modulation signal output by the pulse width modulation control chip until a voltage of the current sampling signal is equal to that of a reference current signal, or a voltage of the voltage sampling signal is equal to that of a reference voltage signal; and
a modulation circuit configured to modulate the power frequency AC voltage signal according to the pulse width modulation signal to obtain a modulation signal and output the power frequency AC voltage signal and the modulation signal to the inverter circuit to trigger the inverter circuit to convert the DC voltage signal into the AC voltage signal.