This action might not be possible to undo. Are you sure you want to continue?
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1
Examinations June 1996
Time: 3 hours Examiners: Dr E Boje
Total marks: 100 Dr P Gleeson
Instructions to candidates:
1) Attempt FOUR out of five questions. All questions carry equal marks.
2) Candidates are allowed a single A4 sheet of hand written notes. Both sides may be used.
3) Normalised charts and Laplace and z transform tables are attached. Semilogarithmic graph paper
is available.
Question 1 (25 marks)
Consider the following chemical reaction in which substances A
and B form a new substance AB by means of the reversible
reaction,
A + B ⇔ AB
The reaction rate of formation of AB is,
αT
m
m m
AB
A B
log
( )
2
]
]
]
]
(in kg/s)
where
T is the temperature in ºKelvin,
α is a constant
m
A
, m
B
, m
AB
are the masses (in kg) of A, B and AB
respectively
Each kg of AB formed releases q Joules of energy (i.e. exothermic reaction) (if the reaction is
reversed, the energy is absorbed).
The reactants, A and B enter a well stirred, insulated vessel of constant volume, V=constant (i.e.
volumetric outflow = volumetric inflow). The substances are diluted in water and the thermal
behaviour is that of water, with specific heat, c
w
and density ρ
w
. For inputs A and B, for example,
Γ
A
is the inflow concentration in kg of A per m
3
inflow
u
A
is the inflow rate of A in [m
3
/s]
T
A
is the input temperature in [ºK]
a) What are the conserved variables? (Volume is not of interest in this problem.) (4)
b) Find the state differential equation. Clearly identify state variables, inputs and parameters. (15)
c) Find the algebraic output equation. The output variables of interest are (6)
i) the output mass flow rate of product, AB
ii) the yield, M M M
AB A B
iii) the temperature of the output.
V=const
u
A
, T
A
, Γ
A
u
B
, T
B
, Γ
B
outflow
2
Question 2 (25 marks)
a) In Simulink, how would you do the following?
i) Simulate the linear system, S
A B
C D
·
]
]
]
·
−
−
]
]
]
]
]
1 1 3
0 2 4
4 5 1
. (3)
ii) Change the initial condition of an integrator to 3.5. (2)
b) Consider the model of a nonlinear pendulum shown.
( )
& sin( )
&
ω θ βω
θ ω
· − − +
·
1
J
mg T
u
l
where,
J m · l
2
is the inertia,
β is the linear friction
θ is the angle from the vertical
ω is the angular velocity
Draw the Simulink implementation diagram if m=2kg, l =1m, β=0.1, g=10 and T
u
=1Nm unit step
applied at t=0.2. The state variables and the time should be sent to the workspace. (15)
c) Show how you would output the Potential and Kinetic energy in the system above (5)
Question 3 (25 marks)
a) Find the state space representation of the following
linear mechanical system. Use x ·

.
`
,
x
v
x
v
1
1
2
2
The output is y=x
1
, the position of mass m
1
.
bi) Convert the following system into transfer function form.
( )
& x x
x
·
− −
−

.
`
,
+

