# FEM-Parameterized Synchronous Machine

**Libraries:**

Simscape /
Electrical /
Electromechanical /
Synchronous

## Description

The FEM-Parameterized Synchronous Machine block implements the electrical and mechanical characteristics of an externally excited synchronous machine or hybrid excitation permanent magnet synchronous machine (PMSM) for which the magnetic flux linkage depends nonlinearly on the stator currents, field current, and rotor angle. These types of machine are also called synchronous AC motors and doubly-excited synchronous motors respectively.

Use this block to represent an externally excited electric motor or machine that has a rotor field winding. This block captures detailed behavior like saturation effects and cogging torques by importing finite-element-derived lookup tables from a motor design tool. You can also represent a hybrid excitation machine in which the permanent magnets and the field winding generate the rotor flux.

The FEM-Parameterized Synchronous Machine block uses
flux linkage that you must calculate by using an external finite element (FE) tool. The
block uses the *A*-phase flux linkage, which is a four-dimensional
table that depends on the stator current magnitude, stator current phase advance, field
winding current, and rotor angle. The block derives the field winding flux linkage by
calculating the *D*-axis flux linkage from the
*A*-phase, *B*-phase, and *C*-phase
flux linkages and by subtracting the flux linkage when the field current is zero.

### Equations

This equation defines the back electromotive force (EMF) of the stator:

$$\left[\begin{array}{c}{e}_{A}\\ {e}_{B}\\ {e}_{C}\end{array}\right]=\left[\begin{array}{c}\frac{d{\Psi}_{A}}{dt}\\ \frac{d{\Psi}_{B}}{dt}\\ \frac{d{\Psi}_{C}}{dt}\end{array}\right]+{P}^{-1}\left[\begin{array}{c}0\\ 0\\ {L}_{0}\end{array}\right]\frac{d{i}_{0}}{dt},$$

where

*e*,_{A}*e*, and_{B}*e*are the stator winding voltages._{C}*Ψ*,_{A}*Ψ*, and_{B}*Ψ*are the magnetic fluxes that link each stator winding._{C}*L*is the value of the_{0}**Stator zero-sequence inductance, L0**parameter.*i*is the zero-sequence current._{0}*P*is the Park transform.

To keep the table dimension small, this block does not tabulate the stator flux
linkages with the zero-sequence current. The block then adds the zero-sequence
dynamics with a separate term. If you set the **Winding type**
parameter to `Wye-wound`

and do not enable the
**Expose neutral port** parameter, then the zero-sequence
dynamics are zero.

This equation defines the back EMF for the field winding of the rotor:

$${e}_{f}=\frac{d{\Psi}_{f}}{dt},$$

where:

*Ψ*is the field winding flux linkage. These equations define the field winding flux linkage:_{f}$$\begin{array}{c}\left[\begin{array}{c}{\Psi}_{d}\\ {\Psi}_{q}\\ {\Psi}_{0}\end{array}\right]=P\left(\theta \right)\left[\begin{array}{c}{\Psi}_{A}\left(I,B,\theta ,{i}_{f}\right)\\ {\Psi}_{B}\left(I,B,\theta ,{i}_{f}\right)\\ {\Psi}_{C}\left(I,B,\theta ,{i}_{f}\right)\end{array}\right]\\ {\Psi}_{f}\left(I,B,\theta ,{i}_{f}\right)={\Psi}_{d}\left(I,B,\theta ,{i}_{f}\right)-{\Psi}_{d}\left(I,B,\theta ,0\right)\end{array}$$

*e*is the field winding voltage._{f}*Ψ*,_{d}*Ψ*, and_{q}*Ψ*are the_{0}*d*-axis,*q*-axis, and zero-sequence fluxes, respectively.*Ψ*,_{A}(I,B,θ,i_{f})*Ψ*, and_{B}(I,B,θ,i_{f})*Ψ*are the_{C}(I,B,θ,i_{f})*A*-phase,*B*-phase, and*C*-phase flux linkages, respectively, tabulated with respect to*I*,*B*,*θ*, and*i*._{f}*I*is the stator peak current magnitude.*B*is the stator current advance angle.*θ*is the rotor angle.*Ψ*is the field winding flux linkage tabulated with respect to_{f}(I,B,θ,i_{f})*I*,*B*,*θ*, and*i*._{f}

