Documentation Home Page eHS Toolbox Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Block


Table of Contents

Description

This block processes the communication and configuration between the RT-LAB CPU-based model and the FPGA-based Electrical Machine model. It supports up to 4 machines, and each of them can be one of the following machine types:


Mask Parameters

General TAB

Block mode: This parameter is used to select which type of FPGA-based machine model that is available in the firmware. It supports:

  • Quad generic machine model mode for simulation of up to 4 Synchronous Machine or Asynchronous machine models.
  • Dual PMSM Variable DQ mode for simulation of up to 2 Permanent Magnet Synchronous Machine or Brushless DC motor models.


Once the selection is made, the available model types will be refreshed in each machine tab. This parameter is global to the block. For simulating of a Induction machine and a Permanent magnet machine in the same CPU model, it will be require to use two seperate Generic Machines CPU block, one configured with the generic machine model option and the second configured with the PMSM option.

Number of Machines: In the General tab, the number of machines (up to 4 for Generic Machine mode, up to 2 for PMSM modes) can be selected.

Solver Time Step [Ts(sec)]: Time step of the FPGA solver of the Generic Machines in seconds. It is 500ns by default.

Hardware Controller Name (OpCtrl): FPGA controller name that refers to the motor model bitstream (in OpCtrl or Oplnk block). It is usually 'OpCtrl'.

FPGA Clock Period [Tfpga(sec)]: The clock period of the FPGA. It is 5ns by default.

CPU Clock Period [Tcpu(sec)]: The time step of the CPU model. It is 20μs by default.

Communications Settings Automatic Configuration:This will enable the automatic setting of the communications ports. The *.conf file linked to the *.bin file selected in the OpCtrl Controller will be parsed and the communications settings will be set accordingly. If unchecked, the fields become modifiable for manual user settings.

Machine Core: If Communications Settings Automatic Configuration is enabled, Machine Core allows the selection of which machine defined in the *.conf to use for automatic configuration. To know more about how cores are defined inside a *.conf file, see: Conf File Writing Conventions.

Configuration Port Number: Data In/Load In/Data Out port: Number of communication ports from/to FPGA to send/receive solver data. Port numbers depend on the bitstream. See the associated bitstream *.conf file to get the right port numbers. These parameters should be updated at every firmware update.

The description keys to look depend on the selected block mode:

  • For Generic machine mode, the description key used is IM_SM
  • For PMSM Vdq mode, the description key used if PMSMVDQ

Machine TABs

Depending on the number of machines selected in the General tab, corresponding tabs will appear. Each tab has Configuration, Electrical, Mechanical, Resolver, and Encoder Parameters sections:

Configuration

Machine Type: In the dropdown list of each tab, the machine and its rotor type can be selected as Synchronous Machine Round Rotor/Salient-pole Rotor or Doubly-fed Induction Machine or Induction Machine with Squirrel-cage when the Generic machine mode is selected in the general tab. In PMSM mode, the machine parameter can be set as "Fixed Ld Lq values" for PMSM with salency simulation or "BLDC" for brushless dc motor emulation with trapezoidal back emf.

  • Configure Machine Inputs: This button opens a voltage mapping table for each machine as follows:

  • Input Name shows the stator and rotor (if applicable) supply voltage names for the selected machine type and rotor type,
  • Input Source gives the option of selecting between different available eHS sources,
  • Measurement Index is to assign the eHS indexed measurement to the corresponding machine input.


    For different types of machine voltage mapping, refer to the info below:
  • For Synchronous Machine, the stator voltages and field rotor voltage should be mapped,

  • For Doubly-fed (Wound Rotor) Induction Machine, the stator voltages and rotor voltages should be mapped,

  • For Induction Machine with Squirrel-cage Rotor, PMSM or BLDC, the stator voltages should be mapped.

Configure eHS inputs: This button opens a current mapping table for each machine as follows:

  • Input Name shows the stator and rotor (if applicable) current names for the selected machine type,
  • Input Source gives the option of selecting between different machine types, either PMSM or generic machine,
  • Measurement Index is to assign the eHS current measurement to the corresponding machine.

