Vous êtes sur la page 1sur 8

1 Payload

The function of the main payload is monitoring and data logging of the vehicles real time trajectory.
The engineering goal of this payload is to determine an accurate trajectory of the vehicle through inertial
measurement sensors, and both environmental and motor conditions. Redundancy of the vital components
on board the payload will be incorporated into the design like most space systems.
1.1 Instrumentation
The tentative list of sensors are as follows:
2 Maxim Integrated Max 21000+T 2000dps Three Axis Gyroscopes
2 Measurement Specialties Inc. ACH-01 150g Accelerometers
2 Heraeus Sensor Technology HD421P+100 Class 0

-850

C Temperature Thermocouple
1 Honeywell MLH02KPSB06A 2000 Psi Pressure Transducer
1 Absolute Barometric Pressure Sensor
The sensors listed above cost a total of about \$260. The inertial measurement system will consist of the
gyroscopes and accelerometers; the purpose of the system is to determine the orientation and position of the
vehicle. One pressure transducer and thermocouple will measure the internal conditions of the rocket motor
to determine the real time thrust generated by the propulsion system. Rocket thrust has two components:
the time derivative of momentum and back pressure forces experienced at the exhaust exit portion of the
nozzle; that is simply expressed as:
Figure 1: Rocket thrust equation.
F
t
=
d(mv)
dt
= v
e
m+A
e
(P
e
P
a
)
v
e
: Eective exhaust velocity, A
e
: Nozzle exit area, P
e
: Pressure at nozzle exit, P
a
: Ambient pressure
Eective exhaust velocity is a function of the specic heats ratio of the combustion gas, combustion temper-
ature, exit pressure, and combustion chamber pressure. It is calculated as shown:
Figure 2: Eective exhaust velocity.
v
e
=

2g
1
R(T
c
)
ns
[1 (
P
e
(P
c
)
ns
)
1

]
R: Universal gas constant, : Specic heat ratio, T
c
: Combustion temperature, P
c
: Combustion chamber
pressure.
The gas weight ow rate is used to then calculate the gas mass ow rate: m =

W
g
. With the eective exhaust
velocity and the gas mass ow rate calculated, the rst portion of the thrust is calculated. The only issue
we face with these calculations is the measurement of the exit pressure of the exhaust gas at the nozzle exit.
The ambient pressure will be measured with the absolute pressure sensor placed in the payload bay. The
exit pressure can be determined experimentally during ground motor tests and since the thrust contribution
1
from the back pressure is such a negligible portion compared to the momentum derivative, that experimental
value is sucient for calculations.
Figure 3: Gas weight ow rate.

W = A
t
(P
c
)
ns

g[2/( + 1)]
+1
1
R(T
c
)
ns
= A
b
R
b

gas
A
b
: Surface area of burning surface, R
b
: Burn rate for particular propellant mix; found experimentally.
As with any sensors, the pressure transducer is bound to have errors; we will alleviate this by running
the measurements over time through a Kalman lter.
1.2 Altitude Determination
Altitude can be directly calculated by integrating twice the acceleration measured by the accelerometers
over time. Due to the errors in the measurement, relying solely on the accelerometers for localization of the
vehicle should be avoided. Calculations of thrust and drag can indirectly be used to predict the position of
the vehicle. The trajectory of the vehicle will be calculated based on this equation which combines Newtons
second law, the rocket thrust equation and drag equation:
Figure 4: Forces acting on vehicle.
F = (m
0
mt)a = mv
e
+A
e
(P
e
P
a
)
1
2

air
V
2
C
D
A(m
0
mt)g
Where is the density of air, V is the velocity of the vehicle and C
D
is an experimentally calculated drag
coecient. The density of the surrounding air will be calculated using measurements from an absolute
pressure sensor and a thermocouple.
Figure 5: Local density of air.

air
=
P
abs
R
air
T
R
air
= 287.058
J
kgK
Since we do not anticipate the vehicle going supersonic, Rayleighs Drag Equation is sucient to calculate
the drag force experienced by the vehicle. The acceleration is easily derived by dividing the force acting on
the vehicle by the mass of the vehicle. Note that since the mass of the vehicle decreases as the propellant
burns, we must consider the mass change over time into our calculations.
Figure 6: Acceleration of the vehicle.
a =
mv
e
+A
e
(P
e
P
a
)
1
2

