Scientific & Engineering Programming
II Year Electronics and Computer Engineering, FoE, WrUST
Laboratory Class 13 – Dynamical systems in Simulink
The scope
To get familiar with the methodology of dynamical systems simulations in Simulink, methods for results visualization and analysis.
Tasks
1. For the double pendulum model
(m1+ m2)l1θ¨1+ m2l2θ¨2cos(θ1− θ2) + m2l2θ˙22sin(θ1− θ2) + g(m1+ m2) sin θ1= 0 m2l2θ¨2+ m2l1θ¨1cos(θ1− θ2) − m2l1θ˙12sin(θ1− θ2) + m2g sin θ2= 0 run the simulation with different initial conditions. Visualize the obtained results. Repeat the simulations for different system parameters.
2. Equipping a kinematic car with a trailer, as shown below,
X Y
x
y �
�
l
0
d�1
where (x, y, ϕ0, ϕ1, θ) is the system configuration (x, y being the rear axle position, ϕ0 – the car orientation, ϕ1 – the trailer orientation, and θ – the wheel steering angle,) and l and d are its parameters (car and trailer lengths, respectively,) one obtains the kinematics model of such system described by a set of differential equations
˙
x = cos θ cos ϕ0u1
˙
y = cos θ sin ϕ0u1
˙
ϕ0= sin θ l u1
˙
ϕ1= cos θ
d sin(ϕ0− ϕ1)u1
θ = u˙ 2
,
1
Scientific & Engineering Programming, II Year EaCE, FoE, WrUST 2
where u1 and u2 are the car controls (its longitudinal speed, and the wheels turning speed.) Observe the behavior of the car for a sequences of constant controls as follows (apply each value for a constant periods t0 (∈ [0.1s, 1s])):
(a) u1 u2
=1 0
0 1
1 0
0
−1
(b) u1
u2
=1 0
0 1
0
−1
1 0
(c) u1 u2
=1 0
0 1
−1 0
0
−1
(d) u1 u2
=1 1
1
−1
−1
−1
−1 1
(e) u1
u2
=0 1
1 0
0
−2
1 0
0 2
−1 0
0
−2
−1 0
0 1