This preview shows page 1. Sign up to view the full content.
Unformatted text preview: pulse_test 1/5 Pulse Testing Experiments CHE 361 Read pgs 344348 of SEM1 text attached  note the input is called x(t).
The analysis of a pulse test allows the calculation of the frequency response of a linear
system. Characteristics of the "test" are:
(1) Input and output variables are deviation variables. In the equations in this handout u(t)
is the input and y(t) is the output.
(2) The process dynamics are assumed to be linear. If the process is nonlinear the
numerical methods will still yield a "frequency response", but those results will be
dependent on the input/output data. Different tests may yield significantly different
frequency response results for the same nonlinear process.
(3) The input is changed at t=0 in some "form" and returned to zero at time Tu. The
simplest "form" is that of a rectangular pulse.
(4) Enough time must be allowed for the output to return to zero. When the output is
"essentially" zero, the time is Ty. The output values, y’(t), must be large enough that any
process or measurement noise is "relatively small".
(5) The derivation of the method begins with the definition of the Laplace transform,
utilizes a trigonometric identity for the exponential function with a complex argument and
requires integration of the product of a sin or cos function times the input or output data.
∞ G ( s ) is by definition = y(s)
u(s) ⌠ y(t) e
⌡
= st dt 0 and by the "shortcut" method ∞ ⌠ u(t) e
⌡ st dt 0 the frequency response of G(s) is found from G ( j ω ) where the
AR magnitude of G ( s ) and the phase angle is the polar ∠ of G (j ω )
Ty thus using the definitions of T u and T y : G(jω) = ⌠ y(t) e
⌡ jωt dt 0 Tu ⌠ u(t) e
⌡ jωt dt 0 where the upper infinite limit on the integrals is replaced by finite values of time, since
after Ty and Tu, the functions y(t) and u(t) respectively have values of zero. pulse_test 2/5 Now we can substitute the Euler identity, which is just the polar > rectangular coordinate
transformation for complex numbers:
e jωt =e j ( polar angle ) = cos ( polar angle ) + sin ( polar angle ) j = cos ( ω t ) + j sin ( ω t ) = cos ( ω t )  j sin ( ω t )
Then substituting the Euler identity into the integrand of the numerator yields
y(t) e jωt dt = y ( t ) cos ( ω t ) d t  y ( t ) sin ( ω t ) d t j If the identity is also substituted into the denominator, it is easy to see that
A(ω)  j B(ω)
C(ω)  j D(ω) G( jω) = where ..... Ty A ( ω ) = ⌠ y ( t ) cos ( ω t ) d t
⌡
0 Ty B ( ω ) = ⌠ y ( t ) sin ( ω t ) d t
⌡
0 Tu C ( ω ) = ⌠ u ( t ) cos ( ω t ) d t
⌡
0 Tu D ( ω ) = ⌠ u ( t ) sin ( ω t ) d t
⌡
0 The real part of G ( j ω ) = R ( ω ) = AC BD and the imag part = I ( ω ) = C2 D2
Then the amplitude ratio AR and phase angle of G(jω) are calculated as:
AR = R2 AD BC C2 D2 I 2 and I ... noting the proper quadrant from I and R values
R
The numerical problem then is to evaluate the integrals for A, B, C, and D.
phase angle = ∠ G ( j ω ) = tan 1 pulse_test 3/5 Remarks: What problems can arise when using a rectangular pulse input ?
(1) Consider the rectangular input pulse to have a height of H. In that case u(t) =
constant = H for t from 0 until Tu, when u = 0 again. In Figure 15.4 of SEM1 the
variable tw is the same as Tu above.
For the frequency response for the specific ω = 2π/Tu, the integrals for C and D
are both 0 and the computations will fail. Even when a frequency is "close" to
this ωmax, roundoff can lead to large errors in the calculated AR and phase angles.
This is why on page 349 of SEM1 the authors suggest ωmax = 5/tw < 2π/Tu.
One "solution" to this problem is to use a "better" shape for the input, as discussed
on page 348 of SEM1. A simpler approach, which is sufficient in the bioreactor
project, is to use a shorter rectangular pulse width to increase the ωmax value and a
"small" max time step so that about 800 steps are required to reach the new steady
state.
NOTE: Since a shorter pulse causes a smaller change in output, the size H of the
input pulse may need to be increased so that "reasonably large" values of y(t) are
obtained. (2) When the process is nonlinear, such as the bioreactor, different pulses will in
general yield different Bode plots. For example a large versus small pulse of the
same duration may yield different results. A positive versus a negative pulse can
give different results. In general the smaller the pulse, the closer the Bode plot
should be to the frequency response of the local transfer function model obtained
by linearizing the ODEs, since y(t) will stay close to its nominal steadystate value. (3) With pulse tests of physical processes, there will always be some process and
measurement "noise" and problems in getting reproducible results  even for the
same designed input pulse. Often a filter, either physical or numerical, is used on
the measured output and input signals. If the true input variable differs from the
ideal one, then measured input u(t) should be used in the calculations, e.g. you
may not be able to make a perfect rectangular pulse in the flow rate because your
control valve takes time to open and close. (4) Advanced process identification schemes often use some form of "pseudorandom
binary" input series, where the control valve is switched between two finite limits
with different time periods between the switching instances. This is beyond the
scope of an introductory course, but is widely used in industry when processes are
difficult to model, especially when the process is MIMO (multiinput, multioutput)
in nature. (5) Example on next 2 pages from pulse2nd.mdl from the class web site. Note here
ωmax = 5/(tw = 0.5) = 10 rad/time marks the beginning of the "nonsmooth" AR
and PA plots, as expected. Here the max time step was set to 0.01 time units, the
min/max freqs were 0.01 & 100 rad/time and 100 frequencies were used. When the
pulse duration was reduced to 0.05 time unit, the experimental Bode plot was more
accurate at larger frequencies, as shown on page 5. pulse_test 4/5
. Uin
Yout 1 tYout 0.1s2+1.1s+1
tUin make_tYout Transfer Fcn make_tUin t_y_y' t_u_u' pulse2nd.mdl = rectangular pulse test
of 2ndorder system
DOUBLE click to
RUN pulsec
GO TO Command Window !! Pulse_Analysis Rectangular Pulse Input (Uin)
6 5 Uin 4 3 2 1 0 0 1 2 3 4
Time 5 6 7 8 6 7 8 Rectangular Pulse Output (Yout)
2 1.8 1.6 1.4 Yout 1.2 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4
Time 5 pulse_test 5/5 Amplitude Ratio 10 10 10 Bode Plot: made by chebode.m using freqg.dat : Tu pulse duration = 0.5 0 1 2 10 2 10 1 0 10
Frequency (rad/min) 10 1 10 2 0 Phase (deg) 90
180
270
360
450
540
2
10 Amplitude Ratio 10 10 10 10 1 0 10
Frequency (rad/min) 10 1 10 2 Bode Plot: made by chebode.m using freqg.dat : Tu Pulse Duration = 0.05 0 1 2 10 2 10 1 0 10
Frequency (rad/min) 10 1 10 2 0 Phase (deg) 90
180
270
360
450
540
2
10 10 1 0 10
Frequency (rad/min) 10 1 10 2 CHE 361: Bioreactor Project  Two Simulink "Hints" 1. When doing a pulse test, the analysis software works best and the results for phase
angle are easier to interpret when the gain of your transfer function is positive. In
order to simplify the Bode plot that will be produced, if your G(s) has a negative gain,
you should reverse the signs in the Sum block shown: you should double click on the
sum block and change + to be +. When you close the sum block you should see the top
signal with a negative sign and the bottom with a + sign. This changes the sign of the
deviation variable data and makes the phase angle start at 0 degrees instead of 180
deg. so that the Bode plot is easier to analyze. Of course you need to remember that
your true gain is still negative.
2XWSRUW &ORFN 0X[ LQB W%RXW WB%B%
BUHF 6XP
%BLQLWLDOBVV
0X[ $9470*94:9
2. When using the chebode2i.m command to draw two Bode diagrams on top of each
other, it may be useful to turn off the grid to see both curves,as shown below. After
running chebode2i, make the first figure made (the complete Bode plot) the "active"
figure by clicking on it. Then in the MATLAB Command window enter:
>> grid
>> subplot(2,1,1)
>> grid % this turns off the grid on the phase angle plot
% this selects the AR plot to be active
% this turns off the grid on the AR plot Amplitude Ratio Bode Plot: chebode2.m solid=freqg1.dat, dash=freqg2.dat 10 10 0 2 4 10
2
10 10 1 0 10
Frequency (rad/min) 10 1 10 2 Phase (deg) 0
45
90
135
180
2
10 10 1 0 10
Frequency (rad/min) 10 1 10 2 ...
View
Full
Document
This note was uploaded on 03/01/2012 for the course CHE 361 taught by Professor Staff during the Winter '08 term at Oregon State.
 Winter '08
 Staff

Click to edit the document details