*P* is the Park transform, which depends on the option you choose
for the **Park’s convention for tabulated data** parameter.

**Note**

The Park transform option of the **Park’s convention for tabulated
data** parameter must match the version of the Park transform
that you use in the FE tool to generate the flux linkage data.

**Option 1:**

```
Q leads D, rotor angle measured from A-phase to
D-axis
```

Simscape™ Electrical™ motor and machine blocks use this convention internally and convert all other options to this format.

*N*is the value of the**Number of pole pairs**parameter.*θ*_{r}is the rotor angle.*i*_{d}and*i*_{q}are the*D*-axis and*Q*-axis currents, respectively.*i*_{p}is the current magnitude and is equal to $$\sqrt{{i}_{d}^{2}+{i}_{q}^{2}}$$.*β*is the current advance angle and is equal to $${\mathrm{tan}}^{-1}\left(-{i}_{d}/{i}_{q}\right)$$.

The corresponding Park transform is

$$\left[\begin{array}{c}{i}_{d}\\ {i}_{q}\\ {i}_{0}\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}\mathrm{cos}\left(N{\theta}_{r}\right)& \mathrm{cos}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{cos}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ -\mathrm{sin}\left(N{\theta}_{r}\right)& -\mathrm{sin}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& -\mathrm{sin}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \frac{1}{2}& \frac{1}{2}& \frac{1}{2}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ \begin{array}{l}{i}_{b}\\ {i}_{c}\end{array}\end{array}\right]$$

where *i*_{a},
*i*_{b}, and
*i*_{c} are the
*A*-phase, *B*-phase, and
*C*-phase currents, respectively.

**Option 2:**

```
Q leads D, rotor angle measured from A-phase to
Q-axis
```

*N*is the value of the**Number of pole pairs**parameter.*θ*_{r}is the rotor angle.*i*_{d}and*i*_{q}are the*D*-axis and*Q*-axis currents, respectively.*i*_{p}is the current magnitude and is equal to $$\sqrt{{i}_{d}^{2}+{i}_{q}^{2}}$$.*β*is the current advance angle and is equal to $${\mathrm{tan}}^{-1}\left(-{i}_{d}/{i}_{q}\right)$$.

The corresponding Park transform is

$$\left[\begin{array}{c}{i}_{d}\\ {i}_{q}\\ {i}_{0}\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}\mathrm{sin}\left(N{\theta}_{r}\right)& \mathrm{sin}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{sin}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \mathrm{cos}\left(N{\theta}_{r}\right)& \mathrm{cos}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{cos}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \frac{1}{2}& \frac{1}{2}& \frac{1}{2}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ \begin{array}{l}{i}_{b}\\ {i}_{c}\end{array}\end{array}\right]$$

where *i*_{a},
*i*_{b}, and
*i*_{c} are the
*A*-phase, *B*-phase, and
*C*-phase currents, respectively.

**Option 3:**

```
D leads Q, rotor angle measured from A-phase to
D-axis
```

*N*is the value of the**Number of pole pairs**parameter.*θ*_{r}is the rotor angle.*i*_{d}and*i*_{q}are the*D*-axis and*Q*-axis currents, respectively.*i*_{p}is the current magnitude and is equal to $$\sqrt{{i}_{d}^{2}+{i}_{q}^{2}}$$.*β*is the current advance angle and is equal to $${\mathrm{tan}}^{-1}\left(-{i}_{d}/{i}_{q}\right)$$.

The corresponding Park transform is

$$\left[\begin{array}{c}{i}_{d}\\ {i}_{q}\\ {i}_{0}\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}\mathrm{cos}\left(N{\theta}_{r}\right)& \mathrm{cos}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{cos}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \mathrm{sin}\left(N{\theta}_{r}\right)& \mathrm{sin}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{sin}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \frac{1}{2}& \frac{1}{2}& \frac{1}{2}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ \begin{array}{l}{i}_{b}\\ {i}_{c}\end{array}\end{array}\right]$$