Same as Machine Inputs, eHS inputs mapping could be different for each type of machine.

  • For Synchronous Machine, stator currents and field rotor current should be mapped,

  • For Doubly-fed (Wound Rotor) Induction Machine, stator currents and rotor currents should be mapped,

  • For Induction Machine with Squirrel-cage Rotor, stator currents should be mapped.

  • For PMSM or BLDC, stator currents should be mapped. Since the model supports only balanced mode, only 2 currents needs to be injected to the eHS.

For more info about the number of current measurements for each type of machine, refer to the following link: Generic Machines CPU block - efsCpuGenericMachines

For measurement index, eight current measurements channels are assigned for each machine, while up to the first six of them could output current values during real-time simulation.

Refer to the following table for the right signal indexes of the Generic machine outputs to the eHS, SM represents for Synchronous Machine.

IndexCurrent SourcesNotes
1Machine #1 Ia Stator Current
2Machine #1 Ib Stator Current
3Machine #1 Ic Stator Current
4Machine #1 Ia Rotor CurrentSM #1 Field Rotor Current
5Machine #1 Ib Rotor CurrentNot available for SM #1
6Machine #1 Ic Rotor CurrentNot available for SM #1
7/8Reserved for internal use
9Machine #2 Ia Stator Current
10Machine #2 Ib Stator Current
11Machine #2 Ic Stator Current
12Machine #2 Ia Rotor CurrentSM #2 Field Rotor Current
13Machine #2 Ib Rotor CurrentNot available for SM #2
14Machine #2 Ic Rotor CurrentNot available for SM #2
15/16Reserved for internal use
17Machine #3 Ia Stator Current
18Machine #3 Ib Stator Current
19Machine #3 Ic Stator Current
20Machine #3 Ia Rotor CurrentSM #3 Field Rotor Current
21Machine #3 Ib Rotor CurrentNot available for SM #3
22Machine #3 Ic Rotor CurrentNot available for SM #3
23/24Reserved for internal use
25Machine #4 Ia Stator Current
26Machine #4 Ib Stator Current
27Machine #4 Ic Stator Current
28Machine #4 Ia Rotor CurrentSM #4 Field Rotor Current
29Machine #4 Ib Rotor CurrentNot available for SM #4
30Machine #4 Ic Rotor CurrentNot available for SM #4
31/32Reserved for internal use

Refer to the following table for the right signal indexes of the PMSM VDQ outputs to the eHS.

IndexCurrent SourcesNotes
1Machine #1 Ia Stator Current
2Machine #1 Ib Stator Current
3Machine #2 Ia Stator Current
4Machine #2 Ia Rotor Current

Notes: Ic current is not available for coupling eHS with PMSM VDQ model since the model supports balanced mode only.

Electrical Parameters

Synchronous Machine with Round Rotor: This configuration is used for dynamic modeling of a Round Rotor Synchronous Machine, which models stator, field, and up to three damper windings one on the D-Axis (Kd) and two on the Q-axis (Kq1 and Kq2). All the rotor parameters, including the field and damper windings, are referred to the stator identified by a prime sign. By choosing open-winding option, the model has the option of having neutral point connection for the star-connected stator winding. The mask and electrical parameters of a Round Rotor Synchronous Machine are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LlsStator leakage inductancePer-phase stator winding leakage inductanceH
LmdD-axis magnetizing inductanceMagnetizing inductance in direct-axis directionH
LmqQ-axis magnetizing inductanceMagnetizing inductance in quadrature-axis directionH
Rfd'Field resistanceDirect-axis field winding resistance, referred to the statorΩ
Llfd'Stator leakage inductanceDirect-axis field winding leakage inductance, referred to the statorH
Rkd'D-axis damper resistanceDirect-axis damper winding resistance, referred to the statorΩ
Llkd'D-axis damper leakage inductanceDirect-axis damper winding leakage inductance, referred to the statorH
Rkq1'1st q-axis damper resistance1st quadrature-axis damper winding resistance, referred to the statorΩ
Llkq1'1st q-axis damper leakage inductance1st quadrature-axis damper winding leakage inductance, referred to the statorH
Rkq2'2nd q-axis damper resistance2nd quadrature-axis damper winding resistance, referred to the statorΩ
Llkq2'2nd q-axis damper leakage inductance2nd quadrature-axis damper winding leakage inductance, referred to the statorH
NsfStator to field turn ratioThis turn ratio is used when the voltage ratio between the stator and the field is not unitary-
R0Zero-sequence resistanceZero-sequence stator winding resistanceΩ
L0Zero-sequence inductanceZero-sequence stator winding leakage inductanceH