.
`
,
· +
1 3
2 4
1
2
2 1 2
u
y u
(7)
/Question 3bii)
//////////////////////////////////
m
θ
l
T
u
f
///////////////////////////////
B
1
m
1
k
1
x
2
, v
2
k
2
x
1
, v
1
B
2
m
2
3
Q3bii) Write down the observer form state space description of
P s
s s
s s
( ) ·
+ +
+ +
2
2
1
2 3
(3)
Question 4 (25 marks)
ai) Draw the Bode plot of the transfer function,
P s
s
s s
( )
( / )
( / ) . ( / )
·
+
+ × +
3 5 1
2 2 04 2 1
2
(10)
aii) Without doing any long calculations, what would the approximate response of the above system
be to an input, u(t) = 2 sin(2t)? (3)
bi) Find the unit step response (assuming zero initial conditions) of the system,
P s
s
s s
( )
( / )
( )( / )
·
+
+ +
3 2 1
1 3 1
(5)
bii) Sketch your solution (3)
ci) What damping factor is required from a second order system to have an overshoot of 10%? (3)
cii) What would the corresponding maximum dB overshoot be on the Bode plot? (1)
Question 5 (25 marks)
ai) The system, P s
s
s s
s
( ) ·
+
+ +
4 7
3 2
2
is subject to a staircase input with T=0.5. Calculate the z
domain transfer function, P
z
(z). (Hint: Use a partial fraction expansion.) (7)
aii) Use the final value theorem to find the final value of the output if the input is a step. Does your
answer make sense with respect to the final value of the step response of the continuous system? (3)
b) Given P s
s
s
( ) ·
+
2
3
, find the w domain description for T=0.2 and comment on the similarity and
difference between P
s
(s) and P
w
(w). (Use 3 decimal places in your calculations.) (8)
c) Given P z
z z
z z
z
( )
.
. .
·
− +
+ +
2 05 1
02 05
2
2
and u
0
=1, u
1
=2, u
n
=0 n ≠ 0, 1, initial y=0.
i) Calculate y
n
for n=0, 1, 2, and 3 by writing the difference equation and substitution. (5)
ii) Does the oscillating behaviour make sense in terms of the pole locations in the z plane?
Explain. (2)
1
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1
Examinations June 1997
Time: 3 hours Examiners: Dr E Boje
Total marks: 120 Dr G Bright
Instructions to candidates:
1) Attempt all six questions. All questions carry equal marks.
2) Candidates are allowed a single A4 sheet of hand written notes. Both sides may be used.
3) Normalised charts and Laplace and z transform tables are attached. Semilogarithmic graph paper
is available.
Question 1 (20 marks)
Consider the icecream manufacture process shown alongside.
The ice cream is made up of the following ingredients:
i) Liquid (cream, milk, water etc.) added at a rate r
l
[kg/hr] and
with a density ρ
l
[kg/l].
ii) Sugar, added at a rate r
s
[kg/hr]. The sugar dissolves
completely.
iii) Air is added (fully entrained  does not dissolve or escape) at
a rate of r
a
[litres/hr] and only adds to the volume of the ice
cream product, not to the weight.
The tank has a cross sectional area, A, and is well mixed by the
agitator.
Ice cream outflow is u
out
[l/hr]
a) Find a model for the process with height in the tank and density of manufactured icecream as
outputs. Be careful of units. Clearly state any further assumptions you find necessary. (15)
b) By considering profit as the difference between cost and income, add a state differential equation
to your system to give profit as an additional output. The liquid ingredients cost C
l
[Rand/litre], the
sugar costs C
s
[Rand/kg] and the air is free (i.e. negligible compression costs etc.). The selling price
of icecream is S [Rand/litre]. (5)
liquid
r
l
,
ρl
, C
l
sugar
r
s
, C
s
ice cream
outflow
air
r
a
h
2
Question 2 (20 marks)
a) Explain the relationship between step size and global accuracy for a second order method. Make
a sketch to illustrate your discussion. (5)
b) The linear equation, & x Ax · , x x ( ) t
0 0
· has the solution, ( ) x x A x ( ) ! t e t k
t k
k
· ·

.
`
,
·
∞
∑
A
0
0
0
Show that the modified Euler method,
x x
f x
f x
i i
i i
i i i i
t
t
t t t
+
+ +
· +
+
·
· + +
1
1 1 2 2
1
2 1 21 1 1 2
∆
∆ ∆
ϕ
ϕ = ϕ ϕ
ϕ
ϕ ϕ
α α
β γ
( , )
( , )
with
α α
β γ
1 2
21 2
1 2
1
· ·
· ·
/
is second order and not third order for this linear equation. (10)
c) Draw the Simulink implementation diagram for the following model of a system:
& ( )
& sin( )
x x x x h u
x x x u
y x x
y x u
1 2 1 2
2 1 2
1 1
2
2
2
2 1
· + +
· +
· +
· +
h(u) is available as a set of measured data,
u 4.0 1.0 0.0 1.0 3.0 5.0
h(u) 1.213 2.124 3.234 2.456 1.235 1.123
The input will come from a function generator and the output will be sent to the workspace for
plotting. (5)
3
Question 3 (20 marks)
a) Find the state space representation of the following
linear mechanical system. Use x ·

