• We can use the system transfer function to calculate the acceptable range of controller time.. real system differential equations difference equations estimated values realizability tr
Trang 14.4.3 Cascade
• By adding extra feedback loops we can add levels of robustness to a control system
• In this case the control loops appear to be nested
• Consider a cascade control system for disturbances,
c n
r n
- =
+
-+
-+
+
d n
r n
G c
2
G c
1
Trang 2• Now consider a cascade controller for a multistage process, such as a sewage treatment plant with sequential tanks with varying flow rates Here the disturbance would be the sewage flow-ing into the first tank the two process blocks are the treatment tanks The output is water returned to rivers The controllers vary the flow rates by looking at parameters for both tanks
• To do design/analysis for these controllers we do an analysis of the innermost feedback loop This then becomes a process, and we do design/analysis at the next higher loop
• Select controllers for the system pictured below,
+
-+
-+
+
r n
d n
G c
2
r n
H f
Trang 3
-+
-+
+
d n
r n
5B
1–B
- r n
G c
2
G c
1
1 Design for Gc1 as if the disturbance and Gc2 are not present
2 Design for disturbance minimization with Gc2
Trang 44.5 SAMPLE TIME
• In deadbeat type controllers we do not typically see mentions of the sample period, but in most practical systems we see a mention of the sample time ‘T’
• We can use the system transfer function to calculate the acceptable range of controller time In all cases the lower sample period is 0, but for practical reasons we may want to make this larger
• A shorter sample time requires a faster computer, and steals cycle time from other processes
• The general procedure is,
1 Find the characteristic equation of the overall system transfer function
2 Determine the roots (symbolically) of the equation
3 Select values of ‘T’ that ensure that all of the roots have a value of 1 or more
4 Select a sample time that is less than the longest time
• Consider the example below,
B2+TB–2T2
-= Find the sample time T required for stability,
B2+TB–2T2 = 0
First, we find the characteristic equation, and solve for the roots, when the roots are
B –( )T ( )T 2
4 1( )(–2T2)
–
±
2 1( )
- T
2
-(–1± 1+8) T
2 -(–1±3) 1
T = 1 0.5,
Based on these results we can now determine the stable region
Trang 54.6 SUMMARY
• The following is a map of techniques that show typical uses of the mathematical technique cov-ered so far
real
system
differential
equations
difference
equations
estimated
values
realizability
transfer function
controller equation
block diagram
desired behavior
design techniques
system transfer function
pick sample time
stability analysis
input function
output function
input functions from data
input function
value table error functions
steady state
b-shift table
b-shift algebra
difference equation
B-shift
table
partial fractions
or long division
transfer function
feedback equation
transfer function
final value theory
characteristic equation
transfer function table
calculations
Trang 64.7 PRACTICE PROBLEMS
1 a) We are developing a freight elevator control system The first major task is developing a height positioning controller The elevator is moved to a new floor by issuing a step function for the new floor height The transfer function below relates the voltage supplied to the eleva-tor moeleva-tor to the height of the elevaeleva-tor Develop a controller transfer function that has a first order response, and draw a complete block diagram
b) Develop the discrete equation for the controller if the time constant for the first order response
is 5 seconds and the sampling time is 1 second
2 c) Write a computer program (in the computer language of your choice) that implements the controller in question 1 Assume the input and output values are set using the two functions below
3 Redraw the following system and add a feedforward controller Develop the function used for the feed forward controller
4 The control system below will be used for positioning the height of an elevator
1–0.5B
-=
INPUT() - This function will return the elevator height in feet (floating point) OUTPUT(value) - This function will set the output voltage at ‘value’
+
_
10–B
B 1( –B)2
-B+5
B–1
-B+2
Trang 7a) Find a controller transfer function that gives a first order response for a time step of T=1 and a time constant of 3
b) Develop the discrete equation and determine if the controller is realizable
c) Develop a transfer function for the final system and determine if the system is stable
4 We want to design a control system to minimize the effects of disturbance Given a step input of magnitude 1, we are willing to accept a maximum error of 0.5 for one time step
a) Find a controller transfer function
b) Develop the discrete equation for the system and determine if the controller is realizable?
1–B B
-G c
-ANS
0.283B2
1–2B+B2
-= b) realizable
1–0.717B
1–B
-=
ANS
10 0.5 1( –B)2
–
5B 1( –B)
-= b) not realizable m
n m n–1 9.5
5
-e n+1 1
5
-e n 0.5
5
-e n–1
–
=
Trang 85 DISCRETE SYSTEMS
• When dealing with computers we will sample data values from the real world These sampled values can then be used to estimate how a system will behave
• The term ‘discrete’ refers to the use of single sampled values, instead of a continuous functions You will see that the difference is between weighted sums and integrals
5.1 DISCRETE SYSTEM MODELLING WITH EQUATIONS
• We can write a differential equation, and then manipulate it to put in terms of time steps of length ‘T’
• In review consider how we can approximate derivatives using two/three points on a line
T - Sample Period
sampled values
Trang 9• Consider the example,
y i–1
y i+1
t i
y i
t i–1
t i+1
y t( )
y t( )i
t i 1
t i
∫ y i+y i–1
2
i–t i–1
2
- y( i+y i–1)
=
d dt
-y t( )i y i–y i–1
t i–t i–1
t i+1–t i
T
- y( i–y i–1) 1
T
- y( i+1–y i)
d dt
-
2
y t( )i
1
T
- y( i+1–y i) 1
T
- y( i–y i–1)
–
T
T2
-=
If we read the flow rate of oil in a pipeline once every hour for three hours The read-ings in order are 1003, 1007, 1010 What is the integral and first and second deriva-tives for the values?
Trang 105.1.1 Getting a Discrete Equation
• First, consider the example of a simple differential equation,
• We can continue the example and use this equation to simulate the system Here the ‘x’ values are given, and the first ‘y’ value is assumed to be 0 Assume T=0.5 and K=0.2
d
dt
-
y t( ) = Kx t( )
y T( ) Kx t( )d t
∞
–
T
∫ Kx t( )d t
∞
–
0
∫ Kx t( )d t
0
T
∫
+ y0 Kx t( )d t
0
T
∫ +
We can solve the differential equation at time T, assuming that the slope is constant and known,
The equation above is developed for a time T after zero We can manipulate it so that it
will be valid for any point in time,
y T( ) = y0+K x( )0 T
y n
∴ = y n–1+K x( n–1)T
y n–y n–1
∴ = K x( n–1)T
y T( ) = y0+K x( )0 T
Now we can assume that the velocity ‘x(t)’ is constant,
ASIDE: The approximations above can
be shown using a slope approxi-mated with two points on a curve
for this particular differential
∆y = x0t
equation we can assume
say d
dt
-A = V
Trang 11• Find the discrete equation for the differential equation below Then find values over time.
• We can expand this model by also including a ‘disturbance’ This can be used to model random
0
1
2
3
4
5
6
7
8
9
10
11
12
13
0 0 1 1 1 1 1 1 0 0 0 0 0 0
0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.7 0.7 0.7 0.7 0.7
0 0 0.1 0.1 0.1 0.1 0.1 0.1 0 0 0 0 0 0
d
dt
-v 1
M
-F
=
Trang 12noise, or changes in system loading, found in all systems.
5.1.2 First Order System Example
• The water tank below has a small outlet, and left alone the fluid level in the tank will drop until empty There is a valve controlled flow of fluids into the tank to raise the height of the fluid
d
dt
-
y t( ) = Kx t( )+d t( )
Go back to the original differential equation, and add a disturbance term ‘d’ that
y T( )
∞
–
T
∫ d t( )d t
∞
–
T
∫
+ Kx t( )d t
∞
–
0
∫ Kx t( )d t
0
T
∫ d t( )d t
0
T
∫
y n
∴ = y n–1+K x( n–1)T+d n–1T
y n–y n–1
∴ = K x( n–1)T+d n–1T
y T( ) = y0+K x( )0 T+d0T
appears for a single sample,
d t( )d t
∞
–
0
assume
h
water flow out
water flow in
water tank valve
θ
q i
q o
A = Area of tank (i.e., fluid surface)
Trang 13The water flow rate out of the tank is approximately a function of the hydrostatic
pressure caused by the water level in the tank,
q o = K o h
The inlet valve can be (very roughly) approximated with a simple equation,
q i = K iθ
We can now relate these components to find the fluid height in the tank,
∆V q i–q o A d
dt
-h K iθ–K o h
A d
dt
-h
∴ = K iθ–K o h
t A
K o
-
-–
K i
K o
-
θ
tK o A
K o
-
θ0
+
The general form of solution for this differential equation for h is, (we will review later)
K o
-
θ0
+
=
We can find the value of coefficient C by setting time to zero,
C
K o
-
θ0
–
=
K o
-
θ0
–
K o A
-
K o
-
θ0
t K o A
-
–
θ0 K i
K o
-
t K o A
-
K o
-
+
+
The final form of this equation can be constructed, by separating out height and valve angle,
h T h0 e
T K o A
-
–
θ0 K i
K o
-
T K o A
-
K o
-
+
+
= Put in terms of a time step, to prepare to make discrete,
h n h n–1 e
T K o A
-
–
θn–1 K i
K o
-
T K o A
-
K o
-
+
+
=
Then to a discrete form, as a difference equation,
transient + steady state
A d
dt
-h
∴ = K iθ–K o h
Trang 14• This difference equation can then be used to predict fluid height If we change the valve posi-tion, this will also be reflected in the calculated values
egr450.0.mcd
• Now try varying the input valve angle,
Use the parameters given to calculate the height of the water in the tank over time initial height =1 m
surface area = 2 m2
Ki = 1 liter/min/degree
Ko = 2 liter/min/m
valve angle = 20 degrees
T = 30 sec
Trang 155.1.3 Second Order System Example
• Consider the second order example below,
Using all of the conditions outlined before, find out what happens when the valve angle is changed to 10 degrees after 10 seconds
Trang 16• try the following problem.
d dt
-
2
y = Ax
First, the basic equation,
Second we begin to integrate, starting at time zero, to time T to get difference equations
d dt
-
y
T Ax0T d
dt
-
y 0
+
=
d dt
-
2
y T = Ax0
y T Ax0T
2
2
- d
dt
-
y
0T y0
=
d dt
-
y
n
d dt
-
y
n– 1
–
y n–y n–1
2
2
- d
dt
-
y
n– 1T
+
=
These equations can be solved in two steps, or we can recombine them to get a single differential equation We do this by rearranging the last difference equation, and then we substitute this into the previous difference equation
dt
-
y
n– 1 y n–y n–1 Ax n–1T
2
2 -–
=
d dt
-
y
n
T
-y
n+ 1
1
T
-y n
– Ax n T
2 -–
=
d dt
-
y
n
d dt
-
y
n– 1
T
-y
n+ 1
1
T
-y n
– – x A n T
2
- 1
T
-y n
T
-y
n– 1 Ax n–1T
2
2y n
– +y n–1+y n+1
2
2 -–Ax n–1T2 Ax n–1T
2
2 -+
= This can then be shifted back in time one step to make it more useful
2y n–1
– +y n–2+y n
2
2 - Ax n–2T
2
2 -–
=
y n
∴ 2y n–1–y n–2 Ax n–1T
2
2 - Ax n–2T
2
2 -–
+
=
(1)
(2)
(2)
(1)
Trang 175.1.4 Example of Dead (Delay) Time
• In a real system there is a distance between an actuator, and a sensor This physical distance results to a lag between when we actuate something, and when the sensor sees a result
• Assume we have a simple process where after a change in x there is a delay of ‘m’ time steps before the proportional change occurs in y We can write the equation as,
• Consider the example,
Calculate the position of a 5 Kg mass if a force of 2N is applied for 5 seconds and then removed Try the calculations using a 1 second and a 2 second period
y n = Ax n–m
Trang 185.2 DISCRETE CONTROLLERS
• The system models we developed before allow us to predict how a system will behave A sepa-rate, and important topic is computer control
• With no controller we would set an input, and hope for an output For example, push the gas pedal and hope for the right speed
• A controller looks at the desired system condition, and the actual system condition, and then adjusts the input to bring the desired and actual closer For example cruise control
• The diagram below is a representation of a simple control system add to in the previous tank example,
Calculate the position of a 5 Kg mass if a force of 2N is applied for 5 seconds and then removed There is a one second delay between the time that the force is applied, and when the effects are apparent on the mass
Trang 19• We have already dealt with deriving an equation for the process In this case it was the valve tank combination discussed before By itself the tank is an open loop system, we set the valve angle and hope for a liquid level
•Next, we need to find an equation for the controller This equation can be highly dependent upon the control method to be used If we are to use a computer it is best to have a simple equation,
as shown below, (NOTE: the form of the equation, and the values of the coefficients change the nature of the control problem)
• The controllers (equations) that follow will be put in the above form These controllers can also
be used individually, or combined to get more complex properties
• Keep in mind that the typical objective of a control system is to minimize the error between the input and output Another common goal is to do this as quickly, or efficiently as possible One constraint we must observe is that the system should not become unstable
Controller
Feedback
Process h actual
To make notations more generic we will associate stock variables for desired and actual positions, as well as error, and controller output We will also add the discrete
timestep subscripts used before,
r n = h desired
c n = h actual
+
-e n = r n–c n
m n = θ
(valve/tank)
m n = m n–1+K0e n+K1e n–1+K2e n–2+K3e n–3+K4e n–4+…
m n–m n–1 = K0e n+K1e n–1+K2e n–2+K3e n–3+K4e n–4+…
The basic difference equation is,
The ‘output oriented’ form is shown below,
Trang 205.2.1 A Proportional Controller
• One of the simplest controllers is the proportional control,
• The magnitude of K will determine how fast the system responds If the value is too large the system will oscillate and/or become unstable (i.e flood or go empty) If too small the system error will be very large (ie, the tank will never reach the right height.)
• This type of controller will always have a small error between the actual and desired values
• For the water tank (from before) add a controller, and try varying ‘K’ values
m n = Ke n
This can be put in discrete form easily,
The basic proportional equation is,
m n–m n–1 = Ke n–Ke n–1
Finally this can be put into the general form seen before,
m
∴ n = m n–1+Ke n–Ke n–1
Note: This form will be more useful when dealing with more complex controllers
h n h n–1 e
T K o A
-
–
θn–1 K i
K o
-
T K o A
-
K o
-
+
+
=