automatic control system modelling. modelling dynamical systems engineers use models which are based...
TRANSCRIPT
Automatic Control System
Modelling
Modelling dynamical systemsEngineers use models which are based upon mathematical relationships between two variables. We can define the mathematical equations:• Measuring the responses of the built process (black model)Not interested in the number and the real value of the time constants of the process, only it is enough that the response is similar sufficient accuracy• Using the basic physical principles (grey model). In order to simplification of mathematical model the small effects are neglected and idealised relationships are assumed.
Developing a new technology or a new construction nowadays it’s very helpful applying computer aided simulation technique.This technique is very cost effective, because one can create a model from the physical principles without building of process.
Grey box model
Modelling mechanical systems
;2
2
dt
sdmF ;
dt
dsCvCFD ksFs
Newton’s law one-dimensional translation and rotational systems.
;2
2
dt
dIM
adt
sd
2
2
2
2
dt
d
velocity
acceleration
F: force [N]; FD: absorber’s force; Fs: spring’s force M: moment about centre of mass of body [Nm]I: the body’s moment of inertia [kgm2]s, : displacement [m; rad]v, ω: velocity [m/sec; rad/sec]a, : acceleration [m/sec2; rad/sec2]C: friction constant [Nsec/m]k: spring constant [N/m]
•Assign variables and sufficient to describe an arbitrary position of the object.•Draw a free-body diagram of each components and indicate all forces acting.•Apply Newton’s law in translation and rotational form.•Combine the equations to eliminate internal forces.
adt
ds
dt
d
Modelling mechanical systems
m2
m1
k2
k1
C
t
y
t
x
t
r
The car’s wheel vertical motion is assumed one-dimensional and the mass hasn’t got extension. The sock absorber is represented by a dashpot symbol with friction constant C.The force from the spring acts on both masses in proportional their relative displacement with spring constant k.The equilibrium positions of the two mass are offset from the spring’s unstretched positions because of the force of gravity.Nowadays the mathematical programs allow one to create a better model.The system can be approximated by the simplified system shown in left.
Road surface
Modeling mechanical systems
m2
m1
k2
k1
C
t
y
t
x
t
r
2
2
dt
sdmF
dt
dsCFD ksFs
The positive displacements or velocity of mass, and so the positive force are signed by up arrows.
2
2
112 dt
xdm)rx(k)xy(k
dt
)xy(dC
2
2
22 )()(
dt
ydmxyk
dt
xydC
Simulating the system by MATLAB
dt
tdy )(
dtdt
dt dt2
1
m
1
1
m1k
)(tr
1k
)(tx
C 2k
)(ty
2k
C
2
2 )(
dt
txd
2
2 )(
dt
tyd
dt
tdx )(
Difference equations
0 T0 2T0 3T0 4T0 5T0 6T0 7T0
y7
y6
y5
y4
y3
y2
y1
y0
0
)1()()(
T
iyiy
dt
tdy
20
2
2 )2()1(2)()(
T
iyiyiy
dt
tyd
30
3
3 )3()2(3)1(3)()(
T
iyiyiyiy
dt
tyd
)()( 0iTyiy A block input is energised by x(t), and the responseis y(t). Because of the response needs any time or insimulation the calculation of the response also needs any time, and so y(iT0) can be calculated from previous value than x(iT0). The sampled block has a delay time (T0). Example: )()(
)(tbxty
dt
tdyT
)1()()1()(
0
ibxiyT
iyiyT
)1()1()(00
0
ibxiyT
Tiy
T
TT
iiT
iyTdtty0
0
0
)()(0 )1()1()(
0
0
0
ibxTT
Tiy
TT
Tiy
Using difference equationrkyk
dt
dyCxkxk
dt
dxC
dt
xdm 12122
2
1
)()}1()({
)1()}()1({)}1()(2)1({
2
222
ixkixixT
C
iykiyiyT
Ciyiyiy
T
m
0)1(,)1(,)1(,0)0()0(,)0( 110 yxxrrandyxrr
xkdt
dxCyk
dt
dyC
dt
ydm 222
2
2
)1()()}1()({
)()()}1()({)}2()1(2)({
12
2121
irkiykiyiyT
C
ixkkixixT
Cixixix
T
m
Using Laplace transform to model mechanical systems
m2
m1
k2
k1
C
2
2
112 )()()(
dt
xdmrxkxyk
dt
xydC
2
2
22 )()(
dt
ydmxyk
dt
xydC
)()()()()()()( 211122 sxsmsrksxksxksyksCsxsCsy
)()()()()( 2222 sysmsxksyksCsxsCsy
)()()()( 2111
22 sxsmsrksxksysm
Block modeling mechanical system
sm2
1
sm1
1
s
1
1k
2k
C
)(ssy
)(22 sysm
)(sy)(21 sxsm
)(sr
)()()()()( 2222 sysmsxksyksCsxsCsy
)()()()( 2111
22 sxsmsrksxksysm
2ks
1)(ssx
C
)(sx
Block modeling mechanical systemBlock reduction
sm2
1
sm1
1
s
1
21
1
sm
k
2k
C
)(sy
)(sr2k
s
1
Csm1
1s
22sm
Modeling electromechanical systems
;dt
dKU eE
;
dt
dILU a
L
DC motor’s voltages.
;dt
dCT f
The electromotive force based on:
DC motor’s tongues.
B: magnet field [T: Tesla]; Ta armature torqueIa: armature current Tf friction torqueUE: electromotive force [V] TL load torqueUL: voltage on inductance [V] C: friction constant [Nsec/m]UR: voltage on resistance [V]
aaa IKT
lBUE
;aR RIU
Modeling DC motor
M
aT LTfTaLaR
eUaI
dcU
aJ armature inertia
angular displacementTa armature torqueTf friction torqueTL load torqueIa armature currentRa armature resistanceLa armature inductance
Ka motor torque constantC rotational friction constant
dt
dILIR
dt
dKUUUUUU a
aaaedcLRedc 0
Generated electromotive force (emf) against the applied armature voltage
LaaLfaa Tdt
dCIKTTT
dt
dJT
2
2
Ke electromotive force constant
Simulating the system by MATLAB
dtdtaJ
1)(tTL
C
)(teK
dcU
aR
dtaL
1 )(tIa
aK
dt
dIa
2
2
dt
d dt
d
Example: Block modeling DC motor
M
aLaR
eUaI
dcU
aT LTfT
aJ
dtLa
1dt
aR
aK
eK
C
dt
d2
2
dt
dJa
dt
dIL aa
LT
fT
dcU aI aT
Laaa Tdt
dCIK
dt
dJ
2
2
dt
dILIR
dt
dKU a
aaaedc
dtJa
1
In time domain using difference equations
LaaaLaaa TIKdt
dC
dt
dJT
dt
dCIK
dt
dJ
2
2
2
2
)1()}1()({)()}1()({ iUiIiIT
LiIRii
T
Kdcaa
aaa
e
)}1()({)1()1()(}{ iiT
KiI
T
LiUiI
T
LR e
aa
dcaa
a
dca
aaae Udt
dILIR
dt
dK
)1()1()}1()({)}2()1(2)({2
iTiIKiiT
Ciii
T
JLaa
a
)}2()1({)2()2()1(
iiTRL
KiI
TRL
LiU
TRL
TiI
aa
ea
aa
adc
aaa
In operator frequency domain
M
aT LTfTaLaR
eUaI
dcU
aJ
Assuming than Udc is constant andthe system is steady-state when onechange the value of Udc
Examination of dynamic behaviourcan be used the Laplace transform.
Laaa Tdt
dCIK
dt
dJ
2
2
dt
dILIR
dt
dKU a
aaaedc
)()()()( ssILsIRssKsU aaaaedc
)()()()(2 sTsCssIKssJ Laaa
G(s))(sx )(sy )()()()(
)(
)(sxsGsysG
sx
sy
Block modeling DC motor
M
aLaR
eUaI
dcU
aT LTfT
aJ
)()()()( ssILsIRssKsU aaaaedc
)()()()(2 sTsCssIKssJ Laaa
sJa
1
sLa
1
s
1
aR
aK
eK
C
s2sJa aasIL
LT
fT
dcUaI aT
a
aa
K
sLR
Simpler block model of DC motor
s
1
sLR
K
aa
a
sJC a1
dcU
LT
eK
sJCsLR
K
aaa
a
1
dcU
eK
LT
s
1
sKsJCsLR
K
eaaa
a 1
))((
a
aa
K
sLR LT
dcU
Models of electronic circuitKirchhoff’s current law: The algebraic sum of current leaving a junction or node equals the algebraic sum of the current entering that node.Kirchhoff’s current law: The algebraic sum of all voltages taken around a closed path in a circuit is zero.
Resistor
)()( tRitu
InductorCapacitor
)()( sRIsU )()( sLsIsU
dt
tdiLtu
)()(
dt
tduCti
)()(
)()( sCsUsI
Models of electronic circuit
U1 U2
I1
I2
I3
A B
All resistance equal R and all capacitanceequal C. Point “A” is nearly ground and such as a summing junction for the currents.“B” is a take off point for U2.The OpAmp amplitude gain is Au(s)
)(1 sG
)(2 sG
)(3 sG
)(sAu
U2U1 I1
I2
I3
U1 I1
U2I2
U2I3
21
1
2
1
)(
)(
1
1
RsCRsU
sI
sCR
sC
sU
sI
1)(
)(
2
2
21
1
2
1
)(
)(
2
3
RsCRsU
sI
Modeling heat flow
);(1
21 TTR
q
vcmC
Heat energy flow.
Specific heat:
Thermal conductivity:
;1q
Cdt
dT
q: heat energy flow J/sec R: thermal resistance °C/J T: temperature °CC: thermal capacity J/°C
l
kA
R
1
A: cross-sectional area l: length of the heat-flow pathk: thermal conductivity constant
Temperature as a function of heat-energy flow:
Heat flow models
q1
q2
room T1
T0
R1
R0
The heat energy flows through substances (across the room’s wall):
))(11
()(1
1011
2110 TTRR
qqTTR
q
The net heat-energy flow into a substance:
qCdt
dT 1
vmcC m: the mass of the substancecv: specific heat constant
qdt
dTC
The heat can also flow when a warmer mass flow into a cooler mass or vice versa: )( 01 TTc
dt
dmq v
Heat flow models
))(()()( 101
11
2
222121
11 TT
l
Ak
l
AkTTc
dt
dmqqq
dt
dTC vm
)}()()()()()()( 20111 sTcssmsTsconstTsTcssmssT vv
The total heat-energy flow: )(1
)( 1021 TTR
TTcdt
dm
dt
dTC v
qdt
dTC )(
110 TT
Rq
It’s non-linear, except T1=T2.
Modelling a heat exchanger
)(1
)( wsssivssss
s TTR
TTcKdt
dA
dt
dTC
water steam
siT dt
dAK
dt
dm ss
s www AK
dt
dm
sT
wiT
wT realT
)(1
)( wswwivwwww
w TTR
TTcKAdt
dTC
The time delay between the measurementand the exit flow of the water:
)( dwreal tTT
As: area of the steam inlet valve, Aw: area of the water inletKs: flow coefficient of the inlet valve, Kw: flow coefficient of the water inletcvs: specific heat of steam, cvw: specific heat of waterTsi: temperature of inflow steam, Twi: temperature of inflow waterTs: temperature of outflow steam, Ts: temperature of outflow waterCs=mscvs thermal capacity of the steam, Cw=mwcvw thermal capacity of the waterR: thermal resistance (average over the entire exchanger)
Simulating heat exchanger
)(1
)( wsssivssss
s TTR
TTcKdt
dA
dt
dTC )(
1)( wswwivwww
ww TT
RTTcKA
dt
dTC
dt)(tTs
vsscK
sC
1
dt
dTC s
s
wC
1dt
dTC w
w
dt)(tTw
R
1
)(tTsi
)(tTwivwww cKA
)(tAs
dt
d
Laplace form heat exchanger
)(1
)( wsssivssss
s TTR
TTcKdt
dA
dt
dTC )(
1)( wswwivwww
ww TT
RTTcKA
dt
dTC
dswreal esTsT )()(
The equation is nonlinear because the state variable Ts is multiplied by the the controlinput As. The equation can be linearized at the working point Ts0, and so Tsi-Ts0=Ts
nearly constant. To measure all temperature from Twi, it’s eliminated Twi=0.
))()((1
)()( sTsTR
TcKsAssTC wssvsssss
))()((1
)()( sTsTR
sTcKAssTC wswvwwwww
)(1
1)(
1)( sT
sRCsA
sRC
TcRKsT w
ss
s
svsss
)(
1
1)( sT
sRCcKRAsT s
wvwwww
)(1
1
1
1)(
11
1)( sT
sRCsRCcKRAsA
sRC
TcRK
sRCcKRAsT w
swvwwws
s
svss
wvwwww
)(})(){( 2 sATcKCRCsCcKsRACCscKAsT ssvssswsvwwwswvwwww
Block model of heat exchanger
vwww cKA1
sRCs
1)(ssTC ss)(sTw
R
1
)(sRTssvss TcK
)(sAs
))()((1
)()( sTsTR
TcKsAssTC wssvsssss
))()((1
)()( sTsTR
sTcKAssTC wswvwwwww
dswreal esTsT )()(
sCw
1)(ssTC wwse
Black box model
Modeling by reaction curve
Process field
plant
controller
Feedback control
A/M
GC(s) GA(s)
GT(s)
GW(s)
GP1(s) GP2(s)
When auto / manual switch is manualposition (open), then GC(s)=1
A/M
GC(s) GA(s)
GT(s)
GW(s)
GP(s)R0+r U0+u
YM0+yM
W
Modelled the process from reaction curveby dead-time proportional first order transfer function HPT1
t
,My u
uMy
uT gT
1( ) ;
1
usT
p Pg
G s K esT u
yK M
p
The error of the model
0
2mod })()({
ielmeasured ixix
The principle of the less squares:
The better model the less sum of value of the squares.
The error of the model:
%100|)(|
|)()(|
0
0mod
N
imeasuredM
N
ielMmeasuredM
iy
iyiy
A better model of process from reaction curveby dead-time second order transfer function HPT2
t
,my u
umy
1 2
1 1( )
1 1
tsT
p PG s K esT sT
It needs computer! The beginning parameters: tf T
TTT ,..
221
Modelled the process from reaction curveby “n” order transfer function PTn
t
,my u
umy
30t
npp sTKsG
)1(
1)(
70t
%30
%70
%10
10t
Modelled the process from reaction curveby dead-time integral first order transfer function HIT1
t
u
gT
1 1( )
1pi g
G sT sT
iT
,my u