Next Article in Journal
Efficiency-Enhanced Hybrid Dickson Converter with Quasi-Complete Soft Charging for Direct Large-Ratio Step-Down Applications
Previous Article in Journal
Model Predictive Control-Assisted Energy Management Strategy for Hybrid Mining Dump Trucks Based on Speed and Slope Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Trajectory Tracking Method of Four-Wheeled Independent Drive and Steering AGV Based on LSTM-MPC and Fuzzy PID Cooperative Control

1
School of Mechanical Engineering, Hubei University of Technology, Wuhan 430068, China
2
CCCC Second Harbor Engineering Company Ltd., Wuhan 430014, China
3
CCCC Wuhan Harbor Engineering Design & Research Institute Co., Ltd., Wuhan 430040, China
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(10), 2000; https://doi.org/10.3390/electronics14102000
Submission received: 10 April 2025 / Revised: 7 May 2025 / Accepted: 13 May 2025 / Published: 14 May 2025

Abstract

:
With the ongoing advancements in automation technology, four-wheeled independent drive and steering (4WID-4WIS) automated guided vehicles (AGVs) are increasingly employed in intelligent logistics and warehousing systems. To enhance the performance of path tracking accuracy and cruising stability of AGVs, an automatic cruising methodology is proposed operating in complex environments. The approach integrates lateral control through model predictive control (MPC), which is optimized by a Long Short-Term Memory (LSTM) network, alongside fuzzy PID control for longitudinal management. By utilizing the LSTM network for trajectory prediction, the system can anticipate future vehicle states and outputs, thereby facilitating proactive adjustments that enhance the performance of the MPC lateral controller and improve both trajectory tracking accuracy and response speed. Concurrently, the fuzzy PID control strategy for longitudinal management increases the system’s adaptability to dynamic environments. The proposed methodology has been demonstrated in a physical prototype operating in real practical environments. Comparative results demonstrate that the LSTM-MPC significantly outperforms conventional MPC in lateral control accuracy. Additionally, the fuzzy PID controller yields superior longitudinal performance compared to traditional dual-PID and constant-speed strategies. This advantage is particularly evident in curved path segments, where the proposed fuzzy PID–LSTM–MPC framework achieves significantly higher lateral and longitudinal tracking accuracy compared to other control strategies.

1. Introduction

With the continuous advancement of logistics and automation technology, automated guided vehicles (AGVs) are being increasingly used in warehousing, logistics distribution, and more. Unlike autonomous vehicles (AVs), which operate in highly dynamic and unstructured road environments using high-level path planning, SLAM, and multi-sensor fusion, AGVs typically function in structured indoor settings—such as factory floors, sorting centers, and cold-chain warehouses—where the emphasis lies on high-precision trajectory tracking, low-speed cruising stability, and real-time obstacle avoidance. This distinction leads to fundamentally different control requirements, with AGVs favoring lightweight and efficient control strategies adapted to repetitive routes and spatial constraints.
As intelligent vehicles with autonomous navigation, AGVs can complete tasks without human intervention, thereby significantly enhancing the efficiency of material transportation and the quality of warehousing management. The four-rudder-wheel all-drive AGV, notable for its unique drive structure and flexible movement capabilities, demonstrates strong adaptability and high efficiency in complex environments. However, achieving high-precision and stable automatic cruise control remains a key challenge for AGV applications, particularly in intricate settings.
To address this problem, researchers have proposed a variety of control methods. For instance, the traditional PID control method is widely used in AGV trajectory control due to its simple structure and easy implementation. Still, it shows poor adaptability upon dynamic environment changes, easily leading to insufficient tracking accuracy and response lag. Consequently, Galati et al. [1] devised an adaptive heading correction mechanism for heavy-duty omnidirectional robots, which modifies the heading reference in real time based on sensor feedback. The incorporation of this adaptive correction within the control loop markedly improves trajectory tracking accuracy and responsiveness when faced with disturbances.
Meanwhile, C. Yang and J. Liu et al. proposed an intelligent driving vehicle trajectory tracking control method based on MPC and fuzzy PID control, which combines the predictive control of MPC and the adaptive property of fuzzy PID control to enhance the system’s adaptability and robustness in uncertain environments. This approach improves the accuracy in horizontal control and achieves decoupling optimization in vertical control [2]. In addition, the introduction of the LSTM network further enhances the trajectory tracking performance, and the study by Huang, K. et al. demonstrated the application of the LSTM network in MPC, which significantly enhances the trajectory prediction capability of AGVs in dynamically changing environments [3].
For the path tracking control of rudder-wheel AGVs, Ibari B et al. used the Backstepping method to optimize single-rudder-wheel trajectory tracking performance. Their study addresses the control system of single-steering-wheel AGVs. It effectively solves the trajectory tracking problem in complex environments by introducing a Backstepping control strategy, demonstrating the potential of this method in improving the accuracy of control of single-steering-wheel AGVs [4].
Although effective, the aforementioned methods exhibit several limitations when applied to the lateral control of a 4WID-4WIS AGV. The adaptive heading correction of Galati et al. [1] improves omnidirectional heading accuracy but does not address the coupled longitudinal–lateral dynamics inherent to four-wheel steering systems. The hybrid MPC–fuzzy PID approach of Yang et al. [2] enhances robustness under uncertainty; yet it still relies on a linearized model that struggles to capture rapid lateral deviations in highly dynamic scenarios. Although Huang et al. [3] demonstrated that LSTM-MPC can learn complex temporal dependencies, their work focuses primarily on multimode process control rather than the specific lateral kinematics of wheeled vehicles. Similarly, the Backstepping solution of Benaoumeur et al. [4] delivers strong stability for single-steer configurations but does not readily generalize to coordinated four-wheel steering. These gaps underscore the need for a control strategy that can both learn nonlinear lateral dynamics from multi-sensor data and integrate seamlessly with MPC to provide anticipatory, adaptive steering inputs.
Based on the powerful capabilities of the deep learning methods proposed by pioneers, this paper introduces an MPC lateral control method based on the Long Short-Term Memory (LSTM) network for optimized trajectory prediction, combined with fuzzy PID control for longitudinal management, aiming to further enhance the trajectory tracking ability of a 4WID-4WIS AGV. By utilizing the LSTM network to forecast and optimize the vehicle’s state and outputs, the AGV is equipped to anticipate forthcoming changes based on inputs from its multi-sensor fusion. This capability facilitates dynamic adjustments to the MPC controller, thereby improving the accuracy and responsiveness of lateral control. Meanwhile, the integration of longitudinal dynamic control with fuzzy PID facilitates the decoupling of longitudinal speed for adaptive regulation. This approach effectively balances both longitudinal and lateral control, thereby improving the overall performance of the system.
To validate the efficacy of the proposed approach, empirical experiments were conducted in real-world scenarios. The results indicate that the proposed method significantly outperforms traditional techniques in complex path tracking tasks, particularly in trajectory tracking accuracy, dynamic responsiveness, and resistance to interference. The integration of LSTM-optimized MPC lateral control with fuzzy PID longitudinal control offers a robust and stable solution for the intelligent navigation of AGVs, providing valuable insights for advancements in technology and practical applications within related domains.

