Main Content

Sliding Mode Observer

Compute electrical position and mechanical speed of a surface-mount PMSM

  • Library:
  • Motor Control Blockset / Sensorless Estimators

Description

The Sliding Mode Observer block computes the electrical position and mechanical speed of a Surface Mount PMSM by using the voltage and current values along the α- and β-axes of the stationary αβ reference frame.

Equations

These equations describe the discrete-time operation of a PMSM:

iαβ(k+1)=Aiαβ(k)+Bvαβ(k)Beαβ(k)

eαβ(k+1)=eαβ(k)+Tsωe(k)Jeαβ(k)

J=[0110]

Φ=[RL00RL]

A=eΦTs

B=0TseΦτdτ=[b00b]

b=1eRTs/LR

These equations describe the discrete-time sliding mode observer operation of a surface mount PMSM:

i^αβ(k+1)=Ai^αβ(k)+Bvαβ(k)Be^αβ(k)ηSign(i˜αβ(k))

e^αβ(k+1)=e^αβ(k)+B1g(i˜αβ(k)Ai˜αβ(k1)+ηSign(i˜αβ(k1)))

i˜αβ(k)=i^αβ(k)iαβ(k)

e˜αβ(k)=e^αβ(k)eαβ(k)

If the back EMF observer fulfils the conditions |eαβ(k+1)eαβ(k)|m and g(0,1), there exists a k0, such that:

e˜αβ(k)<mg

If the sliding mode observer fulfils these conditions:

  • g(0,1)

  • |eαβ(k+1)eαβ(k)|m

  • η>bmg

then there exists a k=k0, such that for k≥k0:

|i˜αβ(k)|η+bmg

where:

  • eα and iα are the stator back EMF and current for the α axis

  • eβ and iβ are the stator back EMF and current for the β axis

  • α and ĩα are the errors in the stator back EMF and current for the α axis

  • β and ĩβ are the errors in the stator back EMF and current for the β axis

  • vα and vβ are the stator supply voltages

  • R is the stator resistance

  • L is the stator inductance

  • g is the back EMF observer gain

  • η is the current observer gain

  • ωe is the electrical angular velocity

  • Ts is the sampling period

  • k is the sample count

Tuning

Use these steps to tune the block using the Current observer gain (η) and Back-emf observer gain (g) parameters.

  • Select a back-emf observer gain (g) value such that g(0,1). Bringing g close to the value 1, results in less error in the estimated back-emf. However, this makes convergence slow.

  • Select a value of m based on the block sample time and maximum slope of the operating back-emf (such that |eαβ(k+1)eαβ(k)|m).

  • Select a current observer gain (η) value based on b, m, and g (such that η>bmg).

Note

The block functions correctly when you tune the sliding mode observer gains.

When using open-loop control to run a motor, compute the rotor position using both sliding mode observer and an actual sensor hardware and compare the computed position values. If the difference is acceptable, the block functions correctly. Otherwise, manually tune the sliding mode observer gains to ensure that the block functions accurately.

The transition from open-loop control to closed-loop control may fail due to noise in the currents and voltages. To make a successful transition, try reducing the value of the Filter cut-off frequency (Hz) parameter.

Ports

Input

expand all

Voltage component along the α-axis of the stationary αβ reference frame.

Data Types: single | double | fixed point

Voltage component along the β-axis of the stationary αβ reference frame.

Data Types: single | double | fixed point

Current component along the α-axis of the stationary αβ reference frame.

Data Types: single | double | fixed point

Current component along the β-axis of the stationary αβ reference frame.

Data Types: single | double | fixed point

The pulse (true value) that resets and restarts the processing of the block algorithm.

Data Types: single | double | fixed point

Output

expand all

The estimated electrical position of the rotor.

Data Types: single | double | fixed point

The estimated mechanical speed of the rotor.

Data Types: single | double | fixed point

Parameters

expand all

Unit of the input voltage and current components along the α-axis and β-axis of the stationary αβ reference frame.

The fixed time interval (in seconds) between every two consecutive instances of block execution.

Motor parameters

Stator phase winding resistance (in ohm).

Stator phase winding inductance (in Henry).

Maximum speed (in RPM) that the block can support. For a speed beyond this value, the block generates incorrect outputs.

Number of pole pairs available in the motor.

The maximum phase voltage applied to the PMSM. For details, see Per-Unit System.

The maximum measurable current supplied to the PMSM. For details, see Per-Unit System.

Note

The Sliding Mode Observer block might occasionally display the warning message 'Wrap on overflow detected.'

Observer Parameters

The gain that ensures the convergence of the back-emf observer.

The gain that ensures the convergence of the current observer.

The cut-off frequency of the internal low-pass IIR filter. The cut-off frequency value must be greater than or equal to the maximum electrical frequency.

Click Compute default parameters to calculate approximate observer gains and the filter coefficient and update these fields. For this calculation, we set g to 0.9, computed m at twice the rated speed, and set η to 1.1(bmg).

Datatypes

Unit of the position output.

Data type of the position output.

Unit of the speed output.

Data type of the speed output.

References

[1] 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

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

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

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced in R2021b