Colorado School of Mines CHEN403 Linear Open Loop Systems

advertisement
Colorado School of Mines CHEN403
Linear Open Loop Systems
Linear Open Loop Systems................................................................................................................................ 1
1st Order Systems................................................................................................................................................. 1
Example 1st Order Systems — Mercury Thermometer.................................................................... 2
Example 1st Order Systems — Mass Storage in Tank ....................................................................... 2
Response of 1st Order Systems ....................................................................................................................... 3
Determination of Coefficients from Data..................................................................................................... 6
Linearization........................................................................................................................................................... 8
1st Order Systems
Output modeled with a 1st order ODE:
a1
dy
+ a0 y = b ⋅ f ( t ) .
dt
If a0 ≠ 0 , then:
a1 dy
b
dy
+ y = f ( t ) ⇒ τp
+ y = K p ⋅ f (t )
a0 dt
a0
dt
where: τ p is the time constant.
K p is the steady state gain, static gain, or gain.
For deviation variables, where y ( 0) = f ( 0 ) = 0 , the Laplace transform will be:
( τ s + 1) y ( s ) = K f ( s )
p
p
⇒ G(s) =
y(s)
f (s)
=
Kp
τp s + 1
This transfer function is referred to as 1st order lag, linear lag, or exponential transfer lag.
But what if a0 = 0 ? Then:
a1
dy
dy b
dy
= bf ( t ) ⇒
= f (t ) ⇒
= K p′ ⋅ f ( t ) .
dt
dt a1
dt
For deviation variables, the Laplace transform will be:
1st Order Systems
-1-
December 21, 2008
Colorado School of Mines CHEN403
sy ( s ) = K p′ ⋅ f ( s ) ⇒ G ( s ) =
y(s)
f (s)
=
K p′
s
.
This transfer function is referred to as purely capacitive or pure integrator.
Kp
f (s)
y(s)
τp s + 1
f (s)
1st Order lag
K p′
y(s)
s
Pure Integrator
Example 1st Order Systems — Mercury Thermometer
Last time we developed the following equation for the reading from a mercury
thermometer:
mCˆ p dT
mCˆ p dT
= Ta − T ⇒
+ T = Ta
hA dt
hA dt
So this is a 1st order lag system with:
τp =
mCˆ p
hA
Kp = 1
Example 1st Order Systems — Mass Storage in Tank
Mass storage in a tank is a 1st order system, but we don’t know which type until we say
something about how the flow out of the tank is controlled.
F0, ρ0
h1, A1
F1, ρ1
For constant density & constant cross-sectional area:
d ( ρ1 Ah)
dt
= ρ0 F0 − ρ1F1 ⇒ A
1st Order Systems
dh
= F0 − F1 .
dt
-2-
December 21, 2008
Colorado School of Mines CHEN403
For flow through a valve where we can linearize to F1 ≈ Cv h = h / R , then:
A
dh
h
dh
= F0 −
⇒ AR + h = RF0 .
dt
R
dt
So this is a 1st order lag system with:
τ p = AR
Kp = R
However, if the flowrate out is controlled separately from the level in the tank, e.g., with a
pump, then:
A
dh
dh F0 − F1
= F0 − F1 ⇒
=
.
dt
dt
A
So this is pure integrator system with:
f ( t ) = F0 − F1
K p′ =
1
.
A
Response of 1st Order Systems
Look at response to 4 typical driving functions.
Impulse disturbance. f ( t ) = α ⋅ δ ( 0) ⇒ f ( s ) = α . So, if 1st order lag:
αK p
y(s) = G(s)⋅ f (s) =
Kp
τp s + 1
α=
τp
1
s+
τp
⇒ y (t ) = α
Kp
τp
e
− t / τp
If pure integrator:
y(s) = G(s)⋅ f (s) =
K p'
s
α ⇒ y ( t ) = αK p'
Unit step change. f ( t ) = α ⋅ H ( t ) ⇒ f ( s ) = α / s . So, if 1st order lag:
1st Order Systems
-3-
December 21, 2008
Colorado School of Mines CHEN403
y(s) = G(s)⋅ f (s) =
(
∴ y ( t ) = αK p 1 − e
1
τp 
α
= αK p  −
 s τ s + 1 
τp s + 1 s
p


Kp
− t / τp
).


1
1
= αK p  −
1
s
s+

τp







