LabVIEW Electric Motor Simulation Toolkit API Reference

Part 3: Simulating a PMSM on an FPGA Target (Electric Motor Simulation Toolkit)

  • Updated2023-02-21
  • 3 minute(s) read

In this part, you can verify whether the algorithm can perform correctly with the hardware-in-the-loop (HIL) solution. Before getting your solution equipped with the real I/O modules, you need to test your algorithm with a simpler solution on an FPGA target.

Complete the following steps to simulate a permanent magnet synchronous motor (PMSM) on an FPGA target.

  1. Open PMSM FEA Model Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\PMSM\PMSM FEA Model Control Simulation directory:
    Open example  Find related examples
  2. In the Project Explorer window, right-click the RT PXI Target and select Properties from the shortcut menu to open the Real-Time PXI Properties dialog box.
  3. In the IP Address/DNS Name field, enter the IP address for the real-time target.
  4. In the Project Explorer window, right-click the FPGA Target and select Properties from the shortcut menu to open the FPGA Target Properties dialog box.
  5. In the Resource field, specify the FPGA target hardware.
  6. In the Project Explorer window, navigate to RT PXI Target»FPGA Target»Build Specifications»PMSM FEA Model Simulator. Right-click the build specification and select Build from the shortcut menu.
  7. Compile the FPGA code.
  8. In the Project Explorer window, right-click the PMSM FEA Model Controller VI and select Deploy from the shortcut menu to deploy the VI to the real-time target.
  9. Open the PMSM FEA Model Controller Simulation VI.
  10. On the front panel, enter the name of the real-time target in Machine Alias.
  11. Run the PMSM FEA Model Control Simulation VI.
  12. On the front panel of the PMSM FEA Model Controller VI, click Enable Control. The real-time controller supplies control signals to the simulated motor and the motor starts running at a fixed velocity.
  13. Adjust the Velocity Setpoint [RPM] and Load Torque [Nm] on the Motor tab. Verify if the output of motor speed is still approaching the value of the velocity setpoint.
  14. Click the Inverter tab. Set the Inverter Type to Advanced. Choose a Fault Type. Observe the results returned from the indicators.
  15. Click the Temperature tab. Change the Coil Temperature [K] and the Magnet Temperature [K].
  16. Click Stop to stop the control.

Related Information

Using the Project Explorer Window

FPGA Target Properties Dialog Box

Part 2: Testing the Control Algorithms Part 4: Composing a Real HIL System

Log in to get a better experience