Original Article
J Space Explo, Volume: 7( 1)

Experimental Sensor Characterization

*Correspondence:
Sands T , Department of Mechanical Engineering, Stanford University, USA, Tel: +1-831-656-3954; E-mail: [email protected]

Received: December 12, 2017; Accepted: January 25, 2018; Published: January 30, 2018

Citation: Sands T. Experimental Sensor Characterization. J Space Explor. 2018;7(1):140.

Abstract

Spacecraft use accelerometers to measure acceleration (changes in speed), so the spacecraft can know things like when it has fired its engines long enough. Thus, accurate modeling and characterization of the accelerometer are very important features of any space mission, especially since it involves fuel consumption (currently an unreplenishable asset in space). Accelerometers are particularly useful for guidance, navigation and control. Simple control algorithms begin by using the governing physics expressed in mathematical models for control, but usually more advanced techniques are required to mitigate noise, mismodeled system parameters, of unknown/un-modeled effects, in addition to disturbances. This research describes methods utilizing LabVIEW software and a myDAQ device, a low-cost data acquisition (DAQ) device that gives students the ability to measure and analyze live signals from Bosch BMA145 accelerometers, both signals and noise. Accelerometer characterization is key to the success of any space mission. This tutorial instructs the reader how to setup the experimental test hardware and characterize an accelerometer and then proceeds to analyze the noise, permitting the utilization of the accelerometer for free fall utilizing a novel algorithm that is a natural extension of the experiments used for accelerometer characterization and noise analysis.

Keywords

Guidance; Navigation; Control; Sensors; Accelerometer; Characterization; Experimentation; Physics-based control; Free fall; Accelerometer; Noise; Fast Fourier transform; Bosch BMA145; Labview; My DAQ

Introduction

Space system guidance and control algorithms need a source of systems states to function properly and the most common two sources (usually used in concert together) are state estimators and sensors. Which system model and sensor models should engineers choose? Astrom and Wittenmark described the techniques in their textbook on adaptive control [1]. Slotine [2,3] reveals adaptive control techniques that utilize system and sensor math models in their adaptive strategies can often make acceptable system identifiers. Fossen [4] subsequently improved Slotine’s technique with mathematical simplifying problem formulation and Sands [5-11,41] and Kim [6] developed further improvements to the algorithm based on Fossen’s problem formulation followed by Nakatani [12,13] and Heidlauf-Cooper [14,15], but alas these improvements were not revealed in time for publication in Slotine’s text. Troublingly, Wie [16] elaborated singularities that exists in the control actuation that can exacerbate or defeat the control design as articulated [17-21] and solved by Agrawal [22]. Lastly, Sands [23,24,39] illustrated ground experimental procedures and on-orbit algorithms for system identification, while this research article illustrates ground experimental procedures for sensor characterization.

Laboratory experiments often confound the best analytically derived algorithms. Noise is just one common reason, while many others arise unexpectedly from the hardware setup, source of electrical-current, etc. This paper gives a detailed step-by-step tutorial for the reader to use inexpensive myDAQ devices [25] and LabVIEW software to build a “virtual instrument” that can be used to characterize an accelerometer for comparison to the products spec sheet. The experiments lead to a very natural ability to perform noise analysis and inspires a novel new algorithm for free fall detection that is favorably compared to recent research [26] and patents [27].

Materials and Methods

Build a virtual instrument (VI)

The goal is to acquire two signals simultaneously, but LabVIEW nominally only lets you have one "DAQ Assistant" virtual instrument (VI) that takes analog inputs. The main task of Part 1 is to configure LabVIEW to read in the two signals with the single DAQ Assistant block and then separate them to do analysis on them separately. NI ELVISmx Instrument Launcher was used to output 3.3V to the myDAQ. AGND was connected to the myDAQ multimeter COM port and AO?0 was connected to the multimeter HI port, making 3.3V visible on the DMM. Henceforth, the myDAQ provides a 3.3V power supply for the lab. The black wire was connected to AGND, the red wire to AO?0 and two of the 3 other wires to AI?0+/AI?0?. AGND, AI?0? and AI?1? were shorted together so that the signals were all referenced to AGND.

