# Performance Enhancement of Consumer-Grade MEMS Sensors through Geometrical Redundancy
## 3 Proposed Method
### Alignment Procedure  
According to what is stated in [29], regular polyhedra can be generated only up to twenty faces (icosahedron), in terms of feasible solutions. Among all mentioned, the authors have chosen the cubic one due to its straightforward configuration to be realized as a prototype and, mainly, the favorable condition of having a theoretical value of \(\beta_{imp}\) equal to 0.41 in the presence of ideal parallelism among the same sensing axis of each sensor. This way, measures associated with the body frame of each inertial sensor must be reported into a single reference frame (Figure 3). A suitable alignment procedure, based on the Wahba method [30] was thus implemented to gain the rotation matrices capable of aligning the sensing axes of the accelerometers and gyros of each sensor to those of the common reference frame, arbitrarily chosen as sensors installed on face 1 of the cube. It is worth nothing that the considered procedure can align the sensing axes of each inertial sensor to the corresponding ones of the reference frame. This way, possible misalignments present in the reference frame and due to non-perpendicularity of the sensor sensitive axes and non-perpendicularity of the sensor sensitive axes with respect to the Printed Circuit Board (PCB) still remains and are, partially, shared by the realigned axes upon the procedure. The alignment procedure must be carried out once at redundant IMU realization or when relative sensors orientation should change due to accidental modifications. The procedure consists of the following steps:  
1. The body frame of the inertial sensors installed on the face 1 of the cube is (arbitrarily) chosen as the reference frame the sensing axes of the other sensors are resolved to (Figure 3). 2. Six rotations are applied to the cube in such a way as each face of the cube is positioned with an orientation coincident with that original of face 1. As an example, in the second step of Figure 3, the second rotation (associated with the face 2) is reported;
3. For each rotation \(i\) (varying from 1 up to 6), raw data of acceleration \(A_{ijk}=\left(ax_{ijk},ay_{ijk},\ az_{ijk}\right)\) are acquired from each sensor \(j\) (varying from 1 up to 6); the index \(k\) is associated with the acquired samples (varying from 1 up to \(N,N\) being the number of measurements carried out in each rotation);
4. The average acceleration vector associated with the \(i\)-th rotation is calculated for each sensor and the results are normalized according to \[\hat{A}_{ij}=\frac{mean\left(A_{ijk}\right)}{norm\left(mean\left(A_{ijk} \right)\right)}\] (17) where \(mean(\cdot)\) stands for the average operating on each axis and \(norm(\cdot)\) represents the traditional norm operator for vectors;  
Figure 3: Operations of sensing axes alignment procedure. 5. The reference matrix \(V\) is arranged by means of acceleration components associated with face 1; in particular, the entries of the \(i\)-th row of the matrix \(V\) are equal to the components of the normalized acceleration of the rotation \(i\) \[V=\left[\hat{A}_{11};\,\hat{A}_{21};\ldots;\hat{A}_{61}\right]\] (18)
6. As for the matrices \(W_{j}\), their entries can be determined in a similar way \[W_{j}=\left[\hat{A}_{1j};\,\hat{A}_{2j};\ldots;\hat{A}_{6j}\right]\] (19)
7. According to the procedure presented in Section 2.2, a MATLAB(r) algorithm is performed to evaluate the alignment matrices. In particular, once the matrix \(K_{j}\) is calculated according to Equation (8) for each face, the optimal rotation (i.e., that capable of making the \(j\)-th reference frame as close as possible to the first one) is determined as a quaternion (eigenvector) corresponding to the maximum eigenvalue of the Equation (7). 8. Finally, the optimal quaternion is transformed in the related rotation matrix by means of straightforward calculation; obtained matrices are exploited to align all the measured inertial quantities to the reference frame of face 1.