SOS-Based Nonlinear Observer Design for Simultaneous State and Disturbance Estimation Designed for a PMSM Model

: In this study, a type of nonlinear observer design is studied for a class of nonlinear systems. For the construction of the nonlinear observer, SOS-based optimization tools are utilized, which for some nonlinear dynamical systems have the advantage of transforming the problem into a more tractable one. The general problem of nonlinear observer design is translated into an SOS polynomial optimization which can be turned into an SDP problem. For a study problem, simultaneous state and disturbance estimation is considered, a cascaded nonlinear observer using a certain parameterization is constructed, and computation techniques are discussed. Cascade nonlinear observer structure is a design strategy that decomposes the problem into its components resulting in dimension reduc-tion. In this paper, SOS-based methods using the cascade design technique are represented, and a simultaneous state and disturbance signal online estimation algorithm is constructed. The method with its smaller components is given in detail, the efﬁcacy of the method is demonstrated by means of numerical simulations performed in MATLAB, and the observer is designed using numerical optimization tools YALMIP, MOSEK, and PENLAB.


Introduction
In the era of smart grids and sustainability, renewable energy sources have become more popular, requiring certain advanced forecasting methods to estimate and monitor the operation to maximize the efficiency and stability of the overall system [1]. A PMSM (Permanent Magnet Synchronous Motor) is a type of electrical motor that is used in EVs, and some variations of it are used in energy harvesting, such as the ones used in wind and tidal sources [2][3][4]. These types of harvesting mechanisms require estimation algorithms to be used in a general control algorithm and system monitoring purposes [5]. In this paper, SOS (Sum of Squares) programming-based nonlinear observer design is considered. In addition to state estimation, disturbance estimation is also studied. The resulting nonlinear observer design is detailed, with an emphasis on the parameterization and the computational aspect of the terms.
Estimation methods have gained prominence with the advent of control methods and the need to maximize efficiency and guarantee the safety of operations in the face of disturbance signals [6]. There are estimation algorithms that are used in nonlinear system state estimation, some of which can be listed as EKF (Extended Kalman Filter) [7], UKF (Unscented Kalman Filter) [8], PF (Particle Filter) [9], MHE (Moving Horizon Estimator) [10,11], SMO (Sliding Mode Observer) [12], HGO (High Gain Observer) [13], Gain scheduling LTI-based observers [14], TS (Takagi-Sugeno) observers [15], adaptive observers [16], ESO (Extended State Observer) [17], and multiple model observers [18]. EKF tends to be the one that results in a systematic design procedure. Although EKF results in accurate estimation performance for non-problematic nonlinear systems depending on the noise and the initial condition terms that can affect the operation, some numerical problems can arise during the estimation process and the error signals might diverge, which requires some additional control algorithms to be implemented that monitor the health of the estimations and the stability of the error dynamics [19]. UKF and PF are variations of EKF whose main focus is to address the non-gaussian process and measurement noise terms that EKF tolerates to a certain extent [20]. In the presence of nonlinear dynamics, the usual assumptions that enable KF (Kalman Filter) to operate efficiently no longer hold, and the PDF of the noise terms evolves during the operation. PF mainly focuses on this aspect of the problem, and consistent construction of the estimated PDF (Probability Density Function) profile of the noise terms is performed in each sampling step which has a computational price that cannot be tolerated by high dimensional nonlinear dynamical systems [21]. MHE is a different type of estimation algorithm that does not depend on an observer design. Instead, MHE considers the problem of state estimation a type of estimation that can be formulated and solved by employing online solvers to produce an estimate which is computed to minimize some stated objective term. That type of approach, although different from the usual controller or observer design, has the advantage of resulting in a tractable observer design method. With the help of specific nonlinear optimization techniques, nonlinear state estimation can be performed quite efficiently. In systems where there are symmetrical structures or intrinsic information is known a priori, explicit MHE methods can be used, as in the case of explicit MPC (Model Predictive Control), where a controller is designed for each specified region in the state space, and explicit MHE results in a set of observers, each of which is valid in a stated region in the state space-a technique that bridges the area of online computational methods and classical controller design techniques [22,23]. SMO is a nonlinear observer algorithm as its controller counterpart; it employs discontinuous functions and high gains to dominate the terms that prevent the stability of the error dynamics. SMO, due to its structure, has the ability to tolerate the exogenous signals that may deteriorate the estimation accuracy, especially if the exogenous signals enter the system through the dynamics of the measured states [24]. HGO is an observer like in SMO; it utilizes discontinuous terms to eliminate the obstructing terms. HGO requires the dynamical system to have a triangular form that limits the systems to which it can be implemented but results in a straightforward design technique [25]. TS observers are another observer type that provides a systematic approach to constructing the observer. It directly uses the information on the state space region that the system operates and, using Luenberger Observer-like structure, proposes an adaptive observer that is parameterized. The terms are computed using the LMI (Linear Matrix Inequality) optimization methods that are used in constructing LTI controllers and observers. In a way, it attempts to reduce the nonlinear observer problem into a set of linear observer design problems. The method works especially well when the system allows expressing the premise variables that can be considered as the scheduling variables in terms of the measurement signals [26]. There are extensions of TS observer design that suggest expressing the system using the polynomial terms that can be exploited using SOS optimization tools, and for low dimensional problems, it offers a clear approach [27]. Adaptive observers are mainly constructed where there is an uncertain term that prevents conventional observer design techniques from being implemented, and the observer is required to account for this parameter uncertainty. As in the case of adaptive controller design, Barbalat's Lemma and variations thereof are used to construct the observer that results in stable error dynamics [28].
Observer design mainly depends on the nonlinearity present in the system, which can be an isolated nonlinearity that can be circumvented by certain algebraic manipulations or a parameter-dependent nonlinearity that may require some adaptive scheme to be implemented [29]. In this paper, nonlinearity stemming from polynomial terms is considered where the general system does not include any discontinuous nonlinearity such as a switching term.
In this paper, the SOS-based optimization approach to constructing a nonlinear observer is represented. The approach can be summarized as turning the problem of observer design into designing a function that is used in the observer to inject a signal so that the estimation error dynamics are stable. The stability aspect in the design of the observer is different compared to the classical controller design since there is an external signal that affects the estimation process. Although this issue for some special problems can be circumvented, the observer design generally results in finding a dynamical system such that the error dynamics are input to a stable state where the disturbance signal in this context can be expressed as the estimated signal, which is derived in the following sections. Additionally, the true disturbance signal can also be accounted for by designing a system that renders the error dynamics input to a stable state where the estimation guarantees certain performance bounds.
This paper is organized as follows. In Section 2, the PMSM model is given. SOS programming is explained in Section 3. The observer design using SOS programming is detailed in Section 4. For the specific problem, observer design to estimate motor speed is given in Section 5, and load estimation is given in Section 6. The simulation results are presented in Section 7, and the overall assessment of the method is addressed in Section 8.