where *i*_{a},
*i*_{b}, and
*i*_{c} are the
*A*-phase, *B*-phase, and
*C*-phase currents, respectively.

**Option 4:**

```
D leads Q, rotor angle measured from A-phase to
Q-axis
```

*N*is the value of the**Number of pole pairs**parameter.*θ*_{r}is the rotor angle.*i*_{d}and*i*_{q}are the*D*-axis and*Q*-axis currents, respectively.*i*_{p}is the current magnitude and is equal to $$\sqrt{{i}_{d}^{2}+{i}_{q}^{2}}$$.*β*is the current advance angle and is equal to $${\mathrm{tan}}^{-1}\left(-{i}_{d}/{i}_{q}\right)$$.

The corresponding Park transform is

$$\left[\begin{array}{c}{i}_{d}\\ {i}_{q}\\ {i}_{0}\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}-\mathrm{sin}\left(N{\theta}_{r}\right)& -\mathrm{sin}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& -\mathrm{sin}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \mathrm{cos}\left(N{\theta}_{r}\right)& \mathrm{cos}\left(N{\theta}_{r}-\frac{2\pi}{3}\right)& \mathrm{cos}\left(N{\theta}_{r}+\frac{2\pi}{3}\right)\\ \frac{1}{2}& \frac{1}{2}& \frac{1}{2}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ \begin{array}{l}{i}_{b}\\ {i}_{c}\end{array}\end{array}\right]$$

where *i*_{a},
*i*_{b}, and
*i*_{c} are the
*A*-phase, *B*-phase, and
*C*-phase currents, respectively.

### Calculating Iron Losses

The FEM-Parameterized Synchronous Machine block models iron losses by using the Steinmetz equation. The Steinmetz equation scales for different motor speeds or electrical frequencies, so the block requires iron loss data only as a function of motor currents.

The block tabulates the iron losses coefficients with the **Peak current
magnitude vector, I**, **Current advance angle vector,
B**, and **Field current vector, If** parameters:

$$\begin{array}{l}{P}_{rotor}\left(f\right)={k}_{hr}\left({I}_{p},\beta ,If\right)f+{k}_{Jr}\left({I}_{p},\beta ,If\right){f}^{2}+{k}_{er}\left({I}_{p},\beta ,If\right){f}^{1.5}\\ {P}_{stator}\left(f\right)={k}_{hs}\left({I}_{p},\beta ,If\right)f+{k}_{Js}\left({I}_{p},\beta ,If\right){f}^{2}+{k}_{es}\left({I}_{p},\beta ,If\right){f}^{1.5}\end{array}$$

where:

*f*is the electrical frequency, in Hz.*k*is the_{hr}(I_{p},β,If)**Rotor hysteresis loss coefficient, k_hr(I,B,If)**parameter value.*k*is the_{Jr}(I_{p},β,If)**Rotor eddy current loss coefficient, k_Jr(I,B,If)**parameter value.*k*is the_{er}(I_{p},β,If)**Rotor excess current loss coefficient, k_er(I,B,If)**parameter value.*k*is the_{hs}(I_{p},β,If)**Stator hysteresis loss coefficient, k_hs(I,B,If)**parameter value.*k*is the_{Js}(I_{p},β,If)**Stator eddy current loss coefficient, k_Js(I,B,If)**parameter value.*k*is the_{es}(I_{p},β,If)**Stator excess current loss coefficient, k_es(I,B,If)**parameter value.

### Modeling Thermal Effects

You can expose thermal ports to model the effects of losses that convert power to
heat. To expose the thermal ports, in the **Thermal Ports**
section, enable the **Model thermal effects** parameter.

For more information about using thermal ports in actuator blocks, see Simulating Thermal Effects in Rotational and Translational Actuators.

### 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.

Nominal values provide a way to specify the expected magnitude of a variable in a model.
Using system scaling based on nominal values increases the simulation robustness. You can
specify nominal values using different sources, including the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see System Scaling by Nominal Values.

## Examples

## Assumptions and Limitations

If you model a hybrid-excitation machine, the block does not modulate the permanent magnet flux linkage with temperature.

## Ports

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2023a**