<< Chapter < Page Chapter >> Page >

Using the accelerometer and barometer

Sensors are used to estimate the rocket's state during flight. In order to take real time data, a microcontroller with both an accelerometer and a barometer are put inside the rocket payload section. A method for apogee detection using only an accelerometer (an "inertial system") is to detect apogee when the velocity, area under the acceleration curve, reaches zero. The acceleration of the rocket steadily increases due to the thrust, reaches a peak, and drops down to a constant -9.8 m/s2 after burn out (since the only force working on the rocket at that point is the downward force of gravity). Therefore, in a perfect world where the acceleration and the accelerometer match, the accelerometer would integrate in real time to find the velocity, and as soon as the velocity reached zero, it would deploy the parachute. However, accelerometers, in general, are far from perfect. The accelerometer data is quantized and noisy. More problematically, the accelerometer contains a bias. This makes integrating the data troublesome, as error from the bias increases constantly over time. This causes enough error to deploy the parachute seconds earlier or seconds later than apogee.

Another approach to electronic apogee detection comes from a barometer. The barometer measures air pressure and detects changes in air pressure in order to determine the height of the rocket. Apogee is detected when the air pressure stops decreasing, and begins to increase. With the barometer is that the data will be quantized. How quantized the data is depends on the sensitivity of the barometer, but are in general significant because the barometer detects changes in air pressure which are small for a comparatively large change in altitude. However, the presence of a bias term is irrelevant when computing apogee from a barometer because it is the change in altitude that determines apogee, not the absolute altitude. The barometer, in theory, can detect when apogee is by looking at the past terms and determining if the altitude is higher, lower, or about the same as the current height. Consider the half parabolic flight pattern in Figure 2. When the rocket is in thrust phase, the barometer will read that the current height is higher than the previous heights. Near the very end of the coasting, as the barometer starts to read values that are incredibly close to each other, the program may use a decision rule to deploy the parachute here. Alternatively, it can deploy as soon as it starts seeing a decrease in altitude. Of course, without digital filtering, apogee is impossible to detect; there is too much noise and quantization error. In addition, because barometers measure air pressure, the pressure wave produced when the rocket nears the speed of sound may be registered as a drop in altitude and therefore apogee. Barometers, like accelerometers are easily fooled. The noise caused in the data alone could cause the parachute to deploy anytime the data dipped below a past value, even if the model rocket is in thrust phase.

Conventional filters are inadequate

After taking in raw flight data, the next attempt to accurately extract the apogee is to filter it in order to obtain a signal that can be used to best approximate apogee. First is the naïve low pass filter approach. As seen in Figure 4, the boxcar filter was able to smooth out the noisy raw data to create a semi-parabolic flight pattern similar to the expected flight pattern. However, the fatal flaw of the boxcar filter is that, while it filters the signal reasonably, it creates a time delay. In this graph, the apogee occurs at around 10-11 seconds into the flight. However, the output to the boxcar filter puts apogee at around 11-12 seconds into the flight. Knowing how crucial a few seconds is in real time flight, the boxcar tragically falls short of the expectations.

Boxcar filter

data filtered through boxcar
Graph of Raw Barometer Data vs. Filtered Data – Boxcar Filter
The first conclusion is that a simple boxcar filter has not worked for the purpose of accurately detecting the time of apogee. Perhaps other filters may work. Figure 5 and Figure 6 depict the same set of raw altitude data filtered by the butterworth and elliptical filters, respectively.On further inspection of the graph of the butterworth filtered data, it might be noted that the Butterworth filter has also created a time delay. Not only that, but this filter has created peaks and troughs (waves, ripples) in the filtered data. Although the time delay has been decreased slightly from the boxcar filter, it fails to smooth out the noisy signal. Unfortunately, if this filter were to be implemented, the system would detect apogee at the first decrease in altitude, which occurs around the 8.5 second mark.

Butterworth filter

data filtered through butterworth
Graph of Raw Barometer Data vs. Filtered Data – Butterworth Filter
Unfortunately, the butterworth filter did not meet the criteria for accurate rocket apogee detection. One last conventional filter, the lowpass elliptic filter, might work. Figure 6 below is a graph of the raw and elliptically filtered altitude data. The elliptic lowpass filter, based on its rough outline, lines up well with the data. The global maximum of the elliptic filter does indeed seem to coincide with the apogee of the rocket (as extrapolated roughly by eye from the raw data). It seems to have overcome the time delay problem. However, the elliptic filter shares its flaw with the butterworth filter; it contains peaks and troughs that the system could easily confuse as apogee. The filtered data has very distinct local maxima and minima, resulting in the same problem as the butterworth filter; the system will deploy the parachute much too early, because it makes a decision rule at the very first decrease in altitude to release the parachute. In addition, the filtered data is attenuated, and while – in this case – bears no consequence to detecting the time of apogee, causes flaws in the actual altitude data.

Elliptic filter

data filtered through elliptic
Graph of Raw Barometer Data vs. Filtered Data – Elliptic Filter

Why the kalman filter?

The Kalman filter is a filter that takes into consideration several factors that the other filters fail to. The Kalman filter is ideal when the situation involves a physical system along with real-time information gathering from noisy sensors. Model rocket flight can approximated from a fairly simple physical model which makes this problem well suited for a Kalman filter. While conventional filters do take into consideration past events in order to process current events, the Kalman filter utilizes the physical model of the rocket (which can be extrapolated from basic physics equations) as well as the previous state in order to process current events. One major advantage of the Kalman filter is that it only uses the previous state and the sensor data to predict the next state, unlike a running average which use many previous samples. Finally, the Kalman filter takes into account the reliability of the sensors (as determined by their variances and covariances) when making the state estimate, and is provably mathematically optimal when the model is accurate, and the sensor data is being corrupted by white noise.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital detection of rocket apogee. OpenStax CNX. Dec 18, 2013 Download for free at http://cnx.org/content/col11599/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital detection of rocket apogee' conversation and receive update notifications?

Ask