• No results found

The steering angle δ of the steering system is limited in between -38 and 38. Which is still less than the maximum angle on a full scale tractor. These values represent the mechanical limits of the steering system, beyond these values the tie rod collides with the front axle. To determine the limit of the steering velocity, the yaw velocity of the tractor has been used. The yaw velocity is determined based on odometry. To make the front joint value of the steering servo Jvf available in Simulink to obtain δ, the firmware needs to be adapted further. Therefore the yaw velocity has been used instead. At time equal to 10 seconds a step steer input has been given from -38to 38. The result is that the tractor has driven a figure eight. During the experiment the yaw velocity of the tractor has been monitored, the result is shown in Figure6.4. The forward velocity during

CHAPTER 6. EXPERIMENTS

the experiment has been 0.27 m/s. It takes approximately 0.22 seconds before the yaw velocity responds on the step steer input. This time equals the response time of the steering system. It then takes approximately 0.3 seconds to steer from full right to full left. The steering velocity limit is therefore approximately 250/s. This result is sensitive to the time in between the selected data points indicated in Figure6.4. In a real tractor it is impossible to steer from full left to full right within a time close to 0.3 seconds. The steering velocity limit of the scaled tractor is therefore definitely higher than on a real tractor.

Figure 6.4: steering velocity limit

The minimum turning circle of the tractor has been determined. In [20] the kerb to kerb turning circle for the full size reference tractor is specified to be 12.98 m. This is the turning circle measured at the outside of the front wheels. At a scale of 1:13.3 this translates into 0.98 m. Figure 6.5 shows the path of the center of the rear axle of the scaled tractor at a constant maximum steering angle δ= 38. This path has been determined again using odometry. The turning circle has also been measured once with a tape measure and it is concluded that the odometry measurement is correct. The turning circle of the tractor at the center of the rear axle is 0.74 m. Taking into account the width of the tractor of 0.19 m over the rear wheels, the turning circle at the outside of the rear wheels becomes 0.93 m. The wheelbase of the tractor is 0.284 m. This results in a turning circle diameter of 1.09 m at the outside of the front wheels assuming kinematic driving. Scaled up with a factor 13.3 this becomes 14.5 m. This is higher than the desired reference of 12.98 m. It is expected however that the minimum turning circle will decrease further for future versions of the chassis with a shorter wheelbase of 0.271 m as indicated in Table 4.1. Compared to the turning circle of 1.57 m for the old tractor which can be calculated based on the results found in [2], a reduction of 0.5 m approximately has been achieved. The problem is however that the maximum steering angle of δ= 38, is still too small compared to a real tractor.

CHAPTER 6. EXPERIMENTS

Figure 6.5: minimum turning circle of the tractor

It has been tested if the tractor follows a straight line for δ= 0 using odometry. The result is shown in Figure 6.6. The tractor starts at position (0,0) and orientation 0. Ideally the tractor should then follow a path which lies on the positive x-axis for δ= 0. Figure6.6 shows however that the tractor deviates to the right in this case. Even though the center position of the steering system has been calibrated, deviations with similar magnitude have been observed multiple times, the deviations occur either to the left or to the right with similar size. This is most likely caused by remaining free play in the steering system around the center position. The deviations indicated by the odometry measurement have been verified with a tape measure. To be able to follow straight lines more accurately, closed loop control of the steering system position is needed. This is possible with the new tractor by making use of the available sensors such as the encoders on the drive motors, the gyroscope, magnetometer and accelerometer.

Figure 6.6: path of tractor for δ= 0

CHAPTER 6. EXPERIMENTS

6.5 Comparison to kinematic model test

A steering angle δ and a velocity vx have been given as input to the scaled tractor. These inputs have been generated using the steering wheel and pedals available in TruckLab. The same inputs are used in a kinematic model which simulates the path of the tractor. The simulated path has been compared to the path driven by the scaled tractor, which has been measured using odometry.

The kinematic model is described by:

ψ = v˙ m

tan(δm)

L (6.1)

˙

xg= vmcos(ψ) (6.2)

˙

yg= vmsin(ψ) (6.3)

