You are on page 1of 5

Lecturer: Prof. E.

Frazzoli

151-0591-00 Control Systems I (HS 2022) Problem Set 2

Topic: Signals and Systems, Linearization

Recitation Date: 07.10.2022


maalbert@ethz.ch October 5, 2022

Problem 1 (System classification)


Label the systems below according to the following categories and justify your answer:

• SISO/MIMO,

• time invariant/time variant

• linear/nonlinear

• static/dynamic

• order of the system

The variable u(t) denotes the input to the system, y(t) denotes the output of the system and t refers
to the time.
dy(t) 1
a) = a2 y(t) + √ u(t), u(t), y(t) ∈ R
dt t
b) y(t) = L sin u(t), u(t), y(t) ∈ R2
dx(t)
c) = t2 x(t) + b u(t)
dt
y(t) = cos(c) x(t) + d u(t), x(t), u(t), y(t) ∈ R
dx(t)
d) = M (t) x(t) + N u(t)
dt
y(t) = O x(t) + P u(t), M (t) ∈ R4×4 , N ∈ R4×2 , O ∈ R5×4 , P ∈ R5×2

Problem 2 (Block Diagram Algebra)


Derive the transfer function of the interconnected system for the following block diagrams. That is,
derive Σ = f (Σ1 , Σ2 , . . .) s.t. y = Σu.

Σ2

+
+ +
u Σ1 y

Figure 1: Example (a)

1
Σ7

+
+ + y
u +
Σ1 Σ3 Σ4 Σ6
− +

Σ2 Σ5

Figure 2: Example (b)

Σ7

Σ3

+ +
+ + y
u +
Σ1 Σ2 Σ4 Σ6
− −

Σ5

Figure 3: Example (c)

Problem 3 (Modelling, State-space, Linearization)


Consider a seesaw as shown in Figure 4. One would like to control the angle α by connecting two
motors with propellers on both ends of the seesaw. The distance from the center of the seesaw to
either of its propellers is `. Furthermore there is a point mass with weight mw added to the seesaw
at a distance of `w from the center of the seesaw. The propellers have angular velocities ω1 and ω2
which generate a force F1 ≥ 0 and F2 ≥ 0 respectively. Assume the seesaw’s moment of inertia J to
be known.

ω1 mw , `w ω2

α̇

Figure 4: Seesaw with attached weight with mass mw and distance from center `w

2
a) Write down the differential equation that governs the motion of the seesaw.

b) Assume that you can only control the difference of the propeller forces u(t) = F2 (t) − F1 (t) and
that you have a sensor to measure the angular position of the seesaw. Define the state of the
system and write the system dynamics in state space form. What is the order of the system? Is
it linear?

c) You would like to control the system around a desired operating point given by αe = α̇e = 0.
What is the required control input ue to make the desired operating point an equilibrium of the
system?

d) In class you have learnt that in practice nonlinear systems can often be quite well approximated
by linear systems near their equilibria. Linearize the system around the previously computed
equilibrium point (αe , α̇e , ue ) and write it in (LTI) state-space form.

e) Optional: What would the (LTI) state-space form look like if your sensor would only allow you
to measure α̇ instead of α? (Hint: Which of the A, B, C, D matrices would change?)

Problem 4 (Matlab Nonlinear model vs. linearization)


Consider a pendulum that is mounted to a wall and connected to a horizontal spring as shown in Figure
5. Let l be the length of the pendulum, Θ its moment of inertia, m its mass, and let λ represent the
damping constant of the pendulum acting at the pivot (damped rotation).
Further, let k represent the spring constant of the spring, and denote by a the distance to the pivot
of the point that connects the spring and the pendulum. Assume the spring to be relaxed at ϕ = 0.
The system is actuated by an external force F (t) which acts at a right angle to the pendulum. There
is a sensor measuring the angle ϕ which we assume to be limited to ϕ(t) ∈ − π2 , π2 .

a
k