2. Theoretical Methodology

2.1. Kinematic Model

The four-wheel-steering and all-wheel-drive AGV can be described as a highly flexible and maneuverable mobile wheeled robot. Its fundamental structural design integrates both motion control and environmental adaptability. As illustrated in Figure 1, the core components of the AGV consist of the steering motor, motor speed controller, inertial measurement unit (IMU), and drive motor.
As illustrated in Figure 2, the motion model of the four-rudder-wheel AGV has been simplified. From a geometric perspective, the kinematic model analyzes the AGV’s motion state, including its position. It is assumed that only rolling friction exists between the AGV and the ground while neglecting friction between the tires and the ground, side deflection stiffness, and various complex mechanical factors. Consequently, the movement of the four-rudder-wheel AGV can be represented through kinematic modeling to simplify the problem [5]. The kinematic state equation is formulated to facilitate subsequent calculations by streamlining the kinematic model.
Since all four driving motors of the four-rudder-wheel AGV can steer in any direction, the Ackermann steering principle is now applied to further simplify the four-rudder wheels by converting them into a two-wheeled bicycle model in world coordinates, as illustrated in Figure 3. This approach enables for the front and rear four-rudder wheels to be controlled in pairs. The physical quantities depicted in Figure 3 are listed in Table 1.
The angles and their geometric relations are derived from Figure 3.
The absolute velocity of the center of mass is calculated as follows:
X ˙ = v cos φ + β
Y ˙ = v sin φ + β
The angular velocity of motion is calculated as follows:
φ ˙ = ν R
We apply the sine theorem to derive the angles for the front and rear wheels separately.
a sin δ f β = R sin π 2 δ f
b sin δ r + β = R sin π 2 δ r
It is derived from the combined simplification of Equations (4) and (5):
a + b R = tan δ f + tan δ r cos β
However, in practice, the equation of a and b can be transformed into the wheelbase of the AGV, denoted as L . Therefore, Equation (6) can be further simplified as follows:
1 R = tan δ f + tan δ r cos β L
By substituting Equation (7) into Equation (3) and integrating it with Equations (1) and (2), we can ultimately express the motion state model of the four-wheeled all-wheel-drive AGV [6]:
X ˙ Y ˙ φ ˙ = V cos φ + β sin φ + β tan δ f + tan δ r L cos β
This concludes the kinematic analysis of the vehicle model, which integrates the front and rear four steering wheels into two wheels for angle solving and control, thereby enabling the management of the entire AGV vehicle.

2.2. Dynamics Model

The kinematic model is particularly well suited for vehicle attitude control at low speeds. Additionally, the vehicle motion state model, derived from the kinematic equations, demonstrates that the vehicle’s center of mass velocity, V, is typically associated with the vehicle’s heading angle. This association complicates unilateral and optimal control in both lateral and longitudinal directions.
Currently, the kinematic equations are used to incorporate the tire lateral deflection stiffness, potential deformation during motion, and the coefficients of friction and ground adhesion into the dynamic analysis to optimize the vehicle body control model. A Frenet coordinate system is employed in the dynamic analysis to assess the vehicle’s motion state, concentrating on decoupling the lateral and longitudinal control of vehicle motion to enhance control outcomes [7,8].
The simplified model illustrated in Figure 3 is utilized for analyzing the dynamics of the vehicle. In this model, point M represents the center of mass, while point O indicates the center of rotation during steering motion. α f and α r denote the lateral deflection angles of the front and rear wheels, respectively, during motion. Additionally, F y denotes the transverse forces exerted on the tires, and F x represents the rolling friction acting on the vehicle during motion. The remaining physical quantities are consistent with those described in Section 2.1 Mechanical analysis can be derived from the model presented in Figure 3.
a y I φ ¨ = cos δ f 1 a cos δ f b F y f F y r
And
F = C α ,
where F represents the side deflection force, C denotes the tire side deflection stiffness, and α indicates the side deflection angle.
Therefore, based on Equations (9) and (10), the mechanical equations can be expressed as follows:
a y I φ ¨ = C f cos δ f C r a C f cos δ f b C r α f α r
However, the reference system of the AGV during its motion is non-inertial, and its velocity and acceleration can be expressed as follows within this non-inertial reference system:
v y a y = y ˙ y ¨ + v x φ ˙
Equations (11) and (12) give rise to the following kinetic state model:
y ¨ φ ¨ = a C f + b C r m V x a C f b C r m V x V x a C f b C r I V x a 2 C f + b 2 C r I V x y ˙ φ ˙ + C f m a C f I δ
where m is the mass of the AGV, I is the moment of inertia, and δ is the steering angle.
The algorithm for the AGV dynamics model has been established. The formulation indicates that when the longitudinal velocity is predetermined, the AGV’s acceleration and angular acceleration during a turn are exclusively determined by the inputs related to the front-wheel cornering angle. Consequently, the dynamics model is capable of effectively decoupling and managing both lateral and longitudinal motion.