Notice that K p is the fraction of the value of the input disturbance that will show up on the
output signal. Also notice that the slope is:
αK p
dy αK p −t / τp
dy
e
=
⇒
=
dt
dt t =0
τp
τp
If the system would maintain its initial rate of change, then it would achieve it ultimate
value in one time constant, i.e., when t = τ p . In reality, the final value is reached in an
exponential decay manner — in reality, it takes about 4τ p to reach the ultimate value
(when y ≈ 0.98αK p ).
1.0
0.9
0.8
0.7
0.6
y/α
αKp 0.5
0.4
0.3
0.2
0.1
0.0
0
1
2
3
4
5
6
7
t/ττp
1st Order Systems
-4-
December 21, 2008
Colorado School of Mines CHEN403
If pure integrator:
y(s) = G(s)⋅ f (s) =
K p′ α αK p′
= 2 ⇒ y ( t ) = αK p′ t
s s
s
This shows the integrating nature of this type of 1st order process.
Ramp. f ( t ) = mt ⇒ f ( s ) = m / s 2 . So, if 1st order lag:
 1 τp
τ2p 
m
y(s) = G(s)⋅ f (s) =
= mK p  2 − +

s
τp s + 1 s2
s τ p s + 1 

Kp
(
∴ y ( t ) = mK p t − τ p + τ pe
− t / τp
).
At large times, then:
y ( t ) ≈ mK p ( t − τ p )
Again, K p is the fraction of the value of the input disturbance that will show up on the
output signal. Now τ p represents a time offset — how far behind the output signal lags
behind the input signal.
Sinusoidal Response. f ( t ) = α sin ωt ⇒ f ( s ) = αω /( s 2 + ω2 ) . So, if 1st order lag:
αωK p  τ2p
1 − τp s 
αω
y(s) = G(s)⋅ f (s) =
=
+


τ p s + 1 s 2 + ω2 1 + τ2p ω2  τp s + 1 s 2 + ω2 
Kp
αωK p  −t / τp 1

τe
+ sin ωt − τ p cos ωt 
2 2 p
1 + τpω 
ω

αωτ p K p − t / τp
αK p
αωτ p K p
y (t ) =
e
+
sin ωt −
cos ωt
2 2
2 2
1 + τpω
1 + τpω
1 + τ2p ω2
y (t ) =
There is a trigonometric identity:
p cos θ + q sin θ = r sin ( θ + φ )
where:
r = p2 + q 2
p
tan φ =
q
1st Order Systems
-5-
December 21, 2008
Colorado School of Mines CHEN403
So for this problem:
2
2
 αωτ p K p   αK p  αK p 1 + τ2p ω2
αK p
r= 
+
=
=


2
2
2
2
2
2

 

1 + τpω
1 + τ2p ω2
 1 + τpω   1 + τpω 
αωτ p K p
−
1 + τ2p ω2
= −ωτ p ⇒ φ = tan −1 ( ωτ p )
tan φ =
αK p
1 + τ2p ω2
and:
y (t ) =
αωτ p K p
e
1 + τ2p ω2
− t / τp
+
αK p
1+ τ ω
2
p
2
sin ωt − tan −1 ( ωτ p ) 
At large times, then:
y (t ) ≈
αK p
1+ τ ω
2
p
2
sin ωt − tan −1 ( ωτ p ) 
Again, K p represents part of the fraction of the value of the input disturbance that will
show up on the output signal. τ p also plays are a part in the gain, but, more importantly,
represents a time offset that manifests itself as a phase angle lag (lag because the angel is
subtracted from the input signal). At most, even with very large τ p values, the output can
lag by no more than 90°.
Determination of Coefficients from Data
How could we determine the parameters in the transfer function for a 1st order process?
We can perturb the process in a controlled manner & look at the transient results.
Impulse disturbance. f ( t ) = α ⋅ δ ( 0 ) gives:
y (t ) = α
Kp
τp
e
− t / τp
Can put into “linear form” by taking the logarithm:
1st Order Systems
-6-
December 21, 2008
Colorado School of Mines CHEN403
 αK p   1 
ln ( y ) = ln 
t
−
 τ   τ 
p
p

  
Using linear regression of ln ( y ) vs. t data, the slope will be −1/ τ p and the intercept will
be ln ( αK p / τ p ) .
Unit step change. f ( t ) = α ⋅ H ( t ) gives:
(
y ( t ) = αK p 1 − e
− t / τp
)
with the initial slope of:
αK p
dy
=
dt t =0
τp
One would get the gain from the ultimate value, K p = y∞ / α ; however, this requires that
you take data long enough to be confident of the ultimate value, y∞ . You could then get the
initial slope & determine the time constant:
τp =
αK p
( dy / dt ) t =0
However, then numerical determination of the derivative from data is inherently difficult.
You could also put this equation into “linear form:”

1
y 
ln  1 −
= − t


τ 
αK p 

 p
