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?

4 views (last 30 days)
Problem Description:
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Aug 2012
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 (0)

Products


Release

R2011a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!