You are on page 1of 12

ACTIVE MODEL ROCKET STABILIZATION VIA COLD GAS THRUSTERS

Danylo Malyuta1 , Xavier Collaud1 , Mikael Gaspar1 , Gautier Rouaze1 , Raimondo Pictet1 , Anton Ivanov1 , and
Nikolay Mullin2
1
Space Engineering Center (eSpace), EPFL, Station 11, 1015, Lausanne, Switzerland.
2
Bauman Moscow State Technical University, ul. Baumanskaya 2-ya, 5, Moscow 105005, Russia.

ABSTRACT tics of the cold gas reaction control system. Section 3


develops the dynamical model of the rocket and the con-
trol scheme used. Section 4 presents the results from four
This paper describes the development and testing of a re- test flights. Finally, Section 5 evaluates the effectiveness
action control system (RCS) for a model rocket named and suggests improvements over the present system.
FALCO-4. The rocket uses cold gas jets to keep itself
perfectly vertical at low speeds. We first describe the me-
chanical layout of FALCO-4 and the characteristics of the
2. MECHANICAL DESIGN
cold gas propulsion system. We then propose a dynam-
ical model of the rocket and a control scheme based on
decoupled PID regulators for roll, pitch and yaw. The 2.1. Rocket Structure
control scheme is then evaluated based on MATLAB R

simulation and flight data collected over 4 test flights that


showed the RCS to work well even though vertical ori- The final design, shown in Figure 1, contains the follow-
entation was only partially achieved due to insufficient ing major components:
thrust from the cold gas thrusters. Finally, the present
approach is evaluated and improvements are suggested.
1. LV-Haack (minimum drag) nose cone (C = 1/3).
Key words: model rocket; active stabilization; PID con- 2. Fiberglass tube (avionics compartment).
trol; vertical landing. 3. Fiberglass tube (RCS compartment).
4. Fiberglass tube (parachute and propulsion compart-
ment).
1. INTRODUCTION
5. Tapered, swept flat-plate fins (fiberglass-reinforced
lemonwood).
Traditionally, rockets are built as expendable systems. 6. Plywood (1 [mm]) and balsa (8 [mm]) sandwhich
Today, however, there is a growing trend towards design- mounting bar.
ing partially or fully reusable rocket systems [1] [2] [3], 7. Raspberry-Pi 1 Model B+ [4] (with USB ports re-
spurred by the prospect of massive cost reductions (up to moved).
100 times [1]) and the need for such systems in future
manned planetary exploration. It is likely that all future 8. 3D-printed cowling (ABS plastic) for Raspberry Pi
rockets will include some reusability aspect. As such, Spy Camera [5].
the present project is an effort to accustom engineering 9. DC/DC boost converter [6].
students to the “reusable rocket” paradigm and the chal-
10. Tube coupler and RCS nozzle ring (pine).
lenges that it entails.
11. RCS valves [7].
Our team aims to design a cheap and accessible model 12. Pressure tubing [8].
rocket featuring all the necessary technology to be a plug-
and-play platform for testing rocket landing algorithms. 13. Pressure regulator [9].
The present paper discusses the first step in this project 14. CO2 cartridge [10].
– the design and validation of a cold gas reaction control 15. CO2 cartridge retainer (pine).
system for maintaining a vertical attitude at low speeds.
The mission for this paper is to maintain a vertical atti- 16. Horizontal CMOS camera [11].
tude around apogee. 17. Tube coupler (pine).
This paper is organized as follows: Section 2 describes 18. Parachute (drogue and main).
the mechanical layout of the rocket and the characteris- 19. Engine mount tube (cardboard).
2

20. Centering ring (pine).


One 300mah 2S Two 300mah 2S
21. Pressure sensors [12]. 35~70C LiPo 35~70C LiPo
22. Power electronics and MSP430G2553 slave micro- battery batteries in series
controller.
23. RCS activation alarm and debugging LEDs. HSC D LN
24. LiPo battery storage [13]. LD1117V33 LM2940T-5.0 N 100MD
LDO Voltage LDO Voltage S A5
25. Engine nozzle. Regulator Regulator pressure
sensors

Weighing 2560 [g], the rocket is 1.36 [m] long, 7.62 [cm] 5.2V DC/DC
in diameter and is composed of two bodies that sepa- Boost
rate after apogee for parachute deployment. The fuselage Converter
length is determined by the size of the RCS and avion-

SPI
Power
ics compartments as well as a static stability requirement.
The final static margin is 6.08 calibers between the center
of mass and center of pressure, offering sufficient aerody- Raspberry Pi 1
namic stability at lift-off. The diameter was dictated by Model B+
the available tubing serving as a mold.

UART
For propulsion, the Aerotech RMS H-238 reusable mo-
tor with 175 [Ns] specific impulse was chosen  in
 order to

UART
Power
obtain an off-launchrod velocity of 15-18 ms required MSP430G2553
for passive stabilization by the fins. The burn time is less slave microcontroller
than 1 [s] during which
  the rocket undergoes an accelera-
tion of upto 78.9 sm2 and reaches a maximum speed of
Parker VSO
about 59 ms . The maximum altitude is approximately solenoid valve
187 [m]. power electronics

Finally, Figure 2 shows a top-level overview of the avion-


Valve 1 Valve 2 Valve 3 Valve 4
ics that flew aboard the rocket. In addition, all software
source code in MATLAB R
and C is available at [14].
Figure 2. High-level layout of the rocket avionics.