3. Control Algorithm

3.1. Error Control Algorithm for 4WID-4WIS

In Figure 4, the geometric center of the AGV aligns with its center of mass at the mass point m. x represents the unit vector corresponding to the AGV’s motion within the world coordinate system, while S indicates the orthographic projection of the AGV’s world coordinates onto the natural coordinate system. Additionally, X r denotes the unit vector associated with the projection point.
Here, n and τ refer to the unit normal and unit tangent vectors of the AGV’s velocity vector in the world coordinate system, respectively. Similarly, n r and τ r represent the unit normal and unit tangent vectors of the AGV’s velocity vector in the Frenet coordinate system. Furthermore, d signifies the lateral error between the actual and reference positions.
Let the trajectory defined by the Frenet coordinate system accurately reflect the geometric characteristics of the intended path. Then, the lateral deviation can be articulated as follows:
d ˙ = x ˙ x ˙ r n r + x x r n ˙ r
The lateral error, V y , φ, coupled by the Frenet formula yields the following result:
d ˙ = v y + v x φ θ r
Let e d = d and e φ = φ θ r .
Consequently, Equation (15) can be expressed as follows:
e ˙ d = v y + v x e φ
From (16), along with the conclusion in Section 2.2, the state space equation for the lateral error system is derived as follows:
e ˙ d e ¨ d e ˙ φ e ¨ φ = 0 1 0 0 0 C f + C r m V x C f C r m a C f b C r m V x 0 0 0 1 0 a C f b C r I V x a C f b C r I a 2 C f + b 2 C r I V x e d e ˙ d e φ e ˙ φ + 0 C f m 0 a C f I δ + 0 a C f b C r m V x 0 a 2 C f + b 2 C r I V x θ ˙ r
According to the error model presented, it can be inferred that the control problem at a particular longitudinal velocity is redefined as the task of regulating the tire’s steering angle in order to reduce lateral deviation.

3.2. Model Predictive Control Algorithms

A growing body of work has demonstrated the efficacy of model predictive control (MPC) across a variety of trajectory tracking and path prediction tasks in both automotive and robotic contexts. Bhatt et al. [9] integrate potential field concepts with MPC to achieve socially and spatially aware trajectory prediction for autonomous driving, illustrating how MPC can seamlessly enforce complex constraints on moving obstacles. Ling et al. [10] further validate the real-time feasibility of MPC by embedding the controller on an FPGA platform, thereby overcoming computational latency challenges and enabling high-frequency control updates. Extending MPC’s applicability beyond vehicular motion, Selvamurugan et al. [11] employ a CNN–LSTM feature extractor within a nonlinear MPC framework to precisely track temperature trajectories in a chemical batch reactor, underscoring MPC’s adaptability to systems with intricate dynamics.
Collectively, these studies highlight MPC’s unique ability to optimize future control actions under explicit state and input constraints—an essential property for ensuring both accuracy and safety in four-wheel-steering, all-wheel-drive AGV trajectory tracking applications.
Building on these insights into MPC’s constraint handling and predictive optimization capabilities, the issue of minimizing lateral error following the development of the error model presented in Section 3.1 of this segment can typically be addressed through the implementation of a model predictive control (MPC) algorithm. As specified in Equation (20), the error state space equation defines a linear model X = e d e ˙ d e φ e ˙ φ T , and the control quantity is denoted as δ; thus, the final simplified control equation can be expressed as follows:
X ˙ = A x + B u + C θ ˙ r
where:
A = 0 1 0 0 0 C f + C r m V x C f C r m a C f b C r m V x 0 0 0 1 0 a C f b C r I V x a C f b C r I a 2 C f + b 2 C r I V x B = 0 C f m 0 a C f I C = 0 a C f b C r m V x 0 a 2 C f + b 2 C r I V x
The discretization of Equation (18) utilizing Euler’s method can be approximated as follows:
X e k + 1 = A ¯ x k + B ¯ u k
where:
A ¯ = I + A 2 T I A 2 T 1 , with B ¯ = B T , and T represents the control period. By combining the control and state quantities based on K-moment time domain forward prediction for N moments with the goal of optimizing them, we obtain the following cost function:
J = n = 0 N 1 X ( k + n | k ) T Q X ( k + n | k ) + u ( k + n | k ) T R u ( k + n | k ) + X k + N T F X k + N
The cost function is derived by separately combining all moments of inputs and outputs as follows:
J = k = 0 N 1 x k x r e f Q ¯ 2 + u k u r e f R ¯ 2
where x r e f is the reference trajectory and u r e f is the desired control input.
X k = X ( k | k ) X ( k + 1 | k ) X ( k + N | k ) , Q ¯ = Q 0 0 F , u k = u ( k | k ) u ( k + 1 | k ) u ( k + N 1 | k ) , R ¯ = R 0 0 R
The linear combination of the error state space equations, based on the K-moment time domain forward prediction for N moments, can be expressed as follows:
X k + 1 = M X k + C u k
where:
M = I n A ¯ A ¯ 2 A ¯ N   C = 0 0 0 0 B ¯ 0 A ¯ B ¯ 0 A ¯ N 3 B ¯ A ¯ N 1 B ¯ A ¯ N 2 B ¯ B ¯
and n is the dimension of the state vector.
The final cost expression can be obtained via Equations (21) and (22):
J = X k T G X k + u k T H u k + 2 X k T E u k
where:
G = M T Q ¯ M , E = C T Q ¯ M , H = C T Q ¯ C + R ¯
Given that the cost function is quadratic and the system dynamics are described by a nonlinear function f x k , u k [12], the resulting model predictive control problem becomes a nonlinear programming (NLP) problem. The optimization formulation is given as follows:
min J = k = 0 N 1 x k x r e f Q ¯ 2 + u k u r e f R ¯ 2 s . t .
x k + 1 = f x k , u k x min x k x max u min u k u max
The control increments H and E can be ascertained by resolving the aforementioned equation. Furthermore, the optimized rolling control of model predictive control can be attained through iterative solutions at each time step throughout the control duration.

3.3. LSTM Network-Based MPC

