Literature DB >> 22454564

Inertial and magnetic sensor data compression considering the estimation error.

Young Soo Suh1.   

Abstract

This paper presents a compression method for inertial and magnetic sensor data, where the compressed data are used to estimate some states. When sensor data are bounded, the proposed compression method guarantees that the compression error is smaller than a prescribed bound. The manner in which this error bound affects the bit rate and the estimation error is investigated. Through the simulation, it is shown that the estimation error is improved by 18.81% over a test set of 12 cases compared with a filter that does not use the compression error bound.

Entities:  

Keywords:  compression; estimation; inertial sensor; magnetic sensor

Year:  2009        PMID: 22454564      PMCID: PMC3312422          DOI: 10.3390/s90805919

Source DB:  PubMed          Journal:  Sensors (Basel)        ISSN: 1424-8220            Impact factor:   3.576


Introduction

Largely because of the MEMS technology, inertial sensors (accelerometers and gyroscopes) are becoming smaller and cheaper [1], which makes it possible to use inertial sensors in many applications. Inertial sensors are used in motion trackers [2], personal navigation systems [3] and remote control systems [4]. In some applications such as body motion trackers (for example, the product ‘Moven’ by XSENS), inertial sensors are used to track body movement. As the number of inertial sensors increases, the size of sensor data increases accordingly. The sensor data is transmitted to the microprocessor board through wired or wireless communication channels. In a wireless communication channel, the transmission speed is relatively low compared with a wired communication channel. The size of the sensor data needs to be reduced if it exceeds the capacity of the communication channel. For example, the transmission rate of raw sensor data for one MTx (commercial inertial and magnetic sensor) could be as high as 72 Kbps: 9 sensor outputs (3 accelerometers, 3 gyroscopes, and 3 magnetic sensors) × 500 Hz (maximum sampling rate) × 16 bits (16 bit A/D conversion for each sensor). If four MTx are used, the size of the sensor data exceeds the capacity of Zigbee (maximum rate is 250 Kbps [5]). More applications are expected as networked control and monitoring systems are becoming more popular [6]. One way to reduce the size of the sensor data is to compress the sensor data before transmission and decompress the received data in the microprocessor board. Data compression has been extensively studied in many areas [7]. In applications such as body motion trackers, real-time compression is preferable, in order to avoid delayed sensor data transmission and consequently the delay in motion estimation. One of the most popular real-time compression methods is ADPCM (Adaptive Differential Pulse Coded Modulation) [8], which is optimized for voice data. In [9], a simplified ADPCM method is used for inertial sensor data compression, where the maximum error (the difference between the original data and the compressed-and-then-decompressed data) is only relatively bounded (e.g., 1% of the sensor data). The performance indices of data compression are the bit rate and the quality of compressed data. In voice data compression, the quality of compressed data is evaluated by listening to the compressed-and-then-decompressed voice data. This rather subjective evaluation makes sense since the final destination of compressed data is the human ear. On the other hand, the final destination of compressed inertial sensor data is usually a filter (such as a Kalman filter), where orientation is estimated. Thus the quality of compression should be judged by how the compression affects the estimation error. In this paper, a modified ADPCM method is proposed, where the absolute maximum error bound is explicitly given. Also, we investigate how this error affects the estimation error. A part of this paper was presented in [10].

Inertial and Magnetic Sensor Data Compression and Estimation

The overall process of compression and estimation is given in Figure 1, where k is a discrete time index. The objective is to estimate some states x(k) (attitude, heading, position, etc.) using inertial sensor data y(k) at a limited data transmission rate. The inertial sensor data y(k) is compressed into d̃(k) and transmitted to the microprocessor board. The compressed data is decompressed into ŷ(k) and the state x(k) is estimated using a filter.
Figure 1.

Overview of inertial and magnetic sensor data compression and estimation.

Since the objective is to find a good estimator of x(k), the quality of compression is considered good if the estimation error x(k) − x̂(k) is small. The quality of the compression algorithm is evaluated using the following estimation error covariance: where x̂(ŷ) is an estimator when ŷ is used as an output. Note that P depends on the filter algorithm used to compute x̂(ŷ) in addition to the compression algorithm. The ideal compression algorithm minimizes both P and the bit rate. However, usually if P is small, the bit rate tends to be large. In Section 4, we propose a compression algorithm where the maximum compression error is bounded. The maximum compression error bound plays a role of design parameter to adjust P and the bit rate.

Modified ADPCM Algorithm