2.2. Reaction Control System ẑB

The cold gas reaction control system is composed of


f f
a cartridge of 68 [g] of liquid CO2 pressurized at
p0 = 60 [bar], a pressure regulator to p1 = 6 [bar] and a
set of pressure tubes leading to four proportional solenoid f x̂B
valves that expell gas in their respective directions. Fig- ŷB
f
ure 3 shows the geometric nozzle layout. The entire RCS
assembly weighs 834 [g]. r

We now discuss the valve thrust calculations that drive the


selection of these components in view of minimal weight
and a 1 [N] thrust per valve requirement (this thrust was Figure 3. Layout of the RCS (top view). f = 5 [mm],
not achieved by the final RCS). We use numerical values r = 3.81 [cm].
relating to the aforementioned RCS components, how-
ever the following calculations have been done for sev-
eral component candidates in order to select the present S 2
combination.
S
We assume CO2 to be an ideal gas and the flow through 0 1
the valve to undergo an isenthalpic throttling process. CO2 cartridge S
The flow conditions upstream are determined by the pres-
sure regulator (see the layout schematic in Figure 4) and S
are set to the following values:

T1 = 273 [K], Figure 4. Pressure connections schematic for the RCS.
p1 = 6 [bar].
3

1 2 3 4 5
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

25
21 22 23 24

Figure 1. Structural layout of FALCO-4.

Where the indices refer to the locations of corresponding 3. CONTROL SYSTEM DESIGN
circled numbers in Figure 4. It is further assumed that
p2 = patm = 101325 [Pa]. It is then possible to compute
the temperature of the flow after the valve by making the 3.1. Dynamical model
isentropic flow assumption:
  γ−1
p2 γ In this section, the dynamical attitude model of the rocket
T2 = T1 ≈ 184.48 [K], (1) is developed using Euler-Lagrange formalism. Because
p1
only rocket attitude is controlled, translational dynamics
where the CO2 specific heat ratio γ is 1.28. We check for are not modelled under the assumption that translational
sonic conditions at the valve orifice, assumed to be the and rotational motions are decoupled about the center of
narrowest part of the flow: mass. Furthermore, as the control system is turned on af-
 γ
 γ−1 ter engine cutoff, rocket mass is assumed to be constant.
2
pcr = p1 ≈ 329620 [Pa] > p2 . (2)
γ+1 The Lagrangian of a system is defined as:
Therefore the flow downstream of the valve orifice is L (q, q̇) = K (q, q̇) − U (q)
equal to the speed of sound. The nozzle exit velocity is 1 T (6)
therefore: = q̇ M (q)q̇ − U (q),
hmi 2
where K (q, q̇) ∈ R is the kinetic energy, U (q) ∈ R is
p
U2 = γRT2 ≈ 211.56 , (3)
s the potential energy, M (q) ∈ Rn×n is the inertia matrix
and q ∈ Rn is the vector of generalized coordinates. In
h i
J
where the CO2 gas constant R is 189 kg·K . We now use T
this case, q = [ϕ θ ψ] ∈ R3 and the Tait-Bryan Eu-
the isenthalpic throttling process assumption to compute
ler angle convention is used with (ψ, θ, ϕ) representing
the mass flow rate through the valve:
s respectively (yaw, pitch, roll).
  γ+1
p1 pcr γ hgi
ṁmax = cd A √ γ ≈ 1.7069 . (4) The Euler-Lagrange equation that describes the system
RT1 p1 s dynamics is:
Note that (4) gives the maximum mass flow rate since the
 
d ∂L (q, q̇) ∂L (q, q̇)
maximum valve opening area A is used for the calcula- − = F (q), (7)
dt ∂ q̇ ∂q
tion. Finally, the maximum thrust is:
where F (q) ∈ Rn is the vector of generalized forces and
Fmax = U2 ṁmax ≈ 0.3611 [N]. (5) torques acting on the rocket. [15] shows that substituting
Note that this value is very close to experimental mea- (6) into (7) gives:
surements, for which maximum thrust varied between
M (q)q̈ + C(q, q̇)q̇ + G(q) = F (q), (8)
0.32 and 0.37 [N]. In the future, maximum thrust could
n×n
be increased by using de Laval nozzles instead of ejecting where C(q, q̇) ∈ R is the Coriolis and centrifugal
gas directly from the tube. force matrix and G(q) ≡ (∂U (q)/∂q) ∈ Rn is the gra-
4

I I B
ṘB = RB S(ωBI ), (15)
B
where ωBI is the angular velocity of the B frame with
x̂I respect to the I frame, written in the B frame. Combin-
ẑB x̂B
ing (13), (15) and the property S(a)b = −S(b)a yields:
ẑI
ṗI = −RB
I
S(pB )ωBI
B
. (16)
ŷI Consider now the kinetic energy of the infinitesimal ele-
pB
ŷB ment in Figure 5:
dm
1  I T I 
dK = ṗ ṗ dm. (17)
2
Substituting (16) into (17) and using the property
I T I
(RB ) RB = I, we get:
Figure 5. Infinitesimal element kinematics.
1 h B T T B i
dK = ωBI S (p )S(pB )ωBI B
dm. (18)
2
dient of potential energy with respect to the generalized To obtain the kinetic energy of the entire rocket, we sim-
coordinates. ply integrate over the mass of the rocket. Since dm =
ρ dV , we get:
The C(q, q̇) matrix is computed using the Christoffel Z 
1 B T
symbols of the first kind: K = ωBI ρS T (pB )S(pB ) dV ωBI B
. (19)
n     2 V
X 1 ∂mij ∂mik ∂mkj
cij = + − q̇k , (9) We identify the integral in (19) as the inertia tensor J of
2 ∂qk ∂qj ∂qi
k=1 the rocket, expressed in the B frame. This integral is
where cij and mij are the elements at row i and column not trivial given the multitude of elements inside a rocket
j of the C(q, q̇) and M (q) matrices respectively. Given – electronics, parachutes, coupling rings, engine casing,
that C(q, q̇) depends on M (q) via (9), we must only find etc. However, J is directly obtained from any CAD pack-
the M (q), G(q) and F (q) in order to obtain the full age (in this case, Solidworks R
) if each part of the CAD
attitude dynamics. model is assigned the correct mass properties.

