Is there an example Processor-in-the-loop (PIL) implementation for a Permanent Magnet Synchronous Machine Field Oriented Controller running on a Texas Instrument processor using Simulink and Embedded Coder?
24 views (last 30 days)
I am interested in generating code for the Field-Oriented Control algorithm for a Permanent Magnet Synchronous Machine (PMSM) using Embedded Coder. I am also interested in verifying the implementation and execution time of the generated code using Processor-in-the-loop (PIL) testing.
A demo kit that contains an example model of a Field-Oriented Control algorithm for a Permanent Magnet Synchronous Machine is available. The kit also includes additional files that will help you to understand the basic workflow and Simulink APIs for generating C code from a motor control algorithm and for verifying its behavior and execution time using Processor-in-the-loop (PIL) testing on Texas Instrument’s (TI’s) F28335 eZdsp board.
The demo kit can be downloaded from the Related Documents section of this solution.
To run the demo and start the instructions, copy the files into a working directory and execute the “startDemo” command at the MATLAB command prompt. You will be able to then set up the simulation environment to model and verify the behavior of a closed-loop motor control system. Once the control system behavior is within specification, you can generate C code from the controller model using Embedded Coder. After inspecting the code, you can also use processor-in-the-loop (PIL) testing to gain confidence that the C code will perform as expected when you integrate it with embedded software that interfaces with the motor hardware.
To view instructions on Target setup please refer Target setup.pdf in the related documents section.
The intent of the demo kit is to provide a working example that end users can use as a base to create their own Processor-in-the-loop (PIL) solution using Embedded Coder and its PIL APIs shown below:
If you have questions on this solution or desire additional support, please e-mail:
More Answers (1)
Is there an example Green Hills INTEGRITY target for Embedded Coder and Simulink using the Green Hills MULTI IDE?