The ADPCM block scheme is given in Figure 2. We assume that y(k) is the output of n bit uniform quantizer, where y(k) satisfies
Figure 2.

Encoder and decoder block scheme.

Let the quantization size δ of y(k) be defined by If there is more than one sensor, we need one encoder for each sensor. The sensor data y(k) is compared with the predictor output ỹ(k). The difference d(k) is coded into d̃(k) and this d̃(k) is transmitted to the estimator board. In the standard ADPCM, d̃(k) is a quantization index i(k). In this paper, d̃(k) consists of one bit mode information m(k) and a quantization index i(k): In the decoder, the decompressed data is ŷ(k) = ỹ(k)+ d̂(k). The predictor output ỹ(k) can be computed from d̂(k) and thus does not need to be transmitted. The adaptive predictor uses the same pole-zero configuration as that in CCITT G.726 ADPCM, which is an ADPCM speech compressor/decompressor protocol proposed in 1990 [11] : From the assumption (2), if ỹ(k) > y from (5), we set ỹ(k) = y. Similarly, if ỹ(k) < −y, we set ỹ(k) = −y. The adaptive algorithm in the G.726 protocol is used to adjust a and b and the detail is given in [11]; the tone and transition detector part was omitted since the part is only for voice data. The compression error e(k) is the difference between the original signal y(k) and the decompressed signal ŷ(k): Standard ADPCM algorithms [8] will be modified so that the maximum error is bounded as follows: Now d̃(k) coding is explained. The mode bit m(k) in d̃(k) is used to ensure (7). If the compression error e(k) of a standard ADPCM method satisfies (7), then the mode is 0 (i.e., m(k) = 0). As will be seen in Section 3.1, this is true if |d(k)| < 2δ, where y(k) is an adaptive scaling factor. On the other hand, if the compression error e(k) of a standard ADPCM method does not satisfy (7), then the mode is 1 (i.e., m(k) = 1) and a special uniform quantizer is used as in Section 3.2. Thus the mode m(k) is given by where y(k) is an adaptive scaling factor. The quantization index i(k) is defined differently when m(k) = 0 and when m(k) = 1.

Quantization index when m(k) = 0

If m(k) = 0, a signal d(k) is quantized with n bits with a logarithm quantizer with an adaptive scaling factor y(k), where the quantized index i(k) (1 ≤ |i| ≤ 2) satisfies The sign of the index i(k) is the same as that of d(k). If d(k) = 0, then i = 1. Coefficients f in (9) are computed from μ law [8] so that f satisfies the following: In this paper, μ = 5 is used and f values for the case of n = 5 is given in Table 1:
Table 1.

f values for n = 5.

f0f1f2f3f4
00.02370.05030.07990.1131
f5f6f7f8f9
0.15010.19150.23790.28990.3479
f10f11f12f13f14
0.41290.48550.56670.65750.7593
f15f16
0.87291.0000
The scaling adaptation factor y(k) is computed similarly with the standard ADPCM algorithm except that y(k) is bounded as follows: We note that ȳ is chosen so that (7) is satisfied. First we are going to derive the upper bound of e(k) when ȳ is given. The decompressed signal d̂(k) is computed as follows: where The error e(k) is then From the fact that f is monotonically increasing and (10), we have Given e, to satisfy (7), ȳ should satisfy the following Thus if ȳ is chosen to satisfy (12), the quantization error is always smaller than e when m(k) = 0. We also note that in addition to the global bound e, if index i(k) is known, we have a less conservative bound given in (11): This bound will be used later in the estimation problem.

Quantization index when m(k) = 1

From (8), m(k) = 1 if |d(k)| > 2δ. If m(k) = 1, then the logarithm quantizer used cannot guarantee the maximum error (7). Noting that d(k) = y(k) − ỹ(k), we can see that the mode is 1 if the difference between the output y(k) and the predicted value ỹ(k) is large, which happens when the signal change is not smooth but instead rather abrupt. To ensure the maximum error condition (7), we introduce a uniform quantizer when the mode is 1. An example is given in Figure 3, where y(k) is outside the [ỹ(k) − δ2, ỹ(k) + δ2] interval and the mode is 1. The upper and lower intervals of the mode 1 interval (the mode 0 interval is the shaded area) are quantized with a uniform quantizer (quantization size is 2e). The formal definition of the index in mode 1 is given as follows. Let u and l be defined by Let u (the number of quantization levels for the upper interval u) be defined by ceil(α) is the smallest integer no smaller than α.
Figure 3.

