Professional Documents
Culture Documents
Homework Solutions For (Nonlinear Vibration) Mustafa Alajrawee Student No. 40240413006 Dr. Dardall
Homework Solutions For (Nonlinear Vibration) Mustafa Alajrawee Student No. 40240413006 Dr. Dardall
Homework solutions
For
( Nonlinear Vibration )
Mustafa Alajrawee
Student No.
40240413006
Dr. Dardall
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Question (1)
Find the linear behavior in the vicinity of each of the following systems. Are they
stable or unstable? Local behavior. Review and draw the phase plane.
System 1: x ̇=y-x^2+2 ,y ̇=2y^2-2xy
System 2: : x ̇=-4x-2y+4 ,y ̇=xy
Solution
The MatLab Code
clear;
figure;
%% Define the first system
sys1 = @(t,x) [x(2) - x(1)^2 + 2; 2*(x(2)^2) - 2*x(1)*x(2)];
%% Define the second system
sys2 = @(t,x) [2*x(1)+x(2); x(1)+2*x(2)];
%% Define the range and step for initial conditions
xmin = -3;
xmax = 4;
sep = 0.9;
%% Plot the first system
subplot(1,2,1);
hold on;
for x0 = xmin:sep:xmax
for y0 = xmin:sep:xmax
% Solve the ODEs for positive time
[ts1, xs1] = ode45(sys1, [0 10], [x0 y0]);
plot(xs1(:,1), xs1(:,2))
end
end
for x0 = xmin:sep:xmax
for y0 = xmin:sep:xmax
% Solve the ODEs for negative time
[ts1, xs1] = ode45(sys1, [0 -10], [x0 y0]);
plot(xs1(:,1), xs1(:,2))
end
end
1. 𝑥̇ = 𝑥 (𝑦 + 2𝑥 − 2) , 𝑦̇ = 𝑦(𝑦 − 1)
2. 𝑥̇ = 𝑥 (𝑦 + 2𝑥 − 2) , 𝑦̇ = 𝑦(𝑦 + 𝑥 − 3)
3. 𝑥̇ = 𝑥 (2 − 𝑦 − 2𝑥 ) , 𝑦̇ = 𝑦(3 − 3𝑦 − 𝑥)
4. 𝑥̇ = 𝑥 (2 − 𝑦 − 2𝑥 ) , , 𝑦̇ = 𝑦(3 − 𝑦 − 4𝑥)
5. 𝑥̇ = 𝑥 (2500 − 𝑥 − 𝑦 ) , 𝑦̇ = 𝑦(70 − 𝑦 − 𝑥)
Find:
Solution
First System:
1. Equilibrium Points:
(0,0)(0,0) and (1,1)(1,1)
2. Eigenvalues:
𝜆1=−2, λ1=−2 and 𝜆2=−1, λ2=−1
3. Eigenvectors:
𝑣1=(0,1), v1=(0,1) and 𝑣2=(1,0), v2=(1,0)
4. Transformation to Modal Space:
𝑥=𝑐1𝑣1𝑒^𝜆1𝑡+𝑐2𝑣2𝑒^𝜆2𝑡, x=c1v1e^λ1t+c2v2e^λ2t
Second System:
1. Equilibrium Points:
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
(0,0)(0,0) and (1,3)(1,3)
2. Eigenvalues:
𝜆1=−2, λ1=−2 and 𝜆2=−3, λ2=−3
3. Eigenvectors:
𝑣1=(0,1), v1=(0,1) and 𝑣2=(1,1), v2=(1,1)
4. Transformation to Modal Space:
𝑥=𝑐1𝑣1𝑒^𝜆1𝑡+𝑐2𝑣2𝑒^𝜆2𝑡, x=c1v1e^λ1t+c2v2e^λ2t
Third System:
1. Equilibrium Points:
(0,0)(0,0) and (1,1)(1,1)
2. Eigenvalues:
𝜆1=2, λ1=2 and 𝜆2=3, λ2=3
3. Eigenvectors:
𝑣1=(1,0), v1=(1,0) and 𝑣2=(0,1), v2=(0,1)
4. Transformation to Modal Space:
𝑥=𝑐1𝑣1𝑒^𝜆1𝑡+𝑐2𝑣2𝑒^𝜆2𝑡, x=c1v1e^λ1t+c2v2e^λ2t
Fourth System:
1. Equilibrium Points:
(0,0)(0,0) and (1,3)(1,3)
2. Eigenvalues:
𝜆1=2, λ1=2 and 𝜆2=3, λ2=3
3. Eigenvectors:
𝑣1=(1,0), v1=(1,0) and 𝑣2=(0,1), v2=(0,1)
4. Transformation to Modal Space:
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
𝑥=𝑐1𝑣1𝑒^𝜆1𝑡+𝑐2𝑣2𝑒^𝜆2𝑡, x=c1v1e^λ1t+c2v2e^λ2t
Fifth System:
1. Equilibrium Points:
(0,0)(0,0), (50,0)(50,0), (0,70)(0,70), and (50,70)(50,70)
2. Eigenvalues:
For (0,0)(0,0): 𝜆1=2500, λ1=2500 and 𝜆2=70, λ2=70
For (50,0)(50,0): 𝜆1=−2500, λ1=−2500 and 𝜆2=20, λ2=20
For (0,70)(0,70): 𝜆1=−2500, λ1=−2500 and 𝜆2=−70, λ2=−70
For (50,70)(50,70): 𝜆1=−2500, λ1=−2500 and 𝜆2=−120, λ2=−120
3. Eigenvectors:
For (0,0)(0,0): 𝑣1=(1,0), v1=(1,0) and 𝑣2=(0,1), v2=(0,1)
For (50,0)(50,0): 𝑣1=(−1,0), v1=(−1,0) and 𝑣2=(1,0), v2=(1,0)
For (0,70)(0,70): 𝑣1=(0,1), v1=(0,1) and 𝑣2=(−1,0), v2=(−1,0)
For (50,70)(50,70): 𝑣1=(−1,−1), v1=(−1,−1) and 𝑣2=(1,−1), v2=(1,−1)
4. Transformation to Modal Space:
The calculated eigenvectors are used to write the final equation.
The MatLab Code
clear;
figure;
% define sys1
sys1 = @(t,x) [x(1)*(x(2)+2*x(1)-2); x(2)*(x(2)-1)];
eqn1 = 'x? = x(y+2x-2), y? = y(y-1)';
%define sys2
sys2 = @(t,x) [x(1)*(x(2)+2*x(1)-2); x(2)*(x(2)+x(1)-3)];
eqn2 = 'x? = x(y+2x-2), y? = y(y+x-3)';
%define sys3
sys3 = @(t,x) [x(1)*(2-x(2)-2*x(1)); x(2)*(3-3*x(2)-x(1))];
eqn3 = 'x? = x(2-y-2x), y? = y(3-3y-x)';
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
%define sys4
sys4 = @(t,x) [x(1)*(2-x(2)-2*x(1)); x(2)*(3-x(2)-4*x(1))];
eqn4 = 'x? = x(2-y-2x), y? = y(3-y-4x)';
%define sys5
sys5 = @(t,x) [x(1)*(2500-x(1)^2-x(2)^2); x(2)*(70-x(2)-x(1))];
eqn5 = 'x? = x(2500-x^2-y^2), y? = y(70-y-x)';
%The axis boundaries and the interval between the initial conditions
xmin = -10;
xmax = 10;
sep = 0.9;
%systems number
num_sys = 5;
for i = 1:num_sys
subplot(rows, cols, i);
hold on;
grid on;
𝑥̇ = 𝑥 − 1 , 𝑦̇ = −𝑥𝑦 + 𝑎(𝑥 − 1)
Solution
The MatLab Code
% Phase Portrait of a Nonlinear System with parameter a.
clear; figure;
xmin = -3;
xmax = 3;
sep = 0.5;
a = -0.5; % You can change the value of a here
hold on
hold off
fsize = 15;
title('Phase Portrait of the Nonlinear System: (x?= x^2-1 , y?= -xy+a(x^2-1))')
set(gca,'XTick',xmin:sep:xmax,'FontSize',fsize)
set(gca,'YTick',xmin:sep:xmax,'FontSize',fsize)
xlabel('x(t)','FontSize',fsize)
ylabel('y(t)','FontSize',fsize)
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Question (4)
Consider the following system of differential equations:
𝑥̇ = 𝑥 (−𝑥 − 𝑦 − 1) , 𝑦̇ = 𝑦(−𝑎𝑥 − 𝑡 + 𝑏)
where a and b are parameters with 0 < ab. Assume that this system is defined only
for 0 ≤ x, y ≤ 2.
Using nullclines, draw the phase portrait of this system for different values of a
and b.Determine the values of a and b for which bifurcation occurs.
Determine the regions of the ab plane in which the system has qualitatively similar
phase portraits and identify the bifurcations that occur as the parameters cross
these boundaries.
Solution
The MatLab Code
clear;
figure;
a = 0.5; % ???? a
b = 0.3; % ???? b
sys = @(t, x) [x(1) * (-x(1) - x(2) - 1); x(2) * (-a * x(1) - t + b)]; % ????
?????????
xmin = 0;
xmax = 2;
sep = 0.1; % ????? ??????
hold on
for x0 = xmin:sep:xmax
for y0 = xmin:sep:xmax
[ts, xs] = ode45(sys, [0, 10], [x0, y0]); % ??
plot(xs(:, 1), xs(:, 2))
end
end
for x0 = xmin:sep:xmax
for y0 = xmin:sep:xmax
[ts, xs] = ode45(sys, [0, -10], [x0, y0]); % ?? ????????
plot(xs(:, 1), xs(:, 2))
end
end
xlabel('x(t)');
ylabel('y(t)');
title('Phase Portrait');
hold off
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Mustafa Alajrawee Student No. 40240413006
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Question (5)
Lyapunov function for the equilibrium point (0,0) of the system with equations
𝑥̇ = −2𝑥 − 𝑦 , 𝑦̇ = −𝑦 − 𝑥
Determine the following. Determine the radius of the disk for which the point
(0,0) is in the domain of attraction.
Solution
The MatLab Code
clear; figure;
% Define the system of equations
sys = @(t,x) [-2*x(1) - x(2)^2; -x(1)^2 - x(2)];