# Accuracy Analysis of the Measurement of Centre of Gravity and Moment of Inertia with a Swing
## 3 Results  
### Centre of Gravity (CG)--Swing  
In this first step, the swing is investigated without an additional model on it. Consequently, Equation (2) is simplified to Equation (3), hence \(F_{M}\) is equal to zero. Calibration weights \(F_{W}\) are added in different distances \(d_{W}\) utilising both pivot axes (Figure 2). Table 2 provides an overview of the conducted measurements with the empty swing and the specification of the analysis cases. All individual measurements are analysed in Figure 4 for the case C3 and C6, which include both distances for each pivot point. The biggest differences in the individually recorded time series from the mean value are in the range of 0.06\({}^{\circ}\) for P1 and 0.03\({}^{\circ}\) for P2. Both values are significantly larger than the non-linearity and non-repeatability of the inertial inclinometer. Adding the normalised minimum and maximum (Figure 4), as well as looking at the time series in detail, shows that a small oscillation could still be found. The effect of this can be minimised by using an time average for the fitting of the equation. Therefore, only the last 54 of the total captured 64 s are used. This limits the influence of disturbances introduced by the swing operator. The solution of the curve-fitting is implemented with the MATLAB function _lsqcurvefit_ in least-squares sense. This needs as inputs a function \(SwingF1\) based on Equation (3), initial point \(d0F1\), input data \(xData\) (vector with the used calibration weights \(FW\)) as well as the connected distances _distanceW_ (equal to \(d_{W}\)) and observed output \(yData\) (equal to \(\alpha\)). The measured angle \(\alpha\) are in deg and have to be transformed to radians. A reduced MATLAB code is presented in the following equations:  
\[SwingF1=@(d,xData)xData.*distanceW./(FS*d); \tag{8}\] \[dSF1=lsqcurvefit(Swing,d0F1,FW,tan(yData./180.*pi)); \tag{9}\]  
The initial values for the distance was chosen based on the following equation:  
\[d0F1= \begin{cases}0.1*fac,&\text{for P1 [m]},\\ 1.255*fac,&\text{for P2 [m]}.\end{cases}  \tag{10}\]  
The initial point \(d0F1\) is set close to the expected distance \(d_{S}\) but this assumption has been altered by a factor \(fac\) in the range of 0.1 to 10 to ensure that the result is independent of this first estimate [34; 35]. Table 2 summarises the results for all analysis cases and indicates that the difference of the individual fittings are in the range of 0.5 mm of the average value for each pivot axis. The addition \(F1\) indicates that the values are referencing the initial Equation (3). Figure 5 focuses on the four individual measurement series and presents the direct comparison of measurement \(M\) and fitted data \(F\). The standardiseddifference between those two values shows that especially around \(F_{W}=0\) kg, the fitting has comparable big deviations. This is caused by the fact that the swing was not in a perfect zero position at the beginning of the measurement. As an improvement, a second function \(SwingF2\) is defined, which allows a constant offset:  
\[SwingF2=@(d,xData)xData.*distanceW./(FS*d(1))+d(2); \tag{11}\] \[dSF2=Isqcurvefit(Swing,d0F2,FW,tan(yData./180.*pi)); \tag{12}\]  
In this case, two initial values have to be chosen:  
\[d0F2= \begin{cases}[0.1,0].*fac,&\text{for P1 [m],}\\ [1.255,0].*fac,&\text{for P2 [m].}\end{cases}  \tag{13}\]  
Figure 6 presents the results for the fitting based on the \(SwingF2\). The differences show a comparable distribution as for the fitting with \(SwingF1\) but the normalised value reduces drastically from 1 to smaller 0.18. Two examples, namely for the analysis cases C1 and C4, are provided in Figure 7. The value for \(F_{W}=0\) kg is a strong indicator how good, the fitting with the original function \(SwingF1\) performs. Figure 4: Boxplot analysis of the individual measurements (13,824 data points = 54 s \(\times\) 256 Hz) normalised by the mean value of the measured angle \(\alpha\) for the lower pivots axis (P1) and the higher one (P2).