# Rotating Air Gap

**Libraries:**

Simscape /
Electrical /
Electromechanical

## Description

The Rotating Air Gap block models an air gap between a stator tooth and a rotating permanent magnet rotor. This block assumes that the rotor magnets are surface mounted and that the associated induced voltage is sinusoidal.

This figure shows the relationship between the parameters of the Rotating Air Gap block and their physical values inside a permanent magnet motor

where:

*r*is the value of the**Rotor radius**parameter.*g*is the value of the**Air gap**parameter.*l*is the value of the_{m}**Permanent magnet length (in direction of flux)**parameter.*l*is the value of the**Tooth depth (in direction of shaft)**parameter.

The rotor circumference is equal to $$2\pi r$$. Then, the width of a permanent magnet on the rotor is equal to $$\frac{2\pi r}{2N}$$, where *N* is the **Number of rotor pole
pairs**.

If the rotor angle is zero, specified by the **Rotor angle** variable in
the **Variables** section, then the rotor magnet perfectly aligns with
the middle of the first stator tooth. The permanent magnet is then orientated to oppose
the flux flow from port **N** to port **S**.

Use this block to create a magnetic representation of a permanent magnet synchronous motor
(PMSM). For example, if you want to model a motor with nine stator poles, create nine
copies of this block and set each of the **Stator tooth reference
index** parameters to `1`

, `2`

,
`3`

, `4`

, `5`

,
`6`

, `7`

, `8`

, and
`9`

, respectively.

### Equations

This figure shows the equivalent circuit for the air gap and the adjacent permanent magnet

where:

*ϕ*is the magnetic flux that flows from the external magnetic circuit to port_{g}**N**.*R*is the air gap reluctance._{g}*mmf*is the magnetomotive force across the rotating air gap component.*R*is the permanent magnet reluctance._{m}*ϕ*is the magnetic flux generated by the rotor permanent magnets in the angle range subtended by the stator tooth._{r}

This equation defines the relationship between
*ϕ _{g}*,

*mmf*, and

*ϕ*:

_{r}$${\varphi}_{g}=\frac{mmf-{R}_{m}{\varphi}_{r}}{{R}_{m}+{R}_{g}}.$$

If the back EMF is sinusoidal, the flux density of the permanent magnet rotor is defined by this equation

$${B}_{r}={B}_{0}cos\left(N{\theta}_{s}-N{\theta}_{r}\right)$$

where:

*N*is the**Number of rotor pole pairs**.*θ*is the rotor angle._{r}*θ*is the stator angle._{s}*B*is the_{0}**Peak magnet flux density**, in Tesla.

Then, to obtain the permanent magnet flux linkage, integrate over the stator angle subtended by the stator tooth

$${\varphi}_{r}({\theta}_{r})=rl{\displaystyle {\int}_{\frac{-{\theta}_{tooth}}{2}}^{\frac{{\theta}_{tooth}}{2}}\left[{B}_{0}\mathrm{cos}\left(N{\theta}_{s}-N{\theta}_{r}\right)\right]d{\theta}_{s}}$$

where:

*r*is the**Rotor radius**.*l*is the**Tooth depth (in direction of shaft)**.

For an ideal PMSM, the *θ _{tooth}* must be equal to

*2π/N*, where

_{s}*N*is the value of the

_{s}**Number of stator teeth**parameter. Then the equation of the flux that flows through the equivalent circuit is obtained by solving the integral:

$${\varphi}_{r}({\theta}_{r})=2{B}_{0}lr/Nsin\left(\frac{\pi N}{{N}_{s}}\right)\mathrm{cos}\left(N{\theta}_{r}\right).$$

To obtain the torque generated across the air gap, first calculate the total energy stored by the component:

$$E=\frac{1}{2}{\varphi}_{g}^{2}{R}_{g}+\frac{1}{2}{\left({\varphi}_{r}\left({\theta}_{r}\right)\right)}^{2}{R}_{m}.$$

Then, to obtain the torque, differentiate with respect to the rotor angle:

$$\tau =\frac{\partial E}{\partial {\theta}_{r}}=-2{B}_{0}{R}_{m}lrsin\left(\frac{\pi N}{{N}_{s}}\right)\mathrm{sin}\left(N{\theta}_{r}\right)\left({\varphi}_{g}+{\varphi}_{r}\left({\theta}_{r}\right)\right)/N.$$

Finally, calculate *R _{g}* and

*R*in terms of geometry:

_{m}$$\begin{array}{l}{R}_{g}=\frac{g}{{\mu}_{0}{A}_{g}}\\ {R}_{m}=\frac{{l}_{m}}{{\mu}_{r}{\mu}_{0}{A}_{g}}\end{array}$$

where:

*μ*is the permittivity of free space._{0}*μ*is the relative permittivity of the permanent magnet._{r}*g*is the**Air gap**.*l*is the magnet length._{m}

### Faults

You can fault the Rotating Air Gap block. To enable
faults, in the **Faults** section, select the **Enable
faults** parameter.

**Note**

The Rotating Air Gap block does not support non-intrusive fault modeling. To model non-intrusive faults, use the Magnetic Rotor.

A fault is defined as a reduction in the peak magnet flux density. The flux density
associated with each rotor magnet remains sinusoidal in shape. When the Rotating Air
Gap block is in the faulted state, you can apply a reduction factor to the flux
density of any of the rotor poles by specifying the **Flux multipliers for
faulted rotor poles** parameter.

The unfaulted flux density in the airgap of a perfect PMSM with a sinusoidal back EMF is equal to:

$${B}_{r}={B}_{0}cos\left(N{\theta}_{s}-N{\theta}_{r}\right)$$

When the faulted magnet interacts with the tooth, the block uses this equation to define the flux density

$${B}_{r}=\lambda {B}_{0}cos\left(N{\theta}_{s}-N{\theta}_{r}\right),$$

where *λ* is the factor that maps peak
*B _{0}* to the faulted

*B*, and is defined in the

_{0}**Flux multipliers for faulted rotor poles**parameter.

The transition to the faulted values linearly blends over the time period that you
specify in the **Duration of transition to faulted** parameter. Use
this parameter to emulate how an overheated permanent magnet gradually loses its
magnetization over time.

### Variables

To set the priority and initial target values for the block variables before simulation,
use the **Initial Targets** section in the block dialog box or Property
Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Use nominal values to specify the expected magnitude of a variable in a model. Using
system scaling based on nominal values increases the simulation robustness. Nominal values
can come from different sources. One of these sources is the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see System Scaling by Nominal Values.

## Examples

## Ports

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2021a**