# Sliding Mode Observer

Motor Control Blockset / Sensorless Estimators

## 描述

Sliding Mode Observer 模块通过使用静止 αβ 参考系的 α 轴与 β 轴上的电压和电流值来计算 Surface Mount PMSM 的电气位置和机械转速。

### 方程

`${i}_{\alpha \beta \left(k+1\right)}=A{i}_{\alpha \beta \left(k\right)}+B{v}_{\alpha \beta \left(k\right)}-B{e}_{\alpha \beta \left(k\right)}$`
`${e}_{\alpha \beta \left(k+1\right)}={e}_{\alpha \beta \left(k\right)}+{T}_{s}{\omega }_{e\left(k\right)}J{e}_{\alpha \beta \left(k\right)}$`
`$J=\left[\begin{array}{cc}0& -1\\ 1& 0\end{array}\right]$`
`$\Phi =\left[\begin{array}{cc}-\frac{R}{L}& 0\\ 0& -\frac{R}{L}\end{array}\right]$`
`$A={e}^{\Phi {T}_{s}}$`
`$B=\underset{0}{\overset{{T}_{s}}{\int }}{e}^{\Phi \tau }d\tau =\left[\begin{array}{cc}b& 0\\ 0& b\end{array}\right]$`
`$b=\frac{1-{e}^{-R{T}_{s}/L}}{R}$`

`${\stackrel{^}{i}}_{\alpha \beta \left(k+1\right)}=A{\stackrel{^}{i}}_{\alpha \beta \left(k\right)}+B{v}_{\alpha \beta \left(k\right)}-B{\stackrel{^}{e}}_{\alpha \beta \left(k\right)}-\eta Sign\left({\stackrel{˜}{i}}_{\alpha \beta \left(k\right)}\right)$`
`${\stackrel{^}{e}}_{\alpha \beta \left(k+1\right)}={\stackrel{^}{e}}_{\alpha \beta \left(k\right)}+{B}^{-1}g\left({\stackrel{˜}{i}}_{\alpha \beta \left(k\right)}-A{\stackrel{˜}{i}}_{\alpha \beta \left(k-1\right)}+\eta Sign\left({\stackrel{˜}{i}}_{\alpha \beta \left(k-1\right)}\right)\right)$`
`${\stackrel{˜}{i}}_{\alpha \beta \left(k\right)}={\stackrel{^}{i}}_{\alpha \beta \left(k\right)}-{i}_{\alpha \beta \left(k\right)}$`
`${\stackrel{˜}{e}}_{\alpha \beta \left(k\right)}={\stackrel{^}{e}}_{\alpha \beta \left(k\right)}-{e}_{\alpha \beta \left(k\right)}$`

`${\stackrel{˜}{e}}_{\alpha \beta \left(k\right)}<\frac{m}{g}$`

• $g\in \left(0,1\right)$

• $|{e}_{\alpha \beta \left(k+1\right)}-{e}_{\alpha \beta \left(k\right)}|\le m$

• $\eta >b\frac{m}{g}$

`$|{\stackrel{˜}{i}}_{\alpha \beta \left(k\right)}|\le \eta +b\frac{m}{g}$`

• eα 和 iα 是 α 轴的定子反电动势和电流

• eβ 和 iβ 是 β 轴的定子反电动势和电流

• α 和 ĩα 是 α 轴的定子反电动势和电流误差

• β 和 ĩβ 是 β 轴的定子反电动势和电流误差

• vα 和 vβ 是定子电源电压

• R 是定子电阻

• L 是定子电感

• g 是反电动势观测器增益

• η 是电流观测器增益

• ωe 是电角速度

• Ts 是采样周期

• k 是采样计数

### 调节

• 选择反电动势观测器增益 (g) 值，使得 $g\in \left(0,1\right)$。使 g 接近值 `1` 会减少估计的反电动势的误差。然而，这会使得收敛变慢。

• 根据模块采样时间和工作反电动势的最大斜率选择值 m（使得 $|{e}_{\alpha \beta \left(k+1\right)}-{e}_{\alpha \beta \left(k\right)}|\le m$）。

• 基于 b、m 和 g 选择当前观测器增益 (η) 值（使得 $\eta >b\frac{m}{g}$）。

## 参数

### 电机参数

Sliding Mode Observer 模块可能偶尔会显示警告消息 `'Wrap on overflow detected``'`

## 参考

[1] A. Podder and D. Pandit, "Study of Sensorless Field-Oriented Control of SPMSM Using Rotor Flux Observer & Disturbance Observer Based Discrete Sliding Mode Observer," 2021 IEEE 22nd Workshop on Control and Modelling of Power Electronics (COMPEL), 2021, pp. 1-8. (doi: 10.1109/COMPEL52922.2021.9645939)

[2] T. Bernardes, V. F. Montagner, H. A. Gründling, and H. Pinheiro, "Discrete-Time Sliding Mode Observer for Sensorless Vector Control of Permanent Magnet Synchronous Machine," in IEEE Transactions on Industrial Electronics, vol. 61, no. 4, pp. 1679-1691, 2014

[3] B. Bose, Modern Power Electronics and AC Drives. Prentice Hall, 2001. ISBN-0-13-016743-6.

[4] J. Liu and X. Wan, "Advanced Sliding Mode Control for Mechanical Systems". Springer-Verlag Berlin Heidelberg, 2011.