MecE420_Lab 3

pdf

School

University of Alberta *

*We aren’t endorsed by this school

Course

420

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

15

Uploaded by DrPencil277

Report
FEEDBACK CONTROL Lab 3 MEC E 420 Winter 2024 Lab 3: Advanced PI Control Instructor: Dr. Albert Vette Instructions Please complete the pre-lab section before the lab session. You will need the results from the pre-lab during the lab! The prelab will be submitted with the lab report after the completion of the lab. You may directly edit the lab pdf or can print and then scan the completed lab report for submission. The final submitted report must be in .pdf format and submitted to eclass before 8 pm on the day of your particular lab for marking. 3.1 Background 3.1.1 Set-Point Weighting In Lab 2, we introduced the standard PI control law, which allows for manipulation of two variables ( k p and k i ). In this lab, we will examine control design using a third variable, known as the proportional set-point ( b sp ). This provides an additional tuning parameter, which provides more flexibility in shaping closed-loop performance. A second set-point ( b sd ) will be introduced in Lab 4. The modified PI control law, which includes the effect of b sp , is given as, u ( t ) = k p ( b sp r ( t ) y ( t )) + k i Z t 0 r ( τ ) y ( τ ) (1) Taking the Laplace transform of Equation (1) and the results from Lab 1, we can derive the new closed loop control block diagram as shown in Figure 1. b sp k p s + k i k p s + k i k p + k i s v sd K K t T d K t τs +1 r + e u + + v m + + ω Controller Plant Figure 1: Detailed Block Diagram for QUBE Speed Control with Set-Point Weighting In Lab 2, we derived the effect disturbance torque had on the output velocity through the closed-loop transfer function G ω,T d ( s ). By inspection of Figure 1, this transfer function does not change when set-point weighting is used. 1
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3.1.2 Integrator Windup So far we have analyzed linear control systems. There is, however, one nonlinear phenomena that we have to deal with, namely saturation of the power supply. Since the maximum voltage the power supply can provide is ± 15 V, it is not possible for the actuator to deliver higher input values. The feedback loop is effectively broken when the amplifier saturates, because the actuator remains at its limit independently of the process output. If integral control is used, the integration of the tracking error, e , will cause the control input, u , to further exceed the actuator limit. This is called integrator windup, which prolongs saturation and decreases the performance of the closed-loop system. There are many ways to avoid integrator windup. One possibility is to introduce an extra feedback loop to remove the excess tracking error integrated during saturation, this is called back-calculation integrator wind-up. This is illustrated in the block diagram below. b sp k p + k i s k p + k i s sat 15 () a w s r + y = ω m + v u + e s + For the QUBE motor, the model of the actuator is u ( t ) = sat 15 ( v ( t )) with the saturation function defined as: sat 15 ( x ) = 15 x < 15 x 15 x 15 15 x > 15 Here the additional integration term sums up the control input when the desired voltage output is greater than what is physically available from hardware. We then multiply this integrated term by a weighting factor, a w , which then is subtracted from the main error integration. The extra feedback loop with gain a w has no effect if the computed control signal, v , does not saturate, since in this case we have u = v . Conversely, if this signal does saturate, the extra feedback loop drives the saturation error, e s , to zero. This means that the control signal, u , will leave its saturation limit as soon as the tracking error, e , decreases. The windup protection is governed by the gain a w which is allowed to vary. There is no protection against windup if a w = 0. Then as a w increases the integrator output is reduced. 3.1.3 Tracking Triangular Signals So far we have considered tracking of reference signals in the form of steps. We will now investigate tracking of ramp references as well. The standard equation for a ramp reference signal, r r , is given by, r r ( t ) = R 0 t (2) Page 2
MEC E 420 Lab 3: Advanced PI Control Winter 2024 Unlike a step input, a ramp input is unbounded. This makes it very difficult to examine the effects of an actual ramp in an experimental setting. Thus, in order to examine the effects of a ramp, a triangular “sawtooth” waveform will be used. In the experimental portion of this lab, the Simulink system block Triangular Signal allows us to set frequency, f 0 . The amplitude, A 0 , of this waveform must be controlled by a gain block as the triangular signal generator is limited to an amplitude of one. The definition of the variables are shown in Figure 2. The resulting slope, R 0 , is given by, R 0 = 4 f 0 A 0 (3) Figure 2: Sawtooth Slope Calculation Page 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3.2 Prelab In Prelab 2, you calculated numerical values for k p and k i . Their numerical values are listed in the table below. The values for K and τ are already in the table and they are the values tuned for model fitting in lab 1. Parameter Numerical Value K 24.06 τ 0.1684 k p 0.1824 k i 1.792 Table 1: Previous Lab Results Please answer the following questions. 1. Derive the closed-loop transfer function G ω,r ( s ) using the block diagram in Figure 1. 2. Derive expressions for k p , k i such that the denominator of the closed-loop transfer function G ω,r ( s ) (i.e. the charac- teristic polynomial of the system) takes the form s 2 + 2 ζω n s + ω 2 n Page 4
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3. Substitute these expressions into G ω,r ( s ). Take the value ζ = 1, i.e. a critically damped system, but leave the other parameters as symbolic variables. 4. The transfer function in Question 3 is a critically damped second-order system. In order to obtain a faster step response, we will employ b sp to reduce G ω,r ( s ) to the first-order (non-oscillatory) system form G des ω,r ( s ) = ω n s + ω n with the same (unity) DC gain as the second-order system. Obtain an expression for b sp to achieve this (hint: start by factoring the denominator). 5. Given that ω n = 16 rad/s evaluate the value of b sp . Use the numerical parameters for k p and k i from Table 1. Page 5
MEC E 420 Lab 3: Advanced PI Control Winter 2024 6. For the control system in Figure 1, find the expression for G e,r , the transfer function from reference input r to tracking error e = r ω . Hint: by linearity, G e,r = G r,r G ω,r = 1 G ω,r . 7. Find the steady-state tracking error e ss for a reference ramp input: r ( t ) = R 0 t . (Hint: use Final-Value theorem). What happens to e ss if b sp = 1? What happens if integral control were turned off ( k i = 0)? 8. Using the numerical parameters from Table 1 and the b sp value from Question 5, determine the steady-state error for a ramp input r ( t ) = 20 t . Page 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3.3 Experiment Simulink Model Startup To start and use the PI Speed Control model for lab 3, follow the steps below: 1. Power on and connect the QUBE to the computer. 2. Start MATLAB and open and run the parameters file named Lab3.m . 3. The PI Speed Control Simulink file specific to Lab 3, named Lab3.slx opens along with the parameters. The Simulink block model should look like the one in Figure 3. 4. Ensure the Reference Switcher is on the Signal Generator side. The Triangular Generator will be used later. 5. You are now ready to run the model. Follow the steps in the questions. Figure 3: Simulink Model of PI System for Lab 3 The controller and plant subsystems can be opened to see the PID Controller and the set point controller. Number Description Number Description 1 HIL-1 Initialize 6 Signal Offset (reference offset) 2 Controller 7 Triangular Amplitude Gain 3 Plant 8 Reference Signal Switch 4 Signal Generator (reference speed) 9 Control Parameters Editors and Display 5 Triangular Signal Generator 10 Scopes Table 2: PI Controller System Page 7
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3.3.1 Ziegler-Nichols Tuning Rules The gains of a closed-loop PI control can be obtained from empirical tuning rules. The first such rules were developed by J.G. Ziegler and N.B. Nichols in 1942. Their method proceeds as follows: using a reference r step input, the integral gain k i of the controller is set to zero, and the proportional gain k p is gradually increased. As you saw in Lab 2, this results in an increasingly oscillatory step response y . The proportional gain is increased until the system becomes critically stable , meaning the step response is purely oscillatory. The corresponding gain k pc and measured period of oscillation T pc are recorded. The PI controller gains are then calculated as: k p = 0 . 45 k pc , and k i = 0 . 54 k pc T pc . (4) Note the Ziegler-Nichols rules were designed to yield closed-loop systems with good load disturbance rejection. As such, they tend to provide large overshoots when used for reference tracking. For this reason, the resulting gains typically require further manual tuning to obtain satisfactory performance. Please follow the steps below: 1. Set the parameters in the Signal Generator as shown below. Remark: these lead to a pure proportional controller with a low gain. Wave Amplitude Frequency Offset k p k i b sp a w Form [rad/s] [Hz] [rad/s] [V.s/rad] [V/rad] Square 25 0.15 50 0.1 0 1 0 Table 3: Module Parameters for Ziegler-Nichols Rules 2. Slowly increase the proportional gain parameter, using increments of approximately 0.1 V.s/rad. Determine the critical gain, k pc , where the system becomes critically stable. Determine the critical period T pc of the corresponding oscillations. To find the period, you must zoom in on the oscillating sections of the angular speed scope and measure it. Use the Zoom X function in the scope graphs and then the Cursor Measurement to obtain the period. A step-by-step diagram is given in Figure 4. Figure 4: Steps to Find T pc Page 8
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3. Using the Ziegler-Nichols method defined by Equation (4), determine the PI controller parameters k p and k i from the k pc and T pc values you found.. 4. Now set the parameters of the PI Speed Control module window as listed below. Wave Amplitude Frequency Offset b sp a w Form [rad/s] [Hz] [rad/s] Square 25 0.15 50 1 0 Set the proportional and integral gains to the values you found in Question 3. Comment on the closed-loop perfor- mance obtained. Include a sketch of a representative screen shot. Page 9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
MEC E 420 Lab 3: Advanced PI Control Winter 2024 5. As stated previously, the Ziegler-Nichols gains often need to be manually tuned to obtain better performance. The rules are used to get the initial gains that must then be tuned. Adjust the k p and k i gains manually to reduce overshoot while keeping the settling time same as before. Provide your k p and k i values and include a sketch of a representative screenshot. (Hint: you’ll need to reduce the values of both gains). 3.3.2 Set-Point Weighting Up to this point in the experiment, the set point weighting b sp has been 1. Now, the use of set-point weighting will be examined in this section. 1. Set the parameters of the PI Control module as listed below. Wave Amplitude Frequency Offset a w Form [rad/s] [Hz] [rad/s] Square 25 0.15 50 0 2. The set-point has a range of 0 b sp 1. Set the controller gain parameters ( k p and k i ) to those listed in Table 1. Slowly change b sp from 0 to 1 in offsets of 0.1. What happens as b sp changes? Page 10
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3. Now test your setpoint weight design, employing the value of b sp calculated in Prelab question 5 and the same k p and k i as in Table 1. Provide a sketch of a representative screenshot of your response. Does the response exhibit the designed first-order characteristic? 3.3.3 Integrator Windup The behavior of a control system can often be captured by linear models. Saturation is a non-linearity that is present in practically all systems. Saturation can cause windup in all controllers that have integral action. Integrator windup is demonstrated in the following procedure. Set the parameters of the Simulink model as given in the table below. These values are chosen specifically to show saturation of the QUBE power supply. Note, the anti-windup protection is initially disabled by setting a w = 0. The Simulink system was made to output both the unsaturated and saturated voltage. The solid line displays the actual input voltage to the QUBE after the saturation ( sat 15 ( x )) is applied. The dotted black line is the commanded voltage that the controller tries to apply but is unable to because of the saturation system. Wave Amplitude Frequency Offset a w Form [rad/s] [Hz] [rad/s] Square 150 0.15 200 0 Table 4: Simulink System Parameters For Integrator Windup Test Page 11
MEC E 420 Lab 3: Advanced PI Control Winter 2024 1. Set the controller gains ( k p , k i ) and setpoint weight b sp to the values indicated in Table 1 and Prelab Question 5. What are your observations? Compare your response to the one previously obtained with the same controller but with smaller amplitudes for the reference step input. Include a sketch of a representative screenshot. The PI controller implemented by the QUBE uses a windup protection scheme that is governed by the gain a w . The windup protection design is detailed in Section 1.2. The gain a w , which ranges between 0 to 10, can be set on the control panel. So far we have used the default value ( a w = 0), meaning no protection against integrator windup. 2. We now investigate integrator windup protection. Keeping the same reference signal (Table 4) and controller gains as in the previous section, gradually increase the values of the parameter a w from 0 to 10 in steps of 0.5. Observe what happens. Are there any drawbacks in using high a w values? Describe your observations and include a sketch of a representative screenshot. Page 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
MEC E 420 Lab 3: Advanced PI Control Winter 2024 3.3.4 Tracking Triangular Signals In this part an experimental investigation of tracking triangular signals is performed. The parameters of the Simulink Parameters will need to be set to those in Table 5 below. Note that a triangular wave reference signal needs to be used. The default signal generator that has been used in the labs thus far does not include a symmetrical triangular signal. A separate signal generator for a triangular wave is included. There contains a switch in the Simulink system that allows you to choose either the default signal generator or the triangular signal generator. Switch to the triangular reference. NOTE: The Triangular Signal only has a frequency and phase control. The amplitude is fixed at 1 so the triangle amplitude gain block is needed to control the amplitude. Wave Amplitude Frequency Offset a w b sp Form [rad/s] [Hz] [rad/s] Triangular 50 0.1 100 0 1 Table 5: Simulink Module Parameters For Tracking Test Page 13
MEC E 420 Lab 3: Advanced PI Control Winter 2024 1. Using Equation (3), determine the ramp slope R 0 from the parameters in Table 5. 2. Set the switch to output a triangular signal with parameters listed in Table 5. Use a pure proportional controller with gain k p = 0.10 V s/rad and b sp = 1 . 0. What do you observe about the tracking error? Include a sketch of a representative screenshot. Does your result match the prediction from Prelab Question 7? 3. Now employ a PI controller whose gains ( k p , k i , and b sp ) are set to the values calculated in Table 1 and Prelab Question 5. Provide a screenshot and measure the steady-state tracking error obtained. How does the measured steady-state error compare to the value calculated in Prelab question 8? To find the steady state error, use the cursor measurement tool on the scope window. You will need to use the Trace Selection tool in Cursor Measurements to change between the reference and actual speeds to find the difference. the difference must be at the steady state. Figure 5 shows the navigation in cursor measurements to find e ss . Page 14
MEC E 420 Lab 3: Advanced PI Control Winter 2024 Figure 5: Steps to Find e ss Page 15
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help