Scientific & Engineering Programming
II Year Electronics and Computer Engineering, FoE, WUST
Laboratory Class 11 – Dynamical systems in Matlab
The scope
To get familiar with the methodology of dynamical systems simulations in Matlab, methods for results visualization and analysis.
Prerequisites
Before the classes you should know, how to:
• represent and define differential equations,
• solve numerically differential equations,
• visualize solution of the differential equation,
• model simple physical systems.
Tasks
1. Exercise the harmonic oscillator from the task 6, Lab Class 3, if not done earlier.
2. Equip the harmonic oscillator with a damper, which generates the friction force proportional to the movement velocity Ff = −cdxdt, where c is called the viscous damping coefficient.
Repeat the simulations. Analyze the system behavior for different values of the system damping ratio ζ = c
2√
mk (ζ larger than, equal to, or smaller than 1.)
3. Consider a driven harmonic oscillator with a damper, affected by an externally applied force F (t).
• Analyze the step response of the system.
• Apply a sinusoidal driving force F (t) = F0sin(ωt), where F0 is the driving amplitude and ω is the driving frequency. Analyze the system behavior for different values of the driving frequency ω (ω larger than, equal to, or smaller than ω0=
qk m.) 4. 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.
5* Extend the double pendulum model with an additional link. Derive the model and perform the simulations.
1