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.

Dual PMSM Model - efs_xsgDualPmsm

Block


Table of Contents

Description

The Dual PMSM Model block implements an FPGA-based model of two three-phase Permanent Magnet Synchronous Motors (PMSM) model with resolvers and encoders. The mask of the block allows to choose the sample time.
It supports multiple model types:

  • PMSM Vdq: stands for variable DQ that supports Ld Lq tables. The tables are 2-dimensions and the model supports saturation vs the current amplitude. The BackEMF is sinusoidal and does not contain harmonics.
  • PMSM SH v1 (small tables): stands for Spatial Harmonics which supports imports of JMAG / Ansys and Infolitica Finite element analysis software data import. The tables are 3-dimensions (current amplitude, machine angle, beta = arctan(-id/iq)). This model supports saturation vs current as well as harmonics on the BackEMF, Current and Torque response. The maximum table size is 64 per half electrical turn x 32 for beta x 16 for the current amplitude.
  • PMSM SH v2 (large tables): same model as the previous but with larger tables and more accuracy. The maximum table size is 128 per half electrical turn x 32 for beta x 32 for the current amplitude.

Mask Parameters

Sample Time: This parameter sets the sample time of the model.

Model Type: This parameter sets the type of the PMSM model that will be instantiated.
It supports multiple model types:

  • PMSM Vdq: stands for variable DQ that supports Ld Lq tables.
  • PMSM SH v1 (small tables): stands for Spatial Harmonics which supports imports of JMAG / Ansys and Infolitica Finite element analysis software data import.
  • PMSM SH v2 (large tables): same model as the previous but with larger tables and more accuracy.

Inputs

DataIn: This port allows to send data (torque load, speed, and enable mechanical model for both motors) to the mechanical model. Port data type is UFix_33_0.

DataIn_SOF: This port is the Start of Frame signal of the DataIn port. Port data type is UFix_1_0.

LoadIn: This port allows the configuration of the block when using a specific configuration structure. The LoadIn signal should be connected to a RT-XSG LoadIn port. Port data type is UFix_33_0.

LoadIn_SOF: This port is the Start of Frame signal of the RT-XSG LoadIn port. Port data type is UFix_1_0.

AnalogIn_FLWS: Frame-based Lightweight Serial Protocol (FLWS) bus port which allows to send analog input to the Dual_resolver_encoder part of the model.
There are three (3) signals in the bus:

  • Data. Data type is XFloat_8_24.
  • Valid. Data type is UFix_1_0.
  • Last. Data type is UFix_1_0.

eHS_FLWS: Frame-based Lightweight Serial Protocol (FLWS) port which allows to receive data from the eHS.
There are three (3) signals in the bus:

  • Data. Data type is XFloat_8_34.
  • Valid. Data type is UFix_1_0.
  • Last. Data type is UFix_1_0.

Outputs

Machine_0: Output bus containing electrical and mechanical variables from the model of the first PMSM.
The variables are:

  • ia0, first phase current. Data type is XFloat_8_24.
  • ib0, second phase current. Data type is XFloat_8_24.
  • ic0, third phase current. Data type is XFloat_8_24.
  • va0avg, first phase average voltage. Data type is XFloat_8_24.
  • vb0avg, second phase average voltage. Data type is XFloat_8_24.
  • vc0avg, third phase average voltage. Data type is XFloat_8_24.
  • P0, 3-phase power P output. Data type is XFloat_8_24.
  • Q0, 3-phase power Q output. Data type is XFloat_8_24.
  • id0, direct current in the stator. Data type is XFloat_8_24.
  • iq0, quadratic current in the stator. Data type is XFloat_8_24.
  • thetamec0, mechanical position of the motor. Data type is UFix_24_24.
  • thetaelec0, electrical position of the motor. Data type is UFix_24_24.
  • torque0, torque command sent to the mechanical model. Data type is XFloat_8_24.
  • speed_0, speed of the motor. The speed is either calculated by the mechanical model using the motor parameters and model inputs or directly fed through from the CPU speed input. Port data type is XFloat_8_24.
  • total_torque0, torque command minus the torque load after the static friction. Port data type is XFloat_8_24.

Machine_1: Output bus containing electrical and mechanical variables from the model of the second PMSM. Sames signals as for Machine_0 but replacing "0" by "1" in the names.

Resolver_0: Output bus containing variables from the first resolver.
The variables are:

  • sin_res0, sine signal. Data type is XFloat_8_24.
  • cos_res0, cosine signal. Data type is XFloat_8_24.
  • car_res0, carrier signal. Data type is XFloat_8_24.
  • theta_sensor0, angle signal. Data type is UFix_24_24.

Encoder_0: Output bus containing variables from the first encoder.
The variables are:

  • A_res0, A signal. Data type is Boolean.
  • B_res0, B signal. Data type is Boolean.
  • Z_res0, Z signal. Data type is Boolean.

Resolver_1: Output bus containing signals from the second resolver. Sames signals as for Resolver_0 but replacing "0" by "1" in the names.

Encoder_1: Output bus containing signals from the second encoder. Sames signals as for Encoder_0 but replacing "0" by "1" in the names.

DataOut: Bus port which provides the internal variables contained in Machine_0/1 and Resolver_0/1 above through a serial bus. Triggerred on the DataOut_Sync input signal.
There are three (3) signals in the bus:

  • Data. Data type is UFix32_0. Contains in order : [ia0, ib0, ic0, va0avg, vb0avg, vc0avg, P0, Q0 id0, iq0, thetamec0, thetaelec0, torque0, sin_res0, cos_res0, car_res0, theta_sensor0, speed_0, total_torque0, ia1, ib1, ic1, va1avg, vb1avg, vc1avg, P1, Q1, id1, iq1, thetamec1, thetaelec1, torque1, sin_res1, cos_res1, car_res1, theta_sensor1, speed_1, total_torque1]
  • Valid. Data type Boolean.
  • Last. Data type Boolean.

AnalogOut_FLWS: Frame-based Lightweight Serial Protocol (FLWS) bus port which allows to send analog output. Has the same structure and contains the same data as DataOut_FLWS but is triggered automatically by an internal logic.

eHS_Feedback_FLWS: Frame-based Lightweight Serial Protocol (FLWS) port which allows to send data to the eHS.
There are three (3) signals in the bus:

  • Data. Data type is UFix42_0. Contains in order: [ia0, ib0, ia1, ib1].
  • Valid. Data type is Boolean.
  • Last. Data type is Boolean.

Characteristics and limitations

Direct FeedthroughNO
Discrete sample timeYES
XHP supportN/A
Work offlineYES


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

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter