Abstract
This work proposes a nonlinear modeling of a permanent magnet synchronous motor (PMSM) based on state space neural networks. The state space neural network is trained and the state variables (currents in a direct–quadrature frame and the rotational speed) are estimated by considering a robust Unscented Kalman Filter (UKF). Two contributions are presented in this work: the fist one is a nonlinear modeling structure for a PMSM based on a state space neural network that allows real-time parameter identification, and the second one is PMSM neural network training and state estimation based on a robust UKF. The robustness of the UKF is obtained by using a singular value decomposition of the covariance matrix. A comparison analysis is performed over a real PMSM motor by considering the proposed approach and a linear approximation of the nonlinear model where the states and parameters are computed by using an Extended Kalman Filter. The identified model is validated in closed loop by considering a nonlinear control strategy based on state feedback linearization.
1. Introduction
The control of permanent magnet synchronous motors (PMSMs) requires a detailed modeling of the system. A PMSM is a nonlinear system and therefore the best performance can be achieved by applying nonlinear controllers. Even when field-oriented control (FOC) techniques based on PID are widely used, state feedback controllers are more suitable to modify the inner structure of the system in order to obtain the decoupled behavior of the system. However, the state feedback controllers require the estimation of the states of the system. For example, in [1] is proposed a nonlinear optimal controller based on exact feedback linearization, but considering that the state variables are directly measured. However, in several cases, the state variables are not directly measured, and therefore the state variables need to be estimated.
The UKF has been widely used for estimation of the states of nonlinear systems, where an improvement is obtained for the covariance estimation in comparison to linearized approaches, like the Extended Kalman Filter (EKF) [2]. In [3], a dual UKF for state and parameter estimation is proposed for synchronous generators with unknown parameters, by considering a constrained iterated approach.
In [4], model predictive control is presented based on an identified model where the parameters are estimated for a PMSM. In [5], several state estimators of a PMSM are proposed, based on a UKF, and are compared by considering load torque and flux linkage identification, where the superiority of the augmented model based on the UKF is validated in simulations, and also in [6] a comparison of the EKF and UKF is presented for position sensorless state estimation in a PMSM where the load torque and flux linkage are identified.
In [7], sensorless speed control of a PMSM based on a UKF is proposed where the state variables are estimated based on measurements. In [8], a UKF-based sensor fault diagnosis of PMSM drives in electric vehicles is proposed, where three UKFs are used to detect and isolate current sensor and position sensor faults of the PMSM drive system.
In [9], several UKF variations are evaluated for PMSM state estimation in order to perform sensorless control. In [10], sensorless direct torque control of a PMSM based on a UKF is proposed for torque control. In [11], a robust adaptive UKF for nonlinear estimation with uncertain noise covariance is proposed. In addition, in [12] a nonlinear model predictive control based on an EKF and UKF is proposed for a brushless direct current (BLDC) motor with state estimation.
In this work, a nonlinear modeling of a PMSM is proposed based on state space neural networks, where the neural network is trained and the state variables (currents in a direct–quadrature frame and the rotational speed) are estimated by considering a robust Unscented Kalman Filter (UKF). A comparison analysis is performed by considering a linear approximation of the nonlinear model where the states and parameters are computed by using an Extended Kalman Filter. The model is evaluated in simulation and validated by using an exact feedback linearization control structure. Figure 1 presents a block diagram that summarizes the proposed approach.
Figure 1.
Block diagram that summarizes the proposed approach.
The main contributions of this work can be summarized as follows: the fist one is a nonlinear modeling structure for a PMSM that allows real-time parameter identification, and the second one is the PMSM nonlinear model’s neural network training process based on a robust UKF, which allows real-time implementation. This paper is organized as follows: in Section 2, a theoretical framework where a dual UKF for state and parameter estimation is proposed. In Section 3, the experimental setup, results, and conclusion are evaluated by comparing the proposed approach by using an EKF. Finally, in Section 4 the conclusions and future works are presented.
2. Theoretical Framework
2.1. Discrete State Space Nonlinear Modeling of a PMSM
In [1] is presented a discrete-time nonlinear model of a PMSM described in a direct−quadrature framework, which can be represented as follows:
with
being the state space neural network, defined as
and where
is defined as follows
the state vector x is defined as
and where w is the vector of PMSM model parameters, defined as
with
being the
-th state at sample k () and
the
-th state at sample
(), and where
and
are the direct and quadrature currents, and
is the rotational speed. The input vector u is defined as
where
and
are the direct and quadrature voltages, respectively. Finally, the external disturbance
is the torque load. In addition,
is the additive Gaussian noise with zero mean and covariance matrix
with variance
.
It is worth mentioning that (2) describes a bilinear model where
are the inputs and cross-correlated variables of the neural network and w are the weights of the neural network, assuming that the activation functions are linear with no bias. This simplified structure corresponds to an adaptive linear network (ADALINE), but can be generalized to any other neural network structure. By assuming that the output is the rotational speed
, the measurement equation of the nonlinear system can be defined by
where
is the additive Gaussian noise with zero mean and covariance matrix
with variance
, and where C is defined as
It is worth mentioning that the rotational speed
is the state space variable
, which is assumed to be the only measured state variable of the PMSM. Moreover, it is assumed that the external disturbance
is also measured and therefore the state estimation and the model identification must be computed based only on the measurements of
and
.
2.2. Robust Neural Network Training and State Estimation by a Dual UKF
The structure of the state space neural network proposed in (1) and (2) allows us to adequately model the dynamics of the PMSM. However, the main assumption is that the PMSM model is unknown and must be identified, which involves the neural network training process to find w. In order to design a robust state space-based nonlinear control of the PMSM system by considering the additive noise
and
, an additional estimation of the states of the PMSM is required. Therefore, two processes must be considered: state estimation and model identification. In this work, a dual UKF is designed for state estimation and model identification.
In order to perform the state space neural network training of the nonlinear PMSM model, a dual estimation based on a UKF [13] is proposed. The proposed approach includes a robust computation of the sigma points based on a singular value decomposition (SVD) for the state estimation stage [14].
The KF for parameter estimation of the nonlinear PMSM model is performed by considering that the evolution of the parameters w is defined as follows:
with
being the additive Gaussian noise with zero mean and covariance matrix
, and where
is the covariance matrix of the parameters w.
It is worth noting that the covariance matrix of the states
is decomposed by using the SVD as follows:
with
being the singular values, and where the columns of U and V are called the left singular vectors and right singular vectors of
, respectively. Therefore, the sigma points X are computed by considering x and the expressions
and
.
The aforementioned methodology is computed by a using a sequential approach, where the time update equations for parameters and states are performed as follows:
with
being the prior covariance matrix of the states, and
the prior rotational output, and where the measurement update equations are defined by
with
being the covariance matrix of the output
,
the cross-correlated covariance matrix between the output and the states, and
and
the Kalman Filter gains for th states and parameters, respectively. In addition,
, as described in (3), is computed at each iteration at
as follows:
where
and
are defined as
with L being the number of state variables of x,
, the spread of the sigma points X is defined by
,
,
for Gaussian distributions, and
.
It is worth mentioning that compared to traditional Cholesky decomposition [13], the SVD presented in (13) provides a more robust computation of the sigma points, which is a desirable property for systems with sequential estimation of states and parameters [15].
2.3. Exact Feedback Linearization in Discrete Time
In discrete time, the exact feedback linearization control scheme for the PMSM is described in [1]; the control law for
and
can be computed in function of the PMSM model parameters and states variables as follows:
with
being the integral tracking error, computed as
with
being the sampling time,
the desired output, and
the measured output.
3. Results
Experimental Setup
In order to evaluate the performance of the proposed control approach, a low-voltage three-phase PMSM Teknic M-2310P-LN-04K system(Tecknic, Inc., Victor, NY, USA) is considered. Table 1 shows the PMSM Teknic M-2310P-LN-04K parameters from the manufacturer.
Table 1.
PMSM Teknic M-2310P-LN-04K parameters.
By considering a sampling time
s, the following discrete model for the PMSM is obtained:
It is worth noting that (34) is the simulated PMSM model, where the state variable
(rotational speed
) is the only state space variable that is measured and it is assumed that the torque load is also measured.
The following controller gains are considered [1]:
The outputs of the closed-loop responses, considering a UKF with a
variance of 5 and
variance of 100, are shown in Figure 2. The term “Measured” in the figure caption corresponds to the variables that are measured in the simulated PMSM model. On the other hand, the term “Estimated” corresponds to the variables that are computed by the Kalman Filter.
Figure 2.
Outputs of UKF considering
variance of 5 and
variance of 100.
The states
,
, and
of the closed-loop responses, considering the UKF of Figure 2, are shown in Figure 3.
Figure 3.
States of UKF considering
variance of 5 and
variance of 100.
The inputs
and
of the closed-loop responses, considering the UKF of Figure 2, are shown in Figure 4.
Figure 4.
Inputs of UKF considering
variance of 5 and
variance of 100.
And finally, the evolution of the parameters of the PMSM model, which are estimated from the closed-loop responses by considering the UKF of Figure 2, are shown in Figure 5.
Figure 5.
Parameters of UKF considering
variance of 5 and
variance of 100.
It is noticeable that the currents and voltages of the PMSM shown in Figure 4 and Figure 3 are over the limits of the PMSM parameters shown in Table 1. However, in order to reduce the magnitude of those variables, the controller gains must be modified, which is out of the scope of this work.
A comparison is performed by considering a dual EKF, as proposed in [16]. The corresponding equations for the EKF adapted for the PMSM identification and state estimation are described as follows:
with
being computed as follows:
and the measurement update equations being defined by
In Figure 6 are shown closed-loop responses considering an EKF with a
variance of 5 and
variance of 100.
Figure 6.
Outputs of EKF considering
variance of 5 and
variance of 100.
The states
,
, and
of the closed-loop responses, considering the EKF of Figure 6, are shown in Figure 7.
Figure 7.
States of EKF considering
variance of 5 and
variance of 100.
The inputs
and
of the closed-loop responses, considering the EKF of Figure 6, are shown in Figure 8.
Figure 8.
Inputs of EKF considering
variance of 5 and
variance of 100.
And finally, the evolution of the parameters of the PMSM model, which are estimated from the closed-loop responses by considering the EKF of Figure 6, are shown in Figure 9.
Figure 9.
Parameters of EKF considering
variance of 5 and
variance of 100.
An additional evaluation is performed by considering several levels of noise (considering a variance
of 10, 25, 50, and 100 and a variance
of 100, 250, 500, and 1000) for the dual UKF estimation with closed-loop response.
In Figure 10 are shown the corresponding outputs for the closed-loop response for each one of the noise variances. It can be seen that the outputs of the closed-loop system effectively track the set-points
.
Figure 10.
Noise comparison for the output UKF considering
variance of 10, 25, 50, and 100 and
variance of 100, 250, 500, and 1000.
In Table 2 is shown a comparison of the root mean squared error (RMSE) between the speed reference set-point and the estimated rotational speed of the results presented in Figure 10 for each level of
and
.
Table 2.
RMSE noise comparison.
From Table 2, it can be seen that the RMSE has a small increase with the noise levels but reference tracking is still achieved even under the several noise conditions. This result is consistent with the results presented in Figure 10.
In Figure 11 is shown the estimation of the corresponding parameters for the closed-loop response for each of the noise variances. It can be seen that the parameters of the closed-loop system effectively tend to a steady-state value even under noise conditions.
Figure 11.
Noise comparison for the parameters UKF considering
variance of 10, 25, 50, and 100 and
variance of 100, 250, 500, and 1000.
An additional test with higher speed is performed in order to evaluate the proposed approach by considering
and
. A speed change from 800 to 1000 RPM is considered with the same torque variation shown in Figure 2. This additional test is shown in Figure 12, where the UKF is used by assuming initial states and parameters equals to zero.
Figure 12.
High-speed reference tracking test from 800 to 1000 RPM.
It can be seen that the proposed approach is still valid for higher speed tracking requirements.
4. Conclusions
In this work is presented a novel nonlinear modeling of a PMSM where the model parameters are identified and the state variables (currents in a direct–quadrature frame and the rotational speed) are estimated by considering a robust Unscented Kalman Filter (UKF) in real time. The proposed nonlinear model structure allows us to identify the model’s parameters in real time. In addition, the robust UKF structure is designed specifically for the PMSM nonlinear model in order to allow its application in real time. It is worth noting that since the UKF allows a state estimation of the model, the validation of the proposed approach is performed in closed loop based on a nonlinear control method, exact feedback linearization. It can be seen in the results that the proposed approach effectively estimates the nonlinear model as well as the state estimation, which makes the proposed approach suitable for real-time implementation. It is worth noting that due to the noise, the control signals are over the limits of the PMSM operational range, and therefore the controller gains must be recalculated. This task can be considered in a future work. However, by considering the performance of the controller, it can be seen that the PMSM model parameters and the state vectors (,
, and
) are estimated by considering only the rotational speed
and the torque load
measurements, and the PMSM system is effectively controlled in terms of speed tracking and torque variation. The proposed approach is validated by comparing it to the EKF and it is shown that the control signals and states estimated by the EKF show higher levels of noise in comparison with the UKF state estimate. In addition, it can be seen that the proposed approach is valid over several levels of noise.
Author Contributions
Conceptualization, S.V.-G.; formal analysis, E.G.; methodology, S.V.-G.; software (Matlab 2021b), S.V.-G.; supervision, E.G.; writing—original draft, S.V.-G.; writing—review and editing, S.V.-G. and E.G. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data presented in this study are available on request from the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Velarde-Gomez, S.; Giraldo, E. Real-Time Identification and Nonlinear Control of a Permanent-Magnet Synchronous Motor Based on a Physics-Informed Neural Network and Exact Feedback Linearization. Information 2024, 15, 577. [Google Scholar] [CrossRef] [Scilit]
- Wan, E.; Van Der Merwe, R. The unscented Kalman filter for nonlinear estimation. In Proceedings of the IEEE 2000 Adaptive Systems for Signal Processing, Communications, and Control Symposium (Cat. No.00EX373), Lake Louise, AB, Canada, 4 October 2000; pp. 153–158. [Google Scholar] [CrossRef] [Scilit]
- Rouhani, A.; Abur, A. Constrained Iterated Unscented Kalman Filter for Dynamic State and Parameter Estimation. IEEE Trans. Power Syst. 2018, 33, 2404–2414. [Google Scholar] [CrossRef] [Scilit]
- Fang, S.; Zhang, X. A Parameter-Free Model Predictive Current Control for PMSM Drives Based on Motor Parameter Estimation. In Proceedings of the 2024 IEEE 10th International Power Electronics and Motion Control Conference (IPEMC2024-ECCE Asia), Chengdu, China, 17–20 May 2024; pp. 858–862. [Google Scholar] [CrossRef] [Scilit]
- Horváth, K. Load Torque and Permanent Magnet Flux Linkage Estimation of Surface-Mounted PMSM by Using Unscented Kalman Filter. In Proceedings of the 2023 International Conference on Electrical Drives and Power Electronics (EDPE), High Tatras, Slovakia, 25–27 September 2023; pp. 1–8. [Google Scholar] [CrossRef] [Scilit]
- Horváth, K. Position sensorless extended and unscented Kalman filters with permanent magnet flux linkage and load torque estimation for surface-mounted PMSM. Automatika 2024, 65, 1201–1212. [Google Scholar] [CrossRef] [Scilit]
- Moon, C.; Nam, K.H.; Jung, M.K.; Chae, C.H.; Kwon, Y.A. Sensorless speed control of permanent magnet synchronous motor using Unscented Kalman Filter. In Proceedings of the 2012 Proceedings of SICE Annual Conference (SICE), Akita, Japan, 20–23 August 2012; pp. 2018–2023. [Google Scholar]
- Zhou, N.; He, H.; Liu, Z.; Zhang, Z. UKF-based Sensor Fault Diagnosis of PMSM Drives in Electric Vehicles. Energy Procedia 2017, 142, 2276–2283. [Google Scholar] [CrossRef] [Scilit]
- Moon, C.; Park, J.S.; Kwon, Y.A.; Kennel, R.M. Unscented transformnations of UKF for sensorless speed control of PMSM. In Proceedings of the TENCON 2015—2015 IEEE Region 10 Conference, Macao, China, 1–4 November 2015; pp. 1–4. [Google Scholar] [CrossRef] [Scilit]
- Chen, Z.; Wang, L.; Liu, X. Sensorless Direct Torque Control of PMSM using Unscented Kalman Filter*. IFAC Proc. Vol. 2011, 44, 4380–4385. [Google Scholar] [CrossRef] [Scilit]
- Zheng, B.; Fu, P.; Li, B.; Yuan, X. A Robust Adaptive Unscented Kalman Filter for Nonlinear Estimation with Uncertain Noise Covariance. Sensors 2018, 18, 808. [Google Scholar] [CrossRef] [Scilit]
- Ubare, P.; Ingole, D.; Sonawane, D. Nonlinear Model Predictive Control of BLDC Motor with State Estimation. IFAC-PapersOnLine 2021, 54, 107–112. [Google Scholar] [CrossRef] [Scilit]
- Wan, E.A.; Van Der Merwe, R.; Nelson, A.T. Dual estimation and the unscented transformation. In Proceedings of the 12th International Conference on Neural Information Processing Systems, Cambridge, MA, USA, 29 November–4 December 1999; NIPS’99. pp. 666–672. [Google Scholar]
- Kulikov, G.Y.; Kulikova, M.V. Hyperbolic-SVD-Based Square-Root Unscented Kalman Filters in Continuous-Discrete Target Tracking Scenarios. IEEE Trans. Autom. Control 2022, 67, 366–373. [Google Scholar] [CrossRef] [Scilit]
- Zhao, G.; Jiang, Z.; Wang, J.; Gao, S. A Robust SVD-UKF Algorithm and Its Application in Integrated Navigation Systems. Adv. Space Res. 2024, 75, 1902–1912. [Google Scholar] [CrossRef] [Scilit]
- Khodadadi, H.; Jazayeri-Rad, H. Applying a dual extended Kalman filter for the nonlinear state and parameter estimations of a continuous stirred tank reactor. Comput. Chem. Eng. 2011, 35, 2426–2436. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).