In conventional model predictive control (MPC), accurate prediction of system behavior relies heavily on explicit and well-defined dynamic models. However, for real-time systems such as four-wheel-steering, all-wheel-drive AGVs, the dynamics are often nonlinear, partially known, and subject to external disturbances. To address these modeling challenges, data-driven approaches—particularly Long Short-Term Memory (LSTM) networks—have demonstrated strong potential in learning temporal patterns and nonlinear system behaviors. LSTM networks are especially advantageous in capturing long-range dependencies, making them an effective complement to MPC in dynamic and uncertain environments.
Recent studies have explored the integration of LSTM with MPC in various contexts. For instance, LSTM-MPC frameworks have been employed in motion control and navigation tasks, including distributed formation control, agile quadrotor maneuvering, and reinforcement learning-based collision avoidance [13,14,15,16]. In the domain of energy and process control, LSTM-enhanced MPC has been applied to electric vehicle energy management and thermal regulation in industrial systems, demonstrating improved efficiency and robustness under uncertain dynamics [17,18]. Moreover, in the field of path planning and environment-aware control, LSTM models have been used to enhance trajectory prediction and risk assessment for autonomous vehicles [19,20].
In distinction to the aforementioned applications that primarily concentrate on longitudinal motion, global trajectory planning, or energy optimization, the present study specifically addresses the issue of lateral trajectory tracking control. By integrating a Long Short-Term Memory (LSTM) network within the model predictive control (MPC) framework, the proposed approach effectively captures nonlinear lateral dynamics with a high degree of temporal fidelity. This integration facilitates enhanced accuracy and robustness in path tracking within intricate and time-varying environments. For the control system, the dynamics are modeled as follows:
x ˙ t = f x t , u t
where x t n represents the system state, u t m denotes the control input, and f · : n × m n signifies the functional relationship that describes the dynamics between the system state and the control input. To optimize trajectory tracking performance within MPC, the Long Short-Term Memory (LSTM) network is employed to learn and forecast the system state at future time intervals. The LSTM network accomplishes this by analyzing a sequence of past states and control inputs originating from the present moment. Specifically, the inputs to the LSTM network consist of the historical state sequence X k = X ( k | k ) X ( k + 1 | k ) X ( k + N | k ) T , with the historical control sequence
u k = u ( k | k ) u ( k + 1 | k ) u ( k + N | k ) T , while the network’s predicted output is formulated accordingly.
x o p t t = f L S T M X k , u k , θ
The optimal training objective for an LSTM network model is defined as the discrepancy between its optimized predicted state and the initial predicted state. This is achieved through the application of a specific loss function, which takes into account the constraints and performance metrics pertinent to the system.
L L S T M = t = 1 T x o p t t x r a w t 2 + λ 1 x o p t t 2 + λ 2 x ˙ o p t t x ˙ r a w t 2
where x r a w t represents the original prediction state of the MPC controller. T denotes the duration of trajectory optimization, The variables λ 1 and   λ 2 serve as regularization factors intended to equilibrate the trajectory error with the associated costs of control inputs. The objective of the optimization process is to minimize the prediction state error, the amplitude of control inputs, and the dynamic error of the system.
The LSTM network structure is shown in Figure 5
The architecture of the network generally comprises an input layer, multiple hidden layers, and an output layer. The state of the Long Short-Term Memory (LSTM) network at each time step is modified according to the following recursive equation:
i t = σ W i x t + u i x t 1 + b i
f t = σ W f x t + u f x t 1 + b f
O t = σ W o x t + u o x t 1 + b o
C t = f t C t 1 + i t tan h W c x t + u c x t 1 + b c
h t = O t tanh C t
where i t signifies the input gate, f t indicates the forget gate, O t refers to the output gate, C t denotes the cell state, and h t represents the output state. The network receives as inputs the current state and control inputs, while the output corresponds to the predicted value for the subsequent time step.
The optimized trajectory x o p t t , derived from deep learning utilizing the LSTM network, can be applied to the MPC controller as an input.
min J = t = 0 T 1 x t x o p t t Q ¯ 2 + u t u r e f R ¯ 2 s . t . x t + 1 = A x t + B u t + f L S T M x 0 : t , u 0 : t x m i n x t x m a x u m i n u t u m a x

3.4. Fuzzy PID Speed Controller

In Section 3.2, a model predictive controller is utilized to manage the tire bias angle input, aiming to optimize the roll during a series of control processes associated with the AGV’s trajectory tracking. It is important to note that the AGV’s lateral control is primarily influenced by its longitudinal velocity. The error control model established in Section 3.1 indicates that further optimization of the AGV’s trajectory tracking, particularly concerning the longitudinal control speed, i.e., V x can significantly enhance overall trajectory performance, thereby improving the trajectory tracking process. In contrast to the limitations of model predictive control (MPC) and the challenges associated with tuning traditional PID parameters, the fuzzy PID algorithm selected for this study not only alleviates the need for extensive parameter adjustments related to longitudinal speed and process control but also exhibits robust performance in terms of resilience and resistance to interference [21]. The control flow chart is illustrated in Figure 6.
The fuzzy PID algorithm incorporates the target speed of the vehicle as an input to the system. The control error is determined by calculating the difference between the desired speed and the actual speed. Subsequently, the rate of change of this control error is utilized within the fuzzy inference mechanism to derive the dynamically adjustable parameters Δ K p , Δ K i , and Δ K d . These three tuning parameters are then integrated into the PID controller to facilitate initial closed-loop control of the specified inputs. The fuzzy inference rules are presented in Table 2, where K p , K i , and K d are directly represented due to the analogous nature of the rules governing these parameters.
Based on the fuzzy rules established previously, the control calculation formula for the input fuzzy PID controller parameters, denoted as Δ K p , Δ K i , and Δ K d , is presented as follows:
V k = K p × e k + K i × i = 0 k e k + K i × e k e k 1
K p K i K d = K p 0 K i 0 K d 0 + Δ K p Δ K i Δ K d
The parameters K p 0 , K i 0   , and K d 0   are established during the initialization phase of the PID controller, while e k represents the expected value of the error in the current state. By defining the desired value and inputting it into the fuzzy PID controller for fuzzy inference, the parameters Δ K p , Δ K i , and Δ K d are obtained from the fuzzy table as well as their associated membership functions. These parameters are subsequently incorporated into the fuzzy PID control formula, facilitating the regulation of longitudinal speed.