Synchronous Machine with Salient-pole Rotor: This configuration is used for dynamic modeling of a Salient-pole Rotor Synchronous Machine, which models stator, field, and up to two damper windings one on the D-Axis (Kd) and one on the Q-axis (Kq1). All the rotor parameters, including the field and damper windings, are reffered to the stator identified by a prime sign. By choosing open-winding option, the model has the option of having neutral point connection for the star-connected stator winding. The mask and electrical parameters of a Salient-pole Rotor Synchronous Machine are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LlsStator leakage inductancePer-phase stator winding leakage inductanceH
LmdD-axis magnetizing inductanceMagnetizing inductance in direct-axis directionH
LmqQ-axis magnetizing inductanceMagnetizing inductance in quadrature-axis directionH
Rfd'Field resistanceDirect-axis field winding resistance, referred to the statorΩ
Llfd'Stator leakage inductanceDirect-axis field winding leakage inductance, referred to the statorH
Rkd'D-axis damper resistanceDirect-axis damper winding resistance, referred to the statorΩ
Llkd'D-axis damper leakage inductanceDirect-axis damper winding leakage inductance, referred to the statorH
Rkq1'1st q-axis damper resistance1st quadrature-axis damper winding resistance, referred to the statorΩ
Llkq1'1st q-axis damper leakage inductance1st quadrature-axis damper winding leakage inductance, referred to the statorH
NsfStator to field turn ratioThis turn ratio is used when the voltage ratio between the stator and the field is not unitary-
R0Zero-sequence resistanceZero-sequence stator winding resistanceΩ
L0Zero-sequence inductanceZero-sequence stator winding leakage inductanceH


Induction Machine with Squirrel-Cage Rotor: This configuration is used for dynamic modeling of a Squirrel-cage Induction Machine, which models the stator winding and squirrel-cage rotor. All the rotor parameters are reffered to the stator identified by a prime sign. By choosing open-winding option, each stator induction can be access allowing wie with neutral or delta connection on the stator side. The mask and electrical parameters of a Squirrel-Cage Induction Machine are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LlsStator leakage inductancePer-phase stator winding leakage inductanceH
Rr'Rotor resistancePer-phase equivalent rotor winding resistance referred to the statorΩ
Llr'Rotor leakage inductancePer-phase equivalent rotor winding leakage inductance referred to the statorH
LmMutual inductanceStator-rotor mutual (magnetizing) inductanceH
R0Zero-sequence resistanceZero-sequence stator winding resistanceΩ
L0Zero-sequence inductanceZero-sequence stator winding leakage inductanceH


Induction Machine with Double Squirrel-cage Rotor: This configuration is used for dynamic modeling of a Double Squirrel-cage Induction Machine, which models the stator winding and two squirrel-cages for the rotor. All the rotor parameters are reffered to the stator identified by a prime sign. The mask and electrical parameters of a Double Squirrel-cage Induction Machine are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LlsStator leakage inductancePer-phase stator winding leakage inductanceH
Rr1'Cage 1 rotor resistanceCage 1 per-phase equivalent rotor winding resistance referred to the statorΩ
Llr1'Cage 1 rotor leakage inductanceCage 1 per-phase equivalent rotor winding leakage inductance referred to the statorH
Rr2'Cage 2 rotor resistanceCage 2 per-phase equivalent rotor winding resistance referred to the statorΩ
Llr2'Cage 2 rotor leakage inductanceCage 2 per-phase equivalent rotor winding leakage inductance referred to the statorH
LmMutual inductanceStator-rotor mutual (magnetizing) inductanceH


Doubly-fed Induction Machine: This configuration is used for dynamic modeling of a Doubly-fed Induction Machine, which models the stator and rotor windings. All the rotor parameters are reffered to the stator identified by a prime sign. The mask and electrical parameters of a Doubly-fed Induction Machine are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LlsStator leakage inductancePer-phase stator winding leakage inductanceH
Rr'Rotor resistancePer-phase rotor winding resistance referred to the statorΩ
Llr'Rotor leakage inductancePer-phase rotor winding leakage inductance referred to the statorH
LmMutual inductanceStator-rotor mutual (magnetizing) inductanceH
NsrStator to rotor turn ratioStator to rotor turn ratio-