ϕ(t) F (t)

Figure 5: Pendulum connected to a horizontal spring.

The differential equation governing the dynamics of the above described system is assumed to be given
by
a2 · k
Θ · ϕ̈(t) = −l · m · g · sin ϕ(t) − · sin 2ϕ(t) − λ · ϕ̇(t) + l · F (t).
2
Further, let the system parameters be

3
l = 1m
m = 1 kg
g = 10 m/s2
a = 0.5 m
k = 10 N/m
λ = 3 Nms/rad
Θ = 1 Nms2/rad

The initial conditions at t = 0 are assumed to be such that pendulum is at angle ϕ = − π4 with angular
velocity 1 rad/s in clockwise direction.

In the following we will implement the above system in Simulink and see how it behaves with respect
to the linearization around a certain equilibrium. To do so we provide two templates, a Simulink
model template ModelComparison.slx and a Matlab script ModelComparison.m both of which you
should complete. (See Hints below for some help on Simulink/Matlab.)

a) (Pen and paper) Define the state, input and output of the system and write it in state-space
form.

b) In the Simulink model add the control input F (t) which we consider to be a signal that jumps
from 0 N to 0.1 N after 10 s and then rises to 5 N at time t = 15 s. To do so, enter the subsystem
”Input: F(t)” and model the control input F by two ”Step” blocks. Connect the control input
to the output of the subsystem (yellow block F ). Simulate the model for at least 20 s and use a
”Scope” block to verify that the control input signal F behaves as expected.

c) Implement the ”nonlinear Model” subsystem in Simulink and set the missing parameters in the
ModelComparison.m file. Run first the ModelComparison.m file, then the Simulink model and
have a look at the ”phi(t)” scope block situated at the upper level of the Simulink model.

d) (Optional, pen and paper) Linearize the system around the equilibrium point (ϕ = 0, ϕ̇ = 0, F = 0)
and write it in state-space form.

e) Implement the ”linear System” subsystem in Simulink to represent the linear approximation of
the nonlinear model computed above.
Hint: The linearization around the equilibrium mentioned above is given by

0 1
" # " #
0
δ ẋ(t) = A · δx(t) + B · δu(t) = 2k · δx(t) + l · δu(t)
− glm+a
Θ
−λ
Θ Θ
h i
δy(t) = C · δx(t) + D · δu(t) = 1 0 · δx(t) + 0 · δu(t)

i) Add the matrices of the linearization to the ModelComparison.m file. Subsequently, in the
Simulink model, use a ”state-space” block and enter the A, B, C, D matrices (point them
to the matrices defined in the ModelComparison.m file).
ii) Choose the inital conditions of the state δx(t) such that they match the initial conditions of
the nonlinear model. Add these to the ModelComparison.m file and match the Simulink
model.
iii) Connect the linear system to the same input F (t) used for the nonlinear model and connect
the linear system output to the scope ”phi(t)”.
iv) Simulate the system and compare the outputs of both models (you may need to rerun
ModelComparison.m first). In which time intervals does the linear model stay ”close” to
the nonlinear one? Why?

4
Hints on using Simulink/Matlab and the provided templates:

1. The system is broken down into ”subsystems”. Each of the subsystems is colored in green, you
can enter the subsystem by double clicking it and exit it using ”esc”. Inputs and outputs are
colored in yellow. Both ”Subsystem” and ”in” and ”out” blocks can be found in the Simulink
Library Browser under ”Ports & Subsystem”.

2. Multiple signals can be combined using a ”Mux” block (Simulink Library Browser, under ”Signal
Routing”) and then inspected using a ”Scope” block.

3. Sinusiodal functions can be found in the ”Trigonometric Function” block under ”Math Opera-
tions”.

4. If you double click an ”Integrator” block, you can specify its parameter such as e.g. initial
conditions.

5. In a Matlab file, sections starting with ”%%” can be run separately. Make use of this to run
through the different tasks of this problem.

You might also like