Borrar filtros
Borrar filtros

ODE45 for Equations of Motion

4 visualizaciones (últimos 30 días)
Sam Butler
Sam Butler el 21 de Mzo. de 2023
Comentada: Shree Charan el 4 de Mayo de 2023
Hi, I am hoping someone can help me with the following issue. I have tried this problem multiple times and still can't seem to write the correct code (I am new to MATLAB).
The following three equations of motion are to be solved:
theta dot out is the input velocity into the system, it is time dependant and is characterised by the equation:
All other variables are constant (e.g. theta_dot_zero,J1,c1,k1,f (this is not frequency) etc.).
I believe you can use ode45 to solve this however I have had no luck.
Initial conditions can be taken as zero, a timespan of 0-20seconds can be used as an example.
The aim is to then plot velocity, acceleration and displacement graphs for the unknown theta variables of subscript 1,2,n and out.
I hope someone can help with this! I would really appreciate a draft of some code.
Thanks!
  8 comentarios
Torsten
Torsten el 22 de Mzo. de 2023
Editada: Torsten el 22 de Mzo. de 2023
Do you see the problem why the integration takes so long and is almost impossible to perform ?
param.vin = 600*(2*pi/60); %% 600 is the input velocity in rpm
param.f_mech = param.vin/(2*pi);
theta_out_dot = @(t)param.vin+(0.02*param.vin*cos(72*pi*param.f_mech*t))+(0.005*param.vin*cos(144*pi*param.f_mech*t));
t=0:0.000001:0.1;
plot(t,theta_out_dot(t))
Shree Charan
Shree Charan el 4 de Mayo de 2023
@Sam Butler In the question you mention that "theta_dot_out" is the input velocity into the system and "theta_dot_zero" is a constant.
However in the line
theta_out_dot = param.vin+(0.02*param.vin*cos(72*pi*param.f_mech*t))+(0.005*param.vin*cos(144*pi*param.f_mech*t));
theta_dot_zero is replaced with vin which is the input velocity.
Can you please clarify if theta_out_dot = vin as mentioned in the question or if theta_dot_zero = vin.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by