In the kinematic model ˙ψ is the yaw velocity of the tractor, vmis the longitudinal velocity of the tractor, L is the wheelbase of the tractor, δmis the steer angle of the tractor, ˙xgis the velocity of the tractor in x-direction of the global reference frame at the rear axle, ˙yg is the velocity of the tractor in y-direction of the global reference frame at the rear axle, ψ is the orientation of the tractor in the global reference frame.

A comparison between the path of the kinematic model and the path driven by the scaled tractor is shown in Figure 6.7. Both the scaled tractor and the kinematic model start at position (0,0) with orientation 0, the direction of the positive x-axis. Delays of 0.22 s on δm and 0.14 s on vm have been given to the inputs of the kinematic model. These delays are equal to the response times determined for the propulsion and steering system of the scaled tractor. The shape of the paths are similar, they however deviate over time. This may be caused by an orientation error in the measurement, due to the integration used in the odometry. This should be investigated further.

Figure 6.7: path of kinematic model compared to path of scaled tractor

CHAPTER 6. EXPERIMENTS

The euclidean distance calculated as:

p(∆x)2+ (∆y)2 (6.4)

between the position of the scaled tractor and the position predicted by the kinematic model over time is shown in Figure 6.8. This distance error is still larger than 0.8 m. During the first 98 seconds the tractor was standing still.

Figure 6.8: Euclidean distance between position of scaled tractor and position of kinematic model

A controller can be used to decrease the error between the path of the scaled tractor and the path predicted by the kinematic model. It has been decided to develop a controller that changes the steer input δmof the kinematic model by means of feedback. These changes to the input of the kinematic model should have as a result that the path of the kinematic model follows the path driven by the scaled tractor more closely. It could also have been decided to change the input to the scaled tractor by means of a controller instead. To avoid possible damage to the scaled tractor it has been decided to develop and deploy the controller on the kinematic model. So the path driven by the scaled tractor acts as the reference. The controller that has been used is shown in Figure6.9.

CHAPTER 6. EXPERIMENTS

Figure 6.9: controller layout

While the scaled tractor was driving the reference signals for the controller have been logged.

The controller consists of feed forward of vref and δref. Using only this feed forward gives the result as shown in Figure6.7. Next to the feed forward there are three proportional feedback controllers which act on an error in position, orientation and yaw velocity respectively. The proportional feedback controller which acts on a positional error is defined by:

δf b,p= Kpp

((xref− xg)2+ (yref− yg)2)sgn(θtp) (6.5) Where δf b,p is the steer angle resulting from feedback control on position, Kp is the proportional gain acting on the positional error, xref is the reference x-position for the kinematic model, xgis the x-position of the kinematic model, yref is the reference y-position for the kinematic model, yg is the y-position of the kinematic model. θtp is the angle between the vector which points from the mid rear axle position (xg,yg) to the reference point (xref,yref) on the path and the vector through the center line of the vehicle which points in the driving direction. The sign of θtp determines if the position of the tractor (xg,yg) is to the left or to the right of the reference point (xref,yref). Thereby θtp determines if δf b,p must steer the kinematic model to the left or to the right to get closer to the reference path. The proportional feedback controller which acts on an error in orientation is defined by:

δf b,o= Ko(ψ − ψref) (6.6)

Where δf b,o is the steer angle resulting from feedback control on orientation, Ko is the propor-tional gain acting on the orientation error, ψ is the orientation of the kinematic model, ψref is the reference orientation for the kinematic model.

The proportional feedback controller which acts on an error in yaw velocity is defined by:

δf b,y= Kyref − ω) (6.7)

Where δf b,y is the steer angle resulting from feedback control on yaw velocity, Ky is the propor-tional gain acting on the yaw velocity error, ω is the yaw velocity of the kinematic model, ωref is

CHAPTER 6. EXPERIMENTS

the reference yaw velocity for the kinematic model.

The summed outputs of these feedback controllers is δf b. The sum of δf b and δf f is the steer input δm to the kinematic model.

The comparison between the path predicted by the controlled kinematic model and the path driven by the scaled tractor is shown in Figure6.10. By comparing Figure6.10with Figure6.7it can be concluded that the feedback control is decreasing the deviation between the path driven by the scaled tractor and the path predicted by the kinematic model. The control gains have been manually tuned and are therefore not optimal. The control gains have been varied gradually to decrease the euclidean distance error. The gain on positional error Kp= 6, the gain on orientation error Ko= −2, the gain on yaw velocity error Ky= 10. Note that the opposite sign of Koand Ky

is explained by the opposite order of subtraction in (6.6) and (6.7). Delays of 0.34 s on δmand 0.11 s on vmhave been given to the inputs of the kinematic model. These delays are not exactly equal to the response times determined for the propulsion and steering system of the scaled tractor, but reduce the euclidean distance error further.

Figure 6.10: path of controlled kinematic model compared to path of scaled tractor

The euclidean distance between the position of the scaled tractor and the position predicted by the controlled kinematic model over time is shown in Figure6.11. Compared to the error shown in Figure 6.8 the use of feedback control has reduced the distance error with approximately a factor 20. The error can most likely be further reduced by automating the process of tuning the controller gains.

CHAPTER 6. EXPERIMENTS

Figure 6.11: Euclidean distance between position of scaled tractor and position of controlled kinematic model

The effect of the feedback control on the steer input to the kinematic model δm is shown in Figure 6.12. The changes to δm as a result of the feedback are relatively small for the chosen control gains. The average absolute value of δf bover time is 0.0355 rad. In Figure6.12it is shown that a relatively large steering correction to the left occurs at the end of the experiment. This is caused by the remaining distance in between the last sections of the paths as shown in Figure6.11.

At the end of the experiment the feedback controller which acts on the positional error, tries to steer the kinematic model towards the end section of the measured path. However as the forward velocity in this last section is low, the yaw velocity of the kinematic model is also low. Because of this low yaw velocity the kinematic model deviates further from the measured path. Therefore the positional error does not decrease, this results in a steer correction which increases to 0.16 rad.

Figure6.12further shows that some relatively large steer corrections are needed when steering to the right, δ negative. The cause of this should be investigated further.

Figure 6.12: effect of feedback control on input δ

CHAPTER 6. EXPERIMENTS

The longitudinal velocity of the kinematic model and the scaled tractor have also been com-pared. This has been done to investigate the position error caused by errors in the longitudinal velocity. Figure6.13shows the result of this comparison.

Figure 6.13: comparison of longitudinal velocity

The longitudinal velocities differ by the error shown in Figure6.14.

Figure 6.14: error in longitudinal velocity

CHAPTER 6. EXPERIMENTS

The mean value of this error is 3.3283 · 10−4 m/s. Multiplying by 103 seconds which is the duration of the experiment, this velocity error will cause the path of the kinematic model to be 0.0343 m shorter than the path of the scaled tractor. As this error is small with respect to the total length of the path which is 15.5 m and because the error shown in Figure6.14is small compared to the velocity along the path as shown in Figure 6.13, it has been concluded that additional feedback control on the longitudinal velocity is not necessary. The difference in length can be compensated by increasing the longitudinal velocity input to the kinematic model vmwith 0.2213 percent. Doing that however does not give a noticeable difference to the euclidean distance error shown in Figure6.11.

It can be concluded that the shape and curvature of the path driven by the scaled tractor cor-responds fairly well to the shape and curvature of the path predicted by the kinematic model without using feedback control. Feedback control is however needed to decrease the deviation over time, the necessary steering corrections are relatively small. It can therefore be concluded that the scaled tractor is close to driving in a kinematic way with a steer angle that almost corresponds to the steer angle predicted by the kinematic model.

6.6 Repeatability test

