EE 4343 Lab#4 PID Control Design of Rigid Bodies Prepared by: Stacy Cason E-mail: [email protected] Updated: July 13, 2017 This lab demonstrates some key concepts associated with proportional plus derivative (PD) control and subsequently the effects of adding integral action (PID). The block diagram for the forward path PID control of a rigid body plant is shown in Figure 1. Note that friction is neglected here. This control scheme, acting on plants modeled as rigid bodies, finds broader application in industry than any other. It is employed in such diverse areas as machine tools, automobiles (cruise control), and spacecraft control (attitude and gimbal control). r s Reference Input k k p i kd s s PID Controller xs k hw PLANT Output Hardware Gain Figure 1. Rigid Body PID Control – Control Block Diagram Before proceeding, check with lab assistant as to which system you are using for this lab. The three different systems are Model 210 (Rectilinear Spring/Mass Control System), Model 205 (Torsional Control System) and Model 505 (Inverted Pendulum Control System). Next, follow the appropriate design procedures below for your particular model. 1 07/13/17 1. Rigid Body PID Control for Model 210 (Rectilinear Spring/Mass Control System) The closed loop transfer function is given as cs k hw m k d s 2 k p s k i xs r s s 3 k hw m k d s 2 k p s k i (1.1) For the first portion of your lab we shall consider PD control only ( k i 0 ). With this assumption in mind, one may express (1.1) above as: k hw m k d s k p xs cs r s s 2 k hw m k d s k p (1.2) Notice that one may equate the expression in (1.2) to cs by defining the following: 2 n s 2n xs r s s 2 2 n s 2n n (1.3) k p k hw m (1.4) k k k d k hw d hw 2m n 2 mk p k hw The effects of k p and k d on the roots of the denominator (damped second-order oscillator) of Eq. (1.2) is studied in the work that follows. PD Control Design: a. From Eq’s (1.2, 1.3 and 1.4) design a PD controller (i.e., find k p and k d ) for a system with natural frequency n 15 rad/s and 0.707 . (Do not exceed a value of k p 0.08 and k d 0.04 .) Assume k hw 12800 N/m and m 2.77 kg . b. Implement your controller by performing a step response. Set up a trajectory for a 2500 count closed-loop STEP with 2000ms duration (1 rep). Ask your lab assistant to check your setup before proceeding further. c. Now, execute this trajectory and plot the commanded position and encoder position #1. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots for later comparison. Adding Integral Action: a. Implement a PID controller with a value of k i 0.01 along with the previous values of k p and k d found in (a.) above. Be certain that the following error seen in the background window is within 20 counts prior to implementing this controller (if not choose Zero Position from the Utility Menu). b. Now, execute a trajectory for a 2500 count closed-loop step of 2000ms duration (1 rep). Plot the commanded position and encoder position. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots (export raw data from 2 07/13/17 the data menu) for later comparison. Questions: a. Show all calculations for k p and k d . b. Derive the natural frequency n and damping ratio in Eq. 1.4. c. What is the effect of the system hardware gain k hw , mass m , and control gains k p and k d on the natural frequency n and damping ratio ? d. Describe the effects of natural frequency n and damping ratio on the characteristic roots of Eq. 1.1. Use a root-locus diagram in your answer to show the effect of changing from 0 to for any given n . e. What is the effect of adding integral action? 3 07/13/17 2. Rigid Body PID Control for Model 205 (Torsional Control System) The closed loop transfer function is given as cs k hw J k d s 2 k p s k i xs r s s 3 k hw J k d s 2 k p s k i (2.1) For the first portion of your lab we shall consider PD control only ( k i 0 ). With this assumption in mind, one may express (2.1) above as: k hw J k d s k p xs cs r s s 2 k hw J k d s k p (2.2) Notice that one may equate the expression in (2.2) to cs by defining the following: 2 n s 2n xs r s s 2 2 n s 2n n (2.3) k p k hw J k k k d k hw d hw 2 J n 2 Jk p k hw (2.4) The effects of k p and k d on the roots of the denominator (damped second-order oscillator) of Eq. (2.2) is studied in the work that follows. PD Control Design: a. From Eq’s (2.2, 2.3 and 2.4) design a PD controller (i.e., find k p and k d ) for a system with natural frequency n 10 rad/s and 0.707 . (Do not exceed a value of k p 0.08 and k d 0.1 .) Assume k hw 17.4 N - m/rad and J 0.0108 kg - m 2 . b. Implement your controller by performing a step response. Set up a trajectory for a 2500 count closed-loop STEP with 2000ms duration (1 rep). Ask your lab assistant to check your setup before proceeding further. c. Now, execute this trajectory and plot the commanded position and encoder position. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots for later comparison. Adding Integral Action: a. Implement a PID controller with a value of k i 0.05 along with the previous values of k p and k d found in (a.) above. Be certain that the following error seen in the background window is within 20 counts prior to implementing this controller (if not choose Zero Position from the Utility Menu). b. Now, execute a trajectory for a 2500 count closed-loop step of 2000ms duration (1 rep). Plot the commanded position and encoder position #1. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots (export raw data 4 07/13/17 from the data menu) for later comparison. Questions: a. Show all calculations for k p and k d . b. Derive the natural frequency n and damping ratio in Eq. 2.4. c. What is the effect of the system hardware gain k hw , mass m , and control gains k p and k d on the natural frequency n and damping ratio ? d. Describe the effects of natural frequency n and damping ratio on the characteristic roots of Eq. 2.1. Use a root-locus diagram in your answer to show the effect of changing from 0 to for any given n . e. What is the effect of adding integral action? 5 07/13/17 3. Rigid Body PID Control for Model 505 (Inverted Pendulum Control System) The closed loop transfer function is given as cs k hw m k d s 2 k p s k i xs r s s 3 k hw m k d s 2 k p s k i (3.1) For the first portion of your lab we shall consider PD control only ( k i 0 ). With this assumption in mind, one may express (3.1) above as: k hw m k d s k p xs cs r s s 2 k hw m k d s k p (3.2) Notice that one may equate the expression in (3.2) to cs by defining the following: 2 n s 2n xs r s s 2 2 n s 2n n (3.3) k p k hw m (3.4) k k k d k hw d hw 2m n 2 mk p k hw The effects of k p and k d on the roots of the denominator (damped second-order oscillator) of Eq. (3.2) is studied in the work that follows. PD Control Design: a. From Eq’s (3.2, 3.3 and 3.4) design a PD controller (i.e., find k p and k d ) for a system with natural frequency n 10 rad/s and 0.707 . (Do not exceed a value of k p 0.35 and k d 0.012 .) Assume k hw 2088 N/m and m 0.139 kg . b. Adjust the position of the balance masses to lt 10 cm being sure to secure them on the threaded rode by counter rotating them. Verify that the donut weights are in place and secure on the sliding rod. c. Implement your controller by performing a step response. Set up a trajectory for a 1000 count closed-loop STEP with 1000ms duration (1 rep). Ask your lab assistant to check your setup before proceeding further. d. Now, execute this trajectory and plot the commanded position and encoder position #2. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots (export raw data from the data menu) for later comparison. Adding Integral Action: a. Implement a PID controller with a value of k i 0.3 along with the previous values of k p and k d found in (a.) above. Be certain that the following error seen in the background window is within 20 counts prior to implementing this controller (if not choose Zero Position from the Utility Menu). Now, execute a trajectory for a 1000 count closed6 07/13/17 loop step of 1000ms duration (1 rep). Plot the commanded position and encoder position. Plot them both on the same vertical axis so that there is no graphical bias. Save your plots for later comparison. Questions: a. Show all calculations for k p and k d . b. Derive the natural frequency n and damping ratio in Eq. 3.4. c. What is the effect of the system hardware gain k hw , mass m , and control gains k p and k d on the natural frequency n and damping ratio ? d. Describe the effects of natural frequency n and damping ratio on the characteristic roots of Eq. 3.1. Use a root-locus diagram in your answer to show the effect of changing from 0 to for any given n . e. What is the effect of adding integral action? 7 07/13/17
© Copyright 2026 Paperzz