110 likes | 228 Views
Controls Lab (2 nd Week) . Objectives cont. Qualitatively observe the effects of the P, I, and D gains. Test the performance of the previously developed P, PD, and PID position controllers on a brushless DC motor. Adjust the PID gain to improve system performance. Post-laboratory work:
E N D
ME 4053: Controls Controls Lab (2nd Week) Objectives cont. • Qualitatively observe the effects of the P, I, and D gains. • Test the performance of the previously developed P, PD, and PID position controllers on a brushless DC motor. • Adjust the PID gain to improve system performance. • Post-laboratory work: • Compare the empirical performance of the various controllers to each other and to the simulated performance
ME 4053: Controls Apparatus • PC • Quanser Data Acquisition • Amplifier • Motor and Flywheel • Encoder
ME 4053: Controls R(s) E(s) V(s) (s) C(s) = (s) GS GP Background – PID Performance Motor Transfer function (Position output) PID controller transfer function Feedback control block diagram
ME 4053: Controls Procedure: Qualitative Observations 1. Use “Control_Qualitative.mdl” as shown on Figure 5. 3. Specify gains (Kp,Ki,Kd) for P controller. 4. Build model and hit START. 5. For each controller turn the flywheel with your hand: (1) quickly, (2) slowly, and (3) turn and hold in position. 6. What aspect is the restoring force sensitive to? Record your observations in your lab notebook. 7. Repeat for I and D controllers.
ME 4053: Controls Quanser Consulting Quanser Consulting Transfer Fcn Figure 5. SIMULINK Model for Qualitative Observations
ME 4053: Controls Procedure: PID Controller Performance 1. Open Control_Template_2. Set constants according to TA instructions 2. Set Kp, Ki, and Kd to the values you calculated for each of the P controller. 3. RTW Build 4. Plot both the shaft position and the control signal (voltage) on the same graph by selecting Plot -> New -> Scope... from the WinCon Server toolbar and choosing Scope1a and Scope1b. 5. Run the controller for at least 1 complete period. 6. Save the graph with both variables plotted as an M-file. 10. Repeat for the PD, and PID controllers.
ME 4053: Controls 30 Pulse Generator Constant Block Diagram to Initiate Position Control of Motor Pulse Generator VALUES ASSIGNED IN Procedure! From : Simulink : Source (use time based) From : Simulink : Source Parameters Parameters Amplitude: Constant Value : Period : Pulse width : Phase Delay : Figure 8. SIMULINK Model used for Position Control of DC Motor
ME 4053: Controls Quanser Consulting Quanser Consulting MQ3 ENC MQ3 DAC Encoder Input Analog Output Quanser Consulting MQ3 Timer Time-Base 25s -K- s+25 Transfer Fcn Gain 0 Constant Sum Simulink and Quanser Blocks From : Quanser Library: Quanser Consulting MQ3 Series From : Quanser Library : Quanser Consulting MQ3 Series (leave parameters as default) (leave parameters as default) From : Quanser Library : Quanser Consulting MQ3 Series (leave parameters as default) From : Simulink : Continuous From : Simulink : Math Parameters Parameters Gain : 1/2000 Numerator : [25 0] Denominator : [1 25] From : Simulink : Source Parameters Constant Value : 0 From : Simulink : Math Parameters List of signs : |++ List of signs : |+++ Figure 9. SIMULINK and Quansar Blocks Used in Position Control
ME 4053: Controls Max. Overshoot 2% Settling time Procedure: PID Controller Performance 2 SCORE-Change • Open M Files. • Measure the maximum overshoot, the 2% settling time, and the steady-state error for each graph (where applicable) and record the information in Table 1. See Figure 10 for an example. • Calculate the “score” for the performance of the controller. • S=Omax x tsettle if steady state error is less than or equal to 0.5% • Adjust the gains of the best PID controller to improve the performance of the controller. Record the gains and the scores for each attempt in Table 1. Figure 10. Example measured quantities: settling time and max overshoot.
Non-Linear Simulink Model Verification: • Build the following Non-Linear Model to compare to experimental results. • The Transfer Fcn2 on the right is really just (Km / (Tm*s^2 + s)). • To Run your simulation, make sure to go to Simulation, then Configuration Parameters, and run Ode5, with a step size of 0.005. This will make your simulation run much quicker. Feel free to vary these values to make a higher resolution plot. • Slight modification to this model will give a linear version – to be tested as well. Which model works better? See Procedure Pulse Generator See Procedure Figure 11: Non-Linear Model ME 4053: Controls
Controller Kp (units) Ki (units) Kd (units) Max Overshoot (%) Settling Time (s) Steady-State Error (%) Score Ess<=0.5% Pth Pexp PDth PDexp PIDth n=n1 PIDexp n=n1 PIDth n=n2 PIDexp n=n2 PIDth n=n3 PIDexp n=n3 PIDadj PIDadj PIDadj Controller Performance Results Table 4. Simulation and experimental performance results for various controllers. ME 4053: Controls