Starting from:

$34.99

CMPSCI403 Homework 6 Solution


Using the example given in class as a guide, derive the equations of motion (in Matlab) for the double pendulum with parameter definitions as in the figure below. A torque τ1 with vector τ1kˆ (where kˆ = ˆi × ˆj) acts between the base and body 1, and a torque τ2 with vector τ2kˆ acts between body 1 and body 2. Assume gravity g = 9.81m/s2 in the −ˆj direction. Write a function to simulate the double pendulum. Provide a copy of your working code.

Figure 1: Double pendulum and parameter definitions.
1. With τ1 = τ2 = 0, solve the initial boundary value problem from the initial condition
θ1 = 3rad, θ2 = 0rad, θ˙1 = θ˙2 = 0rad/s
on the time interval t = [0s, 7s]. Use parameters m1 = m2 = 1kg, I1 = I2 = 0.05kg·m2, l1 = 1m, l2 = 0.5m, c1 = 0.5m, c2 = .25m.
Plot θ1(t) and θ2(t). Does the solution display any repetitive and predictable patterns?
2. Plot the total system energy (T + V ) over the same interval. Verify energy conservation (You will see almost constant energy having a small drift).
3. (Optional) Derive the equations again considering the addition of three springs with potential energies

The vector r0 = [rx ry]T represents the attachment point for the last spring.
4. (Optional) After verifying energy conservation of your equations, simulate the system with
κ1 = κ2 = 10Nm/rad, k3 = 50N/m θ1,0 = θ2,0 = 0, l0 = 0, rx = 0m, ry = 0.5m
Apply τ1 = −θ˙1 and τ2 = −θ˙2 and use the same initial state as in step 2.
1

More products