Welcome to 520 Motor repository
01.PID basic concept
PID basic concept
PID is the acronym for Proportional, Integral, and Differential controllers, and is a commonly used closed-loop control algorithm.
PID controllers calculate the output control signal based on the current error value of the system, including proportional, integral, and differential terms, so that the system output is stable near the set value

PID formula
Kp: Proportional gain, used to adjust the response speed and stability of the feedback control system. Increasing Kp can speed up the response speed of the system, but may cause system oscillation or overshoot; reducing Kp may cause the system to respond too slowly.
Ki: Integral gain, used to eliminate the steady-state error of the system. Increasing Ki can reduce the steady-state error of the system, but may cause over-regulation or oscillation of the system; reducing Ki may cause the system to be unable to eliminate the steady-state error.
Kd: differential gain, used to suppress the oscillation and overshoot of the system. Increasing Kd can reduce the overshoot and oscillation of the system, but may make the system more sensitive to noise and interference; reducing Kd may cause the system to respond too slowly.
e(t): error signal, which is the deviation between the expected value and the actual value.
Related terms
Feedback: The system output signal is again part of the input signal.
Open loop: The system output is not monitored and adjusted by the system state, and the system directly generates output based on the input signal.
Closed loop: The system monitors the system output signal and compares it with the reference signal, and then adjusts the system state to make the output close to the reference value.
Set value: The set value of the PID regulator is the value that people expect the controlled variable to reach.
Input deviation: The difference between the controlled variable and the set value.
Dynamic deviation: During the adjustment process, the deviation between the controlled quantity and the set value changes at any time. The deviation between the two at any time is called dynamic deviation.
Callback: The adjustment effect of the regulator is displayed, which makes the controlled quantity start to change from rising to falling, or from falling to rising trend, which is called callback.
Proportional (P)
Integral operation of input deviation: directly proportional to the current error, which can quickly respond to the change of error, but it is easy to cause system oscillation.
Integral (I)
Integral operation of input deviation: accumulating past errors helps to eliminate static errors, but may cause slow system response or oscillation.
Differential (D)
Differential operation of input deviation: predicting the trend of error change helps to reduce the dynamic error and oscillation of the system.