PMSM Fix Ld Lq mode: This configuration is used for dynamic modeling of a PMSM with constant parameters. The mask and electrical parameters of the PMSM in Fix DQ mode are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LdDirect-axis inductanceStator winding phase to neutral inductance on the D-AxisH
LqQuadrature-axis inductanceStator winding phase to neutral inductance on the Q-AxisH
FluxPMPermanent magnet flux linkageThe constant flux per pole pairs induced in the stator windings by the rotor magnetsWb
DqThetaRotor flux position at theta = 0Offset angle applied to the dq transform to have magnet flux aligned or 90degree behind phase ADeg


BLDC mode: This configuration is used for dynamic modeling of a BLDC with constant parameters. The mask and electrical parameters of the BLDC mode are presented as follows:

SymbolNameDescriptionUnit
RsStator resistancePer-phase stator winding resistanceΩ
LsStator leakage inductanceStator winding phase to neutral inductanceH
FluxPMPermanent magnet fluxThe constant flux per pole pairs induced in the stator windings by the rotor magnetsWb
BEMFFlatAreaBack EMF flat areaElectrical angle width of the flat area of the trapezoidal back EMFDeg
DqThetaRotor flux position at theta = 0Offset angle applied to the dq transform to have magnet flux aligned or 90degree behind phase ADeg

Mechanical Parameters

In the mechanical section, the Mechanical Mode drop down list gives the following options

  • Speed, which excludes the mechanical model to run the machine in speed mode. In this mode, Enable Mechanical Port gives the option of setting the speed command as a constant parameter in the mask, or as an extrenal port at the input of the block.
  • Mechanical Torque, which includes the mechanical model to run the machine in torque mode. In this mode, Enable Mechanical Port gives the option of setting the torque command as a constant parameter in the mask, or as an external port at the input of the block. The machines can operate in both motor mode, when the torque (load) is positive, and generating mode, when the torque (input) is negative.
  • External mode, which allows controling the mechanical mode from outside of the block specially when the mechanical mode change during the simulation is required. By selecting this option three ports of Mechanical Mode, Speed, and Torque will appear at the input of the block. Mechanical Mode input constant of 0 or 1 corresponds to the speed or mechanical torque mode, respectively.

SymbolNameDescriptionUnit
ppPole PairNumber of pole pairs-
JRotor InertiaRotor moment of inertiakg.m^2
FvViscous Friction CoefficientViscous friction coefficientN.m.s/rad
FsStatic Friction TorqueStatic friction torqueN.m
W0Initial SpeedInitial speedrpm


Be aware the max number of pole pair supported is increased to 127 rather than 31 since eFPGAsim 2.7.

Resolver and Encoder Parameters

By checking the Enable Resolver/Encoder, the resolver/encoder parameters appear in the mask. Two encoder mode can be available (Quadrature or Hall effect). Direction of Sensor Rotation determines if it is either clockwise or counter clockwise. For the resolver, the Excitation Source Type determines the source from which the excitation of the resolver is generated. It can either be AC, which is generated inside the FPGA with the specified frequency, DC, which is generated with a 90-degree from the rotor and External, which is generated from outside the model through Analog In Channel assignment. The Resolver Sine and Cosine Gains are in a vector of 4×1.

For Resolver Sine and Cosine Gains [Rk], four parameters are Sin.Sin, Sin.Cos, Cos.Sin and Cos.Cos. The resolver Sine and Cosine outputs are calculated by using the following two equations. To simulate the resolver ideally, set Sin.Sin and Cos.Cos to 1 while Sin.Cos and Cos.Sin to 0.

SymbolNameDescriptionUnit
RppNumber of Pole Pairs of the Resolver and Encoder

Number of pole pairs of the resolver and encoder

Note: Only disabled when both Resolver and Encoder are disabled

