Prescott, Arizona Campus Department of Electrical and Computer Engineering EE 402 Control Systems Laboratory Fall Semester 2016 Lab Section 51PC Thursday 1:25 – 4:05 pm King Eng. Bldg. Rm 122 Lab Instructor: Dr. Stephen Bruder Lab 05 Second Order System Modeling Date Experiment Performed: Thursday, Feb 25 2016 Instructor’s Comments: Comment #1 Comment #2 Date Report Submitted: Day, Date, Month, 2016 Group Members: Student # 1 Name & Email Student # 2 Name & Email Grade: ?? / 90 EE 402 Control Systems Lab TABLE OF CONTENTS Spring 2016 PAGE 1. Abstract ................................................................................................................................................. 3 2. Introduction ........................................................................................................................................... 3 3. Theory and Experimental Methods ....................................................................................................... 4 4. 5. 1.a. Open-Loop Analysis ..................................................................................................................... 4 1.b. Closed-Loop Analysis ................................................................................................................... 5 Equipment and Procedures.................................................................................................................... 7 4.i. Open-Loop Response .................................................................................................................... 7 4.ii. Closed-Loop Response ................................................................................................................. 9 Results and Discussion ....................................................................................................................... 10 5.i. Open-Loop Response .................................................................................................................. 10 5.ii. Closed-Loop Response ............................................................................................................... 10 6. Conclusion .......................................................................................................................................... 11 7. References ........................................................................................................................................... 11 LIST OF TABLES PAGE Table 1 Comparison of estimated DC motor parameters from open-loop response ................................... 10 Table 2 Comparison of estimated DC motor parameters from closed-loop response ................................ 10 Table 3 Comparison of estimated DC motor parameters ............................................................................ 10 LIST OF F IGURES PAGE Figure 1 A simplified open-loop model of the DC motor ............................................................................. 4 Figure 2 Simulink model (left) and unit step response (right) ...................................................................... 5 Figure 3 A simplified unity feedback closed-loop configuration ................................................................. 5 Figure 4 Updated Simulink model (left) and unit step response (right)........................................................ 6 Figure 5 A generic underdamped 2nd order unit-step response ..................................................................... 7 Figure 6 Open-loop model: Simulation vs real-hardware ............................................................................. 8 Figure 7 Open-loop response: Motor angle - simulation vs real-hardware................................................... 8 Figure 8 Closed-loop model: Simulation vs real-hardware .......................................................................... 9 Figure 9 Closed-loop response: Motor angle - simulation vs real-hardware ................................................ 9 Figure 10 Improved closed-loop response: Motor angle - simulation vs real-hardware ............................ 11 LIST OF SYMBOLS Names of Students in the Group PAGE Page 2 of 11 EE 402 Control Systems Lab Spring 2016 1. ABSTRACT A stand-alone summary of the report – the work done and results observed. The abstract should address: o What is the objective of the experiment? o What type of experiment is performed to achieve the objective? o What are the major results of the experiment? o What conclusions can be made from these results? Write this after you have finished all of the other sections!! The abstract should be less than a page and closer to a ½ page in length. 2. INTRODUCTION In the last lab we applied a step input to the Quanser QUBE-Servo and measured its speed response. Using this data, a 1st order model of the motor of the form G ( s) K / ( s a) was developed. In this lab we will turn our attention to the motor’s shaft angle, as the output of interest, and the effect of closing a unity feedback loop on the motor’s response. Furthermore, by measuring characteristics (e.g., overshoot and time to peak) of the close-loop response we will attempt to estimate parameters of the open-loop transfer function. Names of Students in the Group Page 3 of 11 EE 402 Control Systems Lab Spring 2016 3. THEORY AND EXPERIMENTAL METHODS In the last lab we saw that the DC motor could be “reasonably” well approximated by a 1st order transfer function G ( s ) s( s) K , when the input was considered to be the armature voltage ( ea ) Ea ( s ) s a and the output the motor’s speed ( ). If we now consider the motor’s shaft angle as the output of interest, our transfer function becomes G ( s) ( s) K . Note that this is now a 2nd order Ea ( s) s s a system!! 1.a. Question 1. Open-Loop Analysis Is this system, G ( s) , stable, marginally stable, or unstable? ________________ QUBE DC Motor Ea ( s ) K sa speed 1 s ( s ) angle Figure 1 A simplified open-loop model of the DC motor Task 1. Considering motor’s shaft angle as the output, referring to Figure 1, determine the symbolic form of the system’s unit step response. 1 ? (t ) L1 G ( s) L1 s ? Question 2. (1) Referring to Eqn. (1), what is the slope of the system’s unit step response after the transient response has died away? Slope ? ? Create a simulink model akin to that of Figure 1, add a unit step input (in Volts) and a scope to capture the output angle (in radians). Use the “real hardware” values for K and a (i.e., G physical ( s ) ) which you obtained in Lab 4 (see Eqn. 1.4)1. Paste a copy of your model in Figure 2. Run your simulation for two seconds and insert a copy of the resulting step response into Figure 2. 1 Every motor in the Lab will have slightly different parameters. Names of Students in the Group Page 4 of 11 EE 402 Control Systems Lab Spring 2016 Figure 2 Simulink model (left) and unit step response (right) 1.b. Closed-Loop Analysis By applying closed-loop feedback we can dramatically change the behavior of a system. Figure 3 shows the application of a unity gain feedback loop to the original system. QUBE DC Motor Ea ( s ) + K sa - speed 1 s ( s ) angle Unity Feedback Figure 3 A simplified unity feedback closed-loop configuration Question 3. What is the transfer function of the closed-loop system? Please ensure that the coefficient of the s2 term in the denominator is 1 (i.e., a monic polynomial). GCL ( s ) Question 4. ( s ) ? 2 Ea ( s ) s ? s ? (2) Using your values for K and a from Lab 04, is this system, GCL ( s ) , stable, marginally stable, or unstable?? _______________ Update your Simulink model to perform unity closed-loop feedback, as shown in Figure 3. Paste a copy of your updated Simulink model into Figure 4. Run your simulation for two seconds (step time = 0!!) and insert a copy of the resulting step response into Figure 2. Names of Students in the Group Page 5 of 11 EE 402 Control Systems Lab Spring 2016 Figure 4 Updated Simulink model (left) and unit step response (right) Recall that the transfer function of a generic underdamped 2nd order system can be described as G( s) n2 s 2 2n s n2 (3) with a corresponding unit step time response of (see textbook page 173) of c(t ) 1 1 ent cos( nt ) (4) . 1 2 where 1 2 and tan 1 Task 2. By comparing Eqn. (3) with Eqn. (2) determine the expression for the following quantities in terms of and n : K ? (5) a ? (6) By observing the undamped 2nd order step response (see Figure 5) and recalling that the overshoot is only a function of the damping ration (textbook page 176) %OS 100 e / 1 2 (7) we can solve for the damping ration as Names of Students in the Group Page 6 of 11 EE 402 Control Systems Lab Spring 2016 ln(%OS /100) (8) 2 ln 2 (%OS /100) Furthermore, knowing the time to peak ( T p ) and the damping ratio defines the natural frequency ( n ) via TP n 1 2 . (9) Figure 5 A generic underdamped 2nd order unit-step response 4. EQUIPMENT AND PROCEDURES Starting with your Simulink model from Lab 04, or otherwise, develop a Simulink model to drive the QUBE-Servo motor with a unit step input and now plot angle in radians, as your output (NOT speed). 4.i. Open-Loop Response Place your previously developed open-loop simulation model (see Figure 2) in parallel with the realhardware, as shown in Figure 6. Run the model for 2 seconds. Names of Students in the Group Page 7 of 11 EE 402 Control Systems Lab Spring 2016 Figure 6 Open-loop model: Simulation vs real-hardware Export the scope date to MATLAB and plot (legend, title, … ) the two open-loop unit step responses in Figure 7. Figure 7 Open-loop response: Motor angle - simulation vs real-hardware Names of Students in the Group Page 8 of 11 EE 402 Control Systems Lab Spring 2016 4.ii. Closed-Loop Response Place your previously developed closed-loop simulation model (see Figure 3) in parallel with the realhardware, as shown in Figure 8. Run the model for 2 seconds. Figure 8 Closed-loop model: Simulation vs real-hardware Export the scope date to MATLAB and plot (legend, title, … ) the two closed-loop unit step responses in Figure 9. Figure 9 Closed-loop response: Motor angle - simulation vs real-hardware Names of Students in the Group Page 9 of 11 EE 402 Control Systems Lab Spring 2016 5. RESULTS AND DISCUSSION As is often the case theory and practice do not often exactly coincide. In this section we will use the data collected from the open-loop and closed-loop unit-step responses, for both the simulated model and real-hardware, to estimate the parameters of appropriate transfer function models. 5.i. Open-Loop Response Assuming the motor’s open-loop transfer function to be of the form G ( s) ( s) K , Ea ( s) s s a referring to Figure 7, determine which parameters of this model can you estimate from the real-hardware response and the simulated response. List the parameters and values in Table 1. Table 1 Comparison of estimated DC motor parameters from open-loop response Parameter From Simulated Response From Real-Hardware Response Measured ?? Calculated ?? 5.ii. Closed-Loop Response Assuming the motor’s closed-loop transfer function to be of the form which you determined in Eqn. (2), referring to Figure 9, decide which parameters of this model can you estimate from real-hardware response and simulated response. You may use Table 2 to guide you, however, it is not the only valid approach. Calculated Measured Table 2 Comparison of estimated DC motor parameters from closed-loop response Parameter From Simulated Response From Real-Hardware Response Mp OS (in%) Tp n K a Compare the values for the K and a parameters (real-hardware case) which you calculated in this Lab vs the values obtained during Lab 04 using Table 3. Table 3 Comparison of estimated DC motor parameters Lab# / Parameter K a Lab 04 Lab 05 Names of Students in the Group Page 10 of 11 EE 402 Control Systems Lab Spring 2016 6. CONCLUSION What can you say (qualitatively) about the differences between the simulated and real DC motor responses (both open- (Figure 7) and closed-loop (Figure 9) cases)? Question 5. BONUS QUESTION (+5%): Referring to Figure 9, how would you improve the match between simulation and real-hardware? Implement your suggested changes to the simulation model, regenerate the plot, and past into Figure 10 to hopefully illustrate the improvement. Figure 10 Improved closed-loop response: Motor angle - simulation vs real-hardware 7. REFERENCES [1] www.quanser.com Names of Students in the Group Page 11 of 11