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 Motors VDQ - efs_cpuPMSM_VDQ

Block


Table of Contents

Description

This block processes the communication between the RT-Lab model and the FPGA motor model. It also initialises the FPGA motor solver with the user Ld Lq Flux tables.
It supports multiple configurations:

  • Ld Lq tables from a JMAG rtt file
  • Fix Ld Lq values set by the user
  • Variable Ld Lq values from Ld Lq tables specified by the user

Mask Parameters

MOTOR 1&2 TABS

RTT File mode

This mode uses the table of Ld Lq table stored directly in the file.

Rtt file Path: Path of your Rtt file. You must encapsulate the path name between quote or your file may not be found. This motor support Jmag 10.5 version of rtt files. It only uses the d and q inductances of the file. This block does not support Spatial Harmonic PMSM model. Natively, rtt file contains both motor topologies (dq and Spatial Harmonics topologies) and all the information needed by the solver to work.

Fix Ld Lq mode

This mode configures the solver to perform a standard PMSM dq model.

Ld/Lq Value: [H]Value of Ld Lq in Henry. Because this value is physical, it cannot be a negative value/null value.

Flux Linkage: [Wb] Flux linkage value in Weber. Because this value is physical, it cannot be a negative/null value.

Variable Ld Lq mode

This mode configures the solver to perform a PMSM Variable Ldq model. This mode uses tables of Ld Lq and Flux. Depending on the Id Iq operating point, the inductances and flux values will change to emulate the saturation.

Id/Iq breakpoints: [Amps]These vectors defined the Id and Iq breakpoints for the Ld Lq and Flux tables. Their size must match with the Ld Lq Flux tables defined below (Id length must be equal to Ld/Lq/Flux first dimension and Iq to Ld/Lq/Flux second dimension). The minimum number of breakpoints is 2. Each element must be unique in the respective vector.

Ld/Lq table: [H] These are the table for Ld and Lq. Ld/Lq(N,M) value represent Ld/Lq value when Id = Id_breakpoints(N) and Iq = Iq_breakpoints(M). Thus, the first dimension is Id axis, the second is Iq axis. Because these are physical values, they cannot be negative or null.

Flux table: [Wb] This is the Flux table. Flux(N,M) value represent Flux value when Id = Id_breakpoints(N) and Iq = Iq_breakpoints(M). Thus, the first dimension is Id axis, the second is Iq axis. Because these are physical values, they cannot be negative or null.

Table Notes:
Before being sent and used in FPGA those tables will be format to a FPGA compatible shape. The FPGA takes only tables with Id Iq axes centered on 0 (for example: Id_breakpoints = -Id_max : precision : Id_max is a centered on 0 axis). If the table is not centered on zero, an extrapolation process will saturate the tables values which are out of the user range to the nearest available.
Moreover, the table maximum effective size is 128x128. If the user's table doesn't match this size, the table will be interpolate / extrapolate during pre-processing.
The park transformation done in FPGA is the quadrature transform. The pre-processing function takes care to reshape your Id Iq axes to match with this transform if you didn't use this transform to extract Id Iq axes.
It could happen that the user got only one quadrant of the table from the manufacturer (For example: Id negative and Iq positive). The preprocessing function does not apply any symmetry and this part should be handled by the user (For example: If the values of LdLq table are the same for + and - Iq, you have to add more breakpoints and reshape the table to make it effective).

Common parameters

Number of pole pairs: Number of the motor pole pairs. This value must be an unsigned integer between 1 and 127.

Ra/Rb/Rc: [Ohm]: Stator resistance of the phase a/b/c of the motor. Because this value is physical, it cannot be a negative/null value.

Park transform for Id Iq scaling: Depending on the park transform you use the Id Iq monitoring signals might not be well scaled. This parameter is used to rescale the Id Iq / Vd Vq signals in RT-Lab model with the right gain factor. You have the choice between the quadrature transform (with sqrt(2/3) factor) and the original Park-Clarke transform (with (2/3) factor). This parameter does not change the scaling of Id Iq signals available in the FPGA which can be mapped on Aout. By default the park transform use in the FPGA is the quadrature transform.

Rotor Flux position when theta = 0: This parameter allow you to choose to have q axis on the A axis when theta = 0 (modified park) or d axis on the A axis when theta = 0. This will set the FPGA dq transform in the right referential. You can also manually change the angle offset.

