4.1. Kinematic Modeling of Mobile Platform
The process of solving the mapping relationship between the motor motion input and the mobile platform motion output is called kinematic modeling of the mobile platform. Establishing a kinematic model of the mobile platform can lay a foundation for subsequent control of the motor speed according to the movement requirements of the mobile platform. Before modeling, in order to facilitate the establishment of models and simplified formulas, the following assumptions are made in this paper [
13]:
- (1)
The ground is level and smooth, and the movement of the mobile platform is carried out on the level and smooth ground.
- (2)
The mecanum wheels do not slip relative to the ground, and all four wheels have good contact with the ground.
- (3)
The contact between the mecanum wheel and ground is rigid, and there is no deformation on both contact surfaces.
- (4)
The wheels are free from wear during operation, and the radii of the four wheels should be exactly the same.
In this paper, the kinematic modeling of the mobile platform is solved as follows: Firstly, the whole mobile platform is modeled and analyzed, and the velocity relationship between the center point C of the mobile platform and the center point of each mecanum wheel is solved. Then, kinematic modeling and analysis are carried out on a single mecanum wheel, and the speed relationship between the wheel center point and the rollers in contact with the ground is obtained. Finally, the above two speed relation expressions are combined to solve the conversion relationship between the speed of the center point C of the mobile platform and the speed of the four motors.
As shown in
Figure 4, this is a top view of the omnidirectional mobile platform. The velocity of the translation motion of the center point C of the mobile platform is
v and the angular velocity of rotation around the
z-axis of its own coordinate system is
ω. While the four wheels move in parallel with the center point C of the mobile platform at a speed of
v, they also move in a circle around the center point C at a speed of
. The sum velocity of the translation motion of each wheel and the circular motion around center point C is
.
L and
W represent half the length and half the width of the mobile platform. It can be seen from the diagram that the relationship between the speed of each wheel and the center point C of the mobile platform is as follows:
In the formula, represent the velocity component along the x-axis and the y-axis, respectively; represent the velocity components along the x-axis and y-axis, respectively; and represent the velocity component of along the x-axis and the y-axis, respectively.
Then, a kinematic model of a single mecanum wheel is established, as shown in
Figure 5. R represents the distance from the mecanum wheel axis to the roller axis,
represents the speed of the roller in contact with the ground,
represents the speed of the wheel along the
x-axis,
represents the speed of the wheel along the
y-axis,
represents the angular speed of the wheel rotating around the axis, and
is the angle between the axis of the roller in contact with the ground and the axis of the wheel. From the above diagram, the relationship between wheel center speed and roller speed as well as the wheel speed can be obtained:
Equation (2) is combined with Equation (1) and can be obtained:
Because the mecanum wheel roller speed
is generated by the rotation of the wheels, there is a unique deterministic relationship between the two, and the system has a unique variable of
. For the left front wheel and right rear wheel, take 45° for
. For the left front and right rear wheels, take −45° for
. Substitute the four values of
into Equation (3), and carry out the inverse kinematics solution of the platform by four formulas of the results as follows:
Thus, the forward kinematics equation can be obtained as follows:
4.2. Navigation Algorithm
In the course of tracking motion, the mobile robot deviates from its trajectory due to uneven contact between the four wheels and the ground, uneven ground, and installation error of the frame. Therefore, it is necessary to find a suitable control algorithm to correct the deviation of the robot in time. The mobile robot studied in this paper is driven and controlled by four motors with complex and variable models. At the same time, there will be uncertainties in the operation process, so the traditional PID control cannot achieve the desired control effect. A fuzzy PID control algorithm can dynamically adjust PID parameters according to the variation in robot errors and has been widely used in the control of mobile robots [
14]. Therefore, this paper uses the fuzzy PID control to correct the deviation of the robot. The controller structure is shown in
Figure 5.
When the robot tracks along the magnetic strip, the deviation between the robot trajectory and the ideal trajectory is due to the attitude deflection of the robot caused by the ground and the size accuracy of the robot body. Therefore, the way to correct the deviation of the trajectory of the robot in this paper is to correct the angular velocity of the robot along the z-axis. This compensation is made to adjust the robot to return to the desired trajectory. Therefore, in the control scheme, the angular velocity compensation quantity of the robot rotation is selected as the output of the controller.
Using the fuzzy logic toolbox in MATLAB, the input is error E and error rate EC, and the output variable
,
,
. By modifying parameter
,
,
, the parameter values in the PID controller are continuously corrected to improve the time-varying, robustness, and anti-interference ability of the PID control. The basic domains of inputs E and EC and output
,
,
are selected as [−3, 3] ranges, which are divided into {−3, −2, −1, 0, 1, 2, 3} 7 levels. The basic domain of each variable corresponds to a fuzzy subset of {NB, NM, NS, ZO, PS, PM, PB}, i.e., {large negative, medium negative, small negative, zero, small positive, medium positive, large positive}. Triangle membership function is used for input variable E and EC, and triangle membership function is used for output variable
,
,
. Through expert experience and long-term test results, the fuzzy control rules are set as shown in
Table 2,
Table 3 and
Table 4.
According to the fuzzy rule base, the fuzzy rule surfaces of
,
, and
can be obtained as shown in
Figure 6.
In order to compare the effect of PID control with that of fuzzy PID control, a simulation model of common PID control and fuzzy PID control is built using the Simulink toolbox in the MATLAB R2020a software. The tracking effect of the step signal is compared and analyzed with the two controllers. The simulation model is shown in
Figure 7. The fuzzy PID control subsystem is shown in
Figure 8. Both simulation models use the same transfer function model and initial PID parameters. The transfer function model is G(s) =
, and the initial PID parameters are set to K
p = 1.6, K
i = 0.005, and K
d = 0.1. The proportional factor and quantization factor for the fuzzy controller have been determined based on system tuning.
The response curve of the system is shown in
Figure 9. It can be seen from the diagram that although the PID control rises quickly, the overshoot is large and the stabilization time is long. Although the rise time of the fuzzy PID control is slow, it has the advantages of small overshoot, almost no overshoot, and short stabilization time. Therefore, by comparing the results in
Table 5, it can be seen that the fuzzy PID control is better than the ordinary PID control.