If |y(k) − ỹ(k)| > 2δ, then m(k) = 1.

The index i(k) is given by where floor(α) is the largest integer no larger than α. The decomposed signal d̂(k) is computed as follows. Since a uniform quantizer is used, the compression error e(k) in mode 1 is bounded by Note that the number of bits for the index i(k) is given by When m(k) = 1, n(k) changes depending on ỹ(k) and y(k). Note that when m(k) = 0, n (the number of bits for i(k)) is constant. Also note that n can be computed in the estimation board and thus does not need to be transmitted.

Kalman Filter Compensating the Compression Error

In Section 3, a compression method is proposed, where the maximum compression error is e. Also if m(k) and i(k) are known, bounds of the compression error are given by (13) and (15). In this section, we use this information in a Kalman filter. We assume that y(k) is generated by a linear system where x ∈ R is the state, y ∈ R is the output, and w(k) and v(k) are uncorrelated, zero-mean, white Gaussian noises that satisfy In the standard Kalman filter, x(k) is estimated using y(k). If y(k) is compressed, ŷ(k) = y(k) −e(k) is used instead. From (13) and (15), ē(k) can be computed, which is used to reduce the estimation error. If we assume e(k) (i-th element of e(k)) has a uniform distribution, . By treating the compression error e(k) as measurement noise in y(k), the following model can be used for an estimator. where Since the compression error is compensated in the estimation algorithm, we can expect a smaller estimation error, which is verified through the simulations in Section 5. When a Kalman filter is used for (17), the estimation error covariance P(k) = E{(x(k) − x̂(k))(x(k) − x̂(k))′} can be computed from a Riccati equation [12]. Since R̄(k) depends on ŷ(k), we cannot compute P(k) before simulation. To evaluate the estimation error covariance without simulation, we use an upper bound of R̄(k): Using this R̄ in place of R̄(k), we can find a steady-state solution to (19). P̄ can be considered as an upper bound of P(k) in (19). From P̄, we can see how e affects the estimation error. A similar idea is used in [13], where a networked estimation problem is considered.

Simulation

We compared three data sets using the proposed compression algorithm. Original data is 1600 bits/s for each sensor : 16 bit A/D converted data (i.e., n = 16) with the sampling rate being 100 Hz. We used n = 5: that is, the number of bits for the quantization index when m(k) = 0 is 5. e for each sensor is chosen so that e = 300δ, where δ is different for each type of sensors. ȳ = 12 is found to satisfy (12). Bit rates for the three compressed data sets are given in Table 2. All three data sets are obtained using XSENS MTx (3 accelerometer, 3 gyroscopes, and 3 magnetic sensors). Holding MTx with a hand, we moved MTx slowly (data set 1) and fast (data set 2). Data set 3 is obtained from a personal navigation system, where MTx is attached on the shoe of a pedestrian [3].
Table 2.

Bit rates for 3 inertial and magnetic sensor data sets.

accelerometersgyroscopesmagnetic sensors

data set 1643.2641.6617.6
648.0632.0622.4
656.0628.8614.4

data set 2659.2660.8617.6
662.4640.0622.4
668.8638.4619.2

data set 3771,2715.2638.4
798.4696.0633.6
694.4686.4627.2
The bit rates of data set 3 is the largest because the change of data is the most abrupt. In particular, when the shoe contacts the floor, there is a large change in the accelerometer and gyroscope outputs, and consequently the compression algorithm becomes m(k) = 1 more often. To see how the compression error affects the estimation error, a simple one dimensional attitude estimation problem is considered. An attitude (θ) is estimated using two outputs: y is an inclinometer output and y is a gyroscope output, where where v and v are measurement noises and and . An indirect Kalman filter ([12]) is used to estimate θ using y and y. In the indirect Kalman filter, the gyroscope output is integrated to compute θ, i.e., Defining θ as we obtain In the indirect Kalman filter, θ is first estimated and θ̂ is obtained indirectly from θ̂ = θ − θ̂ By discretizing (22) with the sampling period T (T = 0.01sec), we have Now the proposed compression algorithm is used to compress y and y. The maximum compression errors e (e for y) and e (e for y) affect both the bit rate and the estimation error. If e is small, the chance that the mode becomes 1 increases. Thus the bit rate becomes large. How the bit rate changes with the changing e is given in Figure 4. The data y and y are generated using Matlab.
Figure 4.

Relationship between e and the bit rate.