Vabc filter cut-off Frequency: [Hz] There is an embedded filter in the motor solver to help the user to visualise the Vabc voltage. Because the original traces are square like, it is very hard to figure out the trace of Vabc. This tool simulates a low pass filter on Vabc. The gain is 1, but the cut-off frequency can be easily tuned. This value must be between 0.01 and 100 kHz. For a good result, the value has to be more than twice the electrical motor speed (in Hz) and less than half the PWM frequency.

Table Idq input low pass filter Frequency: [Hz] (-1 to disable) This filter a first order filter used to remove high harmonics of the DQ currents accessing the table, that could make the stiffer.

Add cogging torque Feature that allows to add torque ripple to the torque output.

Other TAB

Solver Step Time: Step time in seconds of the FPGA PMSM solver step time. This parameter must be between 125ns and 4us.

Block Index: This value is used to index initialization data when the same solver is used several times in the FPGA. For example, to make sure that subsystem A does not receive data from subsystem B. This value must be between 0 and 15.

Number of Motors Enable: This parameter activates the 2nd motor or optimizes the solver for use by only one motor. When only one motor is used, the memory that would have been used for the 2nd motor's inductance/flux and torque tables will be used to improve the tables for motor 1. Motor 2 is therefore disabled.

Data In/Load In/Data Out port number:Number of communication ports from/to FPGA to send/receive solver data. Port numbers depend on the bitstream (See bitstream technical documentation to know the right port numbers). If your bitstream was modified, consult its technical note for the port numbers associated to the dual PMSM motors SH block.

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


Inputs

Motor#MecSpeedRPM: Mechanical speed of the motor in RPM. The natural limit of this value is 366000 RPM. The resolution is 1.7e-4 RPM. Depending on the motor topologies this could be an unrealistic limit. If the input goes over the limit, the value sent to the FPGA will be the nearest correct value.

Rst: Reset of the FPGA motor solver. This action will result to a reset of all motors' current states to 0. This is a double signal. The reset is active when input is higher than 0.5.

Advanceport#: This port provides an access to advance solver request. You have to use the "VDQ_motor_AdvanceCmd" block in tools lib to access its functionality. With the VDQ model, this port allow the user to update the Rabc values, change the LdLq values, change the IdIq values at the table Input, force the angle to a position or change the cut-off frequency of the VABC monitoring filter and change the flux value. Help documentation for this block is available here: Cpu Advanced Command block

There are two ports available to connect two different AdvancedPort blocks, but a single one can be connected to both ports.

The advanced port logic for the VDQ model is as follow:

Only one parameter at a time can be changed. The priority is defined this way:
Rabc mot1 > Rabc mot2 > Ldq mot1 > Ldq mot2 > Flux mot1 > Flux mot2 > Idq mot1 > Idq mot2 > Theta mot1 > Theta mot2 > Vabc cut-off freq mot1 > Vabc cut-off freq mot2

  • ra, rb, rc_forced: Change the value of respectively Ra, Rb and Rc
  • update_rabc: Request to send the updated values to the FPGA. This value must be changed from 0 to 1 to request the update
  • ld, ld_forced: Change the value of respectively Ld and Lq
  • force_ldq: Request to send the updated values to the FPGA. As long as this value is set to 1, any change to Ld and Lq will be send
  • id, iq forced: Change the value of respectively Id and Iq
  • force_idq: Request to send the updated values to the FPGA. As long as this value is set to 1, any change to Id and Iq will be send
  • theta_forced: Change the value of the theta position angle
  • force_theta: Request to send the updated values to the FPGA. As long as this value is set to 1, any change to theta will be send
  • vabc_filter_forced: Change the value of Vabc cut-off frequency
  • update_vabc_filter: Request to send the updated values to the FPGA. This value must be changed from 0 to 1 to request the update
  • flux_forced: Change the value of the flux
  • force_flux: Request to send the updated values to the FPGA. As long as this value is set to 1, any change to the flux value will be send


Those parameters are slow to update. The modification of these parameters is not made to be real time.
Overruns can occur while using this functionality.


Outputs

Motor#signals: These signals are the motor monitoring signals from the FPGA. Please see the list below to have an overview of the available signals:

Signal List:

  • Ia/Ib/Ic
  • Vn (currently unsupported)
  • Idq
  • Theta Mec/Elec
  • Torque
  • RPM_speed
  • Vabc_filtered
  • Vdq

Note: You can change the scaling of Idq and Vdq by selecting the Park transform in the GUI.


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

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323