class 4 systems and solutions. 1 st order systems
TRANSCRIPT
Class 4
Systems and Solutions
1st Order Systems
1st Order Systems
oxx
tfxdt
dx
0
(input) measured be to Quantity (output) response Instrument
(s) constant time
tf
x
1st Order Systems
oxx
tfxdt
dx
0
tKtf
ttuKtf
tuKtf
h
sr
ss
cos)(
)(
)(
Step Input
Ramp Input
Harmonic Input
1st Order Systems with Step Input
o
s
xx
tuKxdt
dx
0
0,1
0,0
t
ttu -1 0 1 2
0
1
2
Time, t
u(t)
1st Order Systems with Step InputSolution by Integration
o
s
xx
Kxdt
dx
0
tx
x s
s
s
dtxK
dx
dtxK
dx
xKdt
dx
o 0
tsos
t
so
s
os
s
oo
tu
u
s
tx
x s
eKxKtx
eKx
Kx
xK
xK
tu
ut
u
u
dtu
du
dxduxKu
dtxK
dx
o
o
ln,ln
,
,
0
0
Error Ratio
1st Order Systems with Step InputError Ratio and Excitation Ratio
t
so
s
os
serr
err
err
eKx
Kx
xK
xKr
r
r
value input from deviation Startingvalue input from deviation Current
Error StartingError Current
Ratio Error
terr
os
sex
os
o
os
osex
os
o
os
os
os
oex
ex
ex
erxK
xKr
xK
xx
xK
xKr
xK
xx
xK
xK
xK
xxr
r
r
111
1
1
output initial from deviation Inputvalue initial its from deviation Output
Excitation DesiredExcitation Current
Ratio Excitation
0 1 2 3 4 50
0.2
0.4
0.6
0.8
1
time, t
Excitation Ratio
Error Ratio
Error:
Output deviation from input
Excitation:
Output deviation from its initial value
1st Order Systems with Step InputSolution by Superposition
o
s
xx
Kxdt
dx
0
th
rtrtrthh
rth
rth
hh
Cetxrr
CerCerCexx
rCetxCetx
xx
1,1
01,0,0
0
ODE shomogeneou into ngSubstituti
Assume
ODE shomogenoeu the For
spp
hh
ph
Kxx
xx
txtxtx
and
where
form the of solution a Assume
0
tsos
soos
tshp
sp
spp
eKxKtx
KxCxCKx
CeKtxtxtx
Ktx
Kxx
,0
condition, initial the satisfy To
thereofore is solution complete The
nobservatio by found is
equation particular the of Solution
1st Order Systems with Step InputSolution by Laplace Transform
1)(
1)(
1)(
)()(
)()(
0
ss
xKsxsX
ss
xsKsX
s
xsKssX
xs
KsXssX
s
KsXxssX
xx
Kxdt
dx
oso
os
os
os
so
o
s
tsos
sos
ososo
osos
s
os
os
s
os
o
oso
eKxKtx
s
Kx
s
KsX
s
xK
s
xKxsX
xKxK
B
ss
xKssB
xKss
xKssA
s
B
s
AxsX
ss
xKsxsX
1)(
1
1)(
11
1
11
10
1)(
1)(
1
0
0 1 2 3 4 5 60
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Step Response
Time (sec)
Am
plit
ude
1
1)(
1)(
)()(
00
ssF
sX
sFssX
sFsXssX
x
tfxdt
dx
Transfer Function
>> num=1;
>> den=[1 1];
>> sys = tf(num,den);
>> step(sys)
>> grid
1st Order Systems with Unit Step Input and Unit Time Constant
MATLAB Simulation by Transfer Function
1st Order Systems with Unit Step Input and Unit Time Constant
MATLAB Simulation by Simulink
xtudt
dx
tuxdt
dx
1
1st Order Systems with Ramp Input
o
ro
xx
ttuKxxdt
dx
0
0,1
0,0
t
ttu
ttu
1st Order Systems with Ramp InputSolution by Superposition
o
ro
xx
tKxxdt
dx
0
th
rtrtrthh
rth
rth
hh
Cetxrr
CerCerCexx
rCetxCetx
xx
1,1
01,0,0
0
ODE shomogeneou into ngSubstituti
Assume
ODE shomogenoeu the For
tKxxx
xx
txtxtx
ropp
hh
ph
and
where
form the of solution a Assume
0
trro
trro
roro
trohp
orp
roo
o
r
ro
pp
ropp
eKtKxtx
eKtKxtx
KCxCKxx
CetKxtxtxtx
xtKtx
KxAxB
xBA
KA
tKxBAtA
AtxBAttx
tKxxx
1
,0
,
,
condition, initial the satisfy To
thereofore is solution complete The
ODE the into Substitute
form the of solution a Assume
equation particular the of Solution
1st Order Systems with Ramp InputSteady State Error and Relative Error
rss
tr
tss
tss
tr
ro
Ke
eKe
errore
eKerror
txtKxerror
error
1lim
lim
1
error state Steady
Output-Input
trro eKtKxtx 1
o
ro
xx
ttuKxxdt
dx
0
t
r
tr
r eK
eKErr
11
Error State SteadyError
error Relative
0 0.5 1 1.5 2 2.5 3 3.5 40
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
t
rErr
1st Order Systems with Ramp InputRelative Input and Relative Excitation
trro eKtKxtx 1
t
r
trr
r
r
etK
eKtKex
ex
11
Error State SteadyExcitation Current
Excitation Relative
tK
tK
r
r
Input Relative
S.S.EValue Initial-Input
Input Relative
0 0.5 1 1.5 2 2.5 3 3.5 40
0.5
1
1.5
2
2.5
3
3.5
4
Relative Excitation
Relative Input
t
1
o
ro
xx
ttuKxxdt
dx
0
1st Order Systems with Ramp InputSolution by Laplace Transform
1)(
1
1
)(
1)(
1)(
)()(
)()(
0,
2
2
2
2
2
2
2
2
2
s
C
s
B
s
AxsX
ss
xK
ssxsX
ss
KsxsxsX
s
KsxsxssX
xs
K
s
xsXssX
s
K
s
xsXxssX
xxtKxxdt
dx
o
o
r
o
roo
roo
oro
roo
oro
trro
trror
rror
or
s
o
r
o
ro
s
o
r
or
s
o
r
eKtKxtx
eKKxtKtx
s
K
s
Kx
s
KsX
xKss
xK
sssC
x
Kx
ssxK
sss
ds
dB
xKss
xK
sssA
1
1)(
1
1
1
1
1
1
1
2
1
2
2
0
2
2
2
0
2
2
2
sssss
sGsH
ssF
sXsG
sFssX
sFsXssX
x
tfxdt
dx
2
1
)1(
1)()(
1
1)()(
1)(
)()(
00
1st Order Systems with Unit Ramp Input and Unit Time Constant
MATLAB Simulation by Transfer Function
MATLAB does not have a ‘ramp’ command to plot the ramp
response of the system. However, note that the response, Rst
(s)
of a system with transfer function G(s) to unit step input is Rst
(s)
= G(s)/s, and its response to a unit ramp input is Rrmp
(s) =
G(s)/s2 = (G(s)/s)/s . Thus, the response of G(s) to unit ramp is
equal to the response of H(s) = G(s)/s to unit step.
We may use MATLAB’s ‘step’ command to obtain the ramp
response of a system G(s) simply by obtaining the step response
of H(s) = G(s)/s to unit step.
0 1 2 3 4 50
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
>> num = [0 0 1];
>> den = [1 1 0];
>> t=0:0.1:5;
>> sys = step(num,den,t);
>> plot(t,sys,'o',t,t,'-')
>> grid
1st Order Systems with Unit Step Input and Unit Time Constant
MATLAB Simulation by Simulink
xttudt
dx
ttuxdt
dx
1
1st Order Systems with Harmonic Input
00
cos
x
tKxdt
dxh
0 2 4 6 8 10 12
-1
0
1
1st Order Systems with Harmonic InputSolution by Superposition
1
2
222
tan
1
)cos()cos()2cos(
)2cos(
)sin(
)cos(
)cos(
h
h
h
p
p
p
hpp
KA
KAA
tKtAtA
tAtx
tAtx
tAtx
tKxx
plot vector the From
ODE the into Substitute
form the of solution a Assume
equation particular the of Solution
th
rtrtrthh
rth
rth
hh
ropphh
ph
h
Cetxrr
CerCerCexx
rCetxCetx
xx
tKxxxxx
txtxtx
x
tKxdt
dx
1,1
01,0,0
0
0
00
cos
ODE shomogeneou into ngSubstituti
Assume
ODE shomogenoeu the For
and where
form the of solution a Assume
sin2sinsin2coscos2cos
cos2sincos2cossin2sin
ωt
ϕ
τAω
A
Kh
10-2
10-1
100
101
102
0
0.5
1
1.5
1st Order Systems with Harmonic InputAmplitude Ratio and Phase
1
2
tan
1
)cos(
00
cos
h
h
KA
tAtx
x
tKxdt
dx
1
2
tan
11
Phase
AmplitudeInput AmplitudeOutput
Ratio Amplitude
ha
a
KAr
r
0 2 4 6 8 10 12
-1
0
1 f(t)
x(t)
ϕ
ra
τω
ra
(τω)ϕ
(τω)
1st Order Systems with Harmonic InputSolution by Complex Exponential
iyxz
tiAtAz
Aez
ie
ti
i
sincos
sincos
ωt
x
A
y
z = Aeiωt
Euler’s Identity
ωt
x
A
y
z = Aeiωt
-ωt
z* = Ae-iωt
*2
1cosRe
*
zztAzx
Aez
Aezti
ti
Complex Conjugate
21
2
1
2121
2
1
2
1
2
1
2
1
212121
22
11
ii
i
iii
i
i
eA
A
eA
eA
z
z
eAAeAeAzz
eAz
eAz
Multiplication & Division Rules
niin
innnin
i
eAAez
eAAez
Aez
nn
111
Power Rules
Second Order Systems In the system shown, the input displacement, x
i, will
cause a deflection in the spring, and some time will be
needed for the output displacement xo
to reach the
input displacement.
m
k
c
xi
xo
Second Order Systems
If m/k << 1 s2 and c/k << 1 s, the system may be approximated as a zero order system with unity gain.
If, on the other hand, m/k << 1 s2 , but c/k is not, the system may be approximated by a first order system. Systems with a
storage and dissipative capability but negligible inertial may be modeled using a first-order differential equation.
m
k
c
xi x
o
iiooo
iiooo
ooioi
o
kxxcxxk
cx
k
m
kxxckxxcxm
xmxxcxxk
xmF
Example – Automobile Accelerometer Consider the accelerometer used in seismic and vibration engineering to
determine the motion of large bodies to which the accelerometer is
attached.
The acceleration of the large body places the piezoelectric crystal into
compression or tension, causing a surface charge to develop on the
crystal. The charge is proportional to the motion. As the large body
moves, the mass of the accelerometer will move with an inertial
response. The stiffness of the spring, k, provides a restoring force to
move the accelerometer mass back to equilibrium while internal
frictional damping, c, opposes any displacement away from equilibrium.
m
k
c
xi x
o
Piezoelectric crystal
Zero-Order systems Can we model the system below as a zero-order system? If the mass, stiffness, and damping coefficient satisfy certain
conditions, we may.
m
k
c
xi
xo
i
ioioioi
ooioi
o
xmmck
xmxxmxxcxxk
xmxxcxxk
xmF
First Order Systems Measurement systems that contain storage elements do not respond
instantaneously to changes in input. The bulb thermometer is a good
example. When the ambient temperature changes, the liquid inside the
bulb will need to store a certain amount of energy in order for it to reach
the temperature of the environment. The temperature of the bulb
sensor changes with time until this equilibrium is reached, which
accounts physically for its lag in response.
In general, systems with a storage or dissipative capability but negligible
inertial forces may be modeled using a first-order differential equation.
𝜏𝑑𝑥𝑑𝑡 + 𝑥= 𝐾𝑢(𝑡)
𝑥ሺ0ሻ= 𝑥0 𝑥ሺ𝑡ሻ= 𝐾+ሺ𝑥0 − 𝐾ሻ𝑒−𝑡/𝜏 𝑥ሺ𝑡ሻ− 𝐾𝑥0 − 𝐾 = 𝑒−𝑡/𝜏
𝑥ሺ𝑡ሻ− 𝑥0𝐾− 𝑥0 = 1− 𝑒−𝑡/𝜏
1st Order Systems with Step Input
Error Ratio
Excitation Ratio
Note that the excitation ratio also represents the system response in case of
x0=0 and K=1
error ratio = current errorstarting error = current deviation from final valuestarting deviation from final value
excitation ratio = current excitationdesired (input) excitation= current deviation from initial valueinput deviation from initial value
Excitation ratio may also be called response ratio = current response / desired
response
Example 1
A bulb thermometer with a time constant τ =100 s. is subjected to a step
change in the input temperature. Find the time needed for the response
ratio to reach 90%
Example 1 Solution
A bulb thermometer with a time constant τ =100 s. is subjected to a step change in the input temperature. Find the time
needed for the response ratio to reach 90%
𝑥ሺ𝑡ሻ− 𝑥0𝐾− 𝑥0 = 1− 𝑒−𝑡/𝜏 = 0.9
𝑥ሺ𝑡ሻ− 𝐾𝑥0 − 𝐾 = 𝑒−𝑡/𝜏 = 0.1
𝑡 𝜏= lnሺ10ሻ= 2.3Τ
𝑡 = 2.3× 𝜏= 230 𝑠.≈ 4 minutes
1st Order Systems with Ramp Input excitation ratio = current excitationdesired (input) excitation
excitation ratio = current deviation from initial valueinput deviation from initial value
𝜏𝑑𝑥𝑑𝑡 + 𝑥= 𝑥0 + 𝐾𝑟𝑡𝑢(𝑡)
𝑥ሺ0ሻ= 𝑥0 𝑥ሺ𝑡ሻ= 𝑥0 + 𝐾𝑟𝑡− 𝐾𝑟𝜏(1− 𝑒−𝑡/𝜏)
𝑆.𝑆.𝐸= lim𝑡→∞ሺ𝑥(𝑡) − 𝑓(𝑡)ሻ 𝑆.𝑆.𝐸= 𝐾𝑟𝜏
𝐸𝑥𝑐𝑖𝑡𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑖𝑜 = 𝑥ሺ𝑡ሻ− 𝑥0𝐾𝑟𝑡
𝐸𝑥𝑐𝑖𝑡𝑎𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑖𝑜 = 1− (1− 𝑒−𝑡/𝜏)𝑡 𝜏Τ
limሺ𝑡 𝜏Τ ሻ→0ቆ1− (1− 𝑒−𝑡/𝜏)𝑡 𝜏Τ ቇ
= limሺ𝑡 𝜏Τ ሻ→0ሺ1ሻ− lim
ሺ𝑡 𝜏Τ ሻ→0൫1− 𝑒−𝑡/𝜏൯𝑡 𝜏Τ
= 1− limሺ𝑡 𝜏Τ ሻ→0𝑒−𝑡/𝜏1 = 1− 1 = 0
Error = 𝑥ሺ𝑡ሻ− 𝑓ሺ𝑡ሻ= −𝐾𝑟𝜏(1− 𝑒−𝑡/𝜏)
Steady State Error
Note that using L’Hospital rule
1st Order Systems with Harmonic Input
𝜏𝑑𝑥𝑑𝑡 + 𝑥= 𝐹 cos (ωt) 𝑥ሺ𝑡ሻ= 𝐶𝑒−𝑡/𝜏 + 𝑋cos (ωt − φ)
𝑋= 𝐹ඥ1+ሺ𝜏𝜔ሻ2
φ = tan−1ሺ𝜏𝜔ሻ
C depends on the initial conditions and the exponential term will vanish with time. We are interested in the particular steady solution 𝑋cos (ωt − φ). Solving for 𝑋 and φ, we find
1st Order Systems with Harmonic Input
𝐴𝑟 = 𝑋𝐹= 1ඥ1+ሺ𝜏𝜔ሻ2 = 1
ඥ1+ 4𝜋2𝑇𝑟2
φ = tan−1ሺ𝜏𝜔ሻ=tan−1ሺ2𝜋𝑇𝑟ሻ
Define the amplitude ratio 𝐴𝑟 = 𝑋 𝐹Τ and the time ratio 𝑇𝑟 = 𝜏 𝑇Τ where 𝑇= 2𝜋 𝜔Τ is the period of the excitation function,
1st Order Systems with Harmonic Input
The amplitude ratio, Ar(ω), and the corresponding phase shift,
ϕ, are plotted vs. ωτ. The effects of τ and ω on frequency
response are shown.
For those values of ωτ for which the system responds with Ar
near unity, the measurement system transfers all or nearly all
of the input signal amplitude to the output and with very little
time delay; that is, X will be nearly equal to F in magnitude
and ϕ will be near zero degrees.
1st Order Systems with Harmonic Input
At large values of ωτ the measurement system filters out any frequency information of the input signal by responding with very small
amplitudes, which is seen by the small Ar(ω) , and by large time delays, as evidenced by increasingly nonzero ϕ.
1st Order Systems with Harmonic Input
Any equal product of ω and τ produces
the same results. If we wanted to measure
signals with high-frequency content, then
we would need a system having a small τ.
On the other hand, systems of large τ may
be adequate to measure signals of low-
frequency content. Often the trade-offs
compete available technology against
cost.
dB = 20 log Ar(ω)
1st Order Systems with Harmonic Input
The dynamic error,δ(ω), of a system is defined as
δ(ω) = (X(ω) – F)/F
δ(ω) = Ar(ω) –1
It is a measure of the inability of a system to adequately reconstruct the amplitude of the input signal for a particular input frequency.
We normally want measurement systems to have an amplitude ratio at or near unity over the anticipated frequency band of the input
signal to minimize δ(ω) .
As perfect reproduction of the input signal is not possible, some dynamic error is inevitable. We need some way to quantify this. For a
first-order system, we define a frequency bandwidth as the frequency band over which Ar(ω) > 0.707; in terms of the decibel defined as
dB = 20 log Ar(ω)
This is the band of frequencies within which Ar(ω) remains above 3 dB
Example 2
A temperature sensor is to be selected to measure temperature within a reaction vessel. It is suspected that the temperature will
behave as a simple periodic waveform with a frequency somewhere between 1 and 5 Hz. Sensors of several sizes are available, each
with a known time constant. Based on time constant, select a suitable sensor, assuming that a dynamic error of 2% is acceptable.
Example 2. Solution
A temperature sensor is to be selected to measure
temperature within a reaction vessel. It is suspected that the
temperature will behave as a simple periodic waveform with a
frequency somewhere between 1 and 5 Hz. Sensors of several
sizes are available, each with a known time constant. Based
on time constant, select a suitable sensor, assuming that an
absolute value for the dynamic error of 2% is acceptable.
Accordingly, a sensor having a time constant of 6.4 ms or less
will work.
aA𝛿ሺωሻaA≤ 0.02 −0.02 ≤ 𝛿ሺωሻ≤ 0.02 −0.02 ≤ 𝐴𝑟 − 1 ≤ 0.02 0.98 ≤ 𝐴𝑟 ≤ 1.02
0.98 ≤ 1ඥ1+ሺ𝜏𝜔ሻ2 ≤ 1.0
0 ≤ 𝜏𝜔≤ 0.2
0 ≤ 2𝜏𝜋(5) ≤ 0.2
The smallest value of 𝐴𝑟 will occur at the largest frequency
𝜔= 2𝜋𝑓= 2𝜋(5)
𝜏≤ 6.4× 10−3s.
Example 2. Solution
A temperature sensor is to be selected to measure
temperature within a reaction vessel. It is suspected that the
temperature will behave as a simple periodic waveform with a
frequency somewhere between 1 and 5 Hz. Sensors of several
sizes are available, each with a known time constant. Based
on time constant, select a suitable sensor, assuming that an
absolute value for the dynamic error of 2% is acceptable.
Accordingly, a sensor having a time constant of 6.4 ms or less
will work.
aA𝛿ሺωሻaA≤ 0.02 −0.02 ≤ 𝛿ሺωሻ≤ 0.02 −0.02 ≤ 𝐴𝑟 − 1 ≤ 0.02 0.98 ≤ 𝐴𝑟 ≤ 1.02
0.98 ≤ 1ඥ1+ሺ𝜏𝜔ሻ2 ≤ 1.0
0 ≤ 𝜏𝜔≤ 0.2
0 ≤ 2𝜏𝜋(5) ≤ 0.2
The smallest value of 𝐴𝑟 will occur at the largest frequency
𝜔= 2𝜋𝑓= 2𝜋(5)
𝜏≤ 6.4× 10−3s.
2nd Order Systems Example:
Spring – mass damper
RLC Circuits
Accelerometers
Mathematical Model:
𝑑2𝑥𝑑𝑡2 + 2𝜁𝜔𝑛 𝑑𝑥𝑑𝑡 + 𝜔𝑛2𝑥= 𝑓ሺ𝑡ሻ 𝜁 Damping ratio (dimensionless) 𝜔𝑛 Natural frequency (1/s) 𝑓ሺ𝑡ሻ: Input (quantity to be measured) 𝑥: Output (instrument response)
2nd Order Systems with step input
𝑓ሺ𝑡ሻ= 𝐾𝑢(𝑡)
𝑢ሺ𝑡ሻ= ቄ0 𝑡 < 01 𝑡 ≥ 0
ds
𝑑2𝑥𝑑𝑡2 + 2𝜁𝜔𝑛 𝑑𝑥𝑑𝑡 + 𝜔𝑛2𝑥= 𝐴𝑓ሺ𝑡ሻ 𝜁 Damping ratio (dimensionless) 𝜔𝑛 Natural frequency (1/s) 𝑓ሺ𝑡ሻ: Input (quantity to be measured) 𝑥: Output (instrument response) 𝐴: Arbitrary constant
2nd Order Systems with step input
2nd Order Systems with step input
2nd Order Systems with periodic input
2nd Order Systems with step input