# High-Performance Speed Control of PMSM Using Fuzzy Sliding Mode with Load Torque Observer
## 3 Controller Design
### Load Torque Observer Design  
In a single-degree-of-freedom closed-loop control, the system has to wait for the disturbance to occur, and only when the system output changes, leading to a change in the deviation, will the output of the controller change. In this adjustment process, the suppression of the disturbance is not timely. The root cause of this problem is that a single degree of freedom cannot balance the tracking ability and the disturbance rejection ability simultaneously. For single-degree-of-freedom closed-loop control, only after the disturbance occurs and the system output changes, which in turn causes the deviation to change, can the output of the controller change. In such an adjustment process, the suppression of the disturbance is not timely. The root cause of this problem is that a single degree of freedom cannot take into account both the tracking performance and the disturbance rejection performance. To improve the immunity of the system to the load torque fluctuations, in this paper, a two-degree-of-freedom scheme combining torque observation compensation with sliding mode control is designed. The speed can be measured, but the load torque can not be measured, as can be seen from Equation (3). Selecting \(x=\left[\omega_{m}T_{l}\right]^{T}\), \(u=T_{e}\), \(y=\omega_{m}\). When the sampling period is very small, the load torque is assumed to be constant during a sampling period, and the state space expression is obtained as  
\[\begin{bmatrix}\dot{\omega}_{m}\\ \dot{T}_{l}\end{bmatrix}=\begin{bmatrix}0&-\frac{1}{f}\\ 0&0\end{bmatrix}\begin{bmatrix}\omega_{m}\\ T_{l}\end{bmatrix}+\begin{bmatrix}\frac{1}{f}\\ 0\end{bmatrix}T_{e}=Ax+Bu \tag{21}\]  
\[y=\begin{bmatrix}1&0\end{bmatrix}\begin{bmatrix}\omega_{m}\\ T_{l}\end{bmatrix}=Cx \tag{22}\]  
As can be seen from Figure 1, when the observed load torque \(\hat{T}_{l}\) is obtained, the equivalent compensation current for the external load can be obtained through \(i_{dref}=\hat{T}_{l}/k_{t}\). According to the observability criterion theorem, it can be obtained as  
\[Rank[Q_{c}]=Rank\begin{bmatrix}1&0\\ 0&-\frac{1}{f}\end{bmatrix}=2 \tag{23}\]  
It is obvious that the system is observable.  
The configuration of the Luenberger observer is as follows:  
\[\left\{\begin{array}{l}\dot{\hat{x}}=A\hat{x}+Bu+L(y-\hat{y})\\ \hat{y}=C\hat{x}\end{array}\right. \tag{24}\]  
where \(L=\left[L_{1}L_{2}\right]^{T}\).  
Substitute \(\hat{y}=C\hat{x}\) in Equation (24) into \(\dot{\hat{x}}=(A-LC)\hat{x}+Bu+Ly\), it can obtained as  
\[\dot{\hat{x}}=(A-LC)\hat{x}+Bu+Ly \tag{25}\]  
Substitute Equations (21)-(25)  
\[\begin{bmatrix}\dot{\hat{\omega}}_{m}\\ \dot{\hat{T}}_{l}\end{bmatrix}=\begin{bmatrix}-L_{1}&-\frac{1}{J}\\ -L_{2}&0\end{bmatrix}\begin{bmatrix}\dot{\omega}_{m}\\ \dot{\hat{T}}_{l}\end{bmatrix}+\begin{bmatrix}\frac{1}{J}\\ 0\end{bmatrix}T_{e}+\begin{bmatrix}L_{1}\\ L_{2}\end{bmatrix}\omega_{m} \tag{26}\]  
\[\dot{\hat{\omega}}_{m}=\frac{1}{J}[T_{e}-\hat{T}_{l}+JL_{1}(\omega_{m}-\hat{ \omega}_{m})] \tag{27}\]  
\[\dot{\hat{T}}_{l}=L_{2}(\omega_{m}-\hat{\omega}_{m}) \tag{28}\]  
From Equations (27) and (28), the load torque can be observed only by the electromagnetic torque of the motor and the actual speed of the motor, without adding additional hardware equipment.  
In order to make the observed values approach the true values, the eigenvalues \(\lambda_{1}\) and \(\lambda_{2}\) of the matrix \(A-LC\) should be made less than 0 [24]. This is deduced from the characteristic polynomial:  
\[\lambda^{2}+L_{1}\lambda-\frac{L_{2}}{J}=0 \tag{29}\]  
from which the relationships \(\lambda_{1}\lambda_{2}=L_{1}\) and \(\lambda_{1}+\lambda_{2}=-\frac{L_{2}}{J}\) are obtained. Therefore, the values can be calculated:  
\[L_{1}=\lambda_{1}\lambda_{2},\ L_{1}=-J(\lambda_{1}+\lambda_{2}) \tag{30}\]  
By selecting appropriate \(\lambda_{1}\) and \(\lambda_{2}\) to ensure that the speed at which the observed load torque approaches, the actual value is optimized. The convergence speed increases with the larger absolute values of \(\lambda_{1}\) and \(\lambda_{2}\).