The consistency of the path while using the same inputs has been tested in open loop. The result of 2 runs is shown in Figure6.15. Both times the tractor has started at position (0,0) with orientation 0. The tractor has almost driven the same path twice. The two end points are 0.07 m apart. This indicates that the free play in the steering system and propulsion system is small. Also the amount of tyre slip must have been similar during the 2 runs in order to reach this amount of repeatability. The magnitude of longitudinal tyre slip can be investigated further, possibly by comparing the forward velocity of the tractor indicated by the encoders of the propulsion motors with the forward velocity determined by an accurate tracking system. The magnitude of lateral tyre slip can also be investigated further, possibly by comparison of the orientation indicated by the kinematic model and an accurate measurement of the orientation of the tractor.

Figure 6.15: repeatability of driven path for same input

CHAPTER 6. EXPERIMENTS

6.7 Summary

In this chapter the experiments which have been done to test the new version of the tractor have been discussed. The depletion time of the new battery under the specified driving circumstances is 64 minutes. It has been recommended to limit the forward velocity in between -0.27 m/s and 0.27 m/s during experiments if the forward velocity needs to be maintained while cornering. It has been recommended to limit the acceleration of the tractor with or without trailer in between the deceleration limit of -0.7 m/s2and the acceleration limit of 0.7 m/s2during experiments. The braking capacity of the scaled tractor is sufficient to resemble the braking capacity of a full scale tractor. The response time of the propulsion system is 0.14 seconds. The steering angle δ of the steering system is limited in between -38and 38. Which is still less than the maximum angle on a full scale tractor. The response time of the steering system is 0.22 seconds. The steering velocity limit of the scaled tractor is higher than on a real tractor. A reduction of 0.5 m approximately has been achieved in turning circle diameter compared to the old tractor. To be able to follow straight lines more accurately, closed loop control of the steering system position is needed. This is possible with the new tractor by making use of the available sensors such as the encoders on the drive motors, the gyroscope, magnetometer and accelerometer. A controller can be used to decrease the error between the path of the scaled tractor and the path predicted by the kinematic model. Feedback control is needed to decrease the deviation over time, the necessary steering corrections are relatively small. It can therefore be concluded that the scaled tractor is close to driving in a kinematic way with a steer angle that almost corresponds to the steer angle predicted by the kinematic model. Based on the repeatability test it has been concluded that the free play in the steering system and propulsion system is small.

Chapter 7

Conclusions and recommendations

7.1 Conclusions

The objective for this project has initially been to develop an improved steering and propulsion system for the old tractor and to address other problems. The system requirements have shown that the old tractor needs to be revised completely. The old components can not meet the require-ments. Therefore also the software, chassis, sensors and electronics have been revised. The new tractor mainly consists of compatible robotic components from Turtlebot3. It is better to adapt a robotics platform as Turtlebot3 into a tractor, than to improve a RC toy tractor.

The steering system has clearly improved with respect to the existing tractor. The higher servo resolution, new geometry, reduction of free play and the polynomial steering model enable setting the steering angle δ more accurately with an RMSE of 0.6649after calibration. This accuracy is mostly limited by the remaining free play. The turning circle has been reduced. The removal of front suspension makes the orientation of the front wheels more predictable. The positional feed-back of the sufficiently strong servo enables closed loop control of the new compact steering system.

The propulsion system has improved. The velocity is set with a higher resolution. Free play, friction and wear have been reduced by direct drive, the velocity output is therefore more pre-dictable and repeatable. Individually propelling the rear wheels, eliminates a propulsion shaft and gearbox, thereby saving space, reducing complexity and giving more control functionality. The ve-locity feedback of the sufficiently powerful motors enable closed loop veve-locity control. Within the control limits the propulsion system maintains the velocity during cornering, straight line driving and battery discharge. The pivoting rear axle ensures that all wheels maintain contact with the ground for more traction and less tyre slip.

The use of well supported open source ROS packages saves software developing time and gives extended possibilities. ROS interacts with MATLAB and Simulink via the ROS toolbox and the Robotics system toolbox. The adaptations needed to the open source firmware, to make the tractor steering work, have been minor. The communication with the steering system and the

The use of well supported open source ROS packages saves software developing time and gives extended possibilities. ROS interacts with MATLAB and Simulink via the ROS toolbox and the Robotics system toolbox. The adaptations needed to the open source firmware, to make the tractor steering work, have been minor. The communication with the steering system and the