• No results found

Algorithm for the Learning Framework/Online update

Chapter 4. Proprioceptive Module

4.3 Algorithm of Training Phase

4.3.6 Algorithm for the Learning Framework/Online update

As discussed earlier in section 4.2, online update of the correlated data and trafficability model takes place according to the learning framework and requires considering and handling some special cases. Moreover, certain cases were also discussed there (in section 4.2.1) one of them being, where there are no/very few data samples in the queues of given pitch and terrain type and hence, it is not possible to make reliable prediction in such cases. These kinds of cases can be handled by interpolation or extrapolation.

For extrapolation, it has been also mentioned in the same section that the extrapolated values should not be used for updating the trafficability model. This is because the extrapolated values are calculated using the data samples of the other terrain types and it is not advisable to train the rover to predict the trafficability of a specific terrain type based on the other terrain type’s data samples. As the extrapolated values are used only to predict the trafficability for the current terrain, and not to train the rover, it is not required to execute the extrapolation in the training phase. It is executed in the prediction phase only and hence, the extrapolation algorithm is explained in the prediction phase (section 4.4).

82

Apart from that, the algorithm and implementation for interpolation has been explained next in section 4.3.6.1. Also, one more case has also been considered here, which explains what if a user expert wants to introduce a new terrain type to the system. The details about how to handle this case are discussed in section 4.3.6.2.

4.3.6.1 Interpolation

Interpolation is generally used to estimate a value in between two known values. It is imperative to have at least one slope on both the sides of the queried one, with a queue having an adequate number of data samples (N/4 in this case) and hence, in the cases where this condition is satisfied, interpolation becomes the obvious choice for the estimation of expected slip.

In this system, linear regression model using cubic polynomial has been used for interpolation. This cubic regression is performed keeping the fixed y-intercept. The reason behind the same is that while collecting the data during test runs, rover may not encounter all the slope values for all the terrains and hence, the data set may not have slip measurements at 0° slope for some terrains. For example, if there is no slip measurements for slope values from 0 to 10°, and interpolated slip needs to be calculated at 11°, there would be no slope below the queried one with a queue having an adequate data samples and hence, interpolation would not have been possible. Thus, having a fixed y-intercept will ensure that there is always a data point at 0° slope and it is possible to estimate an interpolated slip for the queried slope as long as at least one higher pitch value has an adequate data samples. Also, using a fixed y-intercept overcomes the occurrence of an up-turning in the cubic regression at lower slope values, which is undesirable. In Figure 4-17 (a), the fitting curve using cubic regression without a fixed y-intercept is shown, where it can be observed that for the slope value lesser than around 7°, the corresponding slip values increases with the decreasing slope value. Whereas in Figure 4-17 (b), the fixed y-intercept is avoiding the occurrence of up-turning in the curve. The value of y-intercept is fixed at the average of first N data samples from the queues of lowest slope values.

Secondly, it is notable here that all the checks and updates regarding interpolation are taking place in the training phase itself. This is because every data sample being added to the Correlated data model affects the curve-fit obtained for calculating interpolated values. Hence, in every training iteration, the necessity to update the interpolation coefficients is checked as shown in the flowchart (Figure 4-18). For the same, the number of training data samples present for all the slope values is

83

scanned sequentially. If any slope queue does not have enough data samples (i.e. n<N/4), the average slip calculated for that slope value is not reliable and the same has to be updated using interpolation. In this case, further slope values are scanned to determine if any of them has enough data samples (i.e. n>N/4), implying whether interpolation is feasible or not. If so, the corresponding coefficients for the interpolation curve are updated using cubic regression and are stored in the memory so as to be used while updating the expected slip in the trafficability model.

4.3.6.1.1 Updating the Trafficability Model using Interpolation

The next step in the algorithm is to update the trafficability model using the interpolation curve, wherever necessary. For the same, as shown in the flowchart below (Figure 4-19), again the number of data samples present in the queues of all the slope values are scanned sequentially and wherever there aren’t enough data samples (n<N/4), the average slip is replaced, by the one which is calculated using interpolation. Further, it is also important to ensure that the expected slip values in the trafficability model should increase monotonically with the slope and the same is being taken care of as well, after calculating interpolated slip, as shown in the same flowchart.

84 (a)

85

Figure 4-18: Algorithm for Interpolation check in Training phase Yes No Continue B Need to update interpolation coefficients??

Calculate new interpolation coefficients and update them in the memory storage

Continue C No No Ye s Yes

Start scanning the slopes from 0 degree to 45 degrees

for queried terrain type, ∅ = 0° Is n (∅ < N/4?? Increment ∅ till 45° Increment ∅ Is n (∅ > N/4?? Update of interpolation coefficient is required,

Turn on the flag & break the loop

Increment ∅ till 45°

Not required

86

Figure 4-19: Updating the Trafficability Model using Interpolation

Continue C

Replace average slip predictions with interpolated

slip (where required) in trafficability module

Ensure that Expected Slip predictions in trafficability module increases monotonically

with increasing slope

No No

Start scanning the slopes from 0 degree to 45 degrees for queried terrain type, ∅ = 0°

Yes

Is n (∅ < N/4 && Ǝ ∅ > ∅ ,where n

(∅ > N/4??

Read latest Coefficients from text file and calculate interpolated slip for ∅

Yes

Is Exp. Slip (∅ 1 > Exp. Slip (∅ ??

Replace Exp. Slip (∅ by Exp. Slip (∅ 1

Increment ∅ till 45°

87