Simulation time in simulink seems to be unending
2 ビュー (過去 30 日間)
古いコメントを表示
I have developed a ball bearing mathematical model in simulink considering a number of subsystem for each bearing component,but while I am trying to run it using ODE45 solver(as it is the best solver to analysis dynamic behaviour of bearing) , it's taking unlimited time with a very slow progress,like after 5 hrs. it's still showing zero percent but the simulation is going on.Please suggest a solution .
Following is the Matlab sample code to generate input value for angular speed of shaft which will be the input for running the inner race.
global M_s;
global K_s;
global R_s;
global J_c;
global M_c;
global K_pin;
global R_pin;
global M_b;
global k_ball;
global J_b;
global r_ball;
global M_p;
global K_p;
global R_p;
global r_c;
global r_b;
global r_i;
global n_b;
global omega;
global ecc;
global g;
global R_f;
global RPM;
if (isempty(whos('global','first_time')))
global first_time;
first_time=1;
M_s = VALUE;
K_s = VALUE;
R_s = VALUE;
J_c = VALUE;
M_c = VALUE;
K_pin = VALUE;
R_pin = VALUE;
J_b = VALUE;
M_b = VALUE;
k_ball = VALUE;
r_ball = VALUE;
r_b = VALUE;
r_i = VALUE;
r_c = VALUE;
n_b = VALUE;
M_p = VALUE;
R_p = VALUE;
K_p= VALUE;
R_f = VALUE;
g=9.81;
end
prompt = {'RPM'};
dlg_title = 'Shaft rotating speed';
num_lines = 1;
def = {num2str(RPM)};
answer = inputdlg(prompt,dlg_title,num_lines,def);
if isempty(answer)
return; %i.e, use default values
else
RPM=str2num(answer{1});
end
omega = RPM/60*2*pi;
1 件のコメント
Ranjeet
2023 年 5 月 3 日
編集済み: Ranjeet
2023 年 5 月 5 日
Hi Samrat,
Can you provide the Simulink model so that the issue can be regenerated and checked for the never-ending simulation time you pointed out. Also, sharing the solver configuration parameters might help to understand the issue if sharing the model is not a possiblity.
The parameters of the ball bearing model and RPM has been provided but it is not clear what is being solved at each timestep.
I suggest referring to the following answer facing similar issues:
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!