MATLAB: How to plot the Tsiolkovsky rocket equation for a multi stage rocket

plotsrocket equation

Hello! I am looking to plot the Tsiolkovsky rocket eqution as a funcion of time for a multi stage rocket. I found the total delta-V:
g0 = 9.81; % [m/s^2]
%Stage 1
Isp1 = 284; % Specific Impulse [sec]
bt1 = 56.5; % Burn Time [sec]
mp1 = 45400; % Propellant Mass [kg]
ms1 = 3600; % Structural Weight [kg]
Z1 = 0.93; % Prop mass fraction
C1 = Isp1*g0; %Exhaust Velocity
F1 = (mp1/bt1)*C1; % Thrust
%Stage 2
Isp2 = 308; % Specific Impulse [sec]
bt2 = 61; % Burn Time [sec]
mp2 = 24500; % Propellant Mass [kg]
ms2 = 3200; % Structural Weight [kg]
Z2 = 0.88; %Prop mass fraction
C2 = Isp2*g0;
F2 = (mp2/bt2)* C2;
%Stage 3
Isp3 = 300; % Specific Impulse [sec]
bt3 = 72; % Burn Time [sec]
mp3 = 7080; % Propellant Mass [kg]
ms3 = 650; % Structural Weight [kg]
Z3 = 0.92; %Prop mass fraction
C3 = Isp3*g0;
F3 = (mp3/bt3)* C3;
%Stage 4
Isp4 = 292; % Specific Impulse [sec]
bt4 = 84.1; % Burn Time [sec]
mp4 = 2010; % Propellant Mass [kg]
ms4 = 155; %Structural Weight [kg]
Z4 = 0.93; %Prop mass fraction
C4 = Isp4*g0
F4 = (mp4/bt4)* C4;
% Total
m_prop_0 = 78990; % kg
m_s_0 = 7605;
m_lift = 88432; % kg lift off mass
mpl = 1837; % kg
delta_V_1 = (g0*Isp1)*log(1/(1-Z1))
delta_V_2 = (g0*Isp2)*log(1/(1-Z2));
delta_V_3 = (g0*Isp3)*log(1/(1-Z3));
delta_V_4 = (g0*Isp4)*log(1/(1-Z4));
Delta_V_total = delta_V_1 + delta_V_2 + delta_V_3 + delta_V_4 % [m/s]
I am given the burn time for each sub-rocket, but I have no idea how to approach this next.

Best Answer

Please refer top this link for reference