4. Experimental Setup

This section presents a comparative experimental analysis of trajectory tracking, emphasizing the integration of the Long Short-Term Memory model predictive control (LSTM-MPC) algorithm with longitudinal Fuzzy PID control. The primary focus of the experiment is to assess the deviations and optimization effects of LSTM-MPC in relation to traditional model predictive control, i.e., naive MPC within the context of longitudinal control, while also illustrating the predictive capabilities of the LSTM network to a certain degree. Additionally, the experiment incorporates the fuzzy PID algorithm in longitudinal control to investigate the optimization effects arising from the decoupling of longitudinal and lateral control mechanisms.

4.1. Experimental Preparation

The 4WID-4WIS AGV and its test environment are shown in Figure 7, with the test area approximately 6 m in length and 10 m in width. The AGV features a compact square chassis with dimensions of 550 mm × 550 mm, designed to ensure both maneuverability and structural stability in confined indoor environments. The test surface is covered with smooth epoxy resin panels, free of noticeable gaps, coated with green polyurethane floor paint, and outlined with white boundary lines. Compared to other complex trajectory planning algorithms—such as those integrating Theta* and Timed Elastic Band methods for wheel-legged robots, which are designed to address dynamic constraints and terrain adaptability [22]—this study adopts a trajectory composition method based on the simple yet effective approach described in the Baidu EM Planner [23], which generates paths by concatenating basic geometric primitives such as straight lines, arcs, and smooth curves. The AGV’s control system is based on the STM32F4 microcontroller. Attitude and position information are obtained through an inertial measurement unit (IMU) and wheel odometry, both installed directly beneath the microcontroller and shielded by a pure black fiberglass plate to reduce environmental interference. The IMU incorporates a high-performance gyroscope, the Bosch BMI088, which offers an angular velocity resolution of ±0.15°/s (typical) at 25 °C and a typical static angular drift of 10°/h under the same conditions. The odometry system has a resolution of 0.03896 mm. Sensor data are transmitted to the microcontroller via a serial communication interface at a baud rate of 115,200 bps. The predefined path is sent from the host computer to the microcontroller for real-time execution.

4.2. Experimental Results

The performance of various algorithms in trajectory tracking is reported in Figure 8, where the black line represents the reference trajectory, the red dashed line denotes the tracking trajectory of Fuzzy-PID-LSTMMPC, the orange line indicates the tracking trajectory of LSTM-MPC, and the blue dashed line signifies the tracking trajectory of traditional MPC. The comparative analysis indicates that both Fuzzy-PID-LSTMMPC and LSTM-MPC outperform the traditional MPC algorithm regarding tracking accuracy. Particularly in scenarios involving sharp curvature or external disturbances, both Fuzzy-PID-LSTMMPC and LSTM-MPC effectively sustain precise tracking of the reference trajectory. This observation implies that the LSTM network excels in error prediction for dynamic systems, while Fuzzy-PID adeptly adjusts the output of the longitudinal speed in longitudinal control across varying road conditions, enhancing the system’s stability and responsiveness.
Figure 9 compares the angular outputs from various algorithms in lateral control. The blue curve represents the outcome of lateral control using only model predictive control (MPC); the red curve shows the predicted angle after deep learning via the Long Short-Term Memory (LSTM) network; and the green curve indicates the angle output after integrating neural network prediction with the MPC controller for adjustments. As depicted in the figure, following LSTM network prediction, the system can effectively adjust the actual state and output based on the prediction results, thereby optimizing the control system’s performance.
According to the data in Table 3 and Figure 9, the Root Mean Square Error (RMSE) of Fuzzy-PID-LSTMMPC is 2.46 × 10−2 which is significantly better than that of LSTM-MPC (RMSE = 7.17 × 10−1) and Naive-MPC (RMSE = 1.20 × 100). This indicates that LSTM-MPC optimizes the performance of the conventional MPC algorithm in lateral control, while Fuzzy-PID-LSTMMPC further improves control accuracy through vertical decoupling.
Figure 10 illustrates the comparison of the transverse errors for Fuzzy-PID-LSTMMPC, LSTM-MPC, and Naive-MPC, with the red line representing Fuzzy-PID-LSTMMPC, the blue line representing LSTM-MPC, and the yellow line representing Naive-MPC. According to the data in Table 3, Fuzzy-PID-LSTMMPC demonstrates a significant advantage in lateral error, with its maximum error and RMSE being lower than Naive-MPC’s. This further verifies the notable performance enhancement of LSTM-based optimized MPC in lateral control. The LSTM network effectively captures trajectory trends and system dynamics, thereby optimizing the MPC control strategy and significantly reducing the trajectory tracking error.
To conduct a comparative analysis of the performance disparities among Naive-MPC, LSTM-MPC, and Fuzzy-PID-LSTMMPC in practical applications, an examination of the heading angle error during trajectory tracking was performed, as illustrated in Figure 11. The blue line denotes Naive-MPC, the yellow line signifies LSTM-MPC, and the red line represents Fuzzy-PID-LSTMMPC. The findings from the error analysis presented in Table 3 indicate that both Fuzzy-PID-LSTMMPC and LSTM-MPC demonstrate superior performance in terms of the RMSE associated with heading angle error when compared to Naive-MPC. This result suggests that the integration of fuzzy PID with LSTM effectively optimizes longitudinal control and markedly improves the precision of heading control. Meanwhile, Table 4 presents the predictive angle training iteration model with data. The RMSE values for both models gradually decrease as the number of training cycles increases. This indicates that the LSTM model converges steadily in the acceleration and angle prediction tasks, demonstrating significant training effectiveness. For angle prediction, the RMSE value after 200 cycles is 0.03, with a loss of 3.90 × 10−4, indicating that the LSTM model can deliver more accurate predictions through continuous optimization.
To further elucidate the training process and reproducibility of the LSTM network employed in this study, Figure 12 presents the Root Mean Square Error (RMSE) progression during the training phase. In the figure, the bright blue line represents the RMSE trajectory of the best-performing training epoch, while the darker blue line shows the RMSE evolution from a randomly selected training epoch. The red-shaded area denotes the confidence interval of the RMSE, highlighting the statistical uncertainty associated with model convergence during training. The training dataset was obtained using the STM32F4 series microcontroller, which sampled key control variables—particularly the wheel steering angles—via its integrated 12-bit successive approximation register (SAR) analog-to-digital converter (ADC). The ADC was configured to sample at 10-millisecond intervals (0.01 s), ensuring consistent and high-resolution data acquisition for model training. This setup facilitated the LSTM network’s ability to learn and predict dynamic system behaviors effectively, as evidenced by the steady decline in RMSE over successive training iterations.
The training process was conducted over 200 epochs, during which the RMSE values demonstrated a consistent downward trend, indicative of the model’s learning efficacy. Specifically, the RMSE decreased from an initial value of 0.15 to a final value of 0.03, with the loss function converging to 3.90 × 10−4. This steady convergence underscores the LSTM model’s capacity to accurately learn and predict the AGV’s trajectory based on the collected sensor data.
Figure 12 thus provides a comprehensive overview of the LSTM network’s training dynamics, highlighting its robustness and reliability in modeling the AGV’s control system. The integration of high-quality, real-time data acquisition with advanced neural network training techniques ensures that the model can be effectively replicated and applied in similar autonomous vehicle control scenarios.
The second objective of the experiment is to analyze the vehicle speed responses under various longitudinal control strategies, as illustrated in Figure 13. The reference planned speed, derived from five iterations of polynomial fitting, is represented by the black line, and the yellow line denotes a constant vehicle speed of 5 m/s; the blue line illustrates the longitudinal speed response achieved through Fuzzy PID control, and the red line displays the outcomes of dual-PID control. The data indicate that when constant-speed control is utilized, the speed error is approximately 0.5 m/s. In contrast, both fuzzy PID and dual-PID control methods result in a reduction in the speed error to below 0.5 m/s. Furthermore, the speed response under fuzzy PID control demonstrates significantly greater stability compared to dual-PID control, which is characterized by oscillations during the speed regulation process.
The experiments concerning longitudinal control, as previously discussed, indicate that traditional trajectory tracking typically employs a constant speed for longitudinal control. This approach may lead to delays in speed adjustments when navigating complex road conditions, which can result in problems such as overshooting or control failures. To mitigate these issues, longitudinal speed is calculated using a fifth-degree polynomial and integrated with a fuzzy PID controller for real-time management. This methodology facilitates flexible modifications to the longitudinal speed, thereby preventing instability in control that may arise from environmental fluctuations. In the context of varying road conditions, the fuzzy PID controller ensures that the vehicle maintains a stable speed response during trajectory tracking by dynamically adjusting control parameters, which effectively minimizes errors. In contrast, while dual PID can be employed to control the longitudinal speed to some extent, it may cause oscillations during the adjustment process, leading to insufficient control accuracy and stability. Fuzzy PID is more adaptable to varying road conditions through its fuzzy control mechanism and adaptive adjustment, significantly enhancing the accuracy and stability of longitudinal control. This improvement is particularly evident in speed response and tracking accuracy, demonstrating significant advantages.

