1. Introduction
Permanent magnet synchronous motors (PMSMs) are widely utilized in various high-demand industrial applications—such as servo robots and electric vehicle steering systems—due to their high reliability, high power density, excellent controllability, and relatively low maintenance costs. However, the nonlinear and cross-coupling characteristics of PMSMs make their performance highly sensitive to variations in external load torque and system moment of inertia [
1]. To achieve high-performance control in servo systems centered on PMSMs, engineers must establish precise mathematical models of the motor and determine key mechanical parameters, such as the load moment of inertia and viscous damping coefficient. These parameters are essential for selecting appropriate control settings for proportional–integral (PI) controllers. The modeling and dynamic updating of such systems pose significant challenges, particularly in industrial environments, where parameter identification using state observers is often affected by unmodeled nonlinear disturbances [
2].
To address these challenges, scholars have explored data-driven offline learning methods for intelligent control of servo systems. These data-driven approaches bypass the need for physical models or domain-specific knowledge by employing neural networks to directly learn motor characteristics from large-scale experimental datasets [
3,
4,
5]. This enables the effective capture of nonlinear or complex system behaviors [
6]. Nevertheless, the performance of such methods heavily relies on the quantity and quality of training data, resulting in reduced control reliability when data are limited.
Building upon the symmetry of physical information and the structural characteristics of physical neural networks (PINNs), some researchers have enhanced the reliability of neural network controllers and state observers in servo systems by incorporating reliability evaluation functions. For instance, the authors of [
7] explored the symmetry principle of physical information based on the mechanical structure of flexible manipulators. To develop a more efficient, safe, and reliable neural network-based servo control system, the authors of [
8] introduced a method that integrates PINN with both offline learning and online parameter updating. The authors of [
9] proposed a deep reinforcement learning (DRL) method based on position, velocity, and heading.
Many scholars have noted that in practical industrial applications, it is challenging to obtain real-time physical information from servo systems, and the computational demands associated with processing such information are substantial. To address these challenges, researchers have integrated numerical optimization algorithms with neural network-based proportional integral derivative (PID) controllers or modified neural network architectures to fully exploit their symmetric properties, thereby enhancing the control performance of servo systems. In reference [
10], the weight iteration process of a neural network-based servo controller was optimized using linear matrix inequality (LMI) techniques combined with Markov jump variables. The symmetric characteristics of the optimized weight iteration were utilized to ensure system stability across two motion states—coupled speed and torque motion. In reference [
11], a cross-parallel optimization algorithm framework was proposed by leveraging the exploratory capabilities of the Harris hawk optimization (HHO) algorithm and the search capabilities of the sine–cosine algorithm (SCA). The authors of [
12] introduced a nature-inspired polar fox optimization algorithm (PFA). As a new success in intelligent parameter tuning, the PFA can improve engineering tuning performance.
Currently, offline pre-training methods are widely used to train neural network-based motor controllers within the domain of intelligent motor control [
13]. Although various optimization strategies proposed by researchers have significantly enhanced the efficiency of neural network pre-training and reduced the dependency on large training datasets for intelligent servo controllers [
14], limited research has been conducted on the online self-tuning of control parameters in neural network controllers. In practical industrial production settings, intelligent servo controllers still require multiple rounds of pre-training, resulting in high overall time and resource costs. An evaluation of the existing methods is shown in
Table 1.
This paper presents an in-depth investigation into the online self-tuning mechanism of neural network-based PI controllers for servo systems, integrating methodologies from both servo system design and intelligent control theory. The primary innovations and contributions are summarized as follows:
- (1)
A dynamic model of the PMSM servo system is established, incorporating operational mechanisms, drive components, and control strategies. Based on this model, a frequency domain tuning method for PI controller parameters in a three-loop servo system is derived.
- (2)
Leveraging the frequency domain tuning method and the inherent symmetry in the tuning formula of the servo system’s PI parameters, this study proposes an online self-tuning optimization framework for neural network-based PI controllers, driven by physical information. This framework aims to enhance the position tracking performance of the servo system during the initial operation phase when using online neural network PI controllers.
- (3)
The anti-disturbance performance of the servo control system under varying load current conditions is evaluated and compared between the proposed optimization framework and conventional neural network-based PI controllers.
The remainder of this paper is structured as follows.
Section 2 presents an analysis of the dynamic derivation process of the three-closed-loop permanent magnet synchronous servo control system, along with the frequency domain tuning methodology for its control parameters. Building upon this foundation,
Section 3 introduces the fundamental principles underlying PI servo controller parameter self-tuning using a backpropagation neural network.
Section 4 proposes an online self-tuning optimization framework for neural network PI controller parameters, driven by physical information, by incorporating the moment of inertia of the servo system.
Section 5 provides simulation and experimental results to validate the enhanced performance of the proposed framework. Meanwhile, it addresses the limitations of the proposed approach, suggests potential directions for further improvement, and outlines future development trends in the field of online self-tuning control parameters for neural network-based PI controllers in servo systems. Finally,
Section 6 concludes this paper by summarizing the key innovations and contributions.
3. Neural Network-Based PI Controller
In this paper, an online intelligent tuning speed loop PI controller is employed to enhance the speed response capability of the position control system, thereby improving the overall position control performance of the servo system. The relationship among the electrical angle
of the servo motor, the electrical angular velocity
, and the mechanical angular velocity
is defined by Equation (12):
Compared with the traditional PI controller, the BPNN-PI controller uses a BPNN to dynamically adjust the proportional gain
and integral gain
in real time. This enables the controller to adapt control parameters in response to changes in different operating conditions. As a result, the BPNN-PI controller offers significant advantages over the conventional PI controller.
Figure 2 illustrates the structure of the BPNN-PI controller.
The backpropagation neural network used for self-tuning consists of an input layer with four neurons, a hidden layer with four neurons, and an output layer with two neurons. During each control cycle, the network receives an input signal vector e, which includes the current system speed output (k), the reference setpoint the error between the setpoint and the system output , and an error integral term incorporating a forgetting factor. Here, the symbol k denotes the current time step.
The input vector
input is defined in Equation (13):
where Netint represents the system control error integral term incorporating a forgetting factor,
η denotes the integral forgetting factor, and
signifies the system control period. The branch of the BPNN is considered the primary path.
Input is the input vector, and
is the normalization vector; thus, the real input of the network will remain numerically small and be similar under different working conditions.
is the real input.
The neural network in this study uses an iterative process of forward and backward propagation to determine the controller parameters, which are represented as the output terms of the network. The network’s depth and width are defined by the number of layers and the number of neurons in the hidden layer, respectively. While deeper and wider architectures generally enhance model performance, they also increase the risk of overfitting and significantly raise computational demands due to the growth in nonlinear operations. Given that a four-layer perceptron has been demonstrated to approximate arbitrary functions [
17], and considering the practical constraints of online computation within a microcontroller, a network structure with a single hidden layer is adopted in this paper. It is worth noting that increasing the number of training iterations can enhance the performance of networks with a limited number of neurons. Although networks with fewer neurons consume less memory, they often require higher computational performance from the execution platform due to the increased number of iterations. Therefore, the number of neurons selected must strike a balance between hardware resource limitations and control performance requirements. Based on this consideration, the hidden layer of the neural network used in this study consists of four neurons.
Activation functions are critical in determining the nonlinear approximation capabilities of neural networks. The activation functions employed in the hidden layers of the network in this study are selected using Equation (14).
Given that the target control parameter exceeds zero, the activation function for the output layer is selected using Equation (15).
Let the weights of the hidden layer in the neural network be
, the input to the hidden layer be
, and the activation function of the hidden layer be
. Let the output of the hidden layer be
. Similarly, let the weights of the output layer be
, the input and output of the output layer be
and
, respectively, and the activation function of the output layer be
. Based on these definitions, the forward propagation process of the neural network can be calculated using Equation (16).
The inverse normalization calculation vector
=
is applied to process the output vector of the network [
18,
19], thereby obtaining the controller parameters
and
as shown in Equation (17).
where
(
x) represents the output of the PI controller and
u(
k) denotes the control input provided to the motor being controlled in Equation (18).
where
(
x) represents the servo system model in Equation (19).
The loss function of the system is formulated as the cross-entropy difference between the desired output and the actual output, as shown in Equation (20):
Backpropagation is implemented by updating each weight in the neural network to minimize the difference between the actual output and the target output provided by the system. During the backpropagation process, the derivative of the loss function
with respect to the network output is computed, as shown in Equation (21):
The derivative of the loss function
with respect to the network weights in both the hidden and output layers is expressed as Equation (22):
The iterative formulas for the network weights are shown in Equation (23).
The learning rate of the neural network is .
4. Physical Information-Driven Optimization Framework
To address the issue of degraded system performance during the initial phase caused by the randomness of the network initial values without pre-training a neural network model, this paper proposes a physical information-driven neural network PI controller optimization framework for servo systems. Based on the frequency domain tuning method for speed loop PI control parameters presented in Equation (11) of
Section 2, the threshold of the neural network output layer is determined using Equation (24).
The bandwidth of the speed loop in the experiment is set to 30 Hz. The moment of inertia of the servo system can be obtained either through a state observer or based on offline measurements.
In this paper, the acceleration of network weight iteration during the backpropagation process is achieved by directly constraining the output value of the neural network. This approach also enhances the position tracking performance of the servo system during the start-up phase. The optimization framework of the BPNN-PI controller, driven by system inertial physical information, along with the iterative optimization strategy for network weights, is illustrated in
Figure 3 and
Figure 4, respectively.
In this study, the backpropagation process of the neural network is influenced by constraining the output of the network’s output layer.
In view of the limited disturbance rejection capability of the proposed method, a load torque acquisition module is incorporated into the BPNN-PI controller optimization framework, which is driven by physical information related to system inertia. By compensating for the controller output based on the acquired load torque, the system’s anti-disturbance performance can be significantly enhanced. The load torque can be either estimated in real time using an observer or predicted in advance based on the system’s operational conditions.
Within the optimization framework introduced in this study, the Luenberger observer is employed to estimate the load torque of the servo system. This estimation is conducted in accordance with the mechanical motion equation of the PMSM.
Assuming that the sampling frequency is high enough to ensure that the load torque
does not change in period
, the load torque can be considered constant in this sampling period. According to Equation (3), the system’s state space model is represented by Equation (25).
The observed state variable is selected as follows:
Following the derivation process, the Luenberger observer takes the following form:
In Equation (27),
and
are the observer gains. By combining Equation (27) with the motor motion equation, the estimated equation of load torque can be obtained as follows:
To ensure the convergence of the observer, the following conditions must be satisfied:
To ensure the convergence of the observer, the following conditions must be satisfied:
The poles are configured as [−50, −50j] and [−50, +50j], with L = [100, −73].
The self-tuning optimization framework for the control parameters of the BPNN-PI controller, incorporating a load torque compensation link in the servo system, is illustrated in
Figure 5.
5. Simulation and Experimental Results
The experiments conducted in this study are based on a 70 W servo control system. The motor control experimental platform comprises a motor-to-drag system, a motor controller, a power supply unit, and an upper-level control mechanism. Communication between the motor controller and the host computer is achieved via Ethernet, enabling remote control functionality. The motor-to-drag system consists of a PMSM, which functions as the servo motor, and a direct current (DC) motor, which serves as the load motor. A position sensor is integrated into the system to facilitate accurate measurement. The parameters of the PMSM and the DC motor used in the servo system are listed in
Table 2. The control algorithm is implemented using a TMS320F28069 microcontroller operating at a frequency of 90 MHz, with a control loop frequency of 5 kHz. An illustration of the experimental platform is presented in
Figure 6. The simulation experiments in this paper were implemented within the MATLAB 24.2 R2024b/Simulink simulation environment. For the physical experiments, the software platforms included Code Composer Studio 10.1.0 and MATLAB 24.2 R2024b/Real-Time Simulation. The corresponding simulation results, experimental data, and source codes are provided in the
Supplementary Materials.
As previously mentioned, a PI controller is employed for both the current loop and speed loop of the PMSM, while a proportional controller is utilized for the position loop. A neural network is integrated to enable intelligent self-tuning of the control parameters within the PMSM speed loop PI controller.
To validate the proposed control methodology, simulations and experiments were conducted as follows: The initial weights of the backpropagation neural network were randomly initialized, as no pre-training of the neural network model was performed. The position tracking performance of the NN-based PI controller and the proposed optimization framework was compared under a sinusoidal position reference signal with a frequency of 5 Hz and an amplitude of π radians.
The position tracking simulation results for the three-closed-loop servo control system utilizing the BPNN PI controller are presented in
Figure 7,
Figure 8 and
Figure 9.
Using the BPNN-PI controller, the system position tracking waveform is basically fitted to the given position control signal.
Since the given position control signal is a dynamic index, the position tracking error shows periodic changes, and the position tracking error in the starting phase reaches 0.3 rads, which is much larger than that in the stable phase (0.07 rads).
The proportional control parameters and integral control parameters of the speed ring set by the neural network change with the given model of the dynamic position control.
A sinusoidal position control signal with a frequency of 5 Hz and an amplitude of π radians was applied. The position tracking simulation results of the three-closed-loop servo control system based on the proposed optimization framework are shown in
Figure 10 and
Figure 11.
The position tracking control error of the system during the initial stage is reduced from 9.741% to 3.8%, thereby preliminarily validating the effectiveness of the proposed method. By setting the control parameter tuning threshold of the neural network PI controller based on physical information, the position control performance of the servo system during the start-up phase can be significantly improved.
Although adjusting the output layer threshold of the neural network can effectively enhance the position tracking performance of the servo system during the initial phase, the system’s ability to resist external load torque disturbances is notably diminished compared to the BPNN-PI controller without threshold setting. This is primarily because the integral control parameters are constrained by the threshold.
In this study, a comparative simulation of the position tracking control performance of the servo system using the BPNN-PI controller and the improved framework was conducted under the original position control signal and a load torque of
= 7 N∙m applied at 0.4 s. The simulation results for the BPNN-PI-based system are shown in
Figure 12 and
Figure 13.
The neural network PI controller has strong anti-disturbance performance because the integral control parameters can dynamically adapt to external load changes.
The system simulation waveform generated using the enhanced framework is presented in
Figure 14 and
Figure 15.
Because the setting threshold limits the self-tuning process of the integral control parameters of the neural network controller, the system is unstable after the sudden load disturbance.
The simulation results indicate that the BPNN-PI servo control system with a threshold becomes unstable when a large load torque is abruptly applied, and its anti-disturbance performance is significantly inferior to that of the standard BPNN-PI servo control system. The threshold BPNN-PI optimization framework with integrated load torque compensation was employed under the original position control signal. At 0.4 s, the position tracking response of the servo system under a sudden load torque of
= 7 N∙m is illustrated in
Figure 16 and
Figure 17.
After the load torque compensation, the servo system has no instability after the sudden load, and its anti-disturbance ability is significantly improved.
The simulation results demonstrate that the anti-disturbance performance of the BPNN-PI optimization framework, which incorporates system inertia physical information, is significantly enhanced by adding load torque compensation. To ensure the safety of the experimental equipment, a sinusoidal position control signal with a frequency of 1 Hz and an amplitude of π radians was applied. The experimental results are presented in
Figure 18 and
Figure 19.
In the starting phase of the experimental motor, the position tracking error is large and reaches 1 rads at 0.6 s.
According to the experimental results, the improved framework proposed in this paper reduces the position tracking error from 1 radian to 0.75 radians during the start-up phase. At the same time, implementing the optimization framework can reduce the time required for the neural network to iterate to an optimal state by 0.5 s, which corresponds to approximately 1000 control cycles.
An external load current of 1.5 Amperes was abruptly introduced to conduct the disturbance rejection test. The corresponding experimental results are presented in
Figure 20,
Figure 21 and
Figure 22.
The PI controller using the BPNN has a strong anti-disturbance performance, which shows a fluctuation of 0.7 rads after a sudden load and returns to the original tracking position after 20 s of iterative adjustment of the control parameters.
After setting the self-tuning threshold of the control parameter, the position of the system after the sudden load showed a drop of 0.4 rads.
After adding load torque compensation, the position tracking error of the system reduced to 0.3 rads within 3 s.
In summary, compared with the BPNN-PI controller, the proposed method demonstrates enhanced performance in position tracking control during the start-up phase by leveraging the learned physical information regarding the system’s moment of inertia. Furthermore, the anti-disturbance capability of the proposed approach is notably improved by incorporating load torque observation. After statistical analysis of experimental data, a comparison of experimental situations is shown in
Table 3.
The proposed current optimization framework is based on physical information driven by the moment of inertia of the system, which primarily influences the neural network weight iteration process by setting a threshold during backpropagation. However, this approach lacks direct constraints on the weight iteration values, leading to repeated threshold crossings during the weight update process. As a result, there remains potential to further accelerate the neural network parameter iteration process.
Several scholars have conducted extensive research on the weight iteration process of neural networks. In reference [
20], a DRL scheme was employed to select the optimal weighting factor online within the cost function of a predictive current controller for the finite control set model of a PMSM. In this approach, a metaheuristic-based artificial neural network was trained using system static data processed by a multi-objective genetic algorithm, which helped prevent weight iterations from entering undesirable numerical regions.
Moreover, the application of backpropagation neural networks faces challenges such as difficulty in selecting an appropriate network structure and high data requirements. To address these issues, various studies have been conducted. In reference [
21], the black-winged kite optimization algorithm (BKA) was applied to optimize key parameters in variational mode decomposition (VMD), including decomposition times and maximum iteration times, as well as parameters in the BPNN, thereby significantly improving system stability. Some researchers have directly integrated intelligent algorithms with traditional control methods. For instance, in reference [
22], model predictive control was combined with a neural network to achieve high-performance motor control. In reference [
23], a torque controller incorporating a radial basis function neural network (RBFNN) compensator was proposed to mitigate the friction effects of a compliant tendon–sheath actuation (CTSA) system, effectively enhancing the tracking performance of the control system.
Looking ahead, future motor control strategies are expected to integrate intelligent algorithms, such as neural networks, with traditional control methods, like model predictive control, to further enhance the overall control performance of motor systems.