Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This block implements a permanent magnet synchronous machine.

...

where Labc is the time-varying inductance matrix (global inductance for DQ and VDQ models), Iabc is the stator current inside the winding, R is the stator resistance and Vabc is the voltage across the stator windings. As for ψabc, it defines the magnet flux linked into the stator windings (for DQ and VDQ models), or the total flux (for the SH model),

...

It is important to note that there are many different types of Park transforms and this often leads to confusion when interpreting the motor states inside the D-Q frame. The one used here presents the advantage of being orthonormal (notice the 3/2  factor). This particular Park orthonormal transform is power-invariant which means that the power computed in the D-Q frame by performing a dot product of currents and voltages will be numerically equal to the one computed in the phase domain. With this transform (and only this transform) the PMSM torque can be expressed by (3), where pp is the number of pole pairs.

...

One may notice the absence of the 3/2 factor in (3), which is usually present in the PMSM torque equation when using non-orthonormal transforms. This is, again, because this model uses the orthonormal Park transform. Figure 1 explains the principle of the Park transform. Considering fixed ABC referential with all quantities ( Vbemf, motor current I) rotating at the electric frequency ω, if we observe these quantities in a D-Q frame turning at the same speed we can see that the motor quantities will be constant.

...

Mathblock
alignmentleft
b=60 \frac{T_{r}}{2 \pi J}


where ωr is the rotor speed, Te is the electromagnetic torque, TL is the torque command, Fvis the viscous friction coefficient, J is the inertia and Ts the sample time. There is a dead-zone implementation with the static friction torque if the electromagnetic doesn't exceed the static friction torque, the speed remains zero.

In speed mode, the rotor speed is directly set to the speed command ωrc.

Resolver Characteristics

...

Mathblock
alignmentleft
\text { sine signal }=\text { Excitation } *\left(\cos \left(\theta_{\text {res }}\right) * R_{k_{\text {ce }}}+\sin \left(\theta_{\text {res }}\right) * R_{k_{\text {ge }}}\right)


where θres is the resolver angle, θmec is the mechanical angle of the machine, θoffset is the angle offset, Rpp is the Number of pole pairs of the resolver and Rk are the resolver sine cosine gains.

...

SymbolNameDescriptionUnitType
MconfMotor configuration type

Type of motor : Constant DQ, Variable DQ or Spatial Harmonics.

In Variable DQ and Spatial Harmonics mode, electrical input parameters are hidden and a resource file must be provided.


Input
MfileMotor configurationField only visible in Variable DQ and Spatial Harmonics modes. Allows to import a Variable DQ or Spatial Harmonics motor configuration resource file.
Input
RsStator resistancesResistances of the stator windings specified for every phase, A, B and C.ΩInput
LlsStator inductancesd and q axis inductancesHInput
δΦ/δθ

Back EMF profileProfile of the back EMF, either Sinusoidal or User defined


Input
EMFfileBack EMF profile tableField only visible in User defined mode. Allows to import a back EMF resource file.
Input
λmPermanent magnet flux linkageAmplitude of the rotor permanent magnet fluxWbInput
ppNumber of pole pairsNumber of pole pairs
Input

is

Stator currentsCurrents measured at phases A, B and C of the statorAMeasurement

isdq

Stator currents (DQ)Currents measured of axis d and qAMeasurement

Vs

Stator voltagesVoltages measured at phases A, B and C of the statorVMeasurement
BemfBack EMF voltagesPhase to neutral voltage generated from the permanent magnet flux linkageVMeasurement
PActive power (3ph, instantaneous)Instantaneous electrical active powerWMeasurement
QReactive power (3ph, instantaneous)Instantaneous electrical reactive powervarMeasurement
θeElectrical rotor positionPosition of the rotor from 0 to 360 degrees°Measurement
RsSnubber resistanceResistances of the snubber on phase A, B and CΩInput
CsSnubber capacitanceCapacitance of the snubber on phase A, B and CFInput

...

SymbolNameDescriptionUnitType
JRotor inertiaMoment of inertia of the rotorkg*m2Input
FvViscous friction coefficientViscous frictionN*m*s/radInput
FsStatic friction torqueStatic frictionN*mInput
ctrlMechanical control modeControl mode of the mechanical model. Has two possible values: speed or torque. In speed mode, the mechanical model is bypassed and the speed command is sent directly. In torque mode, the torque command is used to measure the speed using the mechanical parameters of the machine.
Input
TTorque commandTorque command sent to the mechanical modelN*mInput
ωrcRotor speed commandSpeed command sent to the mechanical modelrpmInput
ωrRotor speedSpeed of the rotorrpmMeasurement
TeElectromagnetic torqueTorque measured at the rotorN*mMeasurement
θ0Initial rotor angleRotor position at time t = 0°Input
θRotor angleRotor position from 0 to 360 degrees°Measurement

.

Resolver Parameters & Measurements

SymbolNameDescriptionUnitType
RenEnable resolverWhether or not to enable the resolverN/AInput
RscResolver feedback signalsThe two two-phase windings producing a sine and cosine feedback current proportional to the sine and cosine of the angle of the motorN/AMeasurement
RppNumber of resolver pole pairsNumber of pole pairs of the resolverN/AInput
RdirDirection of the sensor rotationDirection in which the sensor is turning, either clockwise or counterclockwiseN/AInput
RθAngle offset Δθ ( Sensor-  Rotor )Angle offset between the resolver and the rotor position from 0 to 360 degrees°Input
RkResolver sine cosine gainsThe sine/cosine modulation output sine/cosine component amplitude. Default value are 1, 0, 0 and 1N/AInput
EtypeExcitation source typeThe source from which the excitation of the resolver is generated. Can either be AC, which is generated inside the FPGA with the specified frequency, DC, which is generated with a 90° from the rotor and External, which is generated from outside the modelN/AInput
EfExcitation frequencyFrequency of the excitation when in AC modeHzInput
EsrcExcitation sourceSource of the external excitation source when in External modeN/AInput
EtsExcitation time shiftThis parameter is used to compensate the time offset between the carrier generation's input in the system and modulated signals' outputsInput

...

Where Sin.Sin, Sin.Cos, Cos.Sin, and Cos.Cos represent gains that are applied to simulate a non-ideal resolver.  To simulate an ideal resolver, set the Sin.Sin and Cos.Cos gains to 1, set the Sin.Cos and Cos.Sin gains to 0, set the pp to 1, and set the θOffset to 0.  This results in the following equations:

...

SymbolNameDescriptionUnitType
EncenEnable encoderWhether or not to enable the encoderN/AInput
EnctypeEncoder typeEncoder type, either Quadrature or Hall EffectN/AInput
QABZA B Z encoder signalsA B and Z signals of the encoderN/AMeasurement
QpprNumber of pulses per revolutionNumber of pulses in one full revolution of the encoderN/AInput
QdirDirection of the sensor rotationDirection in which the sensor is turning, either A leads B or B leads AN/AInput
QθAngle offset Δθ ( Sensor - Rotor )Angle offset between the encoder and the rotor position from 0 to 360 degrees°Input
QratEncoder speed ratio ( sensor to mechanical position )

Mechanical to encoder ratio. Angle of Encoder = Qrat * machine mechanical angle. 

N/AInput
HθHall effect sensor positionPosition of sensor phases A, B and C in Hall effect mode°Input

Visualization of Resolver Encoder Parameters Effects

...