Step Response For The Transfer Function of A Sensor PDF
Step Response For The Transfer Function of A Sensor PDF
Step Response For The Transfer Function of A Sensor PDF
MATLAB program
k=5;
T=0.01;
num=[0 k];
den=[T 1];
step(num,den);grid
Step Response
5
4.5
3.5
3
Amplitude
2.5
1.5
0.5
0
0 0.01 0.02 0.03 0.04 0.05 0.06
Time (sec)
Bode diagram
MATLAB program
>> bode(num,den);
grid;
Bode Diagram
20
10
Magnitude (dB)
-10
-20
-30
0
Phase (deg)
-45
-90
0 1 2 3 4
10 10 10 10 10
Frequency (rad/sec)
Bandwidth
Cutoff frequency, b ,defining the bandwidth, is defined as the frequency for which the
Magnitude 20 log|G(j)| drops 3 dB below its zero-frequency value 20 log|G(j0)|
20 log|G(j)| <20 log|G(j0)| - 3 dB for > b
In the above case of a first order transfer function G(s)=k/(1+Ts), k=5, T = 0.01 s
G(s)=5/(1+0.01s)
or
G(j)=5/(1+0.01j)
its zero-frequency value is
G(j0)=5
or
20 log|G(j0)|=14 dB
In practice, this is considered acceptable within bandwidth, i.e for input signal
frequencies
< b
k=5;
T=0.01;
Kc=5
MATLAB Simulations
MATLAB program
num=[0 0 0 50];
den=[0.01 1 1 100];
impulse(num,den);
1
Amplitude
-1
-2
-3
-4
-5
0 10 20 30 40 50 60
Time (sec)
MATLAB program
num=[0 0 0 500];
den=[0.01 1 100 10000];
impulse(num,den);
1
Amplitude
-1
-2
-3
-4
0 1 2 3 4 5 6
Time (sec)
MATLAB program
num=[0 0 0 5000];
den=[0.01 1 10000 1000000];
impulse(num,den);
0.5
Amplitude
-0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Analytical Solutions (K. Ogata, Modern Control Engineering, 4th edition, Prentice Hall
pp. 268-271), where L{}=Laplace transform
For
k=5;
T=0.01;
results
|x(t)|=1
x(t)=1 sin t
G(s) =k/(1+Ts)
G(j) =k/(1+T j)=5/(1+0.01 j)= 5(1-j0.01)/(1+0.0122)= 5(1-j0.01)/(1+0.0122)
|G(j)|= 5/(1+0.0122) 1/2
= tan -1 (-0.01)
Kc = G(j0)=k=5
y(t)=1 |G(j)| sin (t+ )
xest(t)= y(t)/ Kc =(|G(j)|/ Kc) sin (t+ )= (|G(j)|/5) sin (t+ )
|xest(t)|/|x(t)|= |G(j)|/5
For = 10
results
|G(j)|= 5/(1+0.0122) 1/2 =5/(1+0.012102) 1/2 5
= tan -1 (-0.01) =-5.710
y(t)=1 |G(j)| sin (t+ ) 5 sin t
xest(t)= y(t)/k 1 sin t=x(t)
|xest(t)|/|x(t)| 1
Summary of results:
Consequently, for
> b |xest(t)|/|x(t)| <0.7
= 1000 |xest(t)|/|x(t)| 0.1 i.e the estimation is only 10% of the amplitude of the
sensor input signal
Dynamic estimation (calibration) can use inverse problem solution, increasing gains, in
this case 1/0.7 for = 10 for and 1/0.1=10 for = 1000. (E. Doebelin, Measurement
Systems, McGraw Hill, 1990, Ch. 10.5 Dynamic Compensation, pp. 804-808)
Obviously these gains would increase with and can lead to various difficulties
(overflow in numerical computations, over-amplification of noise high frequency-low
amplitude components in the y(t) signal etc), to be studied as part of inverse problem
theory, a topic of advanced mechatronics.
Bode diagram
G-1(s) = (1+Ts)/ k
Bode Diagram
30
20
Magnitude (dB)
10
-10
-20
90
Phase (deg)
45
0
0 1 2 3 4
10 10 10 10 10
Frequency (rad/sec)
- low pass filter for removing high frequency noise in the sensor output
b) Second order transfer function (K. Ogata, Modern Control Engineering, Prentice Hall,
1997, Ch. 4-3, pp. 141-187) for example for a servo system (pp.142-146), or a mass-
spring-damper system (Example 4-7, pp. 174-175).
where
f(t) [N] is the input force to measure
d(t) [m] is the output displacement
v(t) [V]is the output voltage of the potentiometer
or
G(s)=V(s)/F(s)= k /(s2+2 n s + n2)
where
n2 = K /M
2 / n = B / M
k= Kp / M
Time response of such second order instruments are significantly dependent on the value
of = B n / (2 M)
MATLAB Simulations
1) Step response of
G(s) = k /(s2+2 n s + n2) = k /(s2+b s + c)
where
b=2 n
c= n2
Steady state of v(t) for unit step input f(t) is obtained using limit value theorem for unit
step input F(s)=1/s for s tending towards zero
V = lim s G(s) /s= lim G(s) =lim k /(s2+2 n s + n2)= 1/n2 =0.01
a) for = 0, b=2 n =0
MATLAB program for
k=1;
b=0;
c=100;
num=[ 0 0 k];
den=[1 b c];
step(num,den);grid
Fig. v(t) plot shows an undamped oscillatory response, obviously not usefull in practical
applications. Higher values for are required.
Step Response
0.02
0.018
0.016
0.014
0.012
Amplitude
0.01
0.008
0.006
0.004
0.002
0
0 10 20 30 40 50 60
Time (sec)
b) for = 0.1, b= 2 n =2
MATLAB program
k=1;
b=2;
c=100;
num=[ 0 0 k];
den=[1 b c];
step(num,den);grid
The results show significant maximum overshoot of 70% and long 2% settling time of
4/( n ) = 4/ (0.1 x 10)= 4 sec.
Step Response
0.018
0.016
0.014
0.012
0.01
Amplitude
0.008
0.006
0.004
0.002
0
0 1 2 3 4 5 6
Time (sec)
k=1;
b=12;
c=100;
num=[ 0 0 k];
den=[1 b c];
step(num,den);grid
The results show significant reduced overshoot of 5% and reduced 2% settling time of
4/( n ) = 4/ (0.6 x 10)= 1.7 sec.
Step Response
0.012
0.01
0.008
Amplitude
0.006
0.004
0.002
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Time (sec)
k=1;
b=24;
c=100;
num=[ 0 0 k];
den=[1 b c];
step(num,den);grid
0.009
0.008
0.007
0.006
Amplitude
0.005
0.004
0.003
0.002
0.001
0
0 0.2 0.4 0.6 0.8 1 1.2
Time (sec)
k=1;
b=12;
c=100;
num=[ 0 0 k];
den=[1 b c];
bode(num,den);
grid;
Bode Diagram
-20
-40
Magnitude (dB)
-60
-80
-100
-120
0
-45
Phase (deg)
-90
-135
-180
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
Cutoff frequency, b ,for the above case of a second order transfer function
G(s) = k /(s2+2 n s + n2) = k /(s2+b s + c)
where
k=1;
b=12;
c=100;
gives
G(j)=1/( -2 +12j + 100)
its zero-frequency value is
G(j0)=1/100=0.01
or
20 log|G(j0)|=- 40 dB
b 10 rad/sec
fb 10/(2) 1.4 Hz
Dynamic estimation (calibration) can use inverse problem solution, increasing gains, in
this case Obviously these gains would increase with and can lead to various difficulties
(overflow in numerical computations, over-amplification of noise high frequency-low
amplitude components in the y(t) signal etc).
Bode diagram
G-1(s) = (s2+b s + c) / k
F(s)G(s)D(s) G-1(s)V(s)
MATLAB program
k=1;
b=12;
c=100;
den =[ 0 0 k];
num =[1 b c];
bode(num,den);
grid;
Bode Diagram
120
100
Magnitude (dB)
80
60
40
20
180
135
Phase (deg)
90
45
0
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
- low pass filter for removing high frequency noise in the sensor output
For
F(s) 1/ (M s2+B s + K)D(s) V(s)
the overall transfer function is
V(s)/F(s)= Kp / (M s2+B s + K)= (Kp / M)/ (s2+( B / M) s +( K /M) )
or
G(s)=V(s)/F(s)= k /(s2+2 n s + n2)
where
n2 = K /M
2 n = B / M
k= Kp / M
Time response of such second order instruments are significantly dependent on the value
of
= B n / (2 M)
where
=0.6
MATLAB simulation of
or
a=12;
b=100;
num=[ 0 0 0 0 ];
den=[1 a b+* a** b**];
impulse(num,den);
MATLAB Simulations
MATLAB program is
a=12;
b=100;
num=[ 0 0 0 0 1];
den=[1 a b+1 a b];
impulse(num,den);
Impulse Response
0.015
0.01
0.005
Amplitude
-0.005
-0.01
-0.015
0 50 100 150 200 250 300
Time (sec)
The result agrees to Bode diagram amplitude for =1of -40 dB or 0.01
2) =5 rad/s
a=12;
b=100;
num=[ 0 0 0 0 5];
den=[1 12 125 300 2500];
impulse(num,den);
Impulse Response
0.015
0.01
0.005
Amplitude
-0.005
-0.01
-0.015
0 10 20 30 40 50 60 70 80 90 100
Time (sec)
The result agrees to Bode diagram amplitude for =5of -40 dB or 0.01
Analytical Solutions (K. Ogata, Modern Control Engineering, 4th edition, Prentice Hall
pp. 268-271), where L{}=Laplace transform
L{x(t)=sin t } G(s)= k/( s2+2 n s + n2) L{y(t)} 1/ Kc L{ xest(t)}
or for X(s)= /(s2+2) and unit impulse input (s)=1
(s)=1 /(s2+2) k/( s2+2 n s + n2) y(t) 1/ Kc L{ xest(t)}
For
|x(t)|=1
x(t)=1 sin t
= 0.6
n = 10 rad/s
such that
a= 2 n =12
b= n2=100
G(s) = k/( s2+12 s + 100)
G(j) =1/( -2+100+12 j)= ( -2+100-12 j)/ [( -2+100+12 j) ( -2+100-12 j)]
= (100-2-12 j)/( (100-2)2+1222)
|G(j)|= 1/((100-2)2+1222) 1/2
= tan -1 (-12 /(100-2) )
y(t)=1 |G(j)| sin (t+ )
|G(j0)|= 1/((100)2) 1/2 =1/100
Kc =G(j0)=1/100
xest(t)= y(t)/ Kc =(|G(j)|/ Kc) sin (t+ )= (|G(j)|/(1/100)) sin (t+ )
|xest(t)|/|x(t)|= |G(j)|/ Kc =|G(j)|/|G(j0)|
For = 10
results
|G(j)|= 1/((100-2)2+1222) 1/2 =1/((100-102)2+122102) 1/2 =1/120
= tan -1(-12 /(100-2) )= tan -1 (-120/(100-102) ) = tan -1 (-120/0)=-900
y(t)=1 (|G(j)| / Kc)sin (t+ ) ((1/120)/(1/100)) sin( t-90)
|G(j10)|/ |G(j0)| = (1/120)/(1/100)=100/120 = |xest(t)|/|x(t)| 0.83
For = 10, Bode diagram gives appr -42 dB and -900 which agrees with the above result.
Exact calculation of the cutoff frequency, b ,defining the bandwidth, obtained from the
equation
20 log|G(jb)|= 20 log|G(j0)| - 3
or
log|G(j0)| - log|G(jb)| = log(|G(j0)| / |G(jb)| )=3/20
or
|G(j0)| /|G(jb)| = log-1 3/20 = 1.4125
or
|G(jb)| =|G(j0)| /1.4125 =0.0709 |G(j0)|
which shows that, at cutoff frequency, b , the amplitude |G(jb)| drops to 0.0709 of the
|G(j0)|
For the above second order instrument
|G(j)|= 1/((100-2)2+1222) 1/2
results
|G(j0)|= 1/((100-02)2+12202) 1/2 = 1/100
The cutoff frequency, b can be obtained from
|G(jb)| =|G(j0)| /1.4125 =(1/100)/ 1.4125=1/141.25
For obtaining b the equation to solve is then
1/((100-b2)2+122b2) 1/2 =1/141.25
or
((100-b2)2+122b2) 1/2 =141.25
or
(100-b2)2+122b2 =141.252 =19952.6
or
b4 -200 b2 +10000-19952.6+ 144b2 =0
or
b4 -56 b2 -9952.6 =0
The solution for b2 is
b2 =28(282+9952.6) =28103.6 or 131.6 and 75.6
Only the positive solution gives
b =131.6= 11.47 [rad/s]
that can be recognized on the second order Bode diagram for the magnitude of -40-3 =-43
dB