Note that a mapping exists from the Euler angle time


derivatives to the angular velocity of the rocket [16]:
3.1.1. Finding the M (q) matrix
B
ωBI = Wη (q)q̇, (20)
1 0 − sin(θ)
" #
Equation (6) implies that the M (q) matrix may be found
by rewriting the kinetic energy in quadratic form. Let Wη (q) = 0 cos(ϕ) sin(ϕ) cos(θ) . (21)
us consider an infinitesimal element of mass dm on the 0 − sin(ϕ) cos(ϕ) cos(θ)
rocket as shown in Figure 5. The element’s position vec- Substituting (20) into (19) and replacing the integral with
tor pB (expressed in the B frame) is fixed in the B frame the inertia tensor J:
as the rocket is assumed to be a rigid body. The kinetic 1
energy, however, must be written in the I (inertial) frame. K = q̇ T WηT (q)JWη (q)q̇. (22)
We can write: 2
Based on (6) and (22), the inertia matrix M (q) can finally
pI = RB
I B
p , (10) be identified:
I
where RB is the rotation matrix from the B frame to the M (q) = WηT (q)JWη (q). (23)
I frame. From the Tait-Bryan convention we have:
RIB = Rϕ Rθ Rψ , (11)
I
RB = (Rϕ Rθ Rψ ) =
T T T T
Rψ Rθ Rϕ . (12) 3.1.2. Finding the G(q) vector
Now that we know an infinitesimal element’s position in
the I frame, its velocity in the I frame can be found by The discussion for (8) yields:
differentiating (10): ∂U (q)
G(q) = . (24)
ṗI = ṘB
I B I B
p + RB ṗ . (13) ∂q
As the position of the infinitesimal element is fixed, For a rigid body rocket:
ṗB = 0. To further develop (13), define the skew- 0
" #
symmetric matrix S(ω): U (q) = M g 0 , (25)
"
0 −ωz ωy
# z
S(ω) = ωz 0 −ωx . (14) where M is the rocket mass, g = 9.81 sm2 is the gravita-
 
−ωy ωx 0
tional acceleration and z is the distance along the ẑI axis
The rotation matrix has the property: from the I-frame origin to the B-frame origin, taken as
5

30 60

Corrective moment coefficient C1 [-]


C1

Damping moment coefficient C2 [-]


R3
h R4 C2
V

Total speed V [m/s]


~ri 20 40
R1 R2
ẑB
x̂B

10 20
ŷB

Figure 6. Free-body diagram for the RCS. 0 0


2 4 6 8
Time since lift-off t [s]
positive in that direction. However, we only consider atti-
tude, so from (25) we conclude that U (q) is independent Figure 7. Evolution of C1 and C2 based on OpenRocket
R

of the generalized coordinates q. Therefore: simulation data.


G(q) = 0. (26)
∓ŷB axes respectively, we find the relation between RCS
thrusts and the control torque vector:
3.1.3. Finding the generalized torque vector F (q) # R1
 
−f f −f f
"
R 
τ B = −h 0 h 0  2  := BR, (31)
F (q) is composed of control torques, T ∗ (q), from the R3
0 −h 0 h
RCS and aerodynamic torques, A∗ (q, q̇), from the aero- R4
dynamic moments acting about the rocket’s center of where we call B the “mapping” from RCS thrusts to con-
pressure: trol torques. In summary, substituting (31) into (30):
F (q) = T ∗ (q) + A∗ (q, q̇). (27) T ∗ (q) = WηT (q)BR. (32)

Finding T ∗ (q). The most general control that Finding A∗ (q, q̇). We only consider the corrective
can be applied on the rocket is a torque vector τ B = and damping moment coefficients for the aerodynamic
[τxB τyB τzB ]T , expressed in the B-frame and positive ac- torques acting on the rocket, denoted as C1 and C2 re-
cording to the right-hand rule. To find T ∗ (q), we apply spectively. These are given by [18]:
the principle of virtual work. Because we consider the 1
rocket as a single rigid body, the virtual work principle C1 = ρAref V 2 CN α (Z − W ), (33)
2
degenerates to: nc
1 X
CN α,i (Zi − W )2 ,