-
RoffsetResolver Angle OffsetAngle offset between the resolver and the rotor position from 0 to 360 degreesdeg
RkResolver Sine and Cosine GainsVector of 4 sine/cosine modulation output sine/cosine component amplitude between 0 and 1-
EfExcitation FrequencyFrequency of the excitation when the source is in AC modeHz
EtsExcitation Time ShiftThis parameter is used to compensate the time offset between the carrier generation's input in the system and modulated signals' outputs
QpprNumber of pulses per revolutionNumber of pulses in one full revolution of the encoder-
RoffsetEncoder Angle OffsetAngle offset between the encoder and the rotor position from 0 to 360 degreesdeg
HposHall effect sensor positionsVector of 3 elements that give in electrical angle the positions of the Hall effect sensors A B C in this orderdeg

Inputs

Mechanical Mode:This port allows controling the mechanical mode from outside of the block specially when the mechanical mode change during the simulation is required. Mechanical Mode input constant of 0 or 1 corresponds to the speed or mechanical torque mode, respectively.

Speed: This port is used for the speed command. It is available when the mechanical mode is set to external, or it is set to speed and the Enable Mechanical Port is set to external port.

Torque: This port is used for the load torque command. It is available when the mechanical mode is set to external, or it is set to torque and the Enable Mechanical Port is set to external port.


Outputs

Machine signals (Generic machine mode): For each machine, the following signals are available at the monitoring port:

Signal NameDescription
VsqQuadratic stator voltage.
VsdDirect stator voltage.
VrqQuadratic rotor voltage, seen from stator.
Exception: Seen from rotor field voltage for synchronous machine.
VrdDirect rotor voltage, seen from stator.
Exception: Unused for synchronous machine.
PhisqQuadratic stator flux.
PhisdDirect stator flux.
PhirqQuadratic rotor flux, seen from stator.
Exception: Field flux for synchronous machine.
PhirdDirect rotor flux, seen from stator.
Exception: Damper Kd flux for synchronous machine.
IsqQuadratic stator current.
IsdDirect stator current.
IrqQuadratic rotor current, seen from stator.
Exception: Field current for synchronous machine.
IrdDirect rotor current, seen from stator.
Exception: Damper Kd current for synchronous machine.
isaFirst stator phase current.
isbSecond stator phase current.
iscThird stator phase current.
iraFirst rotor phase current, seen from stator.
Exception: Seen from rotor for doubly-fed induction machine.
Exception: Seen from rotor field current for synchronous machine
irbSecond rotor phase current, seen from stator.
Exception: Seen from rotor for doubly-fed induction machine.
Exception: Unused for synchornouc machine
ircThird rotor phase current, seen from stator.
Exception: Seen from rotor for doubly-fed induction machine.
Exception: Unused for synchornouc machine
TorqueElectrical torque
wMotor speed in rpm
thetamMechanical rotor angle in degrees
Resolver sinsin waveform from the resolver
Resolver coscos waveform from the resolver
Resolver carriercarrier waveform from the resolver




Machine signals (PMSM mode): For each machine, the following signals are available at the monitoring port:

Signal NameDescription
IaFirst stator phase current.
IbSecond stator phase current.
IcThird stator phase current.
VaFilteredFirst stator phase voltage filtered.
VbFilteredSecond stator phase voltage filtered.
VcFilteredThird stator phase voltage filtered.
ActivePowerInstantaneous active power.
ReactivePowerInstantaneous reactive power.
IdD-axis current.
IqQ-axis current.
ThetaMecMechanical rotor angle in degrees.
ThetaElecElectrical rotor angle in degrees.
ElectomagneticTorqueElectrical torque in Nm.
SineResolversin waveform from the resolver.
CosineResolvercos waveform from the resolver.
ExcitationResolvercarrier waveform from the resolver.
ThetaResolverResolver angle in degrees use for Sine Cosine modulation.
SpeedRPMElectrical machine speed in Revolution per minutes.
TotalTorqueTorque resultant after static friction (electromagnetic torque - torque load - static friction).
BackEmfABack Emf voltage of phase A in Volts.
BackEmfBBack Emf voltage of phase B in Volts.
BackEmfCBack Emf voltage of phase C in Volts.

Characteristics and limitations

Offline simulation: This block is not capable of offline simulation.

Communication delays: The block latency is 2 CPU Time steps.

Direct FeedthroughNO
Discrete sample timeYES
XHP supportYES
Work offlineNO


If you require more information, please contact https://www.opal-rt.com/contact-technical-support/.

  • No labels