The application discloses a dynamic fixed-point number adaptive PID design method based on error amplitude feedback, which is characterized in that a
PID controller detects the amplitude of a current frequency error in real time, and dynamically adjusts the bit width distribution mode of a fixed-point number in a PID operation process according to an error interval, so that the controller has stronger
dynamic range in a large error stage, has higher operation resolution in a small error stage, and better balances the fast regulation ability and the steady-
state control precision of a
system. Specifically, the method comprises the following steps: (1) obtaining the real-time frequency of a
signal through
fast Fourier transform, and saving a reference frequency value transmitted by an upper computer; (2) comparing the reference frequency with the actual
signal frequency to obtain the frequency error at the
current time, judging the error interval in which the current
system is located according to a threshold value, and switching to a corresponding fixed-point format; (3) completing proportional, integral and differential operations according to the incremental PID control, selecting the corresponding control shift bit number according to the fixed-point format, and calculating the control increment between adjacent two sampling time points and the output control amount of the PID. Through real-time feedback of the error amplitude, the method dynamically optimizes the numerical expression precision of the PID calculation, so that the controller can automatically match a more suitable operation format according to the current error interval. In a
laser frequency stabilization system, the dual requirements of large disturbance fast response and steady-state high-precision locking can be met, and the long-term stable operation requirement of a far-
infrared laser interferometer is better adapted.