Experiments with the Duffing Oscillator from Nonlinear dynamics
Transcription
Experiments with the Duffing Oscillator from Nonlinear dynamics
Experiments with the Duffing Oscillator from Nonlinear dynamics and Chaos by J.M.T. Thompson and H.B. Stewart The 2nd order ODE is x”+.05x’+x3=7.5cos(t) Such an equation might model the motion of a forced structure undergoing large elastic deflections. Here we chose the parameters so as to see chaos thanks to work of Ueda in 1980. Turn this into a system of 2 ODEs with x’(t)= y y’(t)= 7.5cos(t) - .05x’ + x3 We use 2 Matlab m-files: 1 function dz=duffing(t,z) dz=[z(2);(7.5*cos(t)-.05*z(2)-z(1)^3)]; %duffing oscillator [t,z]=ode45('duffing',[0,100],[3,4]); hold off figure plot(t,z(:,1)) hold on [t,z]=ode45('duffing',[0,100],[3.01,4.01]); plot(t,z(:,1),'r') hold off figure [t,z]=ode45('duffing',[0,100],[3,4]); plot(z(:,1),z(:,2)) hold on [t,z]=ode45('duffing',[0,100],[3.01,4.01]); plot(z(:,1),z(:,2),'r') 2 In the pictures below we first plot both (x(t),y(t)) first starting at the point (3,4) which is the blue curve and then starting at the point (3.01,4.01) which is the red curve. The butterfly effect is quite visible in this example. There is divergence from adjacent starts. 3 Then we plot the x-coordinates (the actual solution x(t) to the original 2nd order ODE first for the initial conditions x(0)=3, x’(0)=4, in blue and then for the initial conditions x(0)=3.01 and x’(0)=4.01 in red. 4 function dz=duffing(t,z) dz=[z(2);(7.5*cos(t)-.05*z(2)-z(1)^3)]; %duffchaos.m [t,z]=ode45('duffing',[0,100],[0,0]); hold off figure plot(t,z(:,1)) hold on [t,z]=ode45('duffing',[0,100],[0.01,0.01]); plot(t,z(:,1),'r') hold off figure [t,z]=ode45('duffing',[0,100],[0,0]); plot(z(:,1),z(:,2)) hold on [t,z]=ode45('duffing',[0,100],[0.01,0.01]); plot(z(:,1),z(:,2),'r') Here we redo the plots with the initial point (x,y)=(0,0) meaning the initial conditions x(0)=0=x’(0). 5 6 7