5. Conclusions

This article proposed a control method: Fuzzy-PID-LSTMMPC. The integration of the LSTM network facilitates the prediction of forthcoming states, thereby supplying smoother and more accurate state information for the iterative optimization of MPC. This enhancement markedly improves the response time and trajectory tracking precision of MPC in dynamic environments, allowing the vehicle to adhere to the target path with increased accuracy. According to the experimental results, this control framework demonstrates superior efficacy in complex trajectory tracking scenarios, particularly regarding trajectory tracking accuracy, dynamic responsiveness, and steady-state performance, when compared to conventional control methodologies. Specifically, the LSTM-MPC controller improves the lateral tracking performance by approximately 40.25% compared to naive MPC, highlighting a substantial improvement in lateral control precision.
Notably, for longitudinal control, this paper introduces a strategy that amalgamates a dynamic model with fuzzy PID control. This approach effectively decouples lateral and longitudinal control while dynamically modulating longitudinal speed, thereby ensuring synchronization between the two and further augmenting the overall control performance of the system. Experimental comparisons further indicate that integrating fuzzy PID improves longitudinal control accuracy by about 30.40% over the baseline LSTM-MPC approach, especially in dynamic and curved path scenarios.
In summary, the proposed cooperative strategy, which leverages LSTM-based predictive optimization for MPC lateral control alongside fuzzy PID-based longitudinal control, offers a novel framework for achieving high-precision and stable trajectory tracking. This methodology possesses considerable potential for engineering applications, particularly in the realm of complex path tracking tasks within autonomous driving contexts.

Author Contributions

Conceptualization, Z.W., C.X., B.L., and Y.L.; methodology, C.X. and F.Y.; resources: Z.W. and Y.L.; software, Z.W., B.L., Y.L., and F.Y.; validation, C.X. and F.Y.; writing—original draft, Z.W., C.X., B.L., Y.L., and F.Y.; writing—review and editing, Z.W., C.X., F.Y., B.L., and Y.L.; investigation: B.L. and Z.W.; supervision, C.X., B.L., F.Y., and Y.L.; funding acquisition, C.X. and F.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Youth Science and Technology Innovation Talent Plan of Hubei Province (Grant No. 2023DJC006), the Hubei University of Technology Research Fund (Grant No. BSQD2020009), and the National College Student Innovation and Entrepreneurship Training Program (Grant No. 202210500002).

Data Availability Statement

The datasets presented in this article are not readily available due to the confidentiality of the areas covered by the project. Requests to access the datasets should be directed to 2210121114@hbut.edu.cn.

Conflicts of Interest

