code uses the second derivative values to determine if a stair has been passed and should
therefore be counted. However, detecting a single second derivative value for this
purpose is futile; a range of second derivative values that correspond to a stair edge may
be encountered. The system may also experience subtle negative second derivative peaks
due to uneven motion of the Andros upon the stairs. To account for all of this, the second
derivative value is compared to a threshold value. If the value is less than the threshold,
it is determined to be a stair edge and is counted.
4.1.2 Results
The data collected from the stair-counter testing rig was placed into an Excel
spreadsheet for graphing purposes. The data was analyzed to determine when the second
derivative of the stair representation occurred with respect to the recorded inflection
point, or outside edge, of the stairs.
Figure 4-3a illustrates the first set of sample data from the acquired from the testing.
The dark blue line represents the detected outline of the staircase, while the red line
represents the calculated second derivative of this data. Clearly visible are the two large
negative impulses, each one corresponding to one of the stair peaks shown. As designed,
each impulse is logged 0.25 seconds after the stair peak is experienced. The same is true
of Figures 4-3b and 4-3c; each one has two large, negative impulses that occur 0.25
seconds after their corresponding stair peaks are detected. Also, in each of these figures,
the negative impulses are less than -0.2, while none of the tertiary negative impulses
approach this value. Therefore, this was determined to be the optimum threshold value
for the system to use.