T T C2 = ρAref V (34)
δW = τ B δr = (T ∗ ) δq, (28) 2 i=1
where δr is an infinitesimal change in the position vector
where Aref = πr2 is the nose cone base area, V is the
of the body (expressed in the same frame as τ B , i.e. the
speed, CN α is the total normal force coefficient deriva-
B frame) and δq is an infinitesimal change in the gener-
tive, CN α,i is the i-th structural component’s normal
alized coordinates. To find δr we “integrate” (20). Note
B force coefficient derivative, Z is the distance from the
that because ωBI is not integrable [17], this approach
nose to the rocket center of pressure, Zi is the distance
only works thanks to the infinitesimal change assump-
from the nose to the i-th structural component’s center of
tion. Therefore:
pressure, W is the distance from the nose to the center of
δr = Wη (q)δq. (29) mass, α is the angle of attack (in radians) and nc is the
total number of components of the rocket (FALCO-4 has
By substituting (29) into (28), the generalized control one nose cone, four body tubes and one set of four fins).
torques are expressed:
T ∗ (q) = WηT (q)τ B . (30) The rocket was modeled in OpenRocket R
, whose techni-
cal documentation [19] [20] provides a method to evalu-
However, τ B can be related to the thrust forces generated ate (33) and (34). Thus, a plot of C1 and C2 for FALCO-4
by the four RCS nozzles of the rocket. For this, consider is produced in Figure 7.
Figures 3 and 6. Noting that f  r, calling ~ri the po-
sition vector of the i-th nozzle and keeping in mind that For test flights, the RCS control is activated from the
thrusts (R1 ,R3 ) and (R2 ,R4 ) are parallel to the ±ẑB and 4th second of flight onwards in order to conserve CO2
6

pressure for the low speed flight near apogee. Therefore, 10


based on Figure 7, the control must be able to deal with Roll angle ϕ
the following range of aerodynamic coefficients: Pitch angle θ
Yaw angle ψ

Euler angles [deg]



C1 ∈ [0, 17], 5
(35)
C2 ∈ [0, 0.75].
Since C1 and C2 depend on speed, the attitude-only dy-
namical model of the rocket has no state available to 0
compute these coefficients. Therefore, the corrective and
damping moments are considered as disturbances that the
RCS must be able to counteract in order to keep the rocket −5
vertical. We assume that the corrective and damping mo-
ments act through the yaw (ψ) and pitch (θ) Euler an-
gles. In reality, these moments would act about the axis 0 1 2 3 4 5
I
((RB x̂B ) × x̂I ), but unfortunately the orientation of this Simulation time t [s]
axis degenerates when the rocket is perfectly vertical, i.e.
I
when RB x̂B is parallel to x̂I . Note that zero aerody-
Figure 9. Euler angles evolution for a fast-moving rocket
namic roll moment is assumed. Therefore, the aerody-
with C1 = 16 and C2 = 0.75 (i.e. 4 seconds into the
namic moments are expressed as:
 ∗ flight moving at ≈ 24 [m/s]).
Aϕ = 0, 10
A∗ = −C1 (θ − θo ) − C2 (θ̇ − θ̇o ), (36) Roll angle ϕ
 ∗θ Pitch angle θ
Aψ = −C1 (ψ − ψo ) − C2 (ψ̇ − ψ̇o ),
Euler angles [deg] Yaw angle ψ
where {θo , ψo } accounts for the “pitch” and “yaw” of the 5
local wind vector in case of side wind. Note that the
rocket passively stabilizes about the local wind vector,
not x̂I . The local wind vector has no “roll”, so ϕo = 0. 0
In matrix notation, (36) is written as:
A∗ (q, q̇) = A1 (q − qo ) + A2 (q̇ − q̇o ), (37)
with: −5
0 0 0 0 0 0
" # " #
A1 = 0 −C1 0 , A2 = 0 −C2 0 . (38) 0 1 2 3 4 5
0 0 −C1 0 0 −C2 Simulation time t [s]

3.1.4. The dynamical equations Figure 10. Euler angles evolution for a fast-moving
rocket with C1 = 0.5 and C2 = 0.1 (i.e. 6 seconds into
the flight moving at ≈ 4 [m/s]).
In summary, the following dynamical equations for the
rocket attitude were obtained:
M (q)q̈ + C(q, q̇)q̇ + G(q) = T ∗ (q) + A∗ (q, q̇),
with simulate the attitude of a rocket when it is flying quickly
(Figure 9) or slowly (Figure 10) with zero side wind in
M (q) = WηT (q)JWη (q),


 (39) both cases. A side wind can also be simulated.
G(q) = 0,

 T ∗ (q) = WηT (q)BR,

 ∗ In our application a restoring aerodynamic moment is
A (q, q̇) = A1 (q − qo ) + A2 (q̇ − q̇o ), only beneficial in the absence of side wind. When side
where C(q, q̇) is given by (9), Wη (q) is given by (21), wind is present, the local velocity vector would be off the
J ∈ R3 is the rocket inertia tensor in the B-frame, 0 ∈ geometric vertical (axis x̂I ) and the control would have
R3 is a zero vector, B and R are given by (31) and finally to work against the aerodynamic moments. As the ab-
A1 and A2 are given by (38). sence of side wind cannot be guaranteed, a neutrally sta-
ble rocket (C1 = C2 = 0) would be optimal for our
application. However, for safety and due to the presence
of body lift and other aerodynamic effects, a certain pas-
3.2. Open-loop simulation
sive stability was built into the FALCO-4 by the four tail
fins discussed in Section 2.1. However, at low speeds (e.g
Using (39) we can develop a non-linear Simulink R
around apogee) aerodynamic effects become smaller (see
model (Figure 8) that is used for simulation. For control Figure 7), for which reason the control was designed for
system design, this plant is linearized about the rocket’s the case of small aerodynamic coefficients C1 = 0.5 and
vertical orientation (i.e. q = 0). Using this plant we can C2 = 0.1 (see Figure 10).
7