.
`
,
x
v
x
v
x
1
1
2
2
3
The output is y=x
1
, the position of mass m
1
.
(15)
b) Give rough sketches of the Bode magnitude and phase plots and the unit step responses of second
order lowpass, highpass and bandpass systems (for example as investigated in the laboratory) to
highlight the differences. (5)
Question 4 (20 marks)
ai) Draw the Bode plot (on semilogarithmic graph paper) of the transfer function,
P s
s e
s s
( )
( / )
( / ) . ( / )
.
·
+
+ × +
−
3 2 1
5 2 05 5 1
0 05s
2
(12)
aii) From the Bode plot, what would the approximate harmonic response of the above system be to
an input, u(t) = 2 sin(2t)? Confirm your answer by simple calculation. (3)
b) A second order system is required to have the following worst case specifications:
i) Maximum overshoot ≤ 10% of final value
ii) Rise time ≤ 1.5s
iii) Settling time to 2% ≤ 5.6s
Find the required transfer function and sketch the Bode magnitude plot showing ω
m
and M
m
. (5)
f
///////////////////////////////
B
1
m
1
k
1
x
2
, v
2
x
1
, v
1
m
2
k
2
B
2
B
3
x
3
4
Question 5 (20 marks)
a) Find the response of the system, S
A B
C D
·
]
]
]
· − −
]
]
]
]
]
0 1 1
2 2 2
3 2 1
,
with initial condition x(0) = (1,0)
T
, and input, u(t) = σ(t), a unit step. Sketch your solution. (12)
b) Consider the ping pong ball levitator shown alongside.
Assume that a nozzle makes a cone of air with velocity,
v h
u t
h
air
( )
( )
( )
·
+ α
2
u(t) is the opening of an air supply valve, h is the height above the
nozzle and α is a constant. The drag force on the ball is , ( ) f c A v v
up d air ball
· −
2
. “A” is the ball
cross sectional area and c
d
is the drag coefficient. The model of the ball dynamics is then,
( )
dv
dt m
c A
u t
h
v mg
dh
dt
v
ball
d ball
ball
·
+
−

.
`
,
−

