EE 407 Homework 3 solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (3 votes)

1 Introduction
The objective of this homework is to get you acquainted with modeling of interacting and
non-interacting processes as well as designing PID controllers using Ziegler-Nichols (continuous
cycling) method and Internal Model Control (IMC, a model-based design method).
The fourth question contains short questions regarding the videos you were expected to watch.
The links to these videos can also be found below.
• P-Only Controller Introduction
• Introduction to Proportional Integral (PI) Control
• PID Control: Derivative Action
Before getting started, make sure that you go through the steps below.
• One of the partners should accept the invitation of this assignment via below link and create
a new team. It will give you access to a repository, namely ee-407-hw3-2018-YourGroupName,
in the @METU-EE407 organization on GitHub. Then, the other partner clicks the same
below link and joins the corresponding team. After these steps, both partners will be able
to work on the same repository.
• Don’t forget to put your names and student IDs in the README file in your repository.
Please don’t forget that we expect each member of a team to make at least one commit to
the repository.
2 Questions
1. Heat Exchanger System In this question, a heat exchanger system will be investigated.
A chemical reactor called ”stirring tank” is depicted in Fig. 1. The top inlet delivers liquid
to be mixed in the tank. The tank liquid must be maintained at a constant temperature by
varying the amount of steam supplied to the heat exchanger (bottom pipe) via its control
valve. Variations in the temperature of the inlet flow are the main source of disturbances in
this process.
Figure 1: Schematic of the heat exchanger system (Courtesy of Mathworks)
(a) Open the figure called HeatExchanger StepResponse.fig that you will find in your
repository. This figure reveals the normalized tank temperature, T, when a step
disturbance is injected in valve voltage, V.
(b) In this step you are required to derive a first-order-plus-deadtime (FOPDT) model of
the heat exchanger characteristics from the given data embedded in the figure. Find
process gain, Kp, process time constant, τp and process dead time, θp.
(c) Create a new Simulink model and name it as Question1.
(d) Design the model realizing FOPDT response with the parameters you found. (Hint:
See Transport Delay block available in Simulink Library.)
(e) Simulate the model for 200 seconds when the input signal is unit step, and plot the
response of the FOPDT model along with the real data provided by the given figure.
Insert your figure into your report with a relevant title, labeled axes, and reasonable
axis limits.
(f) Commit the model and push the local repo to the remote repository on GitHub.
(g) Now, calculate a proportional controller, Kc, for servo control problem with the formula
based on Integral of Time Weighted Absolute Error (ITAE).
(h) Modify the Simulink model to simulate closed loop response of the FOPDT model
under the control of the proportional controller. Commit current version of the model
and push the local repo to the remote repository on GitHub.
(i) For a desired temperature signal of 0.5u(t − 5) (when initial temperature is 0), run
simulations to fine tune the controller. Insert a figure into your report exhibiting the
response of the close loop system for the fine-tuned Kc. What is the final value of Kc?
Did you end up in a point that is far away from the initial guess of Kc? Comment on
the tuning procedure?
2. Non-interacting Tanks Consider the non-interacting tanks system depicted in Fig. 2.
Let Ak(m2
) denote the cross-sectional area of tank k, qk(m3/min) and qk−1(m3/min) its
infow and outflow, respectively, and Rk(min/m2
) its outlow valve resistance. Assuming
that the outflow is linearly dependent to tank water height, qk = hk/Rk. Assume also that
the actuating valve and the level transmitter are ideal; that is, level transmitter can give
instantaneous measurements and actuator can supply the desired water flow without any
limits or delay.
Figure 2: Schematic of the non-interacting tanks
(a) Write down the differential equations satisfied by water heights of all tanks and obtain
the state space representation of this system in the following form h˙ = Ah + Bqi
where h = [h1, h2, . . . , hn]
(b) Find the transfer function, G(s) = Hn(s)/Qi(s), of the system. If you observe
the stucture of state space representation (or the governing differential equations),
each state is dependent only on itself and its previous state. Thus, starting from
G1(s) = H1(s)/Qi(s) and proceeding sequentially may ease up the calculations.
(c) If you were to modify the previous transfer function as G0
(s) = Qn(s)/Qi(s), what
would be its DC gain? Does its DC gain make sense on physical grounds and why
(d) In Ziegler-Nichols method, the idea is to control the system under proportional-only
control and increase its gain slowly until sustaining oscillations are observed at the
output. The system has to be open loop stable (as it is the case in our self regulating
process) and one has to be able to push the system to critical stability. Now, suppose
that n = 2 and note that all of the constants are positive. Show that continuous
cycling method cannot be applied to this system (with transfer function G(s)) using:
• an approximate root locus plot and
• an approximate bode plot. (Hint: At critical stability, a system has zero phase
(e) Now, let n = 3. This time you have a system which can be made unstable/critically
stable. Also let τi = RiAi = 1(min) and Ri = 1(min/m2
) for i = 1, 2, 3. Find the
value of gain Kc (critical/ultimate gain), using both of the methods of step 2d, to
make the system critically stable. Also find the angular frequencies of oscillation,
ωcu(rad/sec). Simulate the system to verify and report your result. Note that slight
numerical inaccuracy may make the system unstable; you may have to decrease the
gain slightly to have a bounded response. In practical systems, this is of no concern
as the actuator output is limited unlike your simulation, and you do not even need a
model of the system to find these parameters.
(f) From your simulation result, determine the so-called critical/ultimate period Pu (period
of oscillations under critical gain). Using Kcu and Pu, find the controller parameters
for a suitable PID controller.
(g) Simulate the system and find the decay ratio (decay ratio is explained in the video
Introduction to Proportional Integral Control).
(h) Commit your simulation model. In this model, you are required to show both your
simulation results (of steps 2e and 2g)
3. Heating of Interacting Masses
Consider the heating process of the masses shown in Fig. 3 (which is the setup of experiment
#4). Let m1 and c1 denote the mass and heat capacity of the wirewound resistor (outer
mass), and m2 and c2 be those of the thermocouple (inner mass). hi and Ai are the heat
transfer coefficient and the area of inner contact, and ho and Ao are those of the outer
one. Assume that each body is at a uniform temperature and heat is transferred only by
convection. qin is the power supplied to the resistor (by the means of Joule heating, ohmic
heating or resistive heating) and qout = hoAo(T1 − Te) is the power lost to the environment.
A similar equation of heat transfer governs the heat transfer between the masses, which is
left for you to find at the first step.
Figure 3: Illustration of the interacting masses being heated
(a) Find the differential equations governing the temperatures of each mass.
(b) Find the electrical equivalent circuit representing this system. Find the values of
circuit elements R1, . . . , C1, . . . , V1, . . . in terms of the given quantities.
(c) Knowing that you can superpose the effect of independent sources in an electrical
circuit, kill the active circuit element corresponding to the environmental temperature
(set its value to 0). Find the transfer function G(s) = T1(s)/Q(s) in terms of the
circuit variables you introduced.
(d) The transfer function you found in the previous step should be of the following form.
Suppose that the system parameters are as follows. Approximate the system as a
FOPDT system.
G(s) = Kp(τ1s + 1)

2 + 2ξτs + 1) =
0.5(10s + 1)
2 + 410s + 1
(e) Find the Internal Model Control PID parameters using this approximation. As the
desired closed loop time constants, use the following two τc = Tp/2 and τc = Tp/8.
Simulate the actual plant with these controllers and comment on your results.
(f) Commit your simulation model of step 3e. Both controlled outputs are expected to be
observed in this model.
4. Miscellaneous Questions
(a) Consider the step response of a bump test shown in Fig. 4. One way that you can
obtain the FOPDT parameters would be to draw a tangent line at the inflection point
(that is, the point where the step response has the highest scope), and intersect it
with the y0 line to find θp. Then, find the time of 0.632∆y = (1 − e
)∆y, and, from
the results of the two, find Tp. Interested readers are encouraged to have a look at
this video giving the explanations of these steps and here to see how to achieve this
programmatically. However, this would either require you to draw the tangent line
rudimentarily or be prone to errors due to spikes caused by noise. Instead, finding
a mathematical expression for the time constant and the dead time may be more
beneficial. To achieve this, let ∆u = u1−u0 and ∆y = y1−y0. Also let y1/3 = y0+∆y/3
and y2/3 = y0 + 2∆y/3. You are also given that the response of y(t) is of the following
form, where t0 is the input step time and u
(.) is the unit step function. Rearrange
this equation to find an expression for t where t > t0 + θp, and then find t1/3 & t2/3
(corresponding to y1/3 & y2/3, respectively). Then, rearrange these results to find Tp
and θp. Using these results and shifting the plots as t0 = 0, show that the formulae
given for them in your lectures are valid.
y(t) = (1 − e

Tp )u
(t − t0 − θp)∆y + y0
(b) Answer the following questions after you have watched the videos on ODTUClass
regarding P, PI and PID controllers.
i. Why is it a good idea to have a dead band in an on-off controller? Find an
additional example of a practical on-off controller apart from those stated in the
ii. Which one of the following systems may observe non-zero ess with a properly
chosen P-only control for different set points, and why? A self-regulating process
or an integrating one.
iii. Consider the problem of driving a car. What are the optimal (in the sense of
ITAE) P-control parameters for the cases of (a) you intend to change the speed of
the car regularly and (b) slope of the road changes when you intend to drive the
car at a constant speed?
iv. ITAE, IAE and ISE controller parameters are found for a certain type of a system
by the minimization of R ∞
R ∞
|e(t)|dt and R ∞
(t)dt, respectively. State
which parameter tuning method (a) penalizes all errors equally, (b) penalizes large
errors more and (c) penalizes initial errors less than those at a later time.
v. Consider the water level control of a tank where your actuator is a pump either
supplying water to the tank or draining water from it. Show the configurations of
Figure 4: A step response obtain as a result of bump test
the pump in order to have a reverse acting and direct acting controllers. Describe
what would happen if the pump is in reverse acting configuration and the controller
is in direct acting mode.
vi. Suppose that SP(t) > P V (tss) where P V (tss) is the process variable when the
controller output is CO = CObias. Draw approximately the integral of error and
discuss how this achieves moving the bias term.
vii. What is reset or integral windup? Suggest a method to eliminate this.
viii. How do decay ratio and settling time generally correlate? How about rise time
and peak time?
ix. What is the derivative kick that occurs when the set point changes stepwise? Why
should you and how can you eliminate it?
x. When is the ideal derivative action detrimental to controller performance? What
should you do if you want to use derivative action in such cases?