PMSM Model
In this study, a simplified PMSM model is used as the benchmark for testing the SOS based nonlinear observer algorithm. Detailed information on the PMSM model can be found in [30]. The model that is used is simplified to put the emphasis on the observer design and present the design procedure such that it is not excessively problem dependent. The PMSM dynamical equations are given as where x 1 and x 2 denote the currents in the alpha and beta axis, which are produced from the Clark and Park transformations that are generally carried out to simplify the control of electrical motors in the FOC scheme [31]. The motor rotor speed is denoted by x 3 , and x 4 denotes the rotor position. The inputs to the system, u 1 and u 2 , denote the stator voltage terms in the alpha and beta axis. The disturbance term is denoted by w, which represents the effect of load being applied during the operation, which deteriorates the control and observation performance. For the sake of brevity, the parameters are given by {p 1 , . . . , p 5 } that are related to the motor structure and materials. To facilitate the algebraic manipulations that are used to construct the observer, a variation of this model is obtained by defining new state terms as given by This leads to the new set of state dynamics given by d dt Using this model, the observer is designed to estimate the states and the disturbance term where the measurement states are given as where the currents are measured, which is generally done in the field of sensorless control.

SOS Optimization
In the study of polynomial construction for specified purposes, there are some constraints that are imposed on the decision object, which is a polynomial in this context. Positivity can be a constraint for the polynomial to be determined, and there is no straightforward condition that can be imposed on the coefficient of the polynomial to be computed [32]. Although this issue might be a certain consideration for some problems, the positivity constraint can be changed with a sufficient condition which is to express the polynomial as the sum of squared terms, which results in a tractable formulation [33]. Positivity of a polynomial is a reoccurring constraint for many control problems, such as Lyapunov function construction to produce a certificate of stability where the polynomial in question is required to be positive, and the derivative of the polynomial needs to be negative, which is also can be stated as an SOS optimization problem [34].
To present the idea of representing the positivity constraint with the SOS constraint, a polynomial in x ∈ R n , which is given by where this constraint can be changed with the following where Σ x denotes a set of SOS polynomials in x. This can also be stated as where the SOS constraint is a sufficient condition, and this then can be turned into an SDP problem as where m(x) denotes the monomials in x. Depending on the problem, these monomial terms can be constructed using the special information about the system in general so as to reduce the problem dimension. In the first constraint, the problem can be seen as linear programming, and the second constraint is an SDP constraint [35]. The problem of determining whether a given polynomial is positive can be formulated using the stated sufficiency condition as an SDP feasibility problem which can be solved in polynomial time [36].

