Example Problem
Example Problem
Example Problem
Example Problem
Suppose we have a simple mass, spring, and damper problem.
The modeling equation of this system is Taking the Laplace transform of the modeling equation, we get The transfer function between the displacement and the input then becomes
Let M = 1 kg b = 10 N s/m k = 20 N/m F=1N Plug these values into the above transfer function
The goal of this problem is to show you how each of 1.Fast rise time 2.Minimum overshoot 3.No steady-state error
and
contributes to obtain
The DC gain of the plant transfer function is 1/20, so 0.05 is the final value of the output to an unit step input. This corresponds to the steady-state error of 0.95, quite large indeed. Furthermore, the rise time is about one second, and the settling time is about 1.5 seconds. Let's design a controller that will reduce the rise time, reduce the settling time, and eliminate the steady-state error.
Proportional Control
we know that the proportional controller (Kp) reduces the rise time, increases the overshoot, and reduces the steady-state error. The closed-loop transfer function of the above system with a proportional controller is:
The above plot shows that the proportional controller reduced both the rise time and the steady-state error, increased the overshoot, and decreased the settling time by small amount.
Proportional-Derivative Control
Now, let's take a look at a PD control. we know that the derivative controller (Kd) reduces both the overshoot and the settling time. The closed-loop transfer function of the given system with a PD controller is:
Let equal 300 as before and let in the MATLAB command window. Kp = 300; Kd = 10; C = pid(Kp,0,Kd) T = feedback(C*P,1) t = 0:0.01:2; step(T,t) C= Kp + Kd * s with Kp = 300, Kd = 10
equal 10. Enter the following commands into an m-file and run it
Continuous-time PD controller in parallel form. T= 10 s + 300 ---------------s^2 + 20 s + 320 Continuous-time transfer function.
This plot shows that the derivative controller reduced both the overshoot and the settling time, and had a small effect on the rise time and the steady-state error.
Proportional-Integral Control
Before going into a PID control, let'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 steady-state error. For the given system, the closed-loop transfer function with a PI control is:
Let's reduce the to 30, and let Kp = 30; Ki = 70; C = pid(Kp,Ki) T = feedback(C*P,1) t = 0:0.01:2; step(T,t) C= 1 Kp + Ki * --s with Kp = 30, Ki = 70
equal 70. Create an new m-file and enter the following commands.
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 .The above response shows that the integral controller eliminated the steady-state error.
Proportional-Integral-Derivative Control
Now, let's take a look at a PID controller. The closed-loop transfer function of the given system with a PID controller is:
After several trial and error runs, the gains response Kp = 350; Ki = 300; Kd = 50; C = pid(Kp,Ki,Kd) T = feedback(C*P,1); t = 0:0.01:2; step(T,t) C= 1 Kp + Ki * --- + Kd * s s with Kp = 350, Ki = 300, Kd = 50 PID controller in parallel form.
= 350,
= 300, and
Now, we have obtained a closed-loop system with no overshoot, fast rise time, and no steady-state error.