Solving Equations of motion with ode15s

2 次查看(过去 30 天)
Recently I am trying to solve a system of equations with ode15s. The goal is to calculate the Ascent trajectory of a Rocket with a control variable alpha, which is the angle between the velocity vector v and the thrust vector, so that by changing alpha manually I should change the flight direction.
%Thrust vector control variable
alpha=(-2*pi/180)
%alpha=(-2*pi/180)*t+10
%alpha=0.5*(-2*pi/180)*t^2+10*t+0.01...assumed to be konstant/linear/quadratic[rad]
%functions
gh=g0*((re/h)^2);%Gravi*tationsbeschleunigung abh. von h
rhoh=rho0*exp(-h/sh);%Luftdichte abh. von h
%EoM
dydt=(thrust*sin(alpha)/m*v)-(v*cos(y)/h)-gh*cos(y);
dvdt=(thrust*cos(alpha)/m)-gh*sin(y)-(rhoh*Adrag*(v^2)/2*m);
dhdt=v*sin(y);
dxddt=(re/h)*v*cos(y);
dmdt=-propflow;
dwdt=(1/Ix)*thrust*sin(alpha)*rs;
in a first run I assume alpha to be konstant and I experimented a little bit with the value (so for example alpha=-2*... and in the next run alpha= +10*...). In a next step I assumed alpha to be linear so for example
alpha=(-2*pi/180)*t+10
and in a last step I assumed it to be quadratic:
alpha=0.5*(-2*pi/180)*t^2+10*t+0.01
I am using ode15s to solve the equations, because my code needs to include the algebraic variable t.
I plotted the results over t and I receive the exact same plots for every single run, regardless of alpha being konstant linear or quadratic.
How is that possible?
  11 个评论
Brendan Görres
Brendan Görres 2019-5-3
ok I see I forgot the brackets, but again can you help me with my question?
Torsten
Torsten 2019-5-6
And the values you get for the variables look realistic to you ? E.g. a velocity of 12000 m/s ?
I suggest you reinspect your equations first before going into details about the setting of "alpha".

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by