Control strategies There are two basic strategies that can be used for cruise control: open-loop control and feedback co
Posted: Sun Jul 10, 2022 11:26 am
2. In feedback control, the vehicle's current speed is used to calculate how much gas or electricity should be supplied to the motor. If the vehicle is not moving fast enough, the supply is increased. If it moves too quickly, the supply is decreased. A Gas (Input) 60 mph Setpoint Controller Vehicle (plant) Current speed Feedback control the controller decides what the input should be based on the difference between the current and desired speed (called the setpoint). This is called "feedback control because the output of the system is "fed back into the controller.
50 setpoint task2= vd Simple open-loop control Simulink model Pro-tip: Double-click anywhere on the Simulink canvas and type the name of the block you want to add. 2.237 m/sto mph To create the model, use: . A Constant block with a value of 50 (this represents the setpoint of 50 mph). Double-click the constant block to change its value. . Two Gain blocks. The first is the gain controller. The second gain block should convert from m/s to mph, so set its value to 2.237. . A Scope block so that you can observe the speed. . Double-click the vehicle image to open the virtual vehicle dialog parameters. Set the Traction force saturation limit to 14800 and the Disturbance type to none. Task 2. Set the controller gain to 100. Does the vehicle reach the setpoint of 50 mph? to reach a top speed of 50 mph. This can be accomplished by adjusting the gain value
10 lask 3. Identify the value of the controller gain that causes the vehicle to reach a top speed of 50 mph. This can be accomplished by adjusting the gain value and rerunning the model until the maximum speed recorded by the scope is 50 mph. Try to get a gain value within +1 of the correct value (but it does not need to be closer than that). % Type your answer here (replace NaN with your answer) task3 NaN Test Task 4. Suppose that the plant is linear and the gain is set to the value you identified in Task 3. If the setpoint is changed to 70 mph, what top speed will be reached? % Type your answer here task4 NaN Task 5. In this task, you will check if the plant displays linear behavior a. Change the setpoint in the Simulink model to 60 mph. What is the final speed of the vehicle (round to the nearest mph)? % Type your answer here task5a NaN b. Increase the setpoint to 70 mph. What is the final speed of the vehicle (round to the nearest mph)? * Type your answer here task5b NaN Task 6. Based on your observations in Task 5, is the plant linear? task6
Task 7. Open-loop control can work under certain circumstances. However, disturbances present a problem for open-loop control. Consider the case where a vehicle drives up a hill. Gravity will cause the vehicle to slow down. However, the open-loop controller will have no knowledge of the change in the system, and so it will not compensate for the disturbance. To view this in the model, perform the following. . Double-click the virtual vehicle block and set the Disturbance type to hill. Set the disturbance height to 50 m. • Change the setpoint to 50 mph. Run the model. Notice in the Mechanics Explorer that the car slows down while going up the hill. • View the vehicle speed in the scope. What is the minimum speed reached while driving up the hill in mph? 2 Type your answer here task? - NaN Task 8. Set the Disturbance type on the virtual vehicle block to none to prepare the model for the next part of the lab. Part 2: Feedback control The main drawback of open-loop control is that it cannot account for disturbances in the system. For example, driving up a hill poses a real challenge for the open-loop cruise controller developed in the last section. On the other hand, a feedback controller modifies its behavior based on the system's current state. When driving up a hill, the feedback control loop will increase the engine supply as the car begins to slow. A simple feedback controller is the proportional controller. Proportional control can be summarized in two steps: 1. Take the difference between the setpoint (desired speed) and the output variable (current speed). This difference is the error e(t). 2. Multiply the error term by a constant gain k,, to generate the control signal u(r). This provides the input to the plant. Setpoint o- e(t) Controller kp. u(t) Plant - Output
Implement Task 9. Open the virtual vehicle model: VirtualVehicle.slx and implement the proportional controller. To do so, modify the model so that it matches the Simulink diagram below. 50 setpoint Virtual vehicle with a proportional controller VO 2.237 m/s to mph To create the model, use: . A Constant block with a value of 50 (this represents the setpoint of 50 mph). . A Sum block. In the block dialogue, set the Icon shape to round and the List of signs to 1+-, so that the block appears as shown. . Two Gain blocks. The first is the gain value for the proportional controller, k.,. The second gain block should convert from m/s to mph, so set its value to 2.237. . A Scope block so that you can observe the speed. . Double-click the vehicle image to open the virtual vehicle dialog parameters. Set the Traction force saturation limit to 14800, the Disturbance type to none, and turn on braking by checking Allow braking.
13 14 15 16 17 Task 10. Set k, = 1. Run the model and observe the output in the scope. What is the maximum speed reached in mph (round to the nearest hundredth)? Pro-tip: You can measure values in the scope using Cursor Measurements. From the Scope menu, select Tools > Measurements > Cursor measurements. Select and drag the vertical lines to change the measurement location. * Type your answer here task10 NaN Task 11. The speed reached by the vehicle is nowhere near the setpoint of 50 mph. The input to the virtual vehicle model has units of Newtons, so a gain of 1 is far too low to achieve the desired speed. Set A, - 5000 and rerun the model. What is the maximum speed reached in mph (round to the nearest tenth)? 2 Type your answer here task11= NaN Task 12. Try several different setpoints with the gain value. Does the feedback controller work across a broad range of requested speeds? task12- Test I Task 13. Notice that even with A, 5000, the system still does not exactly reach the setpoint. To understand why this happening, connect a scope to the output of the Gain block kp. Also, reset the setpoint to 50 mph. If correct, you should see this output
18 19 Test Task 13. Notice that even with A, 5000, the system still does not exactly reach the setpoint. To understand why this happening, connect a scope to the output of the Gain block kp. Also, reset the setpoint to 50 mph. If correct, you should see this output: D Scope connected to the control signal (1) By connecting the scope to the output of the gain block, you are viewing the control signal (r). You should notice that the control signal is very large at the start of the simulation. At this time, there is a significant difference between the setpoint and the current speed, so the error is substantial. This induces the car to accelerate quickly. When the current speed is close to the setpoint, the control signal diminishes alongside the error. What is the steady value of the control signal? % Type your answer here i task13 - NaN In the steady state, the control signal is nonzero and is, in fact, quite large. However, the vehicle does not continue to accelerate because of the frictional forces acting against the vehicle. This implies that when the vehicle reaches its steady state, there is a difference between the speed of the vehicle and the FOD
18 19 20 21 X Lab1_CruiseControlmix x + Lab4 PositionAnalysismix By connecting the scope to the output of the gain block, you are viewing the control signal w(r). You should notice that the control signal is very large at the start of the simulation. At this time, there is a significant difference between the setpoint and the current speed, so the error is substantial. This induces the car to accelerate quickly. When the current speed is close to the setpoint, the control signal diminishes alongside the error. What is the steady value of the control signal? 22 * Type your answer here task13 NaN In the steady state, the control signal is nonzero and is, in fact, quite large. However, the vehicle does not continue to accelerate because of the frictional forces acting against the vehicle. This implies that when the vehicle reaches its steady state, there is a difference between the speed of the vehicle and the setpoint. This is known as steady-state error. Adding an integral term to the controller (creating a PI controller) is one method to reduce the steady-state error. Task 14. Feedback control is often more robust than open-loop control. To view this in the model, perform the following. . Double-click the virtual vehicle block and set the Disturbance type to hill. Set the disturbance height to 50 m. • Ensure that the setpoint is 50 mph and then run the model. Notice in the Mechanics Explorer that the car slows down while going up the hill. • View the vehicle speed in the scope. a. What is the minimum speed reached while driving up the hill in mph (round to the nearest mph)? % Type your answer here task14a NaN b. Does the proportional controller control perform better or worse than the open-loop controller while the vehicle is driving up the hill? task14b-