LabVIEW Electric Motor Simulation Toolkit API Reference

Content Type
Programming Language
Current manual

Simulating an Electric Motor on FPGA or Real-Time Targets (Electric Motor Simulation Toolkit)

Simulating an Electric Motor on FPGA or Real-Time Targets (Electric Motor Simulation Toolkit)

In real electric motor simulation, the simulated motor is usually on an FPGA target or a real-time target. Instead of happening on host computers, the simulation happens on FPGA or real-time targets because the electric motor simulation requires a very high speed of processing data, which is unable to achieve on host computers. Therefore, after testing the control algorithms on host computers, you can move the simulated motor to FPGA or real-time targets.

Compared with real-time targets, simulation on FPGA targets yields better performance, efficiency, and determinism. However, due to the complexity of simulation on FPGA targets, you need to test the control algorithms with a simpler solution without getting your solution equipped with real I/O modules.

Testing Simulation on FPGA Targets

Use the control algorithms that you verified in the previous step of Controlling an Electric Motor to control a simulated motor on an FPGA target. In this step, you must compile the simulator VIs on the host computer into a bitfile. Download the bitfile to an FPGA target and run the simulator VIs on the FPGA target. In this way, you can verify if the FPGA simulator VIs are correct.

Correct FPGA code must be able to control the speed of the simulated motor. The simulated motor must run at a velocity that is approximately equal to the velocity setpoint.

Related Examples

The Electric Motor Simulation Toolkit provides the following examples for comparing the simulation outputs on a host computer and on an FPGA target.

  • ACIM FPGA Verification.lvproj in the labview\examples\Electric Motor Simulation\ACIM\ACIM FPGA Verification directory:
    Open example  Find related examples
  • PMSM FPGA Verification.lvproj in the labview\examples\Electric Motor Simulation\PMSM\PMSM FPGA Verification directory:
    Open example  Find related examples

The Electric Motor Simulation Toolkit provides the following examples for simulating electric motors in closed-loop control on FPGA targets.

  • ACIM Constant Parameter Model Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\ACIM\ACIM Constant Parameter Model Control Simulation directory:
    Open example  Find related examples
  • PMSM Constant Parameter Model Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\PMSM\PMSM Constant Parameter Model Control Simulation directory:
    Open example  Find related examples
  • 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
  • PMSM Variable Parameter Model Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\PMSM\PMSM Variable Parameter Model Control Simulation directory:
    Open example  Find related examples
  • SRM Linear Model Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\SRM\SRM Linear Model Control Simulation directory:
    Open example  Find related examples
  • 3-Phase SRM Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\SRM\3-phase SRM Control Simulation directory:
    Open example  Find related examples
  • 4-Phase SRM Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\SRM\4-phase SRM Control Simulation directory:
    Open example  Find related examples
  • 5-Phase SRM Control Simulation.lvproj in the labview\examples\Electric Motor Simulation\SRM\5-phase SRM Control Simulation directory:
    Open example  Find related examples

Simulating on Real-Time Targets

While simulating on the real-time targets, you download the simulator VIs to a real-time target similar to simulating on the FPGA targets. The solution is relatively simpler. You do not need to test the simulation without I/O modules. Use the Electric Motor Simulation sample project to simulate a motor and compose a hardware-in-the-loop system with I/O modules.

To create a sample project for simulation on real-time targets, select Simulate motor on RT as the hardware setting on the Configure your new project page. Refer to the sample project documentation for details about connecting the hardware by I/O modules, adapting the sample project to hardware, and running the simulation. Find an illustration about the simulation system in the Composing a Real HIL System with I/O Modules topic.

Related Information

Controlling an Electric Motor

Real-Time Target

Composing a Real HIL System with I/O Modules

Was this information helpful?