SOS Based Nonlinear Observer Design
In this section, nonlinear observer designs using SOS optimization tools are given. To demonstrate the idea, first how SOS tools can be used to find a Lyapunov function to prove the stability of a given nonlinear dynamical system and then prove the ISS of a given system is formulated in the SOS optimization framework, which is necessary for constructing the observer design [37].

SOS Optimization Stability Constraints
For a given nonlinear dynamical system which is expressed as To prove stability, a Lyapunov function which is denoted by V(x) is required to be computed such that the following assumptions hold, and those constraints can be stated as which is explicitly written as where m 1 (x) and m 2 (x) denote the vector of monomials in the indeterminate of the given problem. The first two constraints are coefficient matching which can be formulated as a set of equality constraints. The last two constraints can be formulated as SDP, which results in an SDP feasibility problem.

SOS Optimization ISS Constraints
Another important problem in formulating the observer design is the constraint of input the state stability. Input to state stability is a property of a system with exogenous input being stable in the asymptotical sense when the exogenous signal is zero and the trajectories of the system being bounded by a norm-like function of the exogenous input [38]. Before the general formulation, a set of function sets are defined. The class K function set is defined as the set of scalar functions, each α : [0, ∞) → [0, ∞) being strictly increasing and α(0) = 0. The class K ∞ function set is defined as the set of scalar functions, each α : [0, ∞) → [0, ∞) being a class K function and α(s) → ∞ as s → ∞ . Class K ∞ functions are used in the definition of the ISS problem [39]. Therefore, to formulate the problem in the SOS optimization framework, another polynomial class is given, namely univariate real even polynomials that are given by where each term is a monomial of a squared term. Furthermore, univariate real even polynomials satisfying the condition s dα(s) ds ≥ 0, ∀s ∈ R can be shown to be class K ∞ functions, where these new given constraints can be formulated as an SOS problem. With the help of this property, the following theorem is given. Theorem 1. The given system, is ISS if there exist univariate real even polynomials α min , α max , σ, α and a polynomial V, as well as SOS polynomials s 1 , s 2 , s 3 , s ξ where ξ ∈ {α min , α max , σ, α} such that . .
The ISS problem formulated in the SOS optimization framework can help to construct nonlinear observers.

SOS Based Observer Design
Consider the system The observer is given as where the error terms are defined as e = x −x (33) and the error dynamics are which can be written as and the resulting error dynamics can be implicitly expressed as where f 2 () is obtained from the definitions of the f , g and R terms, where the expression R(x, u, y) must be designed such that the error dynamics are ISS.

Observer Design for Speed Estimation
The dynamics of the states measured are given as for which the observer dynamics can be written as The corresponding error dynamics are given as where R 1 (x 1 ) , R 2 (x 2 ) are designed such that the given error dynamics are inputs to a stable state. The expressions R 1 (x 1 ), R 2 (x 2 ) are determined as explained in the previous section. The problem can be transformed into an SOS feasibility optimization problem, and the coefficients of the injection functions are computed. The observation algorithm produces the injection signals that lead to the online calculation of the x 3 x 5 and x 3 x 6 terms that can help to estimate the load disturbance signal in the secondary stage of the general observation algorithm.

