Matlab Analysis
Nonlinear Characteristics of a Single-degree-of-freedom System: The Duffing Oscillator
The dynamics of a nonlinear mechanical system have traits that are not exhibited in linear mechanical systems. These character traits include chaotic motion especially in times that sensitivity and predictability are of utmost importance. Therefore, in order to scrutinize the nonlinear response of dynamical systems several geometrical and mathematical approaches have been developed. Furthermore, the use of duffing oscillator has been used to show the nonlinear dynamics of different mechanical systems. These oscillators use differential equations that exhibit a cubic nonlinearity. The study of the nonlinear dynamics of a Duffing Oscillator with one-degree freedom is of absolute importance. This study will be accomplished with the use of duffing oscillators with a single degree of freedom connected to a spring-dashpot system so as to analyze the motion of the oscillator.
The Differential equation of the duffing oscillator dynamics takes the form
(1)
That is
(2)
However with the introduction of dimensionless
where x(0)=a, X(0)=0 is a constant and Therefore the undamped, nonlinear, free vibration duffing equation is given by
;
Calculating for
=
;
In other words:
With difference between the consecutive time steps
Ignoring the higher powers of
Inserting x=Xn=vnt in
Solving for
Ignoring any power higher than 4 for x we get:
In the above mathematical model, the expressions
However, this can also be written as a Taylors expansion of cos (At) and Sin (At). This is done after taking into account the assumption of higher order terms of the time steps in the Taylor series. Therefor:
And
Multiple Scale techniques
With the use of other techniques that can be depicted as
This can be rewritten as:
It is noteworthy that the results of the two methods and that of the Runge-Kutta 4th Order method produce different answers. This is mainly because the error that was accompanied by the velocity of the duffing oscillator is of order
The second order ODE is
X”+0.01x’+x3=4cos(t) Thios equation models the dynamics of a forced structure undergoing a large deflection and needs to be turned into a system of 2 ODE with
X’(t)=Y; and y’(t)=4 cos(t)-0.001x’+x3. Matlab is used and the following:
function dz=duffing(t,z)
dz=[ z(2);4 *cos(t)-.001*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')
After plotting a graph of (x(t),y(t)) from the beginning point (3,4) as depicted by the blue curve and then later starting from point (3.01,4.01) as denoted by the red curve. The butterfly effect is well visible showing that there is a divergence from the starts.
Furthermore, more plotting were done with x-coordinates to the original second order ordinary differential equation with the starting conditions being x(0)=3 and x’(0)=4, and later for the conditions x(0)=3.01 and x’(0)=4.01 in blue and red respectively. And the Matlab being
function dz=duffing(t,z) dz=[z(2);(4*cos(t)-.001*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')
After replotting with initial coordinates (x,y)=(o,0) then the initial conditions x(0)=0 and x’(0) then the following graphs are derived;