1 R1 Simulation mode: RCS thrusts in [Newtons]


Linearization mode: Body torques in [N.m] 1
5 tau_x^B Out
linphi
2 R2 Out1 2
6 tau_y^B lintheta
Out2 qdot 3
3 R3 q linpsi
Rortau
7 tau_z^B Out3 qo qddot 1/s 1/s 4
R4 qodot
4 C2 Integrator Integrator1 Euler angles
Linearization C1
Local wind [pitch;yaw] in [deg] Attitude
C_1
dynamical
time q_o C_1
plant
Clock du/dt C_2
q_o
Derivative C_2

Figure 8. Simulink
R
block diagram of the rocket plant.

Now that the non-linear plant has been created, it is pos- Yr (s) E(s) U (s) Y (s)
sible to develop and test a control scheme for vertically Kp (s) Gp (s)

stabilizing the rocket.

3.3. Control scheme Figure 11. Yaw control block diagram.

3.3.1. Plant linearization From (40), the pitch transfer function is:
2.7802
Gp (s) = 2 . (41)
Physically, the system inputs are the four RCS thrusts. s + 0.2780s + 1.3901
However, it is easier to control in three torques A PID controller of the following form is sought:
[τxB τyB τzB ]T than in the four thrusts [R1 R2 R3 R4 ]T . 1 
This is because WηT (q) in (30) is simpler than K(s) = K 1 + + Td s . (42)
Ti s
WηT (q)B in (32). Figure 8 handles this via the green
In order to obtain the coefficients in (42), Ziegler-Nichols
Linearization block which, using switches, selects
tuning rules are applied to Gp (s):
four RCS thrusts {R1 , R2 , R3 , R4 } for simulation or
K = 1.4197,
(
three torques {τxB , τyB , τzB } for linearization.
Ti = 0.8565, (43)
Using MATLAB R
’s linmod to linearize the Simulink
R Td = 0.2141.
plant model for Figure 10’s conditions, we obtain: However, subsequent hardware-in-the-loop testing re-
B vealed that the integral term caused persistent saturation

ϕ̈ = 337.8378τx ,
θ̈ = −1.3901θ − 0.2780θ̇ + 2.7802τyB , (40) due to sensor noise, fast nature of rocket dynamics and
the limited thrust of the final RCS. As a result, the inte-
ψ̈ = −1.3901ψ − 0.2780ψ̇ + 2.7802τzB .

grator term was removed.
The coefficients above result from FALCO-4’s geometric
and dynamic properties, such as its inertia tensor values. Manual tuning of the remaining proportional and deriva-
Converting (40) into state space form, it can be shown tive terms gives the final pitch controller architecture:
that each axis (roll, pitch and yaw) is controllable using (
K = 5,
RCS torques [τxB τyB τzB ]T as inputs. Td = 3, (44)
Kp (s) = K + Td s.
Notice that each equation in (40) is decoupled. There-
fore, decoupled PID controllers for roll, pitch and yaw A Bode plot of the loop transfer function Kp (s) · Gp (s)
can be designed (at least in the linear case). Since the is shown in Figure 12. K was tuned by hardware-in-the-
pitch and yaw dynamics of (40) are identical, they are loop testing to avoid excessive saturation in the control
assigned identical PID controllers. signal. Td was chosen to place a zero after the resonance
frequency in Figure 12 so as to prevent the −180 degree
drop in phase, therefore stabilizing the system.
3.3.2. Pitch control design
The lack of an integrator means that a steady-state off-
set is present in the response. However, for a 10 degree
Figure 11 shows the implemented feedback control disturbance, this offset is only 2.6 degrees in simulation.
scheme. This is within our tolerated precision. For this reason,
8

Magnitude [dB] 40 Fpitch


ẑB
20 R3 ŷB
ϕ R2
0 Fyaw
−20 ϕ
45 R4 R1
0
Phase [dB]

−45 Figure 13. Roll-mapping of the RCS thrusts.


−90
−135
−180 where max(τxB ) = 2f Rmax and max(ωϕ ) is the roll rate
10−1 10 0
10 1
10 2 deemed to be so large as to make us want to saturate the
Frequency [rad/s] RCS in trying to reduce it. This situation may arise af-
ter, for example, an accident during launch that induces a
severe spin in flight. We chose max(ωϕ ) = 100 [deg/s].
Figure 12. Bode plot of Kp (s) · Gp (s). Lastly, Rmax = 0.36 [N] is the maximum thrust that an
individual RCS nozzle can produce. Therefore the final
(both continuous and discrete time) roll controller is:
the PD controller was chosen as a satisfactory alterna-
tive to the aforementioned PID. It was also chosen over Kr (z) = 0.002063. (49)
a loop-shaping approach for implementation simplicity.
This gives an infinite gain margin and a 90 degree phase
Finally, as can be seen from Figure 12, the controller of-
margin – which, again, offers good stability.
fers infinite gain margin and 81 degrees of phase margin.
Such robustness is important as we cannot measure the
exact final parameters of the rocket to a great precision.
Also, the coefficients C1 and C2 , and thus the dynamical 3.3.4. Optimal thrust allocator
model, are bound to change during flight.

For final implementation, (44) is discretized using back- To develop the controllers, we replaced the RCS thrusts
wards Euler difference (i.e. substituting s = z−1
zTs ):
with net torques about the rocket’s center of mass. Now,
1 − z −1 a combination of {R1 , R2 , R3 , R4 } to produce these net
Kp (z) = K + Td
, (45) torques must be found. As an infinite number of such
Ts combinations exist – and as this allocation problem is
where Ts is the sampling time. The coefficients K and linear – linear programming is used to find the optimal
Td therefore remain the same. Note, that θ and θ̇ were {R1 , R2 , R3 , R4 } combination. On-board, this is imple-
Kalman filtered prior to being passed into the controller. mented as the Simplex algorithm [21].

The idea is to use a “mapping” which eliminates roll from


3.3.3. Roll control design the pitch and yaw stabilization: as the rocket rolls, we
want to re-distribute the thrusts amongst the four RCS
nozzles in order to continue yaw and pitch stabilization
The scheme from Figure 11 is also used for roll control. in the same direction. Using Figure 13, we can write:
However, unlike pitch and yaw where we desire to control 
angles, we only wish for the rocket to have zero roll rate Fyaw = −R1 Sϕ − R2 Cϕ + R3 Sϕ + R4 Cϕ ,

– we do not care what “roll angle” the symmetric rocket Fpitch = −R1 Cϕ + R2 Sϕ + R2 Cϕ − R4 Sϕ , (50)
has. Therefore the roll equation of (40) can be written as τ B = −R f + R f − R f + R f,

x 1 2 3 4
a first-order relation in roll rate:
where:
ω̇ϕ = 337.8378τxB . (46) 
B
Fyaw = τz /h

Taking τxB
as input, the transfer function for roll is:
Fpitch = τyB /h (51)
337.8378 
S = sin(ϕ) and
Gr (s) = . (47) ϕ Cϕ = cos(ϕ)
s
Since (47) contains an integrator, an interator in the con- The optimal thrust allocation problem is then:
troller is not needed for zero steady-state offset. As such, min (R1 + R2 + R2 + R4 )
a proportional controller is deemed to be sufficient for roll subject to
control. The proportionality constant is chosen according B
−R1 Sϕ − R2 Cϕ + R3 Sϕ + R4 Cϕ = τz /h,

to the equation: (52)
−R1 Cϕ + R2 Sϕ + R2 Cϕ − R4 Sϕ = τyB /h,


max(τxB ) −R1 f + R2 f − R3 f + R4 f = τxB ,
K= , (48) 
max(ωϕ ) 
R1 , R2 , R3 , R4 ≥ 0.
9

e(k) ∼ N (0, 1)
100
HIMU (z)

Amplitude [dB]
u(k) v(k) y(k)
IMU + 10−3

Figure 14. Additive noise model for the IMU. Empirical H(ejω ) for θ,ψ
Fitted H(ejω )
10−6
On-board, (52) is solved using the Simplex algorithm 10−2 10−1 100
[21] at a frequency of 50 [Hz]. Frequency [Hz]

3.3.5. Sensor noise model 100

Amplitude [dB]
An important part of control system design is modeling
the feedback dynamics – i.e. the sensors. Here the IMU 10−2
dynamics are ignored (assume it is a unit gain), however
we do model sensor noise according to Figure 14. Simulated additive noise v(k)
10−4
Empirical additive noise v(k)
To identify HIMU (z), the IMU was placed on a steady
surface and the output angle signals were measured for 10−2 10−1 100
one minute. A Discrete Fourier Transform of the output
Frequency [Hz]
signal was then taken in MATLAB R
. Assuming white
Gaussian noise e(k) ∼ N (0, 1) as the input, the follow-
ing transfer function was obtained by fitting and then dis- Figure 15. Identification of the IMU noise filter.
cretizing a second-order model to fit the blue noisy em-
pirical transfer function in the top plot of Figure 15:
ω12  s
HIMU (s) = KIM U · 2 · 1 + . (53) Filtered pitch θ
s + 2ω1 ζs + ω12 ξ
Angular Rate [deg/s]

5 Filtered yaw ψ
Filtered roll rate ω ϕ
Figure 15 shows the visual match between our measure-
Angle [deg]

ments and the identified noise filter HIMU (z). Finally, a


first-order extended Kalman filter was used to filter y(k) 0
before passing it to the pitch, yaw and roll controllers
(and can be consulted in the GNC source code [14]).
−5

3.4. Closed-loop simulation


0 2 4 6 8 10
Simulation time [s]
Using (45) as the pitch and yaw controller, (49) as the
roll controller and (39) as the dynamical plant, Fig-
ure 18 shows the master view of the Simulink R
di-
agram used for simulation. Figures 16 and 17 show
Raw pitch rate dθ/ dt
results for a simulation where the rocket is nearing
Angular Rate [deg/s]

Filtered pitch rate dθ/ dt


apogee (C1 = 0.5, C2 = 0.1) with the initial attitude 5 Raw yaw rate dψ/ dt
Angle [deg]

{ϕ0 , ϕ̇0 , θ0 , θ̇0 , ψ, ψ̇0 } = {0, 30, −7, 0, 7, 0} · π/180. Filtered yaw rate dψ/ dt

Figure 16 shows the evolution of rocket attitude after 0


RCS activation at t = 1 [s]. Note that prior to t = 1 [s],
the Kalman filter converges to the true rocket attitude. −5
Noise is effectively being filtered and the rocket is main-
tained reasonably vertical by the RCS, however wind
disturbances after about 4 [s] have little hope of being 0 2 4 6 8 10
corrected. This is because real tests of the RCS show
Simulation time [s]
the compressed CO2 container to lose pressure rather
quickly. This phenomenon was taken into account as an
exponential decrease in RCS thrust saturation level after Figure 16. Closed-loop simulation angle and angular
1 second of allowed full-thrust operation – see top of Fig- rate evolution.
ure 17. This simple model allows to simulate the effect
10

OL/CL selector &


saturation of signal
Open-loop RCS input
R1 R1
[R1;R2;R3;R4] OL linphi 1
R2 R2 phi

tau R3 R3 lintheta 2
R CL theta
phi R4 R4
Optimal thrust allocator
1 linTerm1 linpsi 3
[phi_filt] In1 psi
out1
2 linTerm2
In2 Euler angles Clean angles Noisy angles
[psi_filt;
psi_dot_filt] 3 linTerm3
tau_z^B err out2 in Razor 9-DOF IMU
In3
FALCO-4 attitude sensor model
PD yaw regulator dynamics
[theta_filt;
theta_dot_filt] [phi_filt;
tau_y^B err out3 theta_filt; [phi_save;
psi_filt; theta_save;
PD pitch regulator phi_dot_filt; psi_save]
Selector theta_dot_filt;
psi_dot_filt]
tau_x^B err u(4)-u(6)*sin(u(2)) x_filt x
z-1
P roll rate regulator wx
[phi_dot_save; Ts.z
Kalman filter (observer) theta_dot_save;
psi_dot_save] Discrete
derivative

Figure 18. Attitude control system overview. Green – selectors; orange – computations; blue – controllers.

of a decreasing thrust level and predicts that after a short


0.4 time the RCS is only be able to resist (rather than com-
R1
pletely correct) rocket deviation from the vertical. The
Valve thrust [N]

R2
0.3 R3
next section describes how test flight data confirms these
R4 simulation results.
0.2

0.1 4. EXPERIMENTAL RESULTS


0
0 2 4 6 8 10
On June 6, 2015, five test flights were conducted with
Simulation time [s] the objective of recording the difference in the rocket’s
deviation from the vertical between the controlled and
0.4 uncontrolled configurations. Initially, three controlled
Pitch control torque τ B
y
and three uncontrolled flights were planned. However,
a limited CO2 cartridge supply made only one controlled
Torque [N · m]

Yaw control torque τ B


0.2 z
launch possible due to an extra ground test using one car-
0 tridge and a valve malfunction forcing the first flight to
be uncontrolled, during which a hard landing ruptured
−0.2 the RCS pressure tubing and thus emptied a second car-
tridge. Nevertheless, four uncontrolled flights were made
−0.4 – of which the last could not be used for data analysis due
0 2 4 6 8 10 to corrupted accelerometer data at lift-off.
Simulation time [s]
Figure 19 summarizes the main result of flight data anal-
ysis. It shows the angles between the x̂B and x̂I axes –
Figure 17. Closed-loop simulation of control torques and i.e. the angle by which the rocket attitude deviates from
RCS thrusts mapped by (52). the vertical. For the uncontrolled flights, the graphs are
very similar with about 90 degree deviation from the ver-
11

Flight #1 (uncontrolled) x̂I


Flight #2 (controlled)

150 Flight #3 (uncontrolled)


Flight #4 (uncontrolled)
ẑB
Deviation angle [deg]

x̂B
0.360
100
0.000 ẑI

0.360
50
ŷB
0.360 ŷI

0
3 4 5 6 7 8 9 10
Time since takeoff [s]
Figure 21. Attitude and RCS thrusts at t = 7.035 [s]
Figure 19. Deviation angle between rocket longitudinal (flight #2 data).
axis and the vertical (test flight data).

5. DISCUSSION AND CONCLUSION


tical at the approximate moment of apogee (shown by the
dashed vertical line in Figure 19). Meanwhile, the con-
trolled flight’s deviation angle is almost 3 times smaller The experimental results closely match what was pre-
– i.e. ≈ 30 degrees at apogee. Note that parachutes open dicted through simulation. The initial goal of maintain-
at t ≈ 8 [s], so the deviation angle thereafter is mean- ing a vertical alignment via cold gas thrusters was par-
ingless. These results are visually confirmed by on-board tially achieved. The control works as expected, the only
video recordings of each flight. shortcoming being a drop in RCS gas pressure. Neverthe-
less, the results show that vertical attitude can be main-
It is worth noting that the RCS was turned on 4 seconds tained throughout the controlled flight if sufficient thrust
into the flight. Correspondingly, in Figure 19 there is a is achieved.
drop in deviation angle at 4 seconds with almost no de-
viation up to about 5 seconds, while the deviation angle The following is a non-exhaustive list of improvements
for all three uncontrolled flights steadily increases. This to make in future vehicles of this type:
suggests that the RCS was doing its job very well while
the CO2 tank pressure was high and thus valve thrust was
sufficient. However, after the first second of operation the 1. Close the loop on valve thrusts (i.e. measure thrust
dropping pressure in the CO2 cartridge rendered the RCS levels). This will allow to implement cascade con-
unable to fully cancel the flight moments. As a result, the trol and better interpret flight data.
RCS could only resist rather than remove vertical devia-
tion for the remainder of the flight up to apogee – which 2. Account for CO2 pressure drop – e.g. by increasing
is what Figure 19 shows. CO2 cartridge volume.

Figure 20 shows the commanded RCS thrusts by the on- 3. Change the IMU to give angles at a higher frequency
board computer for the controlled flight. Note that Figure – the 50 [Hz] limitation of [22] may be a limiting
20 shows the expected RCS thrusts. These were not ac- factor for future development.
tually measured in flight. The valves were calibrated in
open-loop on the ground, so a value in the graph sim- In conclusion, this paper and the flight software [14]
ply indicates the value that the controller assigned to that should help individuals interested in learning and help-
valve and not the one that was actually output. As previ- ing advance rocket vertical landing efforts.
ously noted, after ≈ 5 [s] CO2 pressure began droppping
and the open-loop PWM-to-thrust mappings no longer
held.
ACKNOWLEDGMENTS
Figure 21 allows to visualize Figure 20 at t = 7.035 [s]
(the same color scheme for RCS thrusts is used). As the
rocket tipped at apogee, the RCS saturated trying to push This work was kindly sponsored by the Space Engineer-
it back to the vertical orientation. This is the “resistance ing Center at the École Polytechnique Fédérale de Lau-
to deviation” effect discussed for Figure 19. sanne.
12

RCS thrust R1 [N]

RCS thrust R2 [N]


0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
4 5 6 7 8 9 10 4 5 6 7 8 9 10
Time since takeoff [s] Time since takeoff [s]
RCS thrust R3 [N]

RCS thrust R4 [N]


0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
4 5 6 7 8 9 10 4 5 6 7 8 9 10
Time since takeoff [s] Time since takeoff [s]

Figure 20. Commanded RCS thrusts (flight #2 data).

REFERENCES [12] Honeywell. HSC D LN N 100MD S A 5


temperature-compensanted pressure sensor.
[1] SpaceX. Reusability: The Key to Mak- http://sensing.honeywell.com/honeywell-sensing-
ing Human Life Multi-Planetary. http: trustability-hsc-series-high-accuracy-board-
//www.spacex.com/news/2013/03/31/reusability- mount-pressure-sensors-50099148-a-en.pdf, 2015.
key-making-human-life-multi-planetary, 2015. [13] HobbyKing. Turnigy nano-tech 300mah 2S 35 70C
[2] Spaceflight Now. ULA chief explains Lipo Pack. http://hobbyking.com/hobbyking/store/
reusability and innovation of new rocket. uh_viewItem.asp?idProduct=36220, 2015.
http://spaceflightnow.com/2015/04/14/ula-chief-
explains-reusability-and-innovation-of-new- [14] Danylo Malyuta. Falco-4 open source code
rocket/, 2015. database. https://github.com/DanyloMalyuta/
FlyARocket\_GNC.
[3] Space.com. Airbus’ Adeline Project Aims
to Build Reusable Rockets and Space Tugs. [15] Guilherme Vianna Raffo. Robust Control Strategies
http://www.space.com/29620-airbus-adeline- for a Quadrotor Helicopter. Doctoral thesis, Uni-
reusable-rocket-space-tug.html, 2015. versidad de Sevilla, Escuela Técnica Superior de In-
geniería, 2011.
[4] Adafruit. Raspberry Pi Model B+ 512MB RAM.
http://www.adafruit.com/products/1914, 2015. [16] Warren F. Phillips. Mechanics of Flight. Wiley,
[5] Adafruit. Spy Camera for Raspberry Pi. https:// second edition, 2010.
www.adafruit.com/products/1937, 2015. [17] Herman Bruyninckx. Robot kinematics and dy-
[6] Adafruit. PowerBoost 500 Basic - 5V USB Boost namics. http://people.mech.kuleuven.be/~bruyninc/
at 500mA from 1.8V+. https://www.adafruit.com/ tmp/HermanBruyninckx-robotics.pdf, 2010.
products/1903, 2015. [18] George J. Caporaso Mandell, Gordon K. and
[7] Parker. VSO Miniature Proportional Valve. William P. Bengen. Topics in Advanced Model
http://ph.parker.com/us/12051/en/vso-miniature- Rocketry. MIT, 1973.
proportional-valve, 2015. [19] Sampo Niskansen. OpenRocket technical documen-
[8] SMC Pneumatics. http://www.smcpneumatics. tation For OpenRocket version 13.05, 2015.
com/. [20] The Sky Dart Team. Open Rocket: Dynamic
[9] Leland Gas Technologies. Fixed Pressure Regula- Stability Characteristics. https://sites.google.com/
tor, NR-10. http://www.lelandltd.com/regulating_ site/theskydartteam/openrocket\#TOC-Corrective-
valves_prd.htm, 2015. Moment-Coefficient, 2015.
[10] Leland Gas Technologies. 68 gram 1/2 threaded [21] Jean-Pierre Moreau. Linear Programming in
CO2. http://www.lelandltd.com/small_high_ C/C++. http://jean-pierre.moreau.pagesperso-
pressure.htm, 2015. orange.fr/c\_linear.html, 2014.
[11] HobbyKing. HD Wing Camera 1280x720p 30fps [22] Sparkfun. 9 Degrees of Freedom – Razor IMU.
5MP CMOS. http://hobbyking.com/hobbyking/ https://www.sparkfun.com/products/10736, 2015.
store/__17200__HD_Wing_Camera_1280x720p_
30fps_5MP_CMOS.html, 2015.

You might also like