Authors Bazhou Li and Yang Li were employed by the company CCCC Second Harbor Engineering Company Ltd. and CCCC Wuhan Harbor Engineering Design & Research Institute Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Galati, R.; Mantriota, G.; Reina, G. Adaptive heading correction for an industrial heavy-duty omnidirectional robot. Sci. Rep. 2022, 12, 19608. [Google Scholar] [CrossRef]
  2. Yang, C.; Liu, J. Trajectory Tracking Control of Intelligent Driving Vehicles Based on MPC and Fuzzy PID. Math. Probl. Eng. 2023, 2023, 2464254. [Google Scholar] [CrossRef]
  3. Huang, K.; Wei, K.; Li, F.; Yang, C.; Gui, W. LSTM-MPC: A Deep Learning Based Predictive Control Method for Multimode Process Control. IEEE Trans. Ind. Electron. 2022, 70, 11544–11554. [Google Scholar] [CrossRef]
  4. Ibari, B.; Benchikh, L.; Elhachimi, A.R.H.; Ahmed-Foitih, Z. Backstepping Approach for Autonomous Mobile Robot Trajectory Tracking. Indones. J. Electr. Eng. Comput. Sci. 2016, 2, 478–485. [Google Scholar] [CrossRef]
  5. Xu, C.; Zhou, X.; Chen, R.; Li, B.; He, W.; Li, Y.; Ye, F. Trajectory Tracking for 3-Wheeled Independent Drive and Steering Mobile Robot Based on Dynamic Model Predictive Control. Appl. Sci. 2025, 15, 485. [Google Scholar] [CrossRef]
  6. Sun, X.; Deng, S.; Tong, B.; Wang, S.; Zhang, C. A Solution for Trajectory Planning and Control of Cooperative Steering Mobile Robot Based on Time Elastic Band. J. Comput. Syst. Sci. Int. 2022, 61, 1046–1057. [Google Scholar] [CrossRef]
  7. Liniger, A.; Domahidi, A.; Morari, M. Optimization-based autonomous racing of 1:43 scale RC cars. Optim. Control Appl. Methods 2014, 36, 628–647. [Google Scholar] [CrossRef]
  8. Rokonuzzaman, M.; Mohajer, N.; Nahavandi, S.; Mohamed, S. Review and performance evaluation of path tracking controllers of autonomous vehicles. IET Intell. Transp. Syst. 2021, 15, 646–670. [Google Scholar] [CrossRef]
  9. Bhatt, N.P.; Khajepour, A.; Hashemi, E. MPC-PF: Socially and Spatially Aware Object Trajectory Prediction for Autonomous Driving Systems Using Potential Fields. IEEE Trans. Intell. Transp. Syst. 2023, 24, 5351–5361. [Google Scholar] [CrossRef]
  10. Ling, K.; Wu, B.; Maciejowski, J. Embedded Model Predictive Control (MPC) using a FPGA. IFAC Proc. Vol. 2008, 41, 15250–15255. [Google Scholar] [CrossRef]
  11. Selvamurugan, A.; Ganesan, P.K.; Nayak, S.S.; Simiyon, A.; Indiran, T. CNN-LSTM-Based Nonlinear Model Predictive Controller for Temperature Trajectory Tracking in a Batch Reactor. ACS Omega 2024, 9, 47203–47212. [Google Scholar] [CrossRef] [PubMed]
  12. Takahama, T.; Akasaka, D. Model Predictive Control Approach to Design Practical Adaptive Cruise Control for Traffic Jam. Int. J. Automot. Eng. 2018, 9, 99–104. [Google Scholar] [CrossRef]
  13. He, S.; Dai, S.-L.; Zhao, Z.; Zou, T.; Ma, Y. UDE-Based Distributed Formation Control for MSVs With Collision Avoidance and Connectivity Preservation. IEEE Trans. Ind. Inform. 2024, 20, 1476–1487. [Google Scholar] [CrossRef]
  14. Salzmann, T.; Kaufmann, E.; Arrizabalaga, J.; Pavone, M.; Scaramuzza, D.; Ryll, M. Real-Time Neural MPC: Deep Learning Model Predictive Control for Quadrotors and Agile Robotic Platforms. IEEE Robot. Autom. Lett. 2023, 8, 2397–2404. [Google Scholar] [CrossRef]
  15. Fischer, J.; Steiner, M.; Taş, Ö.Ş.; Stiller, C. Safety Reinforced Model Predictive Control (SRMPC): Improving MPC with Reinforcement Learning for Motion Planning in Autonomous Driving. In Proceedings of the 2023 IEEE 26th International Conference on Intelligent Transportation Systems (ITSC), Bilbao, Spain, 24–28 September 2023; pp. 2811–2818. [Google Scholar] [CrossRef]
  16. Hu, B.; Wan, Y.; Lei, Y. Collision avoidance of USV by model predictive control-aided deep reinforcement learning. In Proceedings of the 2022 IEEE International Conference on Industrial Technology (ICIT), Shanghai, China, 22–25 August 2022; pp. 1–6. [Google Scholar] [CrossRef]
  17. Lu, L.; Zhao, H.; Liu, X.; Sun, C.; Zhang, X.; Yang, H. MPC-ECMS Energy Management of Extended-Range Vehicles Based on LSTM Multi-Signal Speed Prediction. Electronics 2023, 12, 2642. [Google Scholar] [CrossRef]
  18. Sun, Y.; Du, M.; Qi, X. Enhanced Modeling and Control of Organic Rankine Cycle Systems via AM-LSTM Networks Based Nonlinear MPC. Energy Sci. Eng. 2024, 13, 94–106. [Google Scholar] [CrossRef]
  19. Wang, H.; Lu, B.; Li, J.; Liu, T.; Xing, Y.; Lv, C.; Cao, D.; Li, J.; Zhang, J.; Hashemi, E. Risk Assessment and Mitigation in Local Path Planning for Autonomous Vehicles With LSTM Based Predictive Model. IEEE Trans. Autom. Sci. Eng. 2022, 19, 2738–2749. [Google Scholar] [CrossRef]
  20. Xin, J.; Xu, T.; Zhu, J.; Wang, H.; Peng, J. Long Short-Term Memory-Based Multi-Robot Trajectory Planning: Learn from MPCC and Make It Better. Adv. Intell. Syst. 2024, 6, 2300703. [Google Scholar] [CrossRef]
  21. Saidi, S.M.; Mellah, R.; Fekik, A.; Azar, A.T. Real-Time Fuzzy-PID for Mobile Robot Control and Vision-Based Obstacle Avoidance. Int. J. Serv. Sci. Manag. Eng. Technol. 2022, 13, 1–32. [Google Scholar] [CrossRef]
  22. Sun, J.; Sun, Z.; Wei, P.; Liu, B.; Wang, Y.; Zhang, T.; Yan, C. Path Planning Algorithm for a Wheel-Legged Robot Based on the Theta* and Timed Elastic Band Algorithms. Symmetry 2023, 15, 1091. [Google Scholar] [CrossRef]
  23. Fan, H.; Zhu, F.; Liu, C.; Zhang, L.; Zhuang, L.; Li, D.; Zhu, W.; Hu, J.; Li, H.; Kong, Q. Baidu Apollo EM motion planner. arXiv 2018, arXiv:1807.08048. [Google Scholar] [CrossRef]
