Nondimentionalize the 2 DOF equations
Hello all,
I hope you are doing well. I asked a question regarding dimensionalizing the motion equations in 2DOFs. Due to my mistakes, the description is not very clear. As suggested, I post a single question for the same question.
I would like to present the system I want to establish in MATLAB firstly. The absorber consists of a mass, three-spring system in the left fig, and the dashpot.
For the angular velocity , damping ratio, mass ratio , and the stiffness ratio , they are easy to determine. The length of the oblique spring in my code is set to be 2.5m. But it can be various physically.
I am not sure the approach to achieve the nondimensionlized equation is corret or not. Also, I would like to know whether I could use the ratio value only. Specifically, I do not need to set the value.
My codes are also attached. Thank you for your help.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
% Units:
% stiffness: N/m, mass:kg, damping(c_1):Ns/m
% displacement(X):m
% alpha (stiffness ratio):k_o/k_v
% gamma (dimension ratio):a/L (structure length)
% f_opt (frequency ratio): f_1/f_2
% k_v the stiffness of the vertical spring
% k_o the stiffness of the oblique spring
X0 = [0 0 0 0];
%parameters——-
global alpha gamma mu Omega_1 Omega_2 L_0
alpha = 1 % stiffness ratio k_o/k_v
gamma = 2*alpha/(2*alpha+1)
L_0 = 2.5
a = L_0*gamma;
h = sqrt(L_0^2-a^2);
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 angular velocity of the primary structure
Omega_2 = Omega_1*f_opt; % angular velocity of the damper
xi_1 = 0.01; % damping ratio of primary structure
%matrix——–
M = [(1+mu)/(Omega_1^2*L_0) mu/(Omega_1^2*L_0);
1/(Omega_2^2*L_0) 1/(Omega_2^2*L_0)];
C = [2*xi_1/(Omega_1*L_0) 0;
0 2*xi_2/(Omega_2*L_0)];
K = [1/L_0 0;
0 1/L_0];
% state space model——————-
% M: mass matrix, K:stiffness matrix, C:damping matrix
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);
%% plot
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of TMD ‘)
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1))
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)
global alpha gamma mu Omega_1 Omega_2
w = 0.180;
F1 = 0.001/(Omega_1^2*L_0)*sin(w*t); %harmonic excitation
F_o = 2*alpha*(sqrt(1-gamma^2)+X(2)/L_0)*(sqrt(1/((X(2)/L_0)^2+2*sqrt(1-gamma^2)*X(2)/L_0+1))-1);
F = [F;F_o];
dXdt = A*X+B*(F);
endHello all,
I hope you are doing well. I asked a question regarding dimensionalizing the motion equations in 2DOFs. Due to my mistakes, the description is not very clear. As suggested, I post a single question for the same question.
I would like to present the system I want to establish in MATLAB firstly. The absorber consists of a mass, three-spring system in the left fig, and the dashpot.
For the angular velocity , damping ratio, mass ratio , and the stiffness ratio , they are easy to determine. The length of the oblique spring in my code is set to be 2.5m. But it can be various physically.
I am not sure the approach to achieve the nondimensionlized equation is corret or not. Also, I would like to know whether I could use the ratio value only. Specifically, I do not need to set the value.
My codes are also attached. Thank you for your help.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
% Units:
% stiffness: N/m, mass:kg, damping(c_1):Ns/m
% displacement(X):m
% alpha (stiffness ratio):k_o/k_v
% gamma (dimension ratio):a/L (structure length)
% f_opt (frequency ratio): f_1/f_2
% k_v the stiffness of the vertical spring
% k_o the stiffness of the oblique spring
X0 = [0 0 0 0];
%parameters——-
global alpha gamma mu Omega_1 Omega_2 L_0
alpha = 1 % stiffness ratio k_o/k_v
gamma = 2*alpha/(2*alpha+1)
L_0 = 2.5
a = L_0*gamma;
h = sqrt(L_0^2-a^2);
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 angular velocity of the primary structure
Omega_2 = Omega_1*f_opt; % angular velocity of the damper
xi_1 = 0.01; % damping ratio of primary structure
%matrix——–
M = [(1+mu)/(Omega_1^2*L_0) mu/(Omega_1^2*L_0);
1/(Omega_2^2*L_0) 1/(Omega_2^2*L_0)];
C = [2*xi_1/(Omega_1*L_0) 0;
0 2*xi_2/(Omega_2*L_0)];
K = [1/L_0 0;
0 1/L_0];
% state space model——————-
% M: mass matrix, K:stiffness matrix, C:damping matrix
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);
%% plot
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of TMD ‘)
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1))
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)
global alpha gamma mu Omega_1 Omega_2
w = 0.180;
F1 = 0.001/(Omega_1^2*L_0)*sin(w*t); %harmonic excitation
F_o = 2*alpha*(sqrt(1-gamma^2)+X(2)/L_0)*(sqrt(1/((X(2)/L_0)^2+2*sqrt(1-gamma^2)*X(2)/L_0+1))-1);
F = [F;F_o];
dXdt = A*X+B*(F);
end Hello all,
I hope you are doing well. I asked a question regarding dimensionalizing the motion equations in 2DOFs. Due to my mistakes, the description is not very clear. As suggested, I post a single question for the same question.
I would like to present the system I want to establish in MATLAB firstly. The absorber consists of a mass, three-spring system in the left fig, and the dashpot.
For the angular velocity , damping ratio, mass ratio , and the stiffness ratio , they are easy to determine. The length of the oblique spring in my code is set to be 2.5m. But it can be various physically.
I am not sure the approach to achieve the nondimensionlized equation is corret or not. Also, I would like to know whether I could use the ratio value only. Specifically, I do not need to set the value.
My codes are also attached. Thank you for your help.
Best wishes,
Yu
clc;
clear all;
tspan = 0:0.25:200;
% Units:
% stiffness: N/m, mass:kg, damping(c_1):Ns/m
% displacement(X):m
% alpha (stiffness ratio):k_o/k_v
% gamma (dimension ratio):a/L (structure length)
% f_opt (frequency ratio): f_1/f_2
% k_v the stiffness of the vertical spring
% k_o the stiffness of the oblique spring
X0 = [0 0 0 0];
%parameters——-
global alpha gamma mu Omega_1 Omega_2 L_0
alpha = 1 % stiffness ratio k_o/k_v
gamma = 2*alpha/(2*alpha+1)
L_0 = 2.5
a = L_0*gamma;
h = sqrt(L_0^2-a^2);
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 angular velocity of the primary structure
Omega_2 = Omega_1*f_opt; % angular velocity of the damper
xi_1 = 0.01; % damping ratio of primary structure
%matrix——–
M = [(1+mu)/(Omega_1^2*L_0) mu/(Omega_1^2*L_0);
1/(Omega_2^2*L_0) 1/(Omega_2^2*L_0)];
C = [2*xi_1/(Omega_1*L_0) 0;
0 2*xi_2/(Omega_2*L_0)];
K = [1/L_0 0;
0 1/L_0];
% state space model——————-
% M: mass matrix, K:stiffness matrix, C:damping matrix
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);
%% plot
figure,
plot(t,x(:,1)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of primary structure’)
figure,
plot(t,(x(:,2)); xlabel(‘Time/s’),ylabel(‘Dimensionless displacement of TMD ‘)
sys = ss(A,B,E,D);
figure,
bodeplot(sys(1,1))
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)
global alpha gamma mu Omega_1 Omega_2
w = 0.180;
F1 = 0.001/(Omega_1^2*L_0)*sin(w*t); %harmonic excitation
F_o = 2*alpha*(sqrt(1-gamma^2)+X(2)/L_0)*(sqrt(1/((X(2)/L_0)^2+2*sqrt(1-gamma^2)*X(2)/L_0+1))-1);
F = [F;F_o];
dXdt = A*X+B*(F);
end ode45, differential equations, nondimentionalization MATLAB Answers — New Questions