Sale!

AMATH 455/655 Lab 3 Control of Water Height in a Tank solution

Original price was: $35.00.Current price is: $28.00.

Category:

Description

5/5 - (1 vote)

Consider a single tank of water filled by a pump and draining through a hole at the base.
The inflow to the tank is proportional to the voltage V applied to the pump:
Fin(t) = KmV (t) cm3
/sec.

From Bernouilli’s Law, the velocity of the flow out of the tank is
vout(t) = p
2gL(t) cm/sec,
where g is the gravitational acceleration in cm/sec2
, and L(t) is the height of water in the
tank in cm. The volume flow rate out is thus
Fout(t) = a
p
2gL(t) cm3
/sec,

where a is the area of the outflow orifice in cm2
. Since the density of the water doesn’t
change, conservation of mass can be replaced by conservation of volume. Letting A be the
cross-sectional area (cm2
) of the tank,
AL˙(t) = KmV (t) − a
p

2gL(t). (1)
1. Determine the equilibrium level L0 as a function of a constant applied voltage V0.
2. Linearize (1) about the equilibrium L0 determined in Question 1 with voltage V as the
control input.
3. Is the equilibrium point of the original model (1) with constant voltage V (t) = V0
locally asymptotically stable?

4. Does external stability of the controlled linearized system imply local asymptotic stability? Assume that the implementation of the controller is controllable and observable.
Explain your answer.

5. Define a new state variable x(t) = L(t) − L0, input u(t) = V (t) − V0 and write the
linearized system in state space form. The measured output is the water height x(t).
6. Compute the transfer function, P(s), of the linearized system determined in Question 5.
1
Tank 1 Outflow orifice diameter d 0.4763 cm
Tank 1 Area of the outflow orifice a a = π(d/2)2 = 0.1781 cm2
Tank 1 Cross-sectional Area A 15.5179 cm2
gravitational constant g 980 cm/sec2
Flow Constant Km 3.88 cm3/(V·sec)

Table 1:
7. Find the reference voltage V0 associated with water height L0 = 15cm. Use the parameter values in Table 1.
8. Consider the system linearized about L0 with the values of L0, V0 in Question 7, and
a controller
H(s) = Kp + Ki/s, (2)
where Kp is the constant proportional gain, and Ki
is the constant integral gain.

Such
controllers are known as PI controllers.
(a) Compute the various transfer functions 1
1+P H ,
H
1+P H ,
−P
1+P H for the closed loop
system.

(b) Write P and H as ratios of coprime polynomials:
P =
nP
dP
, H =
nH
dH
.

(That is, nP and dP have no common zeros; and similarly for nH, dH.) Define
the characteristic polynomial
κ = nP nH + dP dH .
Since lims→∞ P(s) = 0, the closed loop is stable if and only if κ has no (closed)
right-half plane zeros. (This is shown in the text.)
i. Consider Ki = 0 (i.e., with only proportional control). For what range of values of Kp is the closed-loop system externally stable? All physical parameters
are positive.

ii. Consider Ki 6= 0. For what range of values of Kp and Ki the closed-loop
system externally stable?
9. (a) The denominator in the transfer functions for the closed loop system with PI
controller determined in Question 8a is a second-order polynomial and can be
written in the form
s
2 + 2ζωns + ω
2
n
.

Determine the natural frequency, ωn, and the damping constant, ζ, in terms of
the feedback gains Kp, Ki
.
2
(b) Determine values of Kp and Ki so that the system exhibits a 98% settling time ts
of less than 5 seconds and a less than one percent overshoot P O. (Note: ts =
4
ζωn

and P O = 100 exp(√−ζπ
1−ζ
2
). How does the system response change if a smaller
value of Kp is used?

10. Construct a Simulink model of the nonlinear model of the tank as follows:
(i) Create a new simulink model file.
(ii) Add a Subsystem block from the Commonly Used Blocks library. Rename
“Subsystem” as “Tank system”.
(iii) Double-click on the subsystem block to open it in a new window. Rename “in”
as V and “out” as L. Delete the existing link between ‘in’ and ‘out’.

(iv) Implement equation (1) between ‘in’ and ‘out’. [Hint: You may need the following
blocks: gain, sum, integrator. You may also use square-root function available
in the pull-down menu of Math function block, which can be found in Math
operations].

(v) Close the subsystem window. Connect the output of the ‘tank system’ to a scope
block.
(vi) Add a Constant block, which can be found in Commonly Used Blocks library.
Rename it as L0. Set the value to 15. Add a square-root function, followed by
a gain block to obtain the value of desired voltage V0. Connect it to the input of
the ‘tank system’.
(a) Include screen shot of the Simulink model (that is, the main system plus the
subsystem) that was created based on steps (i) to (vi).

(b) Submit a plot of the open loop system’s response for 100 seconds.
(c) Now, change the input L0 to L0±1 by adding a block with a square wave generator
of magnitude ±1 and frequency 0.1 Hz. (Since the magnitude of the square wave
changes more slowly than the system settling time, this will yield the response
to a series of “constant” inputs. Submit a plot of the system’s response for 100
seconds. What happens to the water height in the tank?

11. Add a PI closed loop control to the Simulink model in Question 10.
(a) Include screenshot of the Simulink model and ensure that both the main system
and the subsystem are included.
(b) Choose values for Kp and Ki based on your analysis in Question 8 . Submit a plot
of the system’s response with constant reference input 15.

(c) Add a square wave input (pulse) of magnitude 1 and frequency 0.1Hz so the input
is either 14 or 16. Submit a plot of the system response over 100 seconds.
(d) Compare the response to the open loop system.
3
(e) Keeping the same value of Ki
, choose Kp > 0 half that of the value used in
question 11b.

Submit a plot of the system’s response with the same input used
in question 11c for 100 seconds. How does the system’s response change? Is this
similar to that predicted by linear analysis?

(f) Use the same value of Kp as in question 11b and change the value of Ki to half
of the original value. Submit a plot of the system’s response with the same input
used in question 11c for 100 seconds. How does the system’s response change? Is
this similar to that predicted by linear analysis?

(g) What is the steady-state error to a step input, in terms of Kp if Ki = 0?
(h) What is the steady-state error to a step input if Ki 6= 0? Compare the steady-state
error with a proportional controller (Ki = 0) and with a PI controller.
4