Observer Design for Load Estimation
Using the cascade nonlinear observer scheme in the first stage of the observation algorithm, the x 5 and x 6 terms are estimated, and these two terms are then used in the second stage observer to estimate w terms that perturb the process of estimation. The speed and load dynamics of the plant are given as where the dynamics of the load are assumed to be constant, and speed dynamics are affected by the load term. Using the dynamics of the speed and the load, the following estimator is suggested. where the x 5 . and x 6 signals are assumed to be known due to the fact that in the previous stage of the observation, the algorithm is constructed such that x 3 x 5 and x 3 x 6 signals are estimated to a certain degree. The error dynamics are given as where R 21 (x 3 ,ŵ), R 22 (x 3 ,ŵ) are designed such that the given error dynamics has inputs to state stability. The resulting observer has the ability to estimate the load signal online with specified robustness against the input voltage fluctuations and load deviations during the operation.

Numerical Simulations
For the PMSM model that is given in Section 2 and using the observer that is designed as detailed in Section 3, to analyze the performance of the nonlinear observer that is designed using numerical optimization tools YALMIP, MOSEK, and PENLAB, a set of numerical simulations are conducted using MATLAB [41][42][43]. The parameters of the PMSM model are given as [p 1 , p 2 , p 3 , p 4 , p 5 ] = [−1, 10, 10, −1.5, −1]. The speed estimator terms are given as R 1 (x 1 ) = 92.7 + 1.2(x 1 ) 2 (53) and the load-estimation-related terms are given as The resulting Lyapunov function for the estimation error dynamics is omitted due to space considerations. The simulation-related input and disturbance terms are given in Table 1. Table 1. Simulation input and disturbance terms during the operation.
The state estimates that are produced by the first stage of the nonlinear observer are given in Figure 1, where the true , states and , states are estimated. Using the , estimates produced by the first stage of the nonlinear observer, and terms are estimated. In Figure 2, the estimation performance of and terms that are denoted by and are given. Using the and terms, the speed state is estimated, and it is given in Figure 2. Additionally, the load estimation error signal is given in Figure 2, which demonstrates the effect of load and input voltage fluctuations on the estimation and the capability of the observer to suppress the deteriorating effects of the changes.
In the second stage of the numerical simulations, the parameter uncertainty case is studied where parameters of the plant are perturbed, and the performance of the estimation algorithm, which is designed based on the nominal parameters given previously, is analyzed. As can be seen in Figure 3, the estimator is sufficient in dealing with the parameter uncertainty, where the parameters are perturbed up to 10% in the series of simulations. In general, the disturbance estimation is affected by the parameter uncertainty case, where the state estimation performance of the system stays unaffected. Using the x 5 , x 6 estimates produced by the first stage of the nonlinear observer, x 3 and w terms are estimated. In Figure 2, the estimation performance of x 3 x 5 and x 3 x 6 terms that are denoted by x 35 and x 36 are given. Using the x 5 and x 6 terms, the x 3 speed state is estimated, and it is given in Figure 2. Additionally, the load estimation error signal is given in Figure 2, which demonstrates the effect of load and input voltage fluctuations on the estimation and the capability of the observer to suppress the deteriorating effects of the changes.
In the second stage of the numerical simulations, the parameter uncertainty case is studied where parameters of the plant are perturbed, and the performance of the estimation algorithm, which is designed based on the nominal parameters given previously, is analyzed. As can be seen in Figure 3, the estimator is sufficient in dealing with the parameter uncertainty, where the parameters are perturbed up to 10% in the series of simulations. In general, the disturbance estimation is affected by the parameter uncertainty case, where the state estimation performance of the system stays unaffected.

Conclusions
In the paper, an SOS-optimization-based nonlinear observer design is studied. The final observer is designed to estimate the states and disturbance signals simultaneously.

Conclusions
In the paper, an SOS-optimization-based nonlinear observer design is studied. The final observer is designed to estimate the states and disturbance signals simultaneously.

Conclusions
In the paper, an SOS-optimization-based nonlinear observer design is studied. The final observer is designed to estimate the states and disturbance signals simultaneously. Considering a PMSM model, the design methodology is given in detail, and the performance of the observer is assessed using a numerical simulation. To reduce the general SOS optimization computation complexity and the problem dimension in general, exploiting the PMSM model structure, a cascaded nonlinear observer scheme is employed. In addition to that, since the measurements are a linear combination of the state vector, the general injection function is written as the function of the estimate terms, which also reduces the SOS optimization problem dimension. The given ISS problem formulation in terms of SOS optimization is another important step in formulating the general nonlinear observer design problem as an SOS feasibility problem which can be solved with the help of numerical optimization tools such as YALMIP, MOSEK, and PENLAB.