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 SH v2 - efs_cpuPMSM_SHv2
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 motor definition file.
It supports multiple file types:
- JSOL JMAG v10.5 rtt files
- Infolytica MotorSolve mat files
- ANSYS Maxwell mat files
V2 improvments:
- Enhanced table size (4x)
- Embedded FPGA mechanical model
Mask Parameters
GENERAL TAB Tab
Solver Step Time: Step time in seconds of the FPGA PMSM solver step time. This parameter must be between 400ns and 4us and a multiple of 50ns.
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'.).
MOTOR 1&2 TABS
Motor Type: "JMAG 10.5 PMSM Spatial Harmonics rtt file", "Infolytica PMSM Spatial Harmonics mat file" or "Ansys PMSM Spatial Harmonics mat file". This option let you choose the kind of data you want to use to define your motor. The files are generated by JSOL JMAG, Infolytica Motorsolve or Ansys Maxwell softwares. The "Dual PMSM Motors SH" supports only 3 phase PMSM WYE connected motor designs. File supported are JMAG *.rtt files and Ansys or Infolytica *.mat or *.json files.
Rtt/Mat file Path: Path of your Rtt/Mat/json file. You must encapsulate the path name between single quotes or your file will not be found.
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 tools simulate an RC filter on Vabc. The gain is force to 1, but the cut-off frequency can be easily tuned. This value must be between 0.01 and 10 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.
Use advance table settings: This checkbox allow the user to set its own table settings. By default 32 levels for Iamp axis, 64 levels for theta axis and 32 levels for beta axis are used.
Each number of levels has to be a power of 2. Furthermore, the system is limited to 16bits tables while using 2 motors and 17bits with 1 motor enable.
To know the number of bit you are using, you have to add the log2 value of the levels number along all axes. For example in the case above: log2 (16) + log2 (32) + log2 (32) = 4 + 6 + 5 = 15bits. This table configuration will work.
The maximum number of sample for the axis are 128 for theta, 64 for beta and 32 for iamp.
Delay Motor 1 - Motor 2 (fpga clk number) (Motor 2 tab only)
This parameter lets the user setup the 2 motors calculation delay. The minimum value is 40 and the maximum value is (solver step time)/5e-9 - 40. This parameter is unused for single motor configuration. It could be help full to assure the same inverter - motor coupling delays on both motors.
For example if the inverter runs at 150ns, a good tuning would be to set the motor step time to 450ns (3times the inverter step time) and the delay between motor 1 and 2 computation at 60 (300ns). So both motors simulations start at the beginning of an inverter simulation step and never drift regarding the inverter period.
Force Torque Symmetry Ratio By enabling this option, the user can specify the symmetry ratio of the torque table for theta axis. As an example, if the torque is periodic every 30deg mechanical, the user can set a symmetry ratio of 12 to have an enhanced definition on the torque. If this option is disabled, the symmetry ratio will be automatically determined with the end value of the torque theta axis in the motor configuration file (RTT / Mat).
Torque Symmetry Ratio: Symmetry ratio value. It must be a integer positive value. 0 is reserved for Automatic mode (defined by RTT/Matfile torque theta axis end value). To set it manually, choose a value between 0 and 31.
Torque Angle Axis: This gives a preview of the theta axis that will be used for the torque table. (Usually [0 360/symmetry_ratio] Deg Mechanical)
MECHANICAL MODEL 1&2 TABS
This solver also simulates a mechanical model. The Mechanical model uses the sum of a torque load input from the CPU model, the motor torque and a torque table (5 Harmonics sinus table) to calculate the speed. Speed is calculated based on a 1st order equation (Fluid Friction and Inertia).
Torque table Angle Offset: [Mec Angle Deg] This is the angle offset between the mechanical angle of the motor and the angle that will be used to access the 5 harmonics sinus torque table.
Torque table Angle symmetry ratio: [Unsigned Positive integer] This is the ratio between the mechanical angle and the angle used to access the table. It must be an integer between 1 and 63.
Fluid Friction: [N.m.s/rad] Fluid friction value (F in the equation above).
Inertia: [Kg.m^2] Inertia value (J in the equation above).
Note: While the model is computed in Floating point, precision error could happen if the ratio tau = (J/F) is higher than 100sec or lower than 5e-6sec.
Torque Dead Zone Threshold: [N.m] Value of the deadzone function threshold value (must be positive). Before entering in the mechanical equation, the torque go through a dead zone function. This dead zone functions approximates the torque to 0N.m if it is lower than the threshold value. This function helps the speed to converge to 0N.m and avoid a slight constant drift of the angle. It can also be interpreted as a dry friction.
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.
en_fpga_mec_mdl_#: When 0, the FPGA mechanical model is disable and the speed is forced to the previous input. When 1, the FPGA mechanical mode is enable and the speed is now computed from the mechanical model. The next 4 inputs will be enable at the same time.
Torque_load_#: Value of the torque load in N.m sent to the mecanical model.
Torque table parameters: The torque table is a 5 harmonics sinus table. Each harmonic has a amplitude and phase that can be parametrized from this block. However the total amplitude of the table must be driven by the torque table gain (harmonics gain are scaled between 0 and 1 maximum).
Torque_table_gain_#: Value of the torque table output gain in N.m.
Torque_table_harmgains_#: Value of the torque table harmonics gains. It must be positive values between 0 and 1 (normalized). It must be a vector of 5 elements.
Torque_table_harmphases_#: Value of the torque table harmonics phases in degrees. It must be a vector of 5 elements.
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 "SH_motor_AdvanceCmd" block in tools lib to access its functionality. With the SH model, this port allow the user to update the Rabc values, force the angle to a position or change the cut-off frequency.
You can only change one parameter at a time. The priority is define this way:
Rabc mot1 > Rabc mot2 > Theta mot1 > Theta mot2 > Vabc cut-off freq mot1 > Vabc cut-off freq mot2
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
- mec_mdl_torque_load
- mec_mdl_torque_total
Characteristics and limitations
Offline simulation: This block is not capable of offline simulation.
Communication delays: The block latency is 2 CPU Time steps.
Direct Feedthrough | NO |
Discrete sample time | YES |
XHP support | YES |
Work offline | NO |
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