Here to the flow of motor speed adjustment using PID adjustment method, wherein the PID adjustment of three parameters and its adjustment function is as follows:
Proportional regulation : Proportional control is one of the simplest control methods. The output of its controller is proportional to the input error signal. is proportional to the deviation of the system, once the system has a deviation, the proportional adjustment immediately produces an adjustment function to reduce the deviation. The proportional action is large, can speed up the adjustment, reduces the error, but the excessive proportion, causes the system stability to descend, even causes the system instability. The system output has a steady state error (steady-state error) when only proportional control is present.
Integral regulation function : In integral control, the output of the controller is proportional to the integral of the input error signal. For an automatic control system, if there is a steady state error after entering the steady state, it is said that the control system is a steady state error or a short differential system with steady-state error. In order to eliminate the steady state error, "integral term" must be introduced in the controller. The integral item pairs the error depends on the time integral, increases with the time, the integral term increases. Thus, even if the error is very small, the integral item will increase with time, it pushes the controller output increase so that the steady-state error further reduced, until equal to zero. Therefore, the proportional + integral (PI) controller can make the system have no steady state error after entering the steady state. The strength of integral action depends on the smaller the integral time constant Ti,ti, the stronger the integral function. On the other hand, TI is weak and integral adjustment can decrease the stability of the system and slow the dynamic response. The integral function is often combined with another two regulation rules to form PI regulator or PID regulator.
Differential Regulation : The differential action reflects the change rate of the system deviation signal, has the foresight, can foresee the tendency of the deviation change, so it can produce the leading control function, which has been eliminated by the differential regulation before the deviation has not formed. Therefore, the dynamic performance of the system can be improved. In the case of differential time selection, the overshoot can be reduced and the adjustment time reduced. The differential action amplifies the noise disturbance, so the excessive differential regulation is disadvantageous to the system anti-interference. In addition, the differential reaction is the rate of change, and when the input does not change, the differential action output is zero. The differential action cannot be used alone, and it needs to be combined with two other regulating laws to form a PD or PID controller.
Although the PID adjustment three parameters have a certain rule can refer to, most or try out, the main rule of regulation is the approximate proportion of i~0,d~5p slowly try.
The PID control program is as follows:
block Controller InPort command (n=1); InPort Feedback (n=1); OutPort OutPort (n=1); Real error; Real Errori; Real Errord; Real Pout;parameter Real Kp=4;p arameter Real Ki=0;p arameter Real Kd=Ten;p arameter Real max_output_pos=Ten;p arameter Real Max_output_neg= -Ten; Algorithmerror:= command.signal[1]-feedback.signal[1];errori:=errori+Error;errord:=error-Pre (Error);p out:= Kp * error+ki*errori+kd*Errord;ifPout >Max_output_pos thenoutport.signal[1] :=Max_output_pos;elseif pout<Max_output_neg thenoutport.signal[1] :=Max_output_neg;Elseoutport.signal[1] :=Pout;endif; end Controller;
The resulting simulation results in the following graphs:
DC Motor Speed Control simulation operation