TNG022_220318_eng

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Exam for the course

Modelling and simulation


Date and Time: Friday 18 March 2022, time: 14 - 18
Course: TNG022 - Modelling and Simulation
Exam code: TEN2
Department: ITN
Number of exercises: 4
Number of sheets (including this page): 8
Responsible teacher: Anna Lombardi, tel 011-363197
Course administrator: Marie-Louise Gustafsson, tel 011-363121,
[email protected]

Permitted material: Theory book Modeling and simulation with normal


reading notes, calculator without already-made programs,
dictionary.
Suggestion of solutions: Displayed after the exam on the course homepage
in Lisam.

Discussion of exam: Wednesday 6 April 2022, time: 12.30-13.00, TPM62.

Preliminary grades: grade 3 18 - 25


grade 4 26 - 33
grade 5 34 - 40

Note! The solution to all the exercises must be presented so that all the steps
(except the trivial computations) can be followed. Inadequate explanations
will result in point reduction.

Good luck!
Basic physical relationships Bond graph elements (1)
e(t)
Bond: Half arrow gives direction of energy flow
Effort Flow Static Effort Flow f(t)
relationship (Storage) (Storage)
e(t)
Designation e(t) f(t) R:γ I:α C:β Effort source: Se System Input and output
f(t)
Electrical Voltage Current Resistor Inductor Capacitor
e(t)
u(t) [V] i(t) [A] R [Ω] L [H] C [F] Flow source: Sf System Input and output
f(t)
Mechanical Force Velocity Friction Mass Spring const.
translation F(t) [N] v(t) [m/s] μ [Ns/m] m [kg] 1/k [m/N] e(t)
Resistive element: R:γ
f(t)
Mechanical Torque Angular vel. Friction Inertia mom. Torsion const.
2
rotation T(t) [Nm] ω(t) [rad/s] μ [Nms/rad] J [Nms ] 1/k [rad/Nm]
e(t)
Effort storage: I:α
f(t)
Flow Pressure Flow Fluid res. Inertance Fluid capac.
2 3 5 4 4 2
p(t) [N/m ] Q(t) [m /s] Rf [Ns/m ] L f [kg/m ] Cf [m s /kg]
e(t)
Flow storage: C:β
f(t)
Thermal
system Pseudo-bond graphs

Series junction:
Linear system e (t) f(t) •
2 • Same flow
Static relationship (R) : e(t) = γ f(t) e (t)
1

f(t)
s • Zero effort sum:

t e (t) - e (t) - ... - e (t) = 0
1 ⎮ e(τ)
1 2 n
Effort storage (I) : f(t) = dτ e (t) f(t) •
α ⌡ 3

t
1 ⌠
Flow storage (C) : e(t) = ⎮ f(τ) dτ Parallel junction:
β ⌡
e(t) f (t) •
2 • Zero flow sum:
Idea with bond graph: ⋅ f(t) [J/s].
Energy balance (effect), P(t) = e(t) e(t) f (t) - f (t) - ... - f (t) = 0
p • 1 2 n
f (t)
e(t)
1 • Same effort
e (t) f (t) •
f(t) 3
1 2

3 4
Bond graph elements (2) Causality - cause and effect
e1(t) e2(t) e2(t) = n e1(t) Se e(t) e(t) is input,
Transformer: Effort source:
TF -1 f(t) f(t) is generated.
f1(t) f2(t) f2(t) = n f1(t)
n
Sf e(t) f(t) is input,
Flow source:
f(t) e(t) is generated.
e1(t) e2(t) e2(t) = r f1(t)
Gyrator: GY -1 e(t) e(t)
f1(t)
r
f2(t) f2(t) = r e1(t) Resistive element: R:γ eller R:γ
f(t) f(t)
t
e(t) 1 ⌠ d f(t) e(t)
Controlled element: Effort storage: I:α f(t) = ⎮ e(τ) dτ =
f(t) α ⌡ dt α
G Objekt
t
e(t) 1 ⌠ d e(t) f(t)
Flow storage: C:β e(t) = ⎮ f(τ) dτ =
Full arrow shows signal flow Object: R-element, sources f(t) β ⌡ dt β
without energy transport. G can transformer and gyrator.
be a dynamic system.
Series junction:
e (t) f(t) •
2 All bonds except one shall
e (t) have the causal stroke at
1
s •
f(t) the s.

