Lesson 16
1 Learning Objectives
By the end of this lesson students will be able to:
- Explain the difference between second-order transient system responses with and without feedback
- Explain the effect controller gain has on system output for second-order systems
- Calculate the output and/or transfer function of a system with feedback and a disturbance
- Calculate the steady state value for second-order systems with feedback and a disturbance, given a step input
- Calculate and for second-order systems with feedback and disturbances if the controller is P or PD
- Calculate the steady-state output of a system given a step input and a P or PD controller
- Describe the effect a P or PD controller has on the system response
2 Introduction
We continue with our exercise to design a mechanical ventilator. We create a second-order model of the lung and investigate how the system response changes with this more accurate model. Then we start to investigate the effect of different controllers on system response.
3 Second-Order Model
To make the lung model more accurate, we need to also model the inertia of moving air. An inductor models the inertia of mass.
First, derive
Now that we have the controlled system transfer function, we can simulate the open-loop and closed-loop system response to various inputs.
3.1 Open-Loop Second-Order System
Using the open-loop system diagram from Lesson 15 as a guide, we write an equation for the output of the system. When done, we replace with the second-order system.
3.2 Closed-Loop Second-Order System
Next, using the closed-loop system diagram from exercise 1 as a guide, we write an equation for the output of the system. When done, we replace with the second-order system.
3.3 Student Exercise 1
Compare the responses of the open- and closed-loop systems in Simulink. Assume a step input of magnitude 1, cmH20 sec/L, L/cmH20, cmH20 sec/L, , , and . Write the steady-state value for the open-loop and closed-loop systems below. Run the simulation again with .
3.4 Student Exercise 2
In the model you used in the previous exercise, add a disturbance that is a step input of magnitude -0.5 and delay the disturbance by 0.75 seconds. Set and run both models. Record the steady-state value. Set and run again.
3.5 Summary of Second-Order Systems
- Feedback introduces a steady-state error
- An increase in gain increases the output of an open-loop system but reduces steady-state error in a closed-loop system; we cannot eliminate steady-state error completely
- Feedback and high gain reduce the impact of disturbances, but may alter type of system response
Be sure to save your models. We will continue using them.
4 Controllers
We have seen the effect of feedback on system response.
- In first- and second-order systems, feedback reduces the time constant but produces a steady-state error.
- In both types of systems, feedback makes the system less susceptible to disturbances.
- In second-order systems, increasing controller gain reduces , which can makes the system underdamped.
For the rest of this lesson, we focus only on second-order systems with feedback. We will look at ways to reduce the negative impacts of feedback on and steady-state error (i.e., controllers).
4.1 System Layout
When we talk about controllers, all systems will have this layout:
Since we will only use second-order systems:
The closed-loop feedback equation for the system above becomes
The difference between this system and the equations for a first-order system is that the controller block is labeled with instead of a constant and the feedback block is labeled with instead of a constant.
We will look at three types of controllers that can be plugged into the block:
- Proportional
- Proportional + derivative (PD)
- Proportional + integral + derivative (PID)
5 Proportional Controller
In a proportional controller, .
The equation for becomes
This equation is the same one from earlier in this lesson (if is set equal to ). This type of controller is called a proportional controller because it multiplies the error signal by a constant, .
Important features of this equation:
At steady-state there is an error between the output and input.
The natural frequency, , is modified by the presence of . The new effective natural frequency of the system becomes
- The damping ratio, , is modified by the presence of . The new effective damping ratio can be written
Important point. We want to be as large as possible to minimize the steady-state error. But large increases the natural frequency and decreases the damping ratio. An increase in natural frequency is desirable, a decrease in damping ratio is not, so the feedback improves the system in one area while degrading it in another.
6 Proportional + Derivative Controller
We are not limited to a single controller. We can add more, like this:
Now the controller contains a proportional controller and a derivative controller. In other words, .
The takes the derivative of the error signal and adds it to the result of the proportional controller.
Plug the new value for into the original equation and the equation becomes
Important points about this equation:
The natural frequency is only controlled by . We can increase to minimize steady-state error without affecting the damping ratio .
The damping ratio is now controlled by , , and . We can adjust without altering the other parameters (and changing ) to increase . Rearranging the term for gives
6.1 Student Exercise 3
Load the closed-loop model of your ventilator (without disturbance) from last time. Add a derivative controller to the proportional controller. Run the lung mechanics model with the following parameters. Assume a step input, cmH2O sec/L, L/cmH2O, cmH2O sec/L, , , , and . How does the response compare to just a proportional controller (i.e., )? What happens to the response if and ?
6.2 Student Exercise 4
Using the model you developed at the end of the last class, add a disturbance that is a step input of magnitude -0.5 and delay the disturbance by 0.75 seconds. Run the lung mechanics model with the following parameters. Assume a step input, cmH2O sec/L, L/cmH2O, cmH2O sec/L, , , . What effect does the disturbance have? Set all controller gains = 100. How does this change the response to the disturbance?
Main point. The derivative controller lets us control the steady-state error without negatively affecting damping ratio. The drawback to this type of controller is that we need an infinite value of to get zero steady-state error. To tackle this problem, we need another type of controller.