Exercise 1 Suppose we have a simple mass, spring, and damper problem. Find The modeling equation of this system (F input, x output). The transfer function. Let M = 1 kg b = 10 N s/m k = 20 N/m F = 1 N 3. Find Open-Loop Step Response. 4. Design a proportional controller to improve the output ( 𝜔 𝑛 =17.89). 5. Design a proportional derivative controller to improve the output (𝜁=0.56 and 𝜔 𝑛 =17.89).
1. The modeling equation of this system Solution 1 1. The modeling equation of this system 𝑓=𝑀 𝑑 2 𝑥 𝑑 𝑡 2 𝑀 𝑥 =−𝑏 𝑥 −𝑘 𝑥+𝐹 ⟹ 𝑀 𝑥 +𝑏 𝑥 +𝑘 𝑥=𝐹 2. The transfer function. Taking the Laplace transform of the modeling equation, we get 𝑀 𝑠 2 𝑋 𝑠 +𝑏 𝑠𝑋(𝑠)+𝑘 𝑋(𝑠)=𝐹(𝑠) ⟹ 𝐺 𝑠 = 𝑋 𝑠 𝐹 𝑠 = 1 𝑀 𝑠 2 +𝑏 𝑠+𝑘 Let M = 1 kg b = 10 N s/m k = 20 N/m F = 1 N 𝐺 𝑠 = 𝑋 𝑠 𝐹 𝑠 = 1 𝑠 2 +10 𝑠+20 Plug these values into the above transfer function 3. Find Open-Loop Step Response. Create a new m-file (Matlab) and run the following code: 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. the rise time is about one second, the settling time is about 1.5 seconds
4. Proportional Control The proportional controller (Kp) reduces the rise time, increases the overshoot, and reduces the steady-state error. 𝐺 𝑠 = 𝑋 𝑠 𝐹 𝑠 = 𝐾 𝑃 𝑠 2 +10 𝑠+(20+ 𝐾 𝑃 ) 1 𝑠 2 +10 𝑠+20 𝐾 𝑃 + - 𝐹 𝑠 𝑋 𝑠 𝜔 𝑛 2 =20+ 𝐾 𝑃 ⟹ 𝐾 𝑃 = 𝜔 𝑛 2 −20=300 Let the proportional gain equal 300 and change the m-file to the following 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. From the table shown above, we see 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: 20+ 𝐾 𝑃 = 𝜔 𝑛 2 ⟹ 𝐾 𝑃 = 𝜔 𝑛 2 −20=300 10+ 𝐾 𝐷 =2𝜁 𝜔 𝑛 ⟹ 𝐾 𝐷 =2𝜁 𝜔 𝑛 −20=2 0.56 17.89 −10⟹ 𝐾 𝐷 =10 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.
Exercise 2 Use a PD controller to control the system G s = 1 𝑠 2 +𝑠 to meet the specifications 𝜁=0.2 𝑎𝑛𝑑 𝜔 𝑛 =4 𝑟𝑎𝑑/𝑠𝑒𝑐.
The open Loop Analysis: the system poles p = 0 and p= - 1. Solution the system TF: G s = 1 𝑠 2 +𝑠 The open Loop Analysis: the system poles p = 0 and p= - 1. - 1 System poles Im Re 3.9 Desired 𝜁=0.2 𝜔 𝑛 =4 Desired Poles Specifications: 𝑠 2 +2𝜁 𝜔 𝑛 𝑠+ 𝜔 𝑛 2 =0 𝑃 1,2 −0.8±𝑗3.9 0.8 The system does not meet the desired specification, we need a controller. 1 𝑠 2 +𝑠 𝐾 𝑃 + 𝐾 𝐷 𝑠 + - 𝑦 𝑑 𝑠 𝑦 𝑠 Controller 𝐶𝐿𝐶𝐸 : 𝑠 2 +𝑠 +1 𝐾 𝑃 + 𝐾 𝐷 𝑠 =0 For the design, we need to find 𝐾 𝑃 and 𝐾 𝐷 to meet the specifications . 𝐷𝑒𝑠𝑖𝑟𝑒𝑑 𝐶𝐿𝐶𝐸 : 𝑠 2 +2𝜁 𝜔 𝑛 𝑠+ 𝜔 𝑛 2 = 𝑠 2 +2 0.2 4 𝑠+ 4 2 = 𝑠 2 +1.6 𝑠+16=0 𝐶𝐿𝐶𝐸 : 𝑠 2 + 1+ 𝐾 𝐷 𝑠+ 𝐾 𝑃 =0 1+ 𝐾 𝐷 =1.6 𝐾 𝐷 =0.6 By matching coefficients: 𝐾 𝑃 =16 𝐾 𝑃 =16
Exercise 3 Use a PI controller to control the system G s = 1 𝑠+3 to meet the specifications 𝜁=0.7 𝑎𝑛𝑑 𝑡 𝑠 <1 𝑠𝑒𝑐.
The open Loop Analysis: the system pole: p= - 3. Solution The system is type zero, it has no integrator. In order to have no steady-state error we need to add an integrator to make the system type one. The open Loop Analysis: the system pole: p= - 3. - 3 System poles Im Re - 4 𝜎>4 𝜁=0.7 satisfy the settling time 𝜁=0.7. 𝜔 𝑛 > 4 𝜁 = 4 0.7 𝑡 𝑠 = 4 𝜎 <1 𝜔 𝑛 >5.71 𝜔 𝑛 =6 𝜎=𝜁 𝜔 𝑛 >4 1 𝑠+3 𝐾 𝑃 + 𝐾 𝐼 𝑠 + - 𝑦 𝑑 𝑠 𝑦 𝑠 The controller design: PI controller 𝐾 𝑃 + 𝐾 𝐼 𝑠 = 𝐾 𝑃 (𝑠+ 𝐾 𝐼 𝐾 𝑃 ) 𝑠 Gain Zero = 𝐾 𝐼𝑃 Integrator The PI controller can be written as: 𝐶𝐿𝐶𝐸 :𝑠 𝑠+3 + 𝐾 𝑃 𝑠+ 𝐾 𝐼 𝐾 𝑃 =0 𝑠 2 +(2+ 𝐾 𝑃 ) 𝑠+ 𝐾 𝐼 =0 𝐷𝑒𝑠𝑖𝑟𝑒𝑑 𝐶𝐿𝐶𝐸 : 𝑠 2 +2𝜁 𝜔 𝑛 𝑠+ 𝜔 𝑛 2 = 𝑠 2 +2 0.7 6 𝑠+ 6 2 = 𝑠 2 +8.4 𝑠+36=0 2+ 𝐾 𝑃 =8.4 𝐾 𝑃 =7.4 𝐾 𝐼 =36 𝐾 𝐼 =36