Each infrared sensor constructs a digital representation of the staircase as the Andros
moves on it by determining the distance from the sensor to the staircase. By assuming
that the vehicle maintains a relatively constant velocity upon the staircase, the derivative
of the stair data can be found by simply taking the difference of the current data point and
the previous data point collected. The second derivative of the stair data can now be
obtained by taking the difference of the first derivative data. Figure 2-8 depicts a sample
stair data representation for a single infrared detector and the corresponding first and
second derivative data. The graph has been cropped to emphasize the range of pertinent
data. The data for the stair representation was simulated using a mathematical model of
the sensor system, with the first and second derivative data obtained as outlined above.
For the simulation, the rise of a single step was set at 8 inches, the run was set at 10
inches, and a 0.1 second sampling rate was used. Derivation of the mathematical model
of the sensor system can be found in Appendix B.
Raw Data
4 3 5 4 9 5 1 4
3 3 4 4 1 1
SortedData 4 4 5 5 5 4
5 5 9 9 9 5
Filtered Data
Figure 2-9: Median filter example