From Figure 4, we can see that the bit rate of the inclinometer outputs increases rapidly as e is decreased. On the other hand, the bit rate of the gyroscope outputs does not change much as e is decreased. The bit rate depends on how often the mode becomes 1: note that n (the number of bits needed for the quantized data when the mode is 1) is generally larger than n (the number of bits needed when the mode is 0). If the original signal is sufficiently smooth, d(k) is small since the predicted value ỹ(k) is very close to y(k). Thus even if we decrease e, d(k) still satisfies |d(k)| ≤ 2δ condition in (8). The y and y signals and the compressed signals are given in Figures 5 and 6, where e = 0.2876 and e = 0.0122. We can see that the gyroscope output is relatively smooth compared with the inclinometer output. Thus the bit rate of the gyroscope output is relatively insensitive to the changes in e.
Figure 5.

Inclinometer output, decompressed data, and error.

Figure 6.

Gyroscope output, decompressed data, and error.

The effects of changes in e on the estimation error are given in Figure 7, where the estimation error is predicted using (20). Actual estimation error from simulation is given in Figure 8, where is computed.
Figure 7.

Predicted estimation error (P̄) of the proposed filter.

Figure 8.

Estimation error of the proposed filter.

The relationship between bit rates and estimation error is presented in Figure 9, where data are from Figures 4, 7 and 8. In the left graph, the points 1–6 have similar bit rates but different P. Thus in the following simulation, we chose the point 1, which corresponds to e = 0.2876 and e = 0.0122. We compared three different filters: (a) a standard Kalman filter using y and y; (b) a Kalman filter using ŷ and ŷ with compression error compensation (proposed in Section 4); (c) a Kalman filter using ŷ and ŷ without compression error compensation. We randomly generated 12 data sets and the results are given in Table 3.
Figure 9.

Bit rates and P: predicted value by (21) and the experiment result.

Table 3.

Bit rates and estimation error of 3 filters: (a) a standard Kalman filter with uncompressed data, (b) the proposed method with ŷ and ŷ, and (c) a Kalman filter with ŷ and ŷ.

experimentBit ratePerror% improvement ((c) - (b)) / (c)
ŷgŷi(a)(b)(c)
1684.8620.30.3180.4370.4523.32
2654.4623.30.1730.3610.49226.62
3640.0621.30.1380.3450.40214.19
4645.7622.20.1390.3120.45531.39
5631.2625.70.1610.3820.44714.50
6633.6621.60.1210.3100.42226.55
7692.7692.70.3080.4270.4453.96
8640.8622.20.1200.2800.31711.77
9634.4618.60.1340.2950.53745.15
10696.1618.80.4230.4870.5033.14
11638.4632.90.1910.3940.46414.99
12638.4621.50.1360.2920.41730.13
average652.5628.40.1970.3600.44618.81
It is not surprising that the P of the standard Kalman filter is the smallest because the original data y and y are used for measurements. We can also see that the P of the proposed filter is smaller than that of the filter (c). On average, the estimation error of the proposed filter is smaller by 18.81% compared with that of the filter (c). Note that the proposed filter (b) and the filter (c) use the same decompressed data ŷ and ŷ for measurements. However, in the proposed filter, the compression error information (13) and (15) are explicitly used in (18), whereas they are ignored in the filter (c). In summary, the estimation error reduction was possible because of two facts: (1) the proposed compression method provides the compression error bound (13) and (15), and (2) the proposed filter algorithm explicitly uses the error compression bound.

Conclusion

In this paper, we have proposed a compression method for inertial and magnetic sensor data. The proposed compression method guarantees that the compression error is bounded by a prescribed e value. Smaller e value usually increases the bit rate and reduces the estimation error of the filter when the decompressed data is used. Thus e plays the role of a trade-off parameter between the bit rate and the estimation error. Also we have seen that by using a bound on compression error, the estimation error can be reduced.
  1 in total

1.  Pedestrian Tracking with shoe-mounted inertial sensors.

Authors:  Eric Foxlin
Journal:  IEEE Comput Graph Appl       Date:  2005 Nov-Dec       Impact factor: 2.088

  1 in total
  1 in total

1.  Overcoming Bandwidth Limitations in Wireless Sensor Networks by Exploitation of Cyclic Signal Patterns: An Event-triggered Learning Approach.

Authors:  Jonas Beuchert; Friedrich Solowjow; Sebastian Trimpe; Thomas Seel
Journal:  Sensors (Basel)       Date:  2020-01-02       Impact factor: 3.576

  1 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.