G(s)

advertisement
First-order Transfer Function
Transfer function g(s):
Effect of forcing system with u(t)
1
-
IMPORTANT!!:
independent
H Preisigg(s)
2006: is
Prosessregulering
/ S. of u(s)!!!
Fraction of two polynomials
Skogestad 2012
General Transfer Matrix
The n roots (generally complex) of the polynomial d(s)
are the same as the eigenvalues of the state matrix A,
and are known as the «poles» of the system
Poles and zeros
• What are transfer functions
 effect of forcing system
• What is a forced system and why do we force a system
• Transfer functions G(s) of linear, time-invariant networks of first-order
systems are ratios of two polynomials in s (Laplace variable which relates
to frequency)
• Polynomials have roots
root in denominator
G(s)   ”pole”
root in numerator
G(s)  0 ”zero”
• Roots & dynamics
– Numerator roots are responsible for inverse or normal response
– Denominator roots determine stability
– Fast or slow dynamics
3
H Preisig 2006: Prosessregulering
Dynamic step response of some
systems
s=tf('s')
g1 = 2/(10*s+1)
step(g1,50)
axis([0 40 -0.2 3])
First-order system (k=2, ¿=10)
Step Response
3
u
2.5
g1 ( s) =
y
2/)
10s+ 1
g1
2
Amplitude
y(t)
1.5
63%
u(t)
1
M
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
Initial and final values for step
response
• Consider response y(t) to step of magnitudeM in input
• Transfer function g(s)
• Deviation variables for y(t) and u(t)
s=tf('s')
g1 = 2/(10*s+1)
step(g1,50)
axis([0 40 -0.2 3])
First-order system (k=2, ¿=10)
Step Response
3
u
2.5
g1 ( s) =
y
2/)
10s+ 1
g1
2
Amplitude
y(t)
1.5
63%
u(t)
1
M
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
Larger time constant (¿=12)
gives slower dynamics
s=tf('s')
g1 = 2/(10*s+1), step(g1,50)
axis([0 40 -0.2 3]); hold on,
g2 = 2/(12*s+1), step(g2,50)
Step Response
3
2.5
g1
g2
Amplitude
2
1.5
1
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
Larger steady-state gain (k=2.2)
s=tf('s')
g1 = 2/(10*s+1), step(g1,50)
axis([0 40 -0.2 3]); hold on,
g2 = 2/(12*s+1), step(g2,50)
g3 = 2.2/(10*s+1), step(g3,50)
Step Response
3
2.5
g3
g1
g2
Amplitude
2
1.5
1
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
Integrating system (g4=0.2/s)
g1 & g4: Same initial response (slope = 0.2=k/¿)
s=tf('s')
g1 = 2/(10*s+1), step(g1,50)
axis([0 40 -0.2 3]); hold on,
g2 = 2/(12*s+1), step(g2,50)
g3 = 2.2/(10*s+1), step(g3,50)
g4 = 2/(10*s+0), step(g4,50)
Step Response
3
2.5
g4=0.2/s
g3
g1
g2
Amplitude
2
1.5
1
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
Integrating system, g(s)=k’/s
• Special case of first-order system with ¿=1
and k=1 but slope k’=k/¿ is finite
• g(s)=k/(¿ s+1) = k/(¿ s) = k’/s
• Step response (u=M): y(t)/M = k’t
Integrating system with time delay (g5)
s=tf('s')
g1 = 2/(10*s+1), step(g1,50)
axis([0 40 -0.2 3]); hold on,
g2 = 2/(12*s+1), step(g2,50)
g3 = 2.2/(10*s+1), step(g3,50)
g4 = 2/(10*s+0), step(g4,50)
g5 = 2*exp(-5*s)/(10*s), step (g5,5
Step Response
3
2.5
g4
g5
g1
Amplitude
2
1.5
1
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
g1 =
2
-------20 s + 1
Unstable system (e.g., exothermic reactor):
Sign change in denominator d(s)
Step Response
3
2.5
g2 =
2
---20 s
g2
g3
unstable
Integrating system:
on the limit to unstable
Amplitude
2
g3 =
g1
stable
1.5
2
-------20 s - 1
1
0.5
Oops… Negative sign in d(s)… Unstable!
0
0
5
10
15
20
Time (seconds)
25
30
35
40
«S-shaped» 2nd order responses
(g2, g3, g4) made from two first-order systems in series
Step Response
3
g1 = 2/(10*s+1), step(g1,50)
g2 = 2/[(10*s+1)*(10*s+1)], step(g2,50)
g3 = 2/[(5*s+1)*(5*s+1)], step(g3,50)
g4 = 2/[(10*s+1)*(2*s+1)], step(g4,50)
2.5
System: g3
Time (seconds): 21.9
Amplitude: 1.86
2
Amplitude
g3
g4
1.5
g2
1
g1
K
G(s)=
( 1s+1)( 2s+1)
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
g1 = 2/(10*s+1)
g2 = 2/[(10*s+1)*(10*s+1)]
2nd order responses
Special case(g2): ¿1=¿2=¿
Step Response
3
2.5
98%
2
Amplitude
86%
91%
(96% at t=6¿)
1.5
63%
59%
First-order
Second-order with ¿1=¿2=¿
1
g1
26%
0.5
g2
0
t=¿
0
5
10
t=4¿
t=2¿
15
20
Time (seconds)
25
30
35
40
g1 = 2/(2*s+1), step(g1,50)
g2 = 2/(2*s+1)^2, step(g2,50)
g3 = 2/(2*s+1)^3, step(g3,50)
g4 = 2/(2*s+1)^4, step(g4,50)
g5 = 2/(2*s+1)^5, step(g5,50)
g6 = 2/(2*s+1)^6, step(g6,50)
g7 = 2/(2*s+1)^7, step(g7,50)
n’th order responses:
From n identical first-order systems in series
Step Response
3
2.5
2
Amplitude
g1
g7
1.5
1
0.5
0
0
5
10
15
20
Time (seconds)
25
30
35
40
General 2nd order system
Chapter 5
K
K
G(s)= 2 2
 2
 s  2 s  1  ( s  1 )( s  2 )
Roots (poles, eigenvalues): 1,2 
 1
 1
 1
   2  1
underdamped (oscillations )
critically damped
overdamped (no  oscillations )
Special case: Two first-order in series (overdamped, ³ ¸ 1):
K
K

( 1s+1)( 2s+1)  1 2s 2 +( 1   2 )s+1
 
Two  real  poles :
 = 1 2 1
2  1 2
1  1/  1 , 2  1/  2
G(s)=
  1 2

Chapter 5
K
G(s)=
( 1s+1)( 2s+1)
1 for :  1   2  1,

 


 = 1 2  2.125 for :  1  3, 2  1/ 3
2  1 2 

3.08
for
:


6,


1/
6
1
2


Underdamped (Oscillating) second-order systems (³<1)
K
G(s) = 2 2
 s  2s  1
Corresponds to complex poles
Process systems:
Oscillations are usually caused by (too) aggressive control
Example 1: P-control of second-order process, k/(¿1 s+1)(¿2 s+1)
• Oscillates (³<1) if Kck is large (see exercise)
Example 2: PI-control of integrating process, k’/s
• Need control to stabilize
• Oscillates (³<1) if Kck’ is small (see derivation SIMC PID-rules)
s=tf('s')
zeta=0.5, tau=1
g = 1/[(tau*s)^2 + 2*tau*zeta*s + 1]
step(g)
Step Response
1.4
1.2
g=
1
----------s^2 + s + 1
1
Amplitude
0.8
>> pole(g)
0.6
ans =
0.4
-0.5000 + 0.8660i
-0.5000 - 0.8660i
0.2
0
0
2
4
6
Time (seconds)
8
10
12
Chapter 5
=a/b
=c/a
Chapter 5
Zeros
Zeros
•
•
•
•
g(s) = n(s)/d(s)
Zeros: roots of numerator polynomial, n(s)=0
Example, g1(s)= (3s+1)/(10s+1)(s+1). Zero: s=-1/3
Problem for control if n(s) has coefficient with different signs (positive
zeros in the right half plane (RHP). Give inverse response.
– Example, g2(s)= (-3s+1)/(10s+1)(s+1). Zero: s=1/3
Oops… Negative sign in n(s)… Inverse response!
Zeros
Zeros
• Zeros are common in practise
• Occur when there are several «paths» to the output.
g1(s)
u
y
g2(s)
• Example 1.
All coefficients positive: LHP zero
g1 (s) =
2
10s+ 1 ;
g(s) = g1 + g2 =
• Example 2
2
10s+ 1 ;
g1 (s) =
g(s) = g1 + g2 =
0:3
g2 (s) = s+
1
2( s+ 1) + 0:3( 10s+ 1)
( 10s+ 1) ( s+ 1)
2:17s+ 1
= 2:3 ( 10s+
1) (s+ 1)
0:3
s+ 1
2( s+ 1) ¡ 0:3( 10s+ 1)
( 10s+ 1) ( s+ 1)
¡ 0:59s+ 1
1:7 ( 10s+
1) ( s+ 1)
g2 (s) = ¡
Sign change: RHP zero ) Inverse response
=
Step Response
2.5
g1 (s) = ¡
0:3
10s+ 1 ;
g(s) = g1 + g2 =
2
s+ 1
2( s+ 1) ¡ 0:3( 10s+ 1)
( 10s+ 1) ( s+ 1)
g2 (s) =
2
=
11:3s+ 1
1:7 ( 10s+
1) ( s+ 1)
Note; Overshoot since 11.3>10
Amplitude
• Example 3
1.5
3
1
2
1
0.5
0
0
5
10
15
20
25
30
Time (seconds)
35
40
Zeros
Step Response
2.5
2
1.5
1
2
0.5
¡ 0:59s+ 1
g(s) = 1:7 (10s+
1)(s+ 1)
0
RHP-zero with «time constant» -0.59: Similar to delay of 0.59.
0
5
10
15
20
Time (seconds)
Zeros
Step Response
3
g1 = 2*(3*s+1)/[(10*s+1)*(s+1)], step(g1,50)
g0 = 2/[(10*s+1)*(s+1)], step(g0,50)
g2 = 2*(-3*s+1)/[(10*s+1)*(s+1)], step(g2,50)
2.5
2
Amplitude
1.5
g1:1 LHP zero
g0: No zero
0.5
0
g2: Sign change for coeffcients in n(s) (RHP zero): Inverse response
-0.5
0
5
10
15
20
Time (seconds)
25
30
35
40
Zeros
Another Inverse response example (RHP zero: «competing effects where slow wins»).
Physical example: Increase hot water flow when water heater is on max. u = qh, y = T
Step Response
3
s=tf(‘s’)
g1 = 1
g2 = 2/(10*s+1)
g=g1-g2
ans =
10 s - 1
--------10 s + 1
2.5
2
Amplitude
1.5
1
0.5
g = g1 - g2,
0
-0.5
-1
0
5
10
15
20
Time (seconds)
25
30
35
40
Zeros
Another example LHP zero: Note no overshoot here (effects in same direction)
Step Response
3
g = g1 + g2
2.5
g1 = 1
g2 = 2/(10*s+1),
2
Amplitude
1.5
G(s) = 1 +
2
10s+ 1
1
= 3 3:33s+
10s+ 1
1
0.5
0
-0.5
-1
0
5
10
15
20
Time (seconds)
25
30
35
40
Zeros
G(s) =
k1
¿1 s+ 1
+
k2
¿2 s+ 1
Zeros
s+ 1
s+ z
= k (¿1 s+¿a1)(¿
=
k
¿a (¿1 s+ 1)(¿2 s+ 1)
2 s+ 1)
k1 : “slow” effect (¿1 > ¿2)
k = k1+k2
¿a =
Zero at z=1/¿a
Im(s)
z4 z3
o x o
z2
o
k 1 ¿2 + k 2 ¿1
k1 + k2
z = 1/¿a
z1
o
1/¿1
Re(s)
z1: RHP-zero (z1<0, ¿a <0)
–
Inverse response = Competing effects (k’s oppsite signs) where slow wins (|k1|>|k2|)
z2: Zero at origin (z2=0, ¿a!1)
– Competing effect with same magnitude (k1=-k2)
– Steady-state gain is zero
z3: LHP-zero close to RHP (¿a > ¿1, approx)
–
Overshoot = Competing effects where fast wins
z4: LHP-zero far from RHP (¿a < ¿1, approx)
–
No overshoot = Effects in same direction (k1 and k2 same sign)
Summary poles and zeros
• Poles p (=eigenvalues of A)
– Determine speed of response
– p in RHP: unstable (NEED control)
– P complex: oscillating response
• Zeros z
– Determine shape of response
– z in RHP: inverse response (BAD for control)
Approximations of time delay
Step Response
1
0.8
0.6
Amplitude
0.4
0.2
s=tf('s')
theta=1
g0=exp(-theta*s)
g1= - theta*s + 1
g2= 1/(theta*s+1)
g3 = (-theta*s/2+1)/(theta*s/2+1)
h=1/(s+1)
step(g0*h,g1*h,g2*h,g3*h)
axis([0 5 -1 1.1])
2
0
0
3
-0.2
-0.4
1
-0.6
-0.8
-1
0
0.5
1
1.5
2
2.5
Time (seconds)
3
3.5
4
4.5
5
% time delay. theta
% RHP-zero, taua=theta
% first order, tau=theta
% Pade-approx
Skogestad Half Rule*
* S. Skogestad, “Simple analytic rules for model reduction and PID controller
design”, J.Proc.Control, Vol. 13, 291-309, 2003 (Also reprinted in MIC)
Example 1
Half rule
Original 2nd order
1st-order+delay (half rule)
s=tf('s')
g=(-0.1*s+1)/[(5*s+1)*(3*s+1)*(0.5*s+1)]
g1 = exp(-2.1*s)/(6.5*s+1)
g2 = exp(-0.35*s)/[(5*s+1)*(3.25*s+1)]
step(g,g1,g2)
Example 2
Step Response
1
0.8
0.4
Step Response
0.4
0.35
0.2
0.3
0.25
Amplitude
Amplitude
0.6
0
0.2
0.15
0.1
-0.2
0
5
10
15
20
Time (seconds)
25
30
35
40
0.05
0
-0.05
0
0.5
1
1.5
2
2.5
3
Time (seconds)
3.5
4
4.5
5
Example 3. Integrating process
k0
s( ¿2 0 s+ 1)
g0 (s) =
Half rule gives
¿2 0
k 0e¡ µ s
g(s) =
wit
h
µ
=
s
2
Proof:
Not e t hat int egrat ing process corresponds t o an in¯nit e t ime const ant .
Writ e
k 0¿1
k 0¿1
g0 (s) = ¿1 s( ¿2 0 s+ 1) ¼ ( ¿1 s+ 1) ( ¿2 0 s+ 1) for ¿1 ! 1
and t hen apply half rule as normal, not ing t hat ¿1 + ¿22 0 ¼ ¿1
Approximation of LHP-zeros
c
c
τc = desired closed-loop time constant
c
c
c
c
To make these rules more general
(and not only applicable to the
choice c=): Replace  (time
delay) by c (desired closed-loop
response time). (6 places)
Related documents
Download