Modeling of square wave

2 次查看(过去 30 天)
Iurii Storozhenko
Iurii Storozhenko 2021-12-8
回答: Abhimenyu 2024-6-7
Hello everyone,
I am modeling the position varying gear mesh stiffness function with the following code inside ODE solver.
z(k) = mod(theta_p,2*pi/t_np);
if z(k)>=(2-c)*2*pi/t_np
k_m(k) = k_max;
else
k_m(k) = k_min;
end
where c, k_max, k_min, t_np are the constants:
k_min = 5e7/2; %minimum stiffness;
k_max = 5e7; %maximum stiffness;
c = 1.63; %engagement rate;
t_np = 25; %number of teeth on pinion;
The goal of this function is to make a square wave with t_np number of maximums over 2*pi interval.
This is how the time/varying gear mesh stiffness should look like:
When the gear have a fault, the stiffness of the faulty gear tooth is compromized, so when the broken tooth is in contact, the stiffness will decrease. I am struggling to figure out how to make the value of one of the minima less than others on each 2*pi intervals. Any suggestions highly appreciated.
Thank you!
  1 个评论
Steve Miller
Steve Miller 2023-1-9
If you are interested in modeling gears with faulty behavior, you may be interested in the Simple Gear block in Simscape Driveline.
--Steve

请先登录,再进行评论。

回答(1 个)

Abhimenyu
Abhimenyu 2024-6-7
Hi,
I understand that you want to modify the gear mesh stiffness function to include a fault that decreases the stiffness of one tooth in each 2π interval. For this, you can introduce a condition to identify the faulty tooth and adjust its stiffness accordingly. Please follow this example MATLAB code :
% Constants
k_min = 5e7 / 2; % minimum stiffness
k_max = 5e7; % maximum stiffness
c = 1.63; % engagement rate
t_np = 25; % number of teeth on pinion
% Faulty tooth index
faulty_tooth_index = 5; % example: 5th tooth is faulty
faulty_tooth_index: This variable specifies which tooth is faulty. In this example, the 5th tooth is considered faulty.
faulty_tooth_stiffness = k_min / 2; % stiffness of faulty tooth (you can adjust this value)
faulty_tooth_stiffness: This specifies the stiffness of the faulty tooth. You can adjust this value to reflect how much the stiffness decreases.
% ODE solver function
%theta_p as given in the diagram shared
for k = 1:length(theta_p)
z(k) = mod(theta_p(k), 2 * pi / t_np);
tooth_index = floor(theta_p(k) / (2 * pi / t_np)) + 1; % find current tooth index
tooth_index: This is calculated to determine which tooth is currently engaged based on the angle θp\theta_p​.
if tooth_index == faulty_tooth_index
k_m(k) = faulty_tooth_stiffness;
elseif z(k) >= (2 - c) * 2 * pi / t_np
k_m(k) = k_max;
else
k_m(k) = k_min;
end
end
I hope this answers your query!

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by