Dimensionless variables of the differential equation
Hello all,
I hope you are all doing well. I have established a 2DOF differetial equation. Basically, the equations are the 2 spring-mass-damper system. But I am wondering how to define the variable X to be a dimentionless variable, such as X/L. In my equations, the variable X should be dimensionless but when I exclude the force (F_o the dimensionless force), the results of the equation are not dimensionless which I have already checked. My codes are attached. I think you can easily run it.
I appreciate your support.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
X0 = [0 0 0 0];
%parameters——-
mu = 0.02; % mass ratio
f_opt = 1/(1+mu); %frequency ratio
xi_2 = sqrt(3*mu/8*(1+mu));
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt; % frequency of the second DOF
xi_1 = 0.01;
%matrix——–
M = [1+mu mu;
1 1];
C = [2*xi_1*Omega_1 0;
0 2*xi_2*Omega_2];
K = [Omega_1^2 0;
0 Omega_2^2];
% state space model——————-
O = zeros(2,2);
I = eye(2);
A = [O I; -inv(M)*K -inv(M)*C];
B = [O; inv(M)];
E = [I O];
D = zeros(2,2);
% solve the equations——————-
options = odeset(‘RelTol’,1e-10,’AbsTol’,1e-10);
[t,X] = ode45(@(t,X) QZSdamper(t,A,B,X),tspan,X0,options);
x = X(:,1:4);
% F_o = 2*Omega_2.^2.*alpha.*(sqrt(1-gamma.^2)+X(:,2)).*(-1+sqrt(1/(X(:,2).^2+2.*sqrt(1-gamma^2).*X(:,2)+1)));
%
% f_s = Omega_2.^2*(X(:,2)-2*alpha*(sqrt(1-gamma^2)+X(:,2))*(-1+sqrt(1/(X(:,2).^2+2*sqrt(1-gamma^2)*X(:,2)+1))));
%
% f_1 = f_s(:,1);
%
% figure,
% plot(t,f_1);
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)))
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1)) % from input 1 to output 3
bp.FrequencyScale = "linear";
[mag,phase,wout] = bode(sys(1,1));
mag = squeeze(mag);
phase = squeeze(phase);
fout = wout/(2*pi);
BodeTable = table(fout,mag,phase);
function dXdt = QZSdamper(t,A,B,X)
mu = 0.025;
alpha = 1;
gamma = 2*alpha/(2*alpha+1);
f_opt = 1/(1+mu);
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt;
w = 0.180;
F = 0.001*sin(w*t);
F_o = 2*Omega_2^2*alpha*(sqrt(1-gamma^2)+X(2))*(sqrt(1/(X(2)^2+2*sqrt(1-gamma^2)*X(2)+1))-1);
% F_o = Omega_2^2*(sqrt(1-gamma^2)+2*alpha*(X(2))*(1/((X(2)-sqrt(1-gamma^2))^2+2*sqrt(1-gamma^2)*(X(2)-sqrt(1-gamma^2))+1)^(1/2)-1))
F = [F;F_o];
dXdt = A*X+B*(F);
endHello all,
I hope you are all doing well. I have established a 2DOF differetial equation. Basically, the equations are the 2 spring-mass-damper system. But I am wondering how to define the variable X to be a dimentionless variable, such as X/L. In my equations, the variable X should be dimensionless but when I exclude the force (F_o the dimensionless force), the results of the equation are not dimensionless which I have already checked. My codes are attached. I think you can easily run it.
I appreciate your support.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
X0 = [0 0 0 0];
%parameters——-
mu = 0.02; % mass ratio
f_opt = 1/(1+mu); %frequency ratio
xi_2 = sqrt(3*mu/8*(1+mu));
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt; % frequency of the second DOF
xi_1 = 0.01;
%matrix——–
M = [1+mu mu;
1 1];
C = [2*xi_1*Omega_1 0;
0 2*xi_2*Omega_2];
K = [Omega_1^2 0;
0 Omega_2^2];
% state space model——————-
O = zeros(2,2);
I = eye(2);
A = [O I; -inv(M)*K -inv(M)*C];
B = [O; inv(M)];
E = [I O];
D = zeros(2,2);
% solve the equations——————-
options = odeset(‘RelTol’,1e-10,’AbsTol’,1e-10);
[t,X] = ode45(@(t,X) QZSdamper(t,A,B,X),tspan,X0,options);
x = X(:,1:4);
% F_o = 2*Omega_2.^2.*alpha.*(sqrt(1-gamma.^2)+X(:,2)).*(-1+sqrt(1/(X(:,2).^2+2.*sqrt(1-gamma^2).*X(:,2)+1)));
%
% f_s = Omega_2.^2*(X(:,2)-2*alpha*(sqrt(1-gamma^2)+X(:,2))*(-1+sqrt(1/(X(:,2).^2+2*sqrt(1-gamma^2)*X(:,2)+1))));
%
% f_1 = f_s(:,1);
%
% figure,
% plot(t,f_1);
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)))
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1)) % from input 1 to output 3
bp.FrequencyScale = "linear";
[mag,phase,wout] = bode(sys(1,1));
mag = squeeze(mag);
phase = squeeze(phase);
fout = wout/(2*pi);
BodeTable = table(fout,mag,phase);
function dXdt = QZSdamper(t,A,B,X)
mu = 0.025;
alpha = 1;
gamma = 2*alpha/(2*alpha+1);
f_opt = 1/(1+mu);
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt;
w = 0.180;
F = 0.001*sin(w*t);
F_o = 2*Omega_2^2*alpha*(sqrt(1-gamma^2)+X(2))*(sqrt(1/(X(2)^2+2*sqrt(1-gamma^2)*X(2)+1))-1);
% F_o = Omega_2^2*(sqrt(1-gamma^2)+2*alpha*(X(2))*(1/((X(2)-sqrt(1-gamma^2))^2+2*sqrt(1-gamma^2)*(X(2)-sqrt(1-gamma^2))+1)^(1/2)-1))
F = [F;F_o];
dXdt = A*X+B*(F);
end Hello all,
I hope you are all doing well. I have established a 2DOF differetial equation. Basically, the equations are the 2 spring-mass-damper system. But I am wondering how to define the variable X to be a dimentionless variable, such as X/L. In my equations, the variable X should be dimensionless but when I exclude the force (F_o the dimensionless force), the results of the equation are not dimensionless which I have already checked. My codes are attached. I think you can easily run it.
I appreciate your support.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
X0 = [0 0 0 0];
%parameters——-
mu = 0.02; % mass ratio
f_opt = 1/(1+mu); %frequency ratio
xi_2 = sqrt(3*mu/8*(1+mu));
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt; % frequency of the second DOF
xi_1 = 0.01;
%matrix——–
M = [1+mu mu;
1 1];
C = [2*xi_1*Omega_1 0;
0 2*xi_2*Omega_2];
K = [Omega_1^2 0;
0 Omega_2^2];
% state space model——————-
O = zeros(2,2);
I = eye(2);
A = [O I; -inv(M)*K -inv(M)*C];
B = [O; inv(M)];
E = [I O];
D = zeros(2,2);
% solve the equations——————-
options = odeset(‘RelTol’,1e-10,’AbsTol’,1e-10);
[t,X] = ode45(@(t,X) QZSdamper(t,A,B,X),tspan,X0,options);
x = X(:,1:4);
% F_o = 2*Omega_2.^2.*alpha.*(sqrt(1-gamma.^2)+X(:,2)).*(-1+sqrt(1/(X(:,2).^2+2.*sqrt(1-gamma^2).*X(:,2)+1)));
%
% f_s = Omega_2.^2*(X(:,2)-2*alpha*(sqrt(1-gamma^2)+X(:,2))*(-1+sqrt(1/(X(:,2).^2+2*sqrt(1-gamma^2)*X(:,2)+1))));
%
% f_1 = f_s(:,1);
%
% figure,
% plot(t,f_1);
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)))
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1)) % from input 1 to output 3
bp.FrequencyScale = "linear";
[mag,phase,wout] = bode(sys(1,1));
mag = squeeze(mag);
phase = squeeze(phase);
fout = wout/(2*pi);
BodeTable = table(fout,mag,phase);
function dXdt = QZSdamper(t,A,B,X)
mu = 0.025;
alpha = 1;
gamma = 2*alpha/(2*alpha+1);
f_opt = 1/(1+mu);
Omega_1 = 0.188; % 0.03 Hz
Omega_2 = Omega_1*f_opt;
w = 0.180;
F = 0.001*sin(w*t);
F_o = 2*Omega_2^2*alpha*(sqrt(1-gamma^2)+X(2))*(sqrt(1/(X(2)^2+2*sqrt(1-gamma^2)*X(2)+1))-1);
% F_o = Omega_2^2*(sqrt(1-gamma^2)+2*alpha*(X(2))*(1/((X(2)-sqrt(1-gamma^2))^2+2*sqrt(1-gamma^2)*(X(2)-sqrt(1-gamma^2))+1)^(1/2)-1))
F = [F;F_o];
dXdt = A*X+B*(F);
end ode45, dimensionless expressions, differential equations MATLAB Answers — New Questions