Assignment title: Information


EEE 304 Lab Exercise 3: Linear Feedback In order to control the output of a system accurately and reliably, a control system is required. Without a controller, the system may drift or become unstable. Take the example of a car, where your foot is on the pedal and not making adjustments. If you enter a downward slope, the car may speed up; that could be dangerous! Closing the loop with a controller on the car, exactly what a cruise control does, will help keep the speed steady. This is an example where closed-loop control can help get rid of disturbances due to unmodeled dynamics. In another example, consider a pendulum with one end attached to a motor. In order to keep the pendulum upright many fast and accurate adjustments must be made. If a human operator attempts to do this and the pendulum rod is too short, the pendulum will fall from its upright position. A closed-loop controller with fast dynamics can however be able to stabilize the pendulum in the upright position. This is an example where an "unstable" plant is stabilized via closed loop control. What about disturbances? If you tap the pendulum gently it may even reject that disturbance and manage to stay upright! The above two examples serve as a brief introduction to the world of closed-loop control and why it is necessary in automation. You should get familiar with the basic concepts of linear feedback control systems from lectures, and this manual will not focus on teaching, rather on assignments. Any MATLAB command you may not have been introduced to in the previous labs will be provided. You are to complete all exercises and produce their results as asked in your reports.   EEE304 Lab 3 Answer Sheet Name: Date: Lab Description Write a paragraph explaining what you have learned from this lab exercise. Task 1 For the control system shown in Fig. 1, Figure 1. A closed loop control system with disturbance where P(s) is the transfer function of the plant C(s) is the transfer function of the controller r is the reference signal e is the error signal u is the output signal from the controller d is the disturbance signal y is the output signal Find the transfer function Tdy from the disturbance d to the output y (assume r = 0). Find the transfer function Try from the reference r to the output y (assume d = 0). If the transfer functions of the plant and controller are given as Plant: P(s)=1/s, (e.g., a normalized description of car velocity with force as the input; this can represent a cruise control system.) Controller: C(s)=K (s+z)/s, where K and z are constants. Verify that this is a PI controller. Show your work and state the expression for the P and I gains in terms of K and z. Show that if the input d is a step disturbance and C(0)=∞, the effect of d on y approaches zero as t→∞ and (Hint: Assume K,z > 0. Use the final value theorem.) Demonstrate your result by choosing the following different sets of values for K and z (varied by orders of magnitude) and plotting their closed-loop step response. Include MATLAB code and plots. Discuss your observation. K = 0.1, z = 0.1 K = 1, z = 1 K = 10, z = 10 Design a controller (select values of K and z) such that the following specifications are met: Target crossover frequency = 1 rad/s (approximately equal to the closed-loop bandwidth). Target phase margin is 60⁰. Show all your work and demonstrate your design meets these specifications by the use of "allmargin" command on the open-loop transfer function L(s) = P(s)C(s). (hint: "help allmargin" in Matlab). Include MATLAB code and results. Plot the closed-loop frequency and step responses from the reference input r to the output y. Show the achieved bandwidth by marking on the Bode plot with a "data cursor". Comment on how different, if so, it is from the specified bandwidth. Include MATLAB code and plots. (Read http://www.mathworks.com/help/matlab/creating_plots/data-cursor-displaying-data-values-interactively.html on how to use the data cursor.) Plot the closed-loop frequency and step responses from the disturbance d to the output y. Does the steady state error e become 0 when a step disturbance d is applied to this closed loop transfer function? Include MATLAB code and plots. Now design a proportional-only controller (i.e., C(s) = K) to have the same closed loop crossover frequency (bandwidth) = 1 rad/s. Show your work. You can ignore the phase margin requirement, since it cannot be modified without a zero in the controller. Repeat problem 2 c) part 2) and 3). Is an integrator needed in the controller? Explain your observation. NOTE: in order to form a closed loop transfer function you need to utilize the "feedback" command. Assuming you have created transfer function objects for both the plant and controller, i.e., P and C, the closed-loop transfer function from r to y, Try, will be computed as >> T_ry = feedback(P*C,1) Subsequently the bode plot and step response for Try can be found with >> bode(T_ry) >> step(T_ry) In order to compute the transfer function from the disturbance d to the output y, use >> T_dy = feedback(P, C) Task 2 This problem explores the effect of sensor noise on the input to the plant. Plant inputs are typically provided by actuators, e.g., valves, motors, and other mechanical components. High-frequency inputs to these actuators cause more stress, leading to shorter actuator lifetime and higher probability of actuator failure. The sensors that measure the output and feed it back to the controller are prone to high-frequency measurement noise. This problem will show the trade-off between bandwidth and high-frequency noise attenuation. Fig. 2 shows how sensor noise enters into the closed-loop system as the signal n(t): Figure 2. A closed loop control system with noise Given the plant P(s)=1/s, design a PI controller C(s)=K (s+z)/s as in Task 1, problem 2, part c), same phase margin but for a target crossover frequency of 10 rad/s. Repeat Task 1, problem 2, part c) 1) and 2). Compare the closed-loop frequency responses from the sensor noise n to the plant input u (Tnu = feedback(C, P)) for this controller and the controller you designed in Task 1, problem 2, part c) with crossover frequency 1. Comment on the difference and what you think is happening. Include MATLAB code and plots. In order to visualize the effects, you will now simulate the two closed loop responses in Simulink. At this point, we assume that you have transfer functions for both controllers. Create a Simulink model as shown below: In the top loop, use the controller with crossover frequency 1 and the bottom loop use the controller with crossover frequency 10. Use the following Simulink blocks: Sum (under Simulink->Commonly Used Blocks): "List of Signs", "|+-" for +- block and "|++" for ++ block Step (under Simulink->Sources) Transfer function (under Simulink->Continuous): specify numerator and denominator coefficients Band-limited white noise (under Simulink->Sources): noise power = 0.0001 Scope (under Simulink->Sinks): double click open scope, click parameters (next to the printer icon), change "number of axes" to 2. Now it can display two graphs. Run the simulation and provide plots of the output. Justify your answer to problem 2 using these step responses. Task 3 This problem studies the effect of unmodeled lag on closed-loop system behavior. The following transfer function represents a perturbation to the system in Fig. 1. Plant: P(s)=1/(s(as+1)) The term 1/as+1 can be viewed as a 1st order lag introduced by unmodeled actuator dynamics (engine; e.g., throttle to torque/force response) or sensor dynamics. The objective of this problem is to demonstrate that when such lags alter the system significantly around the crossover frequency, the closed-loop may become unstable and the controller must be redesigned. Notice that the achievable performance may no longer be the same. Consider the cases where a = 0, 0.1, 1, 10 and plot the closed-loop frequency and step responses from r to y for the same controller designed in Task 1, problem 2, part c). (Note: The case of a = 0 is the nominal plant with no lag.) Include MATLAB code and plots. For the case a = 10, redesign the controller to achieve 60o phase margin and crossover frequency of 0.036 rad/s. Demonstrate your design meets these specifications by the use of "allmargin" command on L(s) = P(s)C(s). Plot the closed-loop frequency and step responses from r to y. Include MATLAB code and plots. As you see, you were able to stabilize the controller but at the cost of bandwidth. The system is stable but sluggish now. You do not need to perform any further experiment but know that the sacrifice in speed would not have been necessary if a PID controller is used in this case rather than a PI. LAB 3: LAB REPORT GRADE SHEET Name: Instructor Assessment Grading Criteria Max Points Points Lost Template Neatness, Clarity, and Concision 2 Lab Description 8 Description of Assigned Tasks, Work Performed & Outcomes Met Task 1 15 Task 2 15 Task 3 10 Points Lost Lab Score (out of 50) Late Lab Lab Score