air
V
2
C
D
A
(m
0
mt)
g
2
The velocity of the vehicle is found by simply multiplying by the amount of time passed since last calculation
of the acceleration.
Figure 7: Velocity of the vehicle.
V = (
mv
e
+A
e
(P
e
P
a
)
1
2

air
V
2
C
D
A
(m
0
mt)
g)t
Since the velocity of the vehicle is zero at the beginning, the drag force simply goes to zero. With the velocity
calculated, the altitude(h) can nally be calculated.
Figure 8: Altitude of the vehicle from accelerometer reading.
h = (
mv
e
+A
e
(P
e
P
a
)
1
2

air
V
2
C
D
A
(m
0
mt)
g)(t)
2
The acceleration calculated from the reading of the pressure transducer and thermocouple can used as the
prediction in the Kalman lter with the accelerometer measurements serving as the input. The true altitude
will be calculated from the absolute barometric pressure sensor and the outside thermocouple using this
equation:
Figure 9: Altitude of the vehicle from pressure and temperature readings.
h =
RT
g
log(P
sea
/P)
The results found from the barometric reading will be considered the prediction and calculations from
acceleration will be considered the measurement. The velocity and acceleration can be calculated from the
barometric readings by taking the time derivative of the altitude. Incorporating multiple sensor inputs and
sophisticated ltering techniques,the error in the measurement are minimized and the precision and accuracy
of the calculations are guaranteed.
3
Figure 10: Rocket Altitude Determination Flow Chart.
1.3 Kalman Filter
The Kalman lter is a recursively operating algorithm that takes a stream of noisy inputs and produces
an estimate of the systems state. The lter is fed with an initial prediction based on known system state
variables; in the case of thrust, the time from ignition is the known variable. The lter updates the estimates
using a weighted average between the estimate and the new data using a factor calculated from the covariance
of the measurement and the process itself. Knowing the time from ignition, we can predict the thrust of
the motor from the experimentally gathered thrust curves and the thrust curves provided by the motor
manufacturer. As we move to casting our own motors, wed have to rely more on our experimental ndings.
The lter can be applied to most measurements we will be take from the temperature of the motor to the
acceleration of the vehicle.
The lter is divided up into two portions: the prediction and the correction phase. The prediction phase
uses the estimation from the previous iteration to predict the future state while the correction uses the
measurement to provide a new estimate of the state of the system.
4
Figure 11: Predict update in Kalman Filter.
x

k
= A x
k1
+Bu
k1
P

k
= AP
k1
A
T
+Q
Figure 12: Correct update in Kalman Filter.
K
k
= P

k
H
T
(HP

k
H
T
+R)
1
x
k
= x

k
+K
k
(z
k
H x

k
)
P
k
= (I K
k
H)P

k
For our application, the matrices can be treated as 1x1 matrices as we will only be considering one variable
at a time. This will allow for faster processing and simpler implementation in code.
u
k
is the control input that directly changes the state of the system; this variable will be zero as all the
data being collected is from environmental conditions and conditions not directly aected by the vehicle.
R is the measurement noise variance and will be calculated from collected data from test ights and ground
tests. The variance will be the dierence of the maximum or minimum value and the average of the mini-
mum and maximum values measured. That variance will be calculated by using readings from each discrete
portion of time from each test.
Q is the process noise variance that essentially is the noise inherent in the system. It is the repeatability
of the system and is hard to measure as the sensors used to measure such quantities are noisy themselves.
For the purpose of the payload, this value will initially be guessed to a reasonable value and will be tuned
through each iterative test.
A, B, H are the transformation functions that will map the measurements to the states. In this application,
they will be 1 as the measurements directly map to the states; an example where these will not be 1 is
during when an encoder reading outputs voltage, but must be converted to values -1.0 to 1.0 to be used in
calculations.
K
k
is the Kalman gain that is the weighing factor. It is calculated from the covariances and determines how
much of the estimate will be relying on the measurement and prediction.
P
k
is the estimate error covariance which shows how much of an error the estimate has from the real state of
the system. A P
k
approaches 0, the estimate is more heavily weighed on the prediction than the measure-
ment.
z
k
is the measured matrix from the sensors.
x
k
is the state matrix and will be the quantity that we want to nd.
A C++ implementation and demonstrations are shown below; the algorithm assumes single variable predic-
tions and measurements to avoid dealing with matrix algebra.
5
Figure 13: KalmanFilter.h
/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** KalmanFilter.h
** Implementation for a single variable Kalman Filter using only one input for
** each prediction and measurement. Assumes process noise variance and
** measurement noise variance are constant to simplify algorithm.
**
** Author: Davidthefat
** -------------------------------------------------------------------------*/
#ifndef _KALMANFILTER_H
#define _KALMANFILTER_H
class KalmanFilter
{
private:
float initEstimate;
float estimateErr;
float processNoise;
float measurementNoise;
float KalmanGain;
float state;
public:
//iE: Initial Estimate, eE: Estimate Error, pN: Process Noise, mN: Measurement Noise
KalmanFilter(float iE, float eE, float pN, float mN);
//in: Prediction estimate
void processEstimate(float in);
//in: Measurement, returns latest estimate.
float processCorrection(float in);
//returns the Estimate Error, used to determine the "exactness" of the estimate.
float error();
};
#endif
6
Figure 14: KalmanFilter.cpp
/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** KalmanFilter.cpp
** Implementation for a single variable Kalman Filter using only one input for
** each prediction and measurement. Assumes process noise variance and
** measurement noise variance are constant to simplify algorithm.
**
** Author: Davidthefat
** -------------------------------------------------------------------------*/
#include "KalmanFilter.h"
KalmanFilter::KalmanFilter(float iE, float eE, float pN, float mN)
{
initEstimate = iE;
estimateErr = eE;
processNoise = pN;
measurementNoise = mN;
}
void KalmanFilter::processEstimate(float in)
{
initEstimate = in;
estimateErr += processNoise;
}
float KalmanFilter::processCorrection(float in)
{
KalmanGain = estimateErr/(estimateErr + measurementNoise);
state = initEstimate + KalmanGain*(in - initEstimate);
estimateErr *= (1 - KalmanGain);
return state;
}
float KalmanFilter::error()
{
return estimateErr;
}
7
Figure 15: Kalman Filter Demo using very noisy measurements.
8