See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/380005917
Matlab Simulation of SpaceX Falcon 1 takeoff and landing
Technical Report · April 2023
DOI: 10.13140/RG.2.2.24517.05606
CITATIONS READS
0 76
2 authors:
Muhammad Hamza Javaid Rakhmeen Gul
National University of Sciences and Technology National University of Sciences and Technology
3 PUBLICATIONS 0 CITATIONS 6 PUBLICATIONS 9 CITATIONS
SEE PROFILE SEE PROFILE
All content following this page was uploaded by Rakhmeen Gul on 23 April 2024.
The user has requested enhancement of the downloaded file.
Abstract – This project aims to simulate conditions and trajectory calculations, to
the takeoff and landing of the SpaceX provide a realistic representation of the
Falcon 1 rocket using SIMULINK, Falcon 1 launch.
incorporating programming and physics- The use of advanced simulation techniques
based algorithms to accurately model the and control systems has the potential to
rocket's behavior during ascent and improve the reliability and accuracy of space
descent. Additionally, a PID controller was launches, making it an important tool in the
implemented to improve the rocket's field of aerospace engineering. By simulating
stability during these phases. The the behavior of the Falcon 1 rocket and
simulation results showed that the PID implementing a PID controller to improve its
controller improved the rocket's stability stability, this project demonstrates the
and resulted in a safer and more efficient capabilities of computer simulations and
flight. control systems in optimizing the design and
I. INTRODUCTION performance of space vehicles.
The SpaceX Falcon 1 rocket was the first II. KEY TERMS USED IN SIMULATION
privately developed liquid-fueled launch A. Rocket propulsion basics
vehicle to achieve orbit and played a critical Rocket propulsion is a class of jet
role in establishing the commercial space
propulsion that produces thrust by
industry. To ensure the success and safety of
future launches, it is important to develop ejecting burned propellant. The thrust is
accurate simulations of the rocket's behavior generated based on Newton's third law
during takeoff and landing, as well as to
of motion. Rocket propulsion systems
implement advanced control systems to
improve its stability and accuracy. can be broadly classified according to
This project aims to simulate the takeoff and
landing of the Falcon 1 rocket using
computer software, and to implement a PID
controller to improve the stability of the
rocket during critical phases of flight. The
simulation includes a detailed model of the
rocket's hardware and engines, as well as
various factors such as atmospheric
the type of energy source (chemical, a 6-DOF but for our convenience we will
solar, electric, or nuclear). use 3 -DOF.
B. Equations for motions for a gravity turn
A gravity turn or zero-lift turn is a III. ENGINE MODEL
maneuver used in launching a spacecraft This model is taken from SpaceX falcon
into, or descending from, an orbit around 1. To make our design simple we will
a celestial body such as a planet or assume the constant force from the
a moon. It is trajectory engine and specific mass flow rate for a
Optimization that uses gravity to steer specific burn time.
the vehicle onto its desired trajectory. Engine Specifications (Merlin 1Ci which
is used in Falcon1 rocket)
C. Boost back burn Amount of fuel = 21491.26\ kg
The boost back burn has to kill all 𝑘𝑔
Mass Flow Rate 𝒎𝒐 ≅ 134.4 𝑠
forward velocity, then accelerate the
Thrust (MSl, Vac) = 346961 𝑁, 394557 𝑁
rocket on a parabolic trajectory towards
the landing sit. This firing is called the Specific Impulse (MSL, Vac) =
deorbit burn. Time of ignition (TIG) is 267 𝑠𝑒𝑐, 300 𝑠𝑒𝑐
usually about an hour before landing. The Burn Time ≅ 169 𝑠𝑒𝑐
burn lasts three to four minutes and slows
We can use the impulse to calculate 𝑚𝑜 :
the shuttle enough to begin its descent.
𝑇[𝑁]
D. 3 DOF simulation Isp (metric): 𝑘𝑔
𝑚 𝑜[ ].𝑔
𝑠
“DOF” stands for “degrees of
𝑇[𝑙𝑏𝑓]
freedom.” The number attached to it Isp (imperial): 𝑙𝑏
𝑚 𝑜[ ].𝑔
𝑠
stands for how many different axes are 𝑘𝑔
MSL: 𝒎𝒐 = 132.46 which gives a
being tracked. There are three main axes 𝑠
burn time of 162.42 secs.
(translational), and three secondary axes
𝑘𝑔
(rotational). A 3DOF VR experience will Vac: 𝒎𝒐 = 134.06 which gives a burn
𝑠
limit you to one set, rotational or time of 160.3 secs.
translational, but not both. A 6dof
experience allows for both. Although it is
V Velocity
T Force
Dry mass 1360.7 kg D Drag force
Fuel mass 21491.26 kg g Gravity
Pay load mass 5000kg m Mass
Length 15m gamma Pitch angle /flight path
angle
Diameter 1.5m
RE Radius of earth
C.G location 7m from base
H Height
A. Launching of rocket
When we ascend, we will assume that
IV. VEHICLE MODEL
the pitch angle is equal to the flight path
We will use them for simulation purposes. angle because force points along the
rocket body.
V. EQUATIONS OF MOTIONS FOR A
GRAVITY TURN B. Landing of rocket
But when we land it will be bit
Liftoff Equations:
different, we will flip the rocket by
𝑑𝑣 𝑇 − 𝐷 initiating the boost back burn and do the
= − 𝑔 ∗ 𝑠𝑖𝑛(𝛾)
𝑑𝑡 𝑚 flip so the pitch angle will be separated,
and it will be defined by the force of cold
𝑑𝛾 𝑣2
𝑣∗ = −(𝑔 − 𝐸 ) ∗ 𝑐𝑜𝑠(𝛾) gas propulsion system multiplied by the
𝑑𝑡 𝑅 +ℎ value of d2 so that is the moment then
Gravity Turn Equations: divided by the moment of inertia so we
will flip the vehicle and land it so the
𝑑𝑥 𝑅𝐸 pitch angle will obviously change.
=( 𝐸 ) ∗ 𝑣 ∗ 𝑐𝑜𝑠(𝛾)
𝑑𝑡 𝑅 +ℎ
Pitching Moment:
𝑑ℎ
= 𝑣 ∗ 𝑠𝑖𝑛(𝛾) 𝑑(𝜃) 𝑇𝐿 ∗ 𝑑2
𝑑𝑡
=
𝑑𝑡 𝐽𝑦
Besides, some general terms used are given
in the table below:
VI. FREE BODY DIAGRAM Before we had force and velocity in the same
A. Launching of rocket direction, so it was speeding up but since we
do a flip it is slowing down. We can see that
flight path angle becomes more and more
negative, but they do also flip at the first
stage for landing and then they initiate the
boost back burn that will slow the vehicle
down. So, when we have impact, we must
Weight will be acting downward while
ensure that the speed is very low and pitch
gamma is the pitch angle approximately
equal to the flight angle during the initial angle as close to 90 degrees as possible. It
flight. As the rocket is moving forward it will should be a vertical descent as we want the
experience the drag force calculated by the
rocket to land vertically.
fluid dynamics where Cd is the drag
coefficient and area A. C. Rocket tilt after takeoff
Until now since the rocket is powered, we
will assume that.
𝜽~𝜸
B. Launching of rocket
The earth radius is a constant value,
when we land pitch angle change, flight
angle will remain negative. Flight angle
shows how much it goes down and mg will
always be down as it is going down drag
Rockets have to tilt to the side as they
force will oppose the speed vector as it will
travel into the sky to reach orbit, or a circular
always oppose the way we move. Now force
path of motion around the Earth. This
from the engine will point in the same
steering technique is known as a gravity
direction as the drag force to oppose the
turn, which uses Earth's gravity to help
speed. The engine force is slowing down the
conserve rocket fuel and minimize stress and
vehicle and that is the Boost Back Burn that
strain on the spacecraft. Because gravity
you activate the force in opposite direction.
turns the flight path during free flight, the
rocket can use a smaller initial pitch over
angle, giving it higher vertical velocity, and our rocket. As it is evident from the root locus
taking it out of the atmosphere more quickly. that initially our system was just marginally
This reduces both aerodynamic drag as well stable, but after applying the PD controller
as aerodynamic stress during launch. and feedback path, our system has now
become stable.
VIII. RESULTS
VII. SIMULINK MODEL
During the takeoff, since the thrust and
A. PID Controller
velocity vector are opposing the pitch angle
Making the rocket stable requires some
is approximated to be the same as the flight
form of control system. Until now, PID
path angle. However soon, as thrust=0 or
controllers are the most popular controller
thrust<0, this is when the boost back and
used in rocket control systems due to their
entry burn occurs, so the rocket has to flipped
simplicity and satisfactory performances.
by 180 degrees. This is done as soon as the
The pitch angle controller of rocket system is
thrust=0 is that engine is shut down after
PID controller. The plant equation
burning until 65% of the fuel is used. Hence
(0.0009/s2) has been taken from the standards
once the rocket is flipped the pitch angle is no
of SpaceX Falcon 1.
same as the flight path angle.
We have used a PD controller as we only had
to decrease the settling time and overshoot A. Speed
(transient response). Using the PD controller
has smoothed out the pitch angle changes of
Simulink graph
The velocity of the rocket increases from zero
to some positive value under the acceleration
produced by the net external force. The initial B. Height
velocity will be calculated by the lift off and
gravity turn equation. As the pitch angle and
flight path angle are assumed to be same in
initial flight, the speed will increase due to
the motion along the direction of force in the
start then it will decrease due to the drag force
acting in the opposite direction. At the
maximum height, the velocity will become
zero at approx. 290 sec after which the boost Simulink graph
back turn will begin, and the entry burn is The rocket takes off and lands. The boost
disabled. The pitch angle will keep back burn initiates at maximum height
approaching towards 90 degree for vertical afterwards height decreases to zero due to
landing. Hence, at the point of impact the downward gravity. At the speed of 149 m/s
speed will be as low as possible. the height becomes zero.
Simulation
Simulation
Diagram
C. Pitch
Simulink graph
Diagram (Gamma = pitch angle)
The pitch angle is the angle made by the
thrust vector to the horizontal, which in most
D. Flight path
cases is the same as the angle of inclination
of the vehicle axis to the horizontal, since the
mean thrust axis coincides with the vehicle
axis. That means that the best way to launch
a high-altitude projectile is to send it flying at
a 90-degree angle to the ground—straight up.
During takeoff pitch angle is same as the
flight path angle as we have discussed earlier.
After that we can see that pitch angle will be
approaching 90 degrees for a vertical take off
Simulink graph
having flight path angle close to minus 90
Flight path angle γ: is the angle between
degrees. The smooth line shows the flip of
horizontal and the velocity vector, which
rocket at maximum height at an angle of 180
describes whether the rocket is climbing or
degree.
descending. As we can see that the flight path
angle is negative 90. Flight path angle
changes with time as it goes from positive 90
to negative 90. It goes about 84 kilometers
downrange from the launch pad which is
correct as landing pad must be 85 kilometers
from launching pad.
Simulation settings
E. Distance from the launch side (x)
Simulation
Simulink graph
The distance from the launching pad is 84
Diagram
km.
Simulation
IX. RESULTS OF ANIMATION C. Rocket vertical landing
A. Simulation of rocket takeoff
X. FINAL SIMULINK DIAGRAM
B. Rocket flip at 180°
PID controller, valuable insights have been
gained that can inform future mission
planning and testing. Overall, this project
highlights the importance of these techniques
in improving the reliability and accuracy of
space launches, and their potential to
contribute to ongoing efforts in aerospace
engineering.
XII. REFERENCES
https://www.britannica.com/topic/Falc
on-1
https://www.spacex.com/
https://www.spaceflightnow.com/falco
n9/001/f9guide.pdf
https://www.grc.nasa.gov/www/k-
12/airplane/atmosmet.html
https://www.grc.nasa.gov/www/k-
12/airplane/rockth.html
XI. CONCLUSION https://www.astronomicalreturns.com/
In conclusion, this project successfully p/section-33-rocket-thrust-
equation.html
simulated the takeoff and landing of the
https://www.jstage.jst.go.jp/article/tast
SpaceX Falcon 1 rocket using SIMULINK j/10/0/10_10142stn/_article/-char/ja/
and implemented a PID controller to improve
its stability during critical phases of flight.
The simulation results demonstrated the
effectiveness of the PID controller in
improving the rocket's stability and ensuring
a more efficient and safe flight.
This project has demonstrated the potential of
advanced simulation techniques and control
systems in optimizing space vehicle design
and performance. By simulating the behavior
of the Falcon 1 rocket and implementing a
View publication stats