Figure 1. The overall structure of the 4WID-4WIS AGV.
Figure 1. The overall structure of the 4WID-4WIS AGV.
Electronics 14 02000 g001
Figure 2. Four-rudder-wheel AGV simplified model.
Figure 2. Four-rudder-wheel AGV simplified model.
Electronics 14 02000 g002
Figure 3. Simplified bicycle model.
Figure 3. Simplified bicycle model.
Electronics 14 02000 g003
Figure 4. The control volume of the AGV in the Frenet coordinate system.
Figure 4. The control volume of the AGV in the Frenet coordinate system.
Electronics 14 02000 g004
Figure 5. LSTM network structure.
Figure 5. LSTM network structure.
Electronics 14 02000 g005
Figure 6. Control flow chart.
Figure 6. Control flow chart.
Electronics 14 02000 g006
Figure 7. The 4WID-4WIS AGV.
Figure 7. The 4WID-4WIS AGV.
Electronics 14 02000 g007
Figure 8. Trajectory tracking diagram.
Figure 8. Trajectory tracking diagram.
Electronics 14 02000 g008
Figure 9. Comparison of actual and predicted outputs.
Figure 9. Comparison of actual and predicted outputs.
Electronics 14 02000 g009
Figure 10. Lateral error.
Figure 10. Lateral error.
Electronics 14 02000 g010
Figure 11. Heading angle error.
Figure 11. Heading angle error.
Electronics 14 02000 g011
Figure 12. Root Mean Square Error during training of LSTM network.
Figure 12. Root Mean Square Error during training of LSTM network.
Electronics 14 02000 g012
Figure 13. Comparison of different control algorithms and response speeds for longitudinal speeds.
Figure 13. Comparison of different control algorithms and response speeds for longitudinal speeds.
Electronics 14 02000 g013
Table 1. Simplified bicycle model physical quantities.
Table 1. Simplified bicycle model physical quantities.
QuantitySymbol
Center of mass pointm
Center of mass velocity V c
Pendulum angle φ
The angle of lateral deflection of center of massβ
Heading angle φ + β
Front-wheel angle δ f
Rear-wheel angle δ r
Table 2. The K fuzzy rules.
Table 2. The K fuzzy rules.
K e
NBNMNSZOPSPMPB
ecNBPBPMPSPS PMPMPS
NMPMPSZOZOPSPSPS
NSPSZONSNSZOZOZO
ZOZONSNMNBNMNSZO
PSZOZOZONSNSPSPM
PMPSPSPSZOZOPSPM
PBPSPMPMPSPSPMPB
Table 3. Lateral error and yaw error comparison.
Table 3. Lateral error and yaw error comparison.
MethodLateral Error (mm)Yaw Error (deg)
MaxRMSEMaxRMSE
NaiveMPC1.501.20 × 1001.50 × 10−145.10 × 10−15
LSTM-MPC0.757.17 × 10−11.73 × 10−144.21 × 10−15
FuzzyPID-LSTMMPC0.692.46 × 10−21.00 × 10−142.93 × 10−15
Table 4. List of predictive angle training iteration models and data.
Table 4. List of predictive angle training iteration models and data.
EpochRMSELossComplexity LayersPlatform
10.449.9 × 10−2Sequence Input (2)
LSTM Layer (64)
Fully Connected Layer (2)
Regression Layer (2)
Intel i7
500.034.1 × 10−4
1000.034.0 × 10−4
1500.034.0 × 10−4
2000.033.9 × 10−4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wan, Z.; Xu, C.; Li, B.; Li, Y.; Ye, F. Trajectory Tracking Method of Four-Wheeled Independent Drive and Steering AGV Based on LSTM-MPC and Fuzzy PID Cooperative Control. Electronics 2025, 14, 2000. https://doi.org/10.3390/electronics14102000

AMA Style

Wan Z, Xu C, Li B, Li Y, Ye F. Trajectory Tracking Method of Four-Wheeled Independent Drive and Steering AGV Based on LSTM-MPC and Fuzzy PID Cooperative Control. Electronics. 2025; 14(10):2000. https://doi.org/10.3390/electronics14102000

Chicago/Turabian Style

Wan, Ziheng, Chaobin Xu, Bazhou Li, Yang Li, and Fangping Ye. 2025. "Trajectory Tracking Method of Four-Wheeled Independent Drive and Steering AGV Based on LSTM-MPC and Fuzzy PID Cooperative Control" Electronics 14, no. 10: 2000. https://doi.org/10.3390/electronics14102000

APA Style

Wan, Z., Xu, C., Li, B., Li, Y., & Ye, F. (2025). Trajectory Tracking Method of Four-Wheeled Independent Drive and Steering AGV Based on LSTM-MPC and Fuzzy PID Cooperative Control. Electronics, 14(10), 2000. https://doi.org/10.3390/electronics14102000

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop