【正文】
ve controller (Kd) reduces both the overshoot and the settling time. The closedloop transfer function of the given system with a PD controller is: Let Kp equals to 300 as before and let Kd equals 10. Enter the following mands into an mfile and run it in the Matlab mand window. Kp=300。Kd=10。num=[Kd Kp]。den=[1 10+Kd 20+Kp]。 t=0::2。step(num,den,t)This plot shows that the derivative controller reduced both the overshoot and the settling time, and had small effect on the rise time and the steadystate error. ProportionalIntegral controlBefore going into a PID control, let39。s take a look at a PI control. From the table, we see that an integral controller (Ki) decreases the rise time, increases both the overshoot and the settling time, and eliminates the steadystate error. For the given system, the closedloop transfer function with a PI control is: Let39。s reduce the Kp to 30, and let Ki equals to 70. Create an new mfile and enter the following mands. Kp=30。Ki=70。num=[Kp Ki]。den=[1 10 20+Kp Ki]。t=0::2。step(num,den,t)Run this mfile in the Matlab mand window, and you should get the following plot. We have reduced the proportional gain (Kp) because the integral controller also reduces the rise time and increases the overshoot as the proportional controller does (double effect). The above response shows that the integral controller eliminated the steadystate error. ProportionalIntegralDerivative controlNow, let39。s take a look at a PID controller. The closedloop transfer function of the given system with a PID controller is: After several trial and error runs, the gains Kp=350, Ki=300, and Kd=50 provided the desired response. To confirm, enter the following mands to an mfile and run it in the mand window. You should get the following step response. Kp=350。Ki=300。Kd=50。num=[Kd Kp Ki]。den=[1 10+Kd 20+Kp Ki]。t=0::2。step(num,den,t)Now, we have obtained the system with no overshoot, fast rise time, and no steadystate error. General tips for designing a PID controllerWhen you are designing a PID controller for a given system, follow the steps shown below to obtain a desired response. 1. Obtain an openloop response and determine what needs to be improved 2. Add a proportional control to improve the rise time 3. Add a derivative control to improve the overshoot 4. Add an integral control to eliminate the steadystate error 5. Adjust each of Kp, Ki, and Kd until you obtain a desired overall response. You can always refer to the table shown in this PID Tutorial page to find out which controller controls what characteristics.