Next, labVIEW was opened and a DAQ Assistant block was placed on the block diagram. Select Acquire Signals, Analog Input, then Voltage, then Channel 0 ("ai0”). The range was set from -10 to 10, differential configuration. The sampling frequency was set to 1000 Hz and to acquire 100. Next, to add another channel of analog input (still within the DAQ Assistant dialog box), I clicked on the blue plus-sign above the channel list and chose channel "ai1" this time. This adds another channel to the channel list. The range was set to -10 to 10 V, again in differential configuration.

Output: the directed-output of this task is to take a screenshot of the two signals on the superimposed graph. FIG. 1 displays the results of the first attempt to display the two signals (3.3V and 5V respectively). Notice the lack of grounding produced oscillations associated with the power source. This was initially confounding, because the hardware was assembled properly, but the reason for improper grounding was not apparent.

space-exploration-acquire-two-signals

FIG. 1: (a) First attempt to acquire two signals. (b) Second attempt to acquire two signals.

The results of the second attempt are depicted in FIG. 2. Unable to deduce the reason for lack of grounding, route-cause may be sought by disconnecting the 3.3V signal’s ground wire from the myDAQ and instead connecting it to the power supply’s ground, which eliminates the oscillations in the 3.3V signal. Since that works, the issue in this instance described here resides somewhere in the myDAQ ground, so next disconnect the remaining ground wire (for the 5V signal) and connect it to the ground of the power supply to eliminate both oscillations finally yielding the proper output for this calibration as depicted in FIG. 2.

space-exploration-Third-attempt

FIG. 2: Third attempt to acquire two signals.

Next, we want to separate the two wave forms, so we can manipulate them separately in labVIEW. Create a "Select Signals" block (under “Express” and "Signal Manipulation" on the functions palette of the Block Diagram); and then click “OK” on the dialog box that comes up without doing anything. Next, wire-up the output of the DAQ Assistant block to the Select Signals block and run the virtual instrument (VI). This tells the Select Signals block what channels the DAQ Assist block is outputting. Double-click on the “Select Signals” block (or right-click and go to Properties) and then move the first channel ("Voltage") from the "Unselected Signals" side to the "Selected Signals" side. Close the dialog box and connect a waveform graph to the output of the Select Signals block and then run the virtual instrument again. Only the signal that came in on the ai1 channel should be visible on the output of the Select Signals block.

Repeat the process to create another Select Signals block that isolates and displays the signal coming in on ai0. The only thing done differently is which of the signals was selected within the dialog box. The y-axis scale was adjusted as necessary to get a cleaner graph. Our goal is to see results as depicted in the screenshot in FIG. 3.

space-exploration-Second-screenshot

FIG. 3: Second screenshot for displaying two channels.

Connect BMA145 accelerometer

Next, tape the BMA145 accelerometer in FIG. 4 (left) onto the tilt-module (right). Connect the accelerometer to the myDAQ according to the schematic in FIG. 4 (center) from the “BMA145 Datasheet.pdf” [28] depicted in FIG. 5.

image

FIG. 4: BMA145 Accelerometer.

space-exploration-schematic-connection

FIG. 5: BMA145 Accelerometer schematic connection to myDAQ.

The supply voltage (Vdd) for the accelerometer should be set at 3.3V. Per the BMA145Datasheet, anything higher than 3.5V will exceed the accelerometer’s design. From the many pins in the accelerometer, only Xout, Yout and Zout will be used. In this instance two of these outputs were connected (Zout plus one of the others, depending on how the tilt-module is setup they are marked XZ or YZ) to the connector block to the pins corresponding to analog input channels in myDAQ. The accelerometer datasheet and the board schematic (FIG. 5) describe the pin layout. In the DAQ Assist block that interfaces with the input, set the sampling frequency to 10 kHz and “data taken” for 0.10 seconds. Since the accelerometer only outputs between 0 and 3.3 V, Channel ai1 was safely set to these limits. Channel ai0 was set to have a similar range (identical in this case).

The datasheet for the accelerometer helps you set the Y-range on your graph to match the expected minimum and maximum outputs of the accelerometer. The key orientation figure and data table are taken from the datasheet and depicted in FIG. 6. The output voltage (Xout, Yout and Zout) of the accelerometer will be accessible within LabVIEW on the two different ai channels created earlier. Add time-domain graphs to the output of the DAQ assistant blocks, visible in the left-hand FIG. 7. The graph on the top contains both signals, while the two bottom graphs contain the disparate single signals.

space-exploration-orientation-output

FIG. 6: BMA145 Accelerometer orientation output.

space-exploration-Part-2-screenshot

FIG. 7: Part 2 screenshot showing 2 A.I.’s and output.

Next, obtain data at various rotation angles of the tilt-module. A description follows for taking data at two different orientations to reconcile the experiment (FIG. 8) with the orientation information provided in the datasheet (FIG. 6). If the tilt-module had been lying flat, so the accelerometer was more similar to the datasheet depiction, you would expect one of the two measured signals (X/Y) to be on the order of 1.5V, while the other signal (Z) should’ve been on the order of 1.8V. Instead, the orientation of the tilt-module here is more akin to the datasheet’s [4] orientation where the gravity vector is perpendicular to the upper depiction of FIG. 6. Thus, neither channel (X/Y and Z) was optimally oriented to measure the gravity vector.

space-exploration-labVIEW

FIG. 8: BMA145 Signal 0 (graphed in labVIEW).

FIG. 8 and FIG. 9 show signal zero plotted two different ways. First the plots were called in labVIEW, but the raw data was also exported to excel and plotted (so the data can be easily saved for other potential analysis). Similarly, FIG. 10 and FIG. 11 depict signal one data, again noting that we don’t see the gravity signal present due to this first orientation of the tilt-module (FIG. 7). Next, the accelerometer should be laid flat by rotating the tile module ninety degrees (FIG. 12) to align the gravity vector to be measured as signal 1 (look again at the top part of FIG. 6. to recall the orientation stated in the datasheet that should now contain a signal from gravity). Signal zero remained just above 1.65V while signal one now has a signal on the order of 1.97V produced by the acceleration of gravity.

space-exploration-Signal-0

FIG. 9: BMA145 Signal 0 (graphed in excel).

space-exploration-Signal-1

FIG. 10: BMA145 Signal 1 (graphed in lab view).

space-exploration-Signal-1-graphed

FIG. 11: Signal 1 (graphed in excel).

space-exploration-laid-flat

FIG. 12: BMA145 laid-flat by 90° rotation of tilt-module.

FIG. 13. shows signal zero plotted in excel and similarly, FIG. 14 depicts signal one data, again noting that now we see the gravity signal is present since we rotated the tilt-module.

space-exploration-orientation

FIG. 13: BMA145 Accelerometer orientation output.

space-exploration-Accelerometer

FIG. 14: BMA145 Accelerometer orientation.

Characterize the BMA145 accelerometer

The final characterization task is to take data points at various angles to determine the 0G bias voltage and sensitivity for each axis; and then compare these to the values found in the datasheet [29]. In particular, two plots showing the acceleration in two of the three dimensions (X and Z, or Y and Z) versus rotation angle. One way to do this is to record angle values and output voltage values from the sensor in excel and make a plot. Additionally, the 0G bias and sensitivity for two of the three X, Y and Z axes will be calculated; and finally, the source of cross-axis sensitivity can be described.

First, note in FIG. 15 the example of signal 1 (z-direction) when the rotation angle in ninety degrees (orthogonal to the gravity vector thus the only signals present are the bias and noise). Taking the mean of this signal reveals the bias, which is depicted in the plot, while the noise bounces around the mean (or bias).

image

FIG. 15: Mean output bias voltages (example).

Rather than produce plots like FIG. 15 to find the means for every experiment, modify your labVIEW file (see FIG. 16) to automatically output the signal mean, μ for each experiment. Then simply iterated the rotation angle and record the means in an excel spreadsheet (FIG. 17 and FIG. 18).

space-exploration-Modified-labVIEW

FIG. 16: Modified labVIEW program for means.

space-exploration-nineteen-experiments

FIG. 17: Signal 0 data from nineteen experiments.

space-exploration-Signal-1-data

FIG. 18: X-ray diffraction patterns

Next, implement equation 1 “No-bias Signal, Vnb [30] to find the no-bias signal (which should contain the acceleration measurement plus noise). Anticipate near-zero, no-bias signal zero, while signal 1 should be near-zero at ± 90 degrees increasing to 1 g at zero degrees. Peaking at FIG. 19, these experiments behave accordingly. According to the BMA145 datasheet, “if the sensor is at rest or at uniform motion, in a gravity field according to” FIG. 6 the output signals are ± 0 g for the X/Y channel and +1 g for the Z channel. This is indeed the results of equation 1 implemented in excel (FIG. 17 and FIG. 18), so there is confidence the experiments were good. The datasheet said to expect sensitivity [30,31] roughly one-tenth of the supply voltage, so something on the order of 3.3/10=0.33 was expected as the measurement for 1 g per equation 2 “sensitivity”, which is very close to the calculation of roughly 0.32.

equation (1)

equation (2)

equation (3)

space-exploration-Mean-output

FIG. 19: Mean output voltages versus rotation angle.

Sensitive is the change of output (voltage) per unit input (acceleration). From a zero-acceleration state, the change is therefore the voltage measurement divided by the acceleration, which is 1 g multiplied by the cosine of the rotation angle, ? per equation 2 and the results are displayed in FIG. 17 and FIG. 18. Carefully note there is a cosine in the denominator of equation 2, so when the rotation angle is ± ninety degrees, this equation is ill-defined, which we see in FIG. 20. As we get away from ninety degrees, we see normal behavior and the accelerometer’s sensitivity is very roughly within spec for much of the experiments, certainly performing towards the lower end of advertised sensitivity. Furthermore, the datasheet stipulates that the expected sensitivity will vary ± 4% establishing the upper and lower bounds depicted in FIG. 20.

space-exploration-Sensitivity

FIG. 20: X-ray diffraction patterns

Note on cross axis sensitivity

Cross-axis sensitivity is sensitivity to accelerations in orthogonal axes. According to both analog.com’s and Bosch’s websites, cross-axis sensitivity is typically caused by alignment errors, etching inaccuracies and circuit crosstalk. We can calibrate it out by first restricting acceleration to one axis, noting the no-bias signal (should be zero, other than noise) present in the other axes.

Analog.com in particular is the source of the recent publication [26] by the authors of the recent patent [27,28] to be used for comparison.

Results and Discussion

Noise analysis

The mean value of the voltage (acceleration measurement plus bias) was subtracted away leaving only the noise per equation 4 “noise calculation”. Next, the root mean square [32] of the noise was calculated per equation 5 (FIG. 21).

space-exploration-Voltage-signal

FIG. 21: X-ray diffraction patterns

equation (4)

(5)

The 1-g voltage value can be calculated for comparison to the spec sheet by subtracting off the 0-g measurements (signal 1) which only contain the bias and the noise. The residual difference is theoretically only the gravity measurement signal which was averaged to find a mean value for measurement of 1-g (roughly 0.33 Volts).

The noise can also be evaluated via the Fourier Transform [33] (automated in labVIEW) depicted in FIG. 22 with results depicted in FIG. 23 and FIG. 24 for the z-aligned and x/y-aligned directions respectively. Although this effort focuses on the z-direction measurements, the x/y-aligned measurements are useful, since they signal contains no acceleration measurement and therefore yield information about bias and noise.

space-exploration-analyzing-noise

FIG. 22: LabVIEW model for analyzing noise.

space-exploration-FFT-Signal

FIG. 23: FFT Signal 0 (aligned with z).

space-exploration-FFT-Signal

FIG. 24: FFT Signal 1 (aligned with x/y).

If the noise were white, there would be equal amounts of spectral content at all frequencies. In both z-aligned and x/y-aligned data, there is clearly more spectral content at low frequencies. This is intuitive, since it is difficult for physical motion to occur at higher-and-higher frequencies and this sensor measures motion acceleration. Naturally, this sensor is better at low frequencies.

Quickly noting the two figures, you can see that spectral content (spikes) are similar in both figures at some frequencies. Since the x-y aligned measurements contain no acceleration data, the spectral content can only be from sources other than acceleration (e.g. 60 Hz from the power lines in the building and spikes just below 2000 Hz, 3000 Hz, 4000 Hz and 5000 Hz could be acoustic noise pressure waves impinging on the accelerometer, recalling that pressure is force divided by area and force is mass times acceleration) [34]. Another potential noise source is the vibrations of the laboratory laptop on the table shared with the accelerometer.

Data averaging

One method for data averaging uses MATLAB [35]. To average the data, import it into MATLAB using the following MATLAB command: xlsread (filename, sheet, x1range) [36], which reads from the file named filename, choosing the particular sheet named sheet and reads data from the range specified by x1range.

Plot multiple data in “subplots” for clarity-of-comparison. Individual figures for the five cases of bins were first plotted in FIG. 25 to FIG. 27. Next, execute a loop in MATLAB that calculates the running-average over a variable amount of data: 100, 300, 1000, 3000 and 10000 measurements. Then root-mean-square RMS values can be calculated for the averaged data and the binsizes cane be converted to bandwidth per equation 6 (bandwidth related to bin-size) [37,38], resulting in FIG. 25.

equation (6)

Also, in FIG. 25, the theoretical noise level is displayed. The sensor’s datasheet reflects equation noise. Thus, 175 μg was multiplied by the root of the bandwidth to yield the noise in [g]. Then, the value of volts corresponding to 1 g (z-channel minus x/y channel) was multiplied to yield the noise value in volts. This sensor seems to slightly exceed the noise spec. There are clearly some advantages to signal averaging, in particular reduction of noise (RMS). FIG. 26 and FIG. 27 demonstrate that increasing the bin-size (number of data points averaged) decreases the root-mean-square value of the noise. Equation 6 inversely-relates the bin-size to the bandwidth and thus FIG. 25 reflects decreasing noise with decreasing bandwidth (or equivalently increasing bin-size). There are also disadvantages. Averaging a signal reduces the fidelity of the knowledge about the measured phenomenon.

space-exploration-Ideal-RMS

FIG. 25: Ideal RMS noise response.

space-exploration-RMS-Noise

FIG. 26: RMS Noise data for Z-aligned signal 0.

space-exploration-Noise-data

FIG. 27: RMS Noise data for X/Y-aligned signal 1./p>

Free fall detection

Having calibrated the accelerometer, the next paragraphs offer a novel algorithm (whose effectiveness evaluation is to be published in the sequel) in LabVIEW that can detect a free fall condition using the accelerometer data. Liao’s recent Patent [27] seeks to do the same thing and fortunately the Liao patent contains experimental data characterizing free fall acceleration and acceleration-rate data. This inspired my algorithm FIG. 28 and FIG. 29. Display the experimental acceleration and acceleration rates respectively.

space-exploration-acceleration

FIG. 28: X-ray diffraction patterns

space-exploration-free fall

FIG. 29: Algorithm to detect free fall.

It is insufficient to monitor only the output of 2 signals, since that neglects one-direction of sensing. The patent restricts free fall measurement to a situation where free fall is always preceded by a rollover condition. In order to detect free fall that doesn’t necessarily follow a rollover, we’ll need to monitor all three directions. Non-ideal parts of this initial setup include differentiation of noisy signals. This is a horrible practice and requires further signal processing actions to mitigate noise. Clearly, if we had only relied upon acceleration-rate measurements, we could have many false-positives. My implementation of the combined-use of acceleration and acceleration-rate is a good start, but noise-mitigation should be pursued further, e.g. signal averaging [35], Kalman Filter, etc.

Conclusion

This paper gave a lengthy tutorial for real-world laboratory calibration of a BMA145 accelerometer utilizing LabVIEW software and a myDAQ device, a low-cost data acquisition (DAQ) device to create “virtual instruments”. After accelerometer characterization, noise analysis is demonstrated; after which a novel supplement algorithm is introduced to detect free fall distinguishable from static conditions, when compared to a recent patented technique. Accelerometer characterization is key to the success of any space mission. Spacecraft use accelerometers to measure acceleration (changes in speed), so the spacecraft can know things like when it has fired its engines long enough. Thus, accurate modeling and characterization of the accelerometer are very important features of any space mission, especially since it involves fuel consumption (currently an unreplenishable asset in space). Accelerometers are particularly useful for guidance, navigation and control. Simple control algorithms begin by using the governing physics expressed in mathematical models for control, but usually more advanced techniques are required to mitigate noise, mismodeled system parameters of unknown/un-modeled effects, in addition to disturbances, permitting challenging space mission accomplishment [41].

Conflicts of Interest

“The authors declare no conflict of interest."

References