Three Phase Permanent Magnet Synchronous Machine (JMAG)

Description of the Three Phase Permanent Magnet Synchronous Machine (JMAG) component in Schematic Editor.

JMAG is a simulation software for the development and design of electrical devices, mainly electrical machines. JMAG software accurately analyzes a wide range of physical phenomena that includes complicated geometry, various material properties, and the heat and structure at the center of electromagnetic fields.

JMAG-RT is a tool that generates high fidelity plant models. These models are based on FEA results and can be calculated quickly while retaining high accuracy. The models can be used in system level simulations to provide a more accurate representation of a simulated electromagnetic device. From the 2020.2 version of Typhoon HIL Control Center, simulation of certain JMAG-RT generated machine models is supported.

Table 1. Three Phase Permanent Magnet Synchronous Machine (JMAG) in Typhoon HIL Schematic Editor
component component dialog window component parameters

Electrical

Table 2. Electrical parameters
symbol description
RT data file path Path to the .rtt file
Accuracy Type Accuracy type (LdLq(table) or Flux integral)
Set resistance manually Enables setting the value of stator resistance manually
Use correction coefficients Enables correction coefficients
Losses calculation Enables losses calculation. Currently supported losses are eddy current and hysteresis losses.
Low-pass filter cut-off frequency Low-pass filter cut-off frequency used to filter out high frequency components in the induced voltage, when calculating losses [Hz]

The electrical parameters of the machine model are defined using an .rtt file. A valid .rtt file that contains the LdLq and/or Flux integral model types needs to be generated in order to use this feature. In addition to the appropriate model type(s), the .rtt file must contain the number of poles. The inertia of the machine should be designated in the component parameters, under the "Mechanical" tab.

JMAG-RT offers several levels of fidelity for permanent magnet synchronous machine models:
  • LdLq (table)
  • Flux integral
  • Spatial harmonic
Typhoon HIL Control Center supports the LdLq (table) and the Flux integral types. The LdLq (table) type models the saturation of fluxes as functions of currents. It is equivalent to the Three Phase Permanent Magnet Synchronous Machine Electrical sub-system model with included saturation effects. The Flux integral type models the fluxes and the machine torque as functions of currents and the rotor position. It is equivalent to the Three Phase Permanent Magnet Synchronous Machine Electrical sub-system model with included saturation effects, as well as the machine's flux and torque spatial harmonics. In both cases the electrical parameters are populated using the .rtt file.

By default, the stator winding resistance is read from the .rtt file. If necessary, it can be set manually after checking the Set resistance manually box.

The Flux integral type allows for correction factors to adjust simulation results. The correction factors are read from the .rtt file and applied to the simulation model. These factors affect inductances, magnetic fluxes, currents, and torque.

The Flux integral type also allows for losses calculation. The chosen .rtt file needs to contain the eddy current and hysteresis loss lookup tables in order to use this feature. Two types of losses are calculated - eddy current losses and hysteresis losses. These can be selected among the output signals in the "Output" tab.

Note: This feature is not available on Linux operating systems.

Mechanical

Table 3. Mechanical parameters
symbol description
Jm Combined rotor and load moment of inertia [kgm2]
Friction coefficient Machine viscous friction coefficient [Nms]
Star/delta Stator winding connection (star or delta)
Unconstrained mechanical angle Limiting mechanical angle between 0 and 2π

Load

Table 4. Load parameters
symbol description
Load source Load can be set from SCADA/external or from model (in model case, one signal processing input will appear)
External/Model load type External/Model load type: torque or speed
Load ai pin HIL analog input address for external torque command
Load ai offset Assigned offset value to the input signal representing external torque command
Load ai gain Assigned gain value to the input signal representing external torque command

External load enables you to use an analog input signal from a HIL analog channel with the load_ai_pin address as an external torque/speed load, and to assign offset (V) and gain (Nm/V) to the input signal, according to the formula:

T l = l o a d _ a i _ g a i n · ( A I ( l o a d _ a i _ p i n ) + l o a d _ a i _ o f f s e t)

Note: An analog input pin may be overwritten if another component uses the same analog input pin. If another property (from the same or a different component) uses the same analog input pin, the input signal value will be applied to only one of those properties. For instance, if both the load and the resolver carrier signal use the same analog input pin, the signal value will only be applied only to one of these.

Feedback

Table 5. Feedback parameters
symbol description
Encoder ppr Incremental encoder number of pulses per revolution
Resolver pole pairs Resolver number of pole pairs
Resolver carrier source Resolver carrier signal source selection (internal or external)
External resolver carrier source type External resolver carrier signal source type selection (single ended or differential); available only if the Resolver carrier source property is set to external
Resolver carrier frequency Resolver carrier signal frequency (internal carrier) [Hz]
Resolver ai pin 1 Resolver carrier input channel 1 address (external carrier)
Resolver ai pin 2 Resolver carrier input channel 2 address (external carrier); available only if the External resolver carrier source type property is set to differential
Resolver ai offset Resolver carrier input channel offset (external carrier)
Resolver ai gain Resolver carrier input channel gain (external carrier)
Absolute encoder protocol Standardized protocol providing the absolute machine encoder position

If an external resolver carrier source is selected, the source signal type can be set as either single ended or differential. The single ended external resolver carrier source type enables use of an analog input signal from the HIL analog channel with the res_ai_pin_1 address as the external carrier source. Additionally, offset (V) and gain (V/V) values can be assigned to the input signal, according to the formula:

r e s _ c a r r _ s r c = r e s _ a i _ g a i n · ( A I ( r e s _ a i _ p i n _ 1 ) + r e s _ a i _ o f f s e t )

