필터 지우기
필터 지우기

Solving Equations of motion with ode15s

조회 수: 5 (최근 30일)
Brendan Görres
Brendan Görres 2019년 5월 3일
댓글: Torsten 2019년 5월 6일
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에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by