and linear regression can again be used. The difficulty now is that the form of the
independent variable, ln (1 − y / αK p ) , includes one of the variables to be determined, K p .
There are two ways this could be handled:
1. Adjust the value of K p until the intercept from the linear regression is zero.
2. Do the regression by forcing the intercept to be zero & adjust K p to maximize the
regression coefficient, r 2 .
The following table shows the response of a tank when the flow rate is increased from 2
ft³/min to 3 ft³/min. Using deviation variables, the value of α will be α = 3 − 2 = 1 ft³/min .
1st Order Systems
-7-
December 21, 2008
Colorado School of Mines CHEN403
min
ft
min
ft
0
0.0
10
1.8
1
0.2
20
3.2
2
0.4
30
4.3
3
0.6
40
5.2
4
0.8
50
5.5
5
0.9
60
6.0
6
1.1
70
6.7
7
1.4
80
7.0
8
1.5
90
7.1
9
1.6
Doing linear regression with the linear form and allowing an intercept, a value of
K p = 7.92 min/ft² gives an intercept of zero; the corresponding slope gives τ p = 39.0 min .
Doing linear regression with the linear form and not allowing an intercept, a value of
K p = 8.05 min/ft² gives an intercept of zero; the corresponding slope gives τ p = 41.0 min .
Note that the values were generated with random perturbations added to a linear model
with K p = 8 min/ft² and τ p = 40 min . The following chart shows the
8.0
7.0
6.0
5.0
h (ft) 4.0
3.0
2.0
1.0
0.0
0
10
20
30
40
50
60
70
80
90
t (min)
Linearization
Not all dynamic systems are described by linear ODEs — in truth, probably none of the
systems are really linear. To use transfer functions & Laplace transforms, however, we
must linearize the system of equations. We have already looked at an example of this with
1st Order Systems
-8-
December 21, 2008
Colorado School of Mines CHEN403
flow through a valve. If the flow through a valve is considered to be proportional to h ,
then the material balance around a tank containing a fluid of constant density is described
by:
dV
= F0 − F1 = F0 − Cv h
dt
and for a constant cross-sectional area in the tank, A , then:
A
dh
= F0 − C v h .
dt
We’ve discussed ways to linearize the square root term in this ODE. We can effectively do a
Taylor series expansion by first taking the total differential of the right-hand-side:
 C 
d F0 − C v h = dF0 −  v  dh
2 h 
(
)
Now, replace the differentials with deviation variables & evaluate any coefficients at the
initial steady state. So:

( F − C h )′ ≈ F ′ −  2C h
0
v
0
v
*

 h′

and the linearized ODE will be:
A
dh′
 C 
= F0′ −  v  h′
dt
 2 h′ 
dh′  Cv 
+
 h′ = F0′
dt  2 h* 
 2 A h*  dh′
 2 h*
′
+h =


 Cv  dt
 Cv



A

 F0′ .


From this, we see that the linearized ODE is simply a 1st order ODE with the following gain
and time constant:
Kp =
2 h*
Cv
1st Order Systems
-9-
December 21, 2008
Colorado School of Mines CHEN403
τp =
2 A h*
Cv
Effectively, we have found that the gain and time constant are not constant, but rather
functions of the liquid level. Whether or not the linearized equation is a good
representation depends upon how far we perturb the system from its steady state value.
For example, given a tank with a cross-sectional area of 5 m² which maintains a level of 16
m when the flow in is 2 m³/min, what happens when we shut off the flow? In the full nonlinear solution:
C
dh
= F0 − v h
dt
A
where:
h( 0 ) = h* = 16 m
F0* = 2 m³/min
F0 ( t ) = 0
then:
C
= − v dt ⇒
A
h
dh
h
Cv t
C 

= − ∫ dt ⇒ h =  h* − v t 
A0
2A 
h

dh
∫
hss
2
The linearized equation is:
(
)
*
C
dh C v h − h
dh′
A +
= −F0* ⇒ A
+ v h′ = −F0*
*
dt
dt 2 h*
2 h

Cv 
F*
h′ = − 0
 As +

s
2 h* 

K p F0*
2 h*
2 A h*
′
h =−
where K p =
and τ p =
Cv
Cv
τp s + 1 s
So:
(
−t / τ
h′ = −F0* K p 1 − e p
)
2F0* h*
⇒ h=h −
Cv
*


tC v
 1 − exp  −
*
 2A h


 

The chart below shows the difference in the drainage curve for the two equations. Notice
that the linearized equation stays fairly close to the exact solution for the 1st 8 ft change of
1st Order Systems
- 10 -
December 21, 2008
Colorado School of Mines CHEN403
level. Also note that even though the ODE is linearized, it does not predict a straight line
answer — there is still curvature to the final h( t ) result.
18
16
14
Level (m)
12
Exact Solution
10
Linearized Equation
8
6
4
2
0
0
10
20
30
40
50
60
70
80
90
Time (min)
1st Order Systems
- 11 -
December 21, 2008
Download