The differential external resolver carrier source type enables use of two analog input signals from the HIL analog channels with the res_ai_pin_1 and the res_ai_pin_2 addresses. Analog signals from these HIL analog inputs are subtracted, and the resulting signal is used as the external differential carrier source. Additionally, offset (V) and gain (V/V) values can be assigned to the input signal (similarly to the single ended case), according to the formula:

r e s _ c a r r _ s r c = r e s _ a i _ g a i n · ( ( A I ( r e s _ a i _ p i n _ 1 ) - A I ( r e s _ a i _ p i n _ 2 ) ) + r e s _ a i _ o f f s e t )
Note: Differential external resolver signal support is available from the 2023.1 software version. Only the single ended external resolver option was available in previous software versions.
Note: In order to get a resolver signal with an amplitude of 1 when using an external carrier signal, the offset and the gain should be chosen in such a way that the resolver carrier signal has an amplitude of 1 after the adjustment. As shown in Figure 1, the sinusoidal signal used to generate external resolver carrier source is fed to HIL analog input 1. The analog input signal is scaled in order to get the resolver signals with an amplitude of 1.
Figure 1. Machine resolver signals
Note: An analog input pin may be overwritten if another component uses the same analog input pin. If another property (from the same or a different component) uses the same analog input pin, the input signal value will be applied to only one of those properties. E.g. if both the load and the resolver carrier signal use the same analog input pin, the signal value will be applied only to one of these.

The following expression must hold in order to properly generate the encoder signals:

4 · e n c _ p p r · f m · T s 1
Table 6. Variables in the encoder limitation expression
symbol description
enc_ppr Encoder number of pulses per revolution
fm Rotor mechanical frequency [Hz]
Ts Simulation time step [s]
Figure 2. Machine encoder signals
Note: While the machine speed is positive, the encoder channel B signal leads the encoder channel A signal.
Note: Absolute encoder protocol is not supported on HIL402 (configurations: 1, 2, 3, and 4).
Note: More information about absolute encoder protocol could be found here.

Advanced

Table 7. Advanced parameters
symbol description
Theta_ab Position of the stationary αβ reference frame, in respect to the stator phase a axis [rad]

The machine model output variables (currents, voltages and fluxes) can be observed from a stationary reference frame. There are two widely used approaches in electrical machine modeling: in the first, the alpha axis of the stationary reference frame lags by 90 degrees in regard to the stator phase a axis (used by default, and indicated in a) Figure 5. In the second one, the alpha axis is aligned with the stator phase a axis (indicated in b) Figure 5. The user can select between these two situations.

Figure 3. Selection of a stationary reference frame position: a) Theta_ab= -pi/2; b) Theta_ab= 0

It is important to know the value of Theta_ab when the rotor position feedback is necessary. As an example, if a model uses the mechanical angle as a feedback signal and feeds it to one of the abc to dq, alpha beta to dq, dq to abc, or dq to alpha beta transformation blocks, the same transformation angle offset value should be used in both components to ensure the expected simulation results.

Figure 4. Example of model containing abc to dq transformation component and chosen stationary reference frame position Theta_ab= -pi/2
Note: This property is available only on certain machine components.

Snubber

All machines with current source based circuit interfaces have the Snubber tab in the properties window where the value of snubber resistance can be set. Snubbers are necessary in the cases when an inverter or a contactor is directly connected to the machine terminals. This value can be set to infinite (inf), but it is not recommended when a machine is directly connected to the inverter since there will be a current source directly connected to an open switch. In this case, one of each switch pairs S1 and S2, S3 and S4, and S5 and S6 will be forced closed by the circuit solver in order to avoid the topological conflicts. On the other hand, with finite snubber values, there's always a path for the currents Ia and Ib, so all inverter switches can be open in this case. Circuit representations of this circuit without and with snubber resistors are shown in Figure 3 and Figure 4 respectively. Snubbers are connected across the current sources.

Figure 5. Circuit representation of machine and inverter when all the switches are open without resistors (not recommended)
Figure 6. Circuit representation of machine and inverter when all the switches are open with resistors (recommended)
Note: Snubbers exist only in the machine components that have the current source based circuit interface.
Note: Snubbers are dynamic, which means that the snubber is dynamically added to circuit modes where topological conflicts are detected.
Table 8. Snubber parameters
symbol description
Rsnb stator Stator snubber resistance value [Ω]

Output

This block tab enables a single, vectorized signal output from the machine. The output vector contains selected machine mechanical and/or electrical variables in the same order as listed in this tab.

Note: All machine components have the Execution rate, Electrical torque, Mechanical speed, and Mechanical angle, but the rest of the signals differ from component to component.
Table 9. Output parameters
symbol description
Execution rate Signal processing output execution rate [s]
Electrical torque Machine electrical torque [Nm]
Mechanical speed Machine mechanical angular speed [rad/s]
Mechanical angle Machine mechanical angle [rad]
Stator alpha axis current Alpha axis component of the stator current [A]
Stator beta axis current Beta axis component of the stator current [A]
Stator d-axis current Direct axis component of the stator current [A]
Stator q-axis current Quadrature axis component of the stator current [A]
Stator alpha axis flux Alpha axis component of the stator flux [Wb]
Stator beta axis flux Beta axis component of the stator flux [Wb]
Stator d-axis flux Direct axis component of the stator flux [Wb]
Stator q-axis flux Quadrature axis component of the stator flux [Wb]
Eddy current losses Eddy current losses [W]
Hysteresis losses Hysteresis losses [W]