.
`
,
·
1
2
2
( )
α
The output of interest is the total energy of the ball, E
mv
mgh
ball
ball
· +
2
2
Find the linearisation of the system around the equilibrium point with v
ball
= 0, h
ball
= 0.1.
Take m = 0.03kg, g = 9.8Nm/s
2
, A = 1E3m
2
, c
d
= 0.4, α = 0.05m (8)
Question 6 (20 marks)
a) The system, P s
s s
s
( )
.
·
+ +
3
2 5
2
is subject to a staircase input with T=0.2. Calculate the Z
domain transfer function, P
z
(z). (8)
b) A sequence, y
n
, has a Z transform,
Y z
z z
z z z
( )
. .
·
+
+ + +
2
3 2
2 14 03
Find the first 5 terms in the sequence (y
0
... y
4
) by long division. (5)
c) By considering the initial and final value theorems in the Z domain, find equivalent initial and final
value theorems in the W domain and confirm that they are similar to the S domain theorems.
(7)
h
nozzle
ball
v
air
5
Show that aliasing will occur if the signal y t e t
t
( ) sin( ) ·
−
2 is sampled with T=0.5 by finding the z
transform of the sampled sequence and then finding the inverse z transform. (7)
c) If a system has the transfer function P s
s
( )
/
·
+
1
3 1
, and T=0.2, find P
z
(w).
d) Show that the unit step signal ,u(t) = σ(t), has
aii) Use the final value theorem to find the final value of the output if the input is a step. Does your
answer make sense with respect to the final value of the step response of the continuous system? (3)
V
u
E
u
(t)
R
u
(t)
V
l
E
l
(t)
R
l
(t)
H
Pump
P(t)
Lower reservoir
Upper reservoir
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1
Examinations: June 1998
Time: 3 hours Examiners: Dr E Boje
Total marks: 110 Dr G Bright
Instructions to candidates:
1) Attempt ALL five questions. Questions do not carry equal marks.
2) Candidates are allowed a single A4 sheet of hand written notes. Both sides may be used.
3) Normalised charts and Laplace and z transform tables are attached. Semilogarithmic graph
paper is available.
Question 1 (20 marks)
A hydroelectric pumped storage scheme moves water between an upper and a lower water
reservoir (subscripts u and l respectively). During periods of low electricity demand, power is
cheap and water is pumped up to the upper reservoir. (Energy is stored as potential energy).
During peak electricity demand, water flows (backwards) through the turbines and the
potential energy is recovered as electrical energy (i.e. electricity is sold back onto the grid at a
higher price). (Electricity is usually sold in kWh but we will use MJ as a measure of power.)
Develop a model for such a scheme under the following assumptions:
• The electricity price (tariff) is T(t) [Rand/MJ] and is a function of time because of
varying demand.
• The power setpoint of the generator station is set at P(t) [MW = MJ/s] by the operator.
P(t) > 0 implies that the station is generating (i.e. selling electricity).
P(t) < 0 implies that electricity is being used to pump water.
• The evaporation rate from the reservoirs is given as E
u
(t) and E
l
(t) [m
3
/s].
• The inflow rate into the reservoirs from rainfall is given as R
u
(t) and R
l
(t) [m
3
/s].
• The acceleration due to gravity is g [m/s
2
].
• The density of water is ρ [kg/m
3
]
• To keep the model simple, the efficiency η = (what you get)/(what you pay for) of
pumping or generating is η = 1.
• The head, H, can be regarded as constant.
• There is a constant (overhead) cost, C [R/s]
of running the station if it is generating,
pumping or standing idle.
The model should be third order (including one
state variable for the number of Rands in the
station’s account) and the required outputs are:
1) The (potential) energy available from the
water in the upper reservoir.
2) The amount of money (in Rand) in the
station’s account.
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1 June 1998
PAGE 2
Question 2 (25 marks)
a) Consider the model of a dc machine driving a mechanical load,
( )
( )
a
a
mech a
Ri k V
L
1
dt
di
dt
d
) ( T i k
J
1
dt
d
− ω − ·
ω ·
θ
ω − βω − ·
ω
φ
φ
where the state variables are,
ω = machine speed
θ = shaft position
i
a
= armature current
and L (inductance), J (moment of inertia), k
φ
(torque constant), R (resistance), β (friction
constant) and µ (load constant) are parameters. T
mech
(ω) is the mechanical load which is
known from measurements and is given as a table.
ω T
mech
(ω)
0 0
50 5
100 15
150 40
200 100
i) Set up the Simulink implementation diagram for the system with V a step from 200V
to 300V at time t=2s. The output speed should be sent to the workspace along with
the simulation time. The armature current should be displayed on a graph. (10)
ii) Explain how to set up initial values for (ω, θ, i
a
) (2)
iii) Explain how to run the simulation for 10 seconds with at least 100 points between
the start and end time. (3)
b) Show that the Linear Implicit Euler method is a single step method by expressing the
method in the form,
i i 1 i
t? x x ∆ + ·
+
(5)
c) Show that the Modified Euler Method is second order and not third order for the linear
equation, x A x · & . Hint: Write out the actual value of
i
) t t (
1 i
i 1 i
e x x
A −
+
+
· ( )
i
t
1 i
e x
A
+
∆
· as
a series expansion. (5)
Question 3 (20 marks)
ai) Draw the Bode plot of the transfer function,
1 ) 5 / s ( 4 . 0 2 ) 5 / s (
) 1 ) 1 /( s )( 1 1 / s ( 4
) s ( P
2
+ × +
+ − +
· (10)
aii) Without doing any long calculations, what would the approximate response of the above
system be to an input, u(t) = 2 sin(3 t)? (2)
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1 June 1998
PAGE 3
Q3b) In the laboratory, the following response was measured as the step response of a second
order lowpass system. Identify the system transfer function  i.e. write down P(s). NB: The
gain is not unity. (8)
Time (sec.)
A
m
p
l
i
t
u
d
e
Step Response
0 0.5 1 1.5 2 2.5 3
0
0.5
1
1.5
2
Question 4 (25 marks)
a) Find the state space representation of the following linear electrical system. (NB x
1
is the
current through L
1
and y
1
is the voltage across L
1
.) (12)
bi) Use the Laplace transform to find the output of the system,
( )x
x x
1 0 y
u
2
3
2 1
2 0
·
,
`
.

+
,
`
.

−
−
· &
with x
0
= (1 –1)
T
and u(t) = σ(t). (10)
bii) Sketch your solution (3)
y
2
+
R
2
L
1
x
1
u
1
R
1
L
3
C
2
x
2
x
3
y
1
UNIVERSITY OF NATAL
DEPARTMENT OF ELECTRICAL ENGINEERING
SYSTEMS AND SIMULATION  DNEL3SS1 June 1998
PAGE 4
Question 5 (20 marks)
a) Given
3 s
4
) s ( P
s
+
· , find the w domain description for T=0.2 and comment on the
similarity and difference between P
s
(s) and P
w
(w). (Use 3 decimal places in your
calculations.) (8)
bi) Calculate the ztransform of the signal, y(t) = e
(t)
sin(5t) sampled at T=1.0. (4)
bii) By finding the inverse ztransform, show that aliasing has occurred and explain why. (3)
c) Find the first 4 terms in the inverse ztransform of
3 . 0 z 5 . 0 z
z 2
) z ( Y
2
+ +
· by means of
long division. Use the final value of the signal to confirm that you result makes sense. (5)
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1
Examinations June 1999
Time: 3 hours Examiners: Dr E Boje
Total marks: 115 Mr B Burton
Instructions to candidates:
1) You may attempt all six questions. A maximum of 100 marks will be awarded. Questions do not
carry equal marks.
2) Candidates are allowed a single A4 sheet of hand written notes. Both sides may be used.
3) Normalised second order charts and Laplace and ztransform tables are attached. Semi
logarithmic graph paper is available.
Question 1 (20 marks)
Consider the evaporating system illustrated. The system works at
standard atmospheric conditions. Water enters at a flow rate of r
in
[m
3
/s] and temperature T
in
[°C]. An electric element is used to heat
and if the temperature is at 100°C, evaporate the water. (Assume
that no evaporation occurs below 100°C.) The element power is
P
elec
[watts]. The heat capacity of the water is C
w
[J/kg/°C] and the
latent heat of evaporation (i.e. water → gas) is L [J/kg].
Develop a dynamic model for the system, choosing the height of the water in the vessel as the output
variable. The vessel has a uniform crosssectional area, A. Assume that the water density, ρ, does
not change with temperature.
Note that depending on the water temperature, you will require two different differential equations
for the same state variable. You may use an IF {condition} THEN {SDE_Option1} ELSE
{SDE_Option2} to achieve this.
Question 2 (20 marks)
a) Explain the relationship between step size and global accuracy for a third order method. Explain
why the local error determines the global error. Also explain what happens to your analysis if the
step size is too big or too small, using a sketch to illustrate your discussion. (5)
b) Explain why the Lipschitz condition was required in our derivation of the bound on the
asymptotic accuracy of a single step method. (5)
Question 2c/…
r
in
, T
in
h
P
elec
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 1999
Page 2 of 4
Question 2 (continued)
2c) Consider the system,
,
`
.

+ −
+
·
2 1 1
2
x x x
t x
x& ,
,
`
.

−
·
1
2
0
x
Illustrate the modified Euler by simulating 2 steps (i.e. calculate x
1
and x
2
by hand), with ∆T = 0.1.
Use 3 decimal digits and present all (intermediate) calculations in a tabulated form. (10)
Question 3 (15 marks)
Consider the following model of a cell growth in a biosystem. The state differential equation is
dC
dt
S V
S V K
C
s
·
+
µ
max
/
/
cell growth rate
in in
s
max
u C
K V / S
V / S
dt
dS
ρ +
+
µ γ − · substrate conservation
out in
u u
dt
dV
− · volume conservation
with,
growth rate, r
S V
S V K
s
·
+
µ
max
/
/
.
µ
max
is the maximum growth rate.
S is the substrate mass
V is the volume
K
S
is the limiting substrate concentration.
γ is the yield
C is the number of cells
u
in
is the substrate volumetric feed rate
ρ
in
is the substrate concentration
= [0.1 (kg substrate)/(m
3
feed)]
u
out
is the outflow rate
u
in
and u
out
are shown below.
Outputs are the cell concentration and the substrate concentration. These must be displayed on
graphs and sent to the Matlab workspace for further analysis.
a) Identify the state variables, the inputs, outputs and parameters. (3)
b) Draw the Simulink implementation diagram, explaining all relevant details of how you would set
up the simulation. Simulation time is 500 time units. (12)
Question 4/…
10 200 t [hr] 100 t [hr] 30
u
in
13
u
out
35
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 1999
Page 3 of 4
Question 4 (25 marks)
a) Find the state space representation of the following linear electrical system. The outputs are the
voltages across the inductor and resistor. The state variables are the voltages across the
capacitors and the current through the inductance.
(12)
4bi) Given the following unit step response of a second order system (for example as investigated in
the laboratory), find the parameters, k, ω
n
and ζ of the transfer function,
( ) ( ) 1 / s 2 / s
k
) s ( P
n
2
n
+ ω ζ + ω
· . (8)
bii) Make a rough sketch of the corresponding Bode plot showing salient features. Semilog paper is
not required. You should find an approximate value of the phase at ω
n
/2 and 2ω
n
using the
normalised chart). (5)
Time (sec.)
A
m
p
l
i
t
u
d
e
Step Response
0 1.4 2.8 4.2 5.6 7
0
0.5
1
1.5
2
2.5
3
3.5
Question 5/…
y
1
+
y
2
C
1
x
1
u
1
R
1
C
2
x
2
L
x
3
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 1999
Page 4 of 4
Question 5 (25 marks)
ai) Draw the Bode plot (on semilogarithmic graph paper) of the transfer function,
( )
( )( ) 1 10 / s 1 1 / s
1 3 / s e 3
) s ( P
s 2 . 0
+ +
+
·
−
(12)
aii) From the Bode plot, what would the approximate harmonic response of the above system be to
an input, u(t) = 2 sin(2t)? Confirm your answer by a simple calculation. (3)
b) Find the natural response of the system,
]
]
]
]
]
− − ·
]
]
]
·
1 2 3
2 4 2
1 1 0
D C
B A
S , with input, u(t) = 0 and
initial condition x(0) = (1, 1)
T
. Sketch your solution. (10)
Question 6 (10 marks)
a) The system,
3 s 2 s
4
) s ( P
2
s
+ +
· is subject to a staircase input with T=0.2 seconds. Calculate the
Z domain transfer function, P
z
(z). (5)
b) The system,
2 s
1
) s ( P
s
+
· is subject to a staircase input with T=0.1 seconds. Calculate the w
domain transfer function, P
z
(w) and comment on the relationship between s and wdomain transfer
functions. (5)
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1
Examinations June 2000
Time: 3 hours Examiners: Dr E Boje
Total marks: 117 Mr B Burton
Instructions to candidates:
1) You may attempt all six questions. A maximum of 100 marks will be awarded. Questions
do not carry equal marks.
2) Candidates are allowed a single A4 sheet of hand written notes. Both sides may be used.
3) Normalised second order charts and Laplace and ztransform tables are attached. Semi
logarithmic graph paper is available.
Question 1 (20 marks)
Two tanks are arranged as shown in the diagram below. Salt and water are added into the first
tank at rates Γ
s
[kg/s] and Γ
w
[m
3
/s] respectively. The tanks are well mixed and the salt
dissolves completely. The flow between the two tanks depends on the pressure difference,
2 2 1 1 A A
h h k f ρ − ρ · . (Recall that density, ρ = mass/volume, ρ
water
=1000kg/m
3
.) The
flow out of the second tank is given by
2 2 B B
h k f ρ · . Both flows are in m
3
/s of the
solution in the respective tanks and you can assume that they are always positive. The tank
areas are A
1
and A
2
respectively. Find the model of the system. The (two) outputs required are
the density of the solution in each of the tanks.
P
f
B
Γ
water
[m
3
/s]
f
A
Γ
salt
[kg/s]
h
1
ρ
1
h
2
ρ
2
tank 1
tank 2
mixer
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 2000
Page 2 of 4
Question 2 (20 marks)
a) For fixed ∆t
i+1
=∆t, the linear equation, & x Ax · , x x ( ) t
0 0
· has the solution,
( ) ) t ( ! k t ) t ( e ) t (
i
0 k
k k
i 1 i
x A x x
t A
∑
∞
·
∆
+
∆ · ·
A 2
rd
order Runge Kutta method (not modified Euler) is,
x
i+1
= x
i
+ ∆t ϕ ϕ (x
i
, t
i
, ∆t)
2 1
4
1
4
3
ϕ ϕ ϕ ϕ ϕ ϕ + ·
with,
( )
i i 1
t , x f · ϕ ϕ
,
`
.

∆ + ∆ + · t
2
3
t , t
2
3
i 1 i 2
ϕ ϕ ϕ ϕ x f
For the above linear equation, show that this method is 2
nd
order and not 3
rd
order. (6)
b) Explain how two types of stepsize control algorithms work. (You may wish to use a
combination of explicit and modifiedEuler as an example.) (8)
c) Find the observer form state space description of the following system:
( )
( ) ( ) ( )( ) 1 1 / s 1 2 / s 5 . 0 2 2 / s
1 3 / s 2
) s ( P
2
+ + × +
+
· (6)
Question 3 (20 marks)
a) A system has the following model:
( )
) u x tan( y
) u x sin( 3 ) x cos( 2 x x
x x
1
1 1 2 2
2 1
− ·
− − + − ·
·
&
&
Find the linearised state space model about the steady state with x = (0, 0)
T
. (6)
b) Draw a Simulink implementation diagram of the system in Question 3a. The input comes
from a function generator and the output and simulation time must be sent to the
workspace. (5)
c) Show how would you do the following in Simulink
i) Set the initial condition of an integrator to 123. (1)
ii) Run a simulation for 20s with a minimum of 100 output data points. (2)
iii) Evaluate the flux density, B given the magnetic field intensity, H. The BH
magnetisation data is available numerically. (2)
iv) Simulate a linear system given the state space matrices,
]
]
]
·
D C
B A
S (2)
v) Generate the bounded ramp signal shown. (2)
u(t)
2
2 t
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 2000
Page 3 of 4
Question 4 (20 marks)
a) Find the state space model of the following electrical circuit. Note that the input u
2
is a
current source and the output, y
2
is the voltage across this source. Be careful to work
systematically. (20)
Question 5 (23 marks)
a) The Bode plot of a second order, low pass system (such as was measured in the practical
SS2) is shown below. Find the plant model and hence sketch the step response showing
salient features (t
p
, M
p
, t
r
, t
s
, etc). (8)
Frequency (rad/sec)
P
h
a
s
e
(
d
e
g
)
;
M
a
g
n
i
t
u
d
e
(
d
B
)
Bode Diagrams
30
25
20
15
10
5
0
5
From: U(1)
10
1
10
2
10
3
180
150
120
90
60
30
0
T
o
:
Y
(
1
)
b) Draw the Bode plot (on semilogarithmic graph paper) of the transfer function,
( )
( ) ( ) 1 5 / s 3 . 0 2 5 / s
e 1 1 / s 2
) s ( P
2
s 1 . 0
+ × +
+
·
−
(15)
y
1
+
R
1
L
2
x
2
u
1
R
2
L
3
C
1
x
1
x
3
u
2 y
2
UNIVERSITY OF NATAL
School of Electrical and Electronic Engineering
SYSTEMS AND SIMULATION  DNEL3SS1 June 2000
Page 4 of 4
Question 6 (14 marks)
a) Find the ztransform of the following system transfer function assuming the input is a unit
staircase (i.e. zero order held). The sampling rate is T=0.2.
) 5 s )( 1 s (
2 s
) s ( P
+ +
+
· (6)
b) Given the ztransform of a sequence, U(z) = Z{u
i
},
6 . 0 z 8 . 0 z
z
) z ( U
2
+ −
·
i) Find the first 4 terms of u
i
by long division. (4)
ii) Find the underlying signal u(t) assuming that T=1 and no aliasing has occurred.
(4)