## 3 Acquired Data
### Acceleration/De-Acceleration Simulation  
The rolling stock, especially the light one (locomotive only; metro/tram rolling stock) may change the speed rapidly. Such a situation shall be recognized by the algorithm and included in the calculation, or such a signal shall be excluded from the speed estimation completely.  
Figure 10: Example of changing the speed using an interpolation method. (**A**) Original signal; (**B**) Speed reduced 2 times, from 1 km/h to 0.5 km/h.  
Figure 9: Example of changing the speed using a decimation method. (**A**) Original signal; (**B**) Speed increased 2 times, from 1 km/h to 2 km/h.  
When the signal u(n) is registered for a certain speed (e.g., v\({}_{0}\) = 1 km/h) in the buffer, the asymmetry being the result of acceleration or de-acceleration (braking) may be generated based on the following formula:  
\[\mathrm{u_{a}[m]=u[n]} \tag{2}\]  
where:  
\[\mathrm{n=}\frac{2v_{0}m+am^{2}T_{i}}{2v} \tag{3}\]  
\[\mathrm{m=1\ldots M\ \cap\ n,\ m\ \in\ N,\ n\ \leq\ n_{max}} \tag{4}\]  
u[n]--nth sample of signal u(n), registered for v = v\({}_{0}\) = const.,  
u\({}_{a}\)[m]--nth sample of signal u(m), accelerated or deaccelerated,  
T\({}_{i}\)--sampling period of \(u[n]\) signal in [s],  
v\({}_{0}\)--initial speed in [m/s], for the presented method always equal to v,  
v--speed for which u(n) has been recorded (or recalculated)--in this case 0.28 m/s (1 km/h),  
a--acceleration (a \(>\) 0)/deacceleration (a \(<\) 0) in [m/s\({}^{2}\)].  
The idea of transformation in order to simulate acceleration and deacceleration is presented in Figure 11. The signal u(n) is the one registered originally for constant speed (or is the result of resampling). Accelerated or deaccelerated signal is calculated based on Formulas (2) and (3). The acceleration is based on non-linear compressing of the original signal when the de-acceleration is a kind of stretching signal with zero-hold approximation (n is rounded down).  
For further processing different situations of speed changes presented in Figure 12 are considered, including linear and step change of the speed. The decimation or interpolation method is used for the step change of speed.  
Linear change of the speed, with constant acceleration a is more practical, whereas theoretical step change provides more significant and visible effects and thereby is useful for testing of robustness of an algorithm.  
Figure 11: Idea of signal transformation for (**A**) acceleration and (**B**) de-acceleration simulation.  
During de-acceleration, the speed is decreased and after time \(\rm t_{gr}\) reaches zero. It generates additional conditions for signal transformation:  
\[\rm v_{0}+at\ \geq\ 0,\ a\ <\ 0\ \Longrightarrow\ t\ \leq-\frac{v_{0}}{a} \tag{5}\]  
\[\rm for\ t=mT_{i}\ \Longrightarrow\ m\ \leq-\frac{v_{0}}{aT_{i}} \tag{6}\]  
\[\rm for\ t_{gr}=m_{gr}T_{i}\ \Longrightarrow\ m_{gr}=\frac{-v_{0}}{aT_{i}} \tag{7}\]  
The above condition means, that:  
\[f\rm or\ m\ >\ m_{gr}\ \Longrightarrow\ u[m]=u[m_{gr}] \tag{8}\]  
Example of transformation of signals (Figure 9A) is presented in Figures 13 and 14.  
Figure 12: Change of the speed. (**A**) Acceleration, linear change; (**B**) Acceleration, step change; (**C**) De-acceleration, linear change; (**D**) De-acceleration, step change.  
Figure 13: (**A**) Example of acceleration and (**B**) de-acceleration—linear change of speed (cases A and C of Figure 12).  
In the signal presented in Figure 13A, the wheel stops after t\({}_{\rm gr}\) = 3 s and it does not change anymore. Other parameters: v = v\({}_{0}\) = 0.28 m/s, a = 0.5 m/s\({}^{2}\) for acceleration and a = \(-\)0.2 m/s\({}^{2}\) for deacceleration, t\({}_{0}\) = 1.7 s.  
In the created signal presented in Figure 14, the speed has changed 3 times: v1 = 3\(\cdot\)v0 for acceleration and v1 = (1/3)\(\cdot\)v0 for de-acceleration; t\({}_{0}\) = 1.7 s.