필터 지우기
필터 지우기

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