e (t) f(t) •
3

Parallel junction:
e(t) f (t) •
2
e(t) Only one bond will have
p • the causal stroke at
f (t) the p.
1

e (t) f (t) •
3

e1(t) e2(t) e1(t) e2(t)


Transformer: TF or TF
f1(t) f2(t) f1(t) f2(t)
n n
e1(t) e2(t) e1(t) e2(t)
Gyrator: GY or GY
f1(t) f2(t) f1(t) f2(t)
r r
1.
a) Consider the system
1
G(s) =
(s + 100)(s + 0.001)

Is the system stiff? Motivate your answer. (1p)

b) Consider the following differential equation

ẏ(t) = 2t + 1
y(0) = 0

the equation is simulated using Euler’s explicit method (xn+1 = xn +


hf (xn )) with step length h = 1 s. Compute the values y(tn ) at the
times tn = 1, 2, 3 s. (2p)

c) The exact solution to the differential equation in b) is given by

y(t) = t2 + t

Compute the local and global error for time tn = 2 s. (3p)

1
d) Consider the Simulink model i Fig. 1.

Figure 1: Simulink model in exercises 1d) and e).

Determine a state space model for the system. (2p)

e) You would like to simulate the system in d) using Euler’s method


(xn+1 = xn + hf (xn )). Which is the longest step size that can be
used in order to have a stable simulation? Motivate your answer. (2p)

2
2.
Consider the mechanical-hydraulic system in Fig. 2.
The mass m1 is coupled, via an elastic line with spring constant k1 , to a
massless piston. This affects, via an hydraulic cylinder with cross area A
and fluid resistance Rf , the mass m2 , that is fixed to a spring with spring
constant k2 and a damper with damping coefficient b. Gravity must be taken
into consideration.

Figure 2: System in exercise 2.

a) Draw a bond graph of the system (the bond graph shall be simplified
as much as possible). (4p)

b) Discuss causality. (1p)

c) Determine a state space description for the system. Velocity of the mass
m2 represents the output signal and gravity force the input signal. (5p)

3
3.

a) Consider the bond graph in Fig. 3. Determine a mathematical model


for the system represented by the bond graph. (4p)

Figure 3: Bond graph in exercise 3a).

b) Which index have the two DAEs below? Motivate your answer! (3p)

i) ẋ1 (t) = 3ẋ2 (t) + 2x3 (t) + x2 (t)


ẋ3 (t) = 2x2 (t)
x2 (t) = u(t) − x1 (t)

ii) ẋ1 (t) = 4x3 (t) + 2x2 (t)


ẋ2 (t) = u(t) − 3x1 (t)
ẋ3 (t) = x2 (t)

c) Draw a block diagram schematic for the bond graph i Fig. 4. Use only
blocks of the type: gain, integrator, sum, input. (3p)

Figure 4: System in exercise 3c).

4
4.

a) Which of the following models is ARX or, respectively, ARMAX?


Motivate your answer! (2p)

1. y(t) + 3y(t − 3) = u(t − 3) + e(t) + e(t − 1)


2. y(t − 2) − u(t) + 6u(t − 2) = e(t − 3)
3. y(t) = u(t − 1) + 3u(t − 2) − u(t − 3) + e(t)
4. y(t − 1) = 3y(t − 2) + u(t − 3) − 2e(t − 2) + e(t − 3)

b) Consider the model

y(t) = b1 u(t − 1) + b2 u(t − 2) + e(t)

Determine the predictor in linear regression form. (2p)

c) The model
y(t) = b1 u(t) + b2 u(t − 1) + e(t)
is fitted to the data with help of the least square method (e(t) is white
noise).
The input signal is

u(t) = 1 + (−1)t , t = 1, . . . , N

Assume that the true system that has generated the measures is given
by
y(t) = u(t) + u(t − 1) + ϵ
where ϵ is a constant disturbance. Which values do the estimates of b1
and b2 converge to when N → ∞? (4p)

5
d) Two ARX-models have been estimated: arx213 and arx492. Figure 5
shows the pole-zero diagram with 99% confidence interval. Give which
output and which pole-zero diagram belong to the arx213 model and
which to the arx492 model. Motivate your answer! (2p)

(i ) (ii )

Figure 5: Pole-zero diagram with confidence interval in exercise 4d).

You might also like