Developing Embedded Software for Induction Motor Control Using Model-Based Design
Aitor Erguin, CAF Power & Automation
CAF Power & Automation needed to develop a new induction motor control strategy with the main objectives of:
- High efficiency, lower energy consumption motor operation
- Efficient, compact code with less load on the processor
- Certification for safety functions according to EN 50657
- Reduced development time
CAF chose to adopt Model-Based Design using Simulink®, Simscape Electrical™, Embedded Coder®, HDL Coder™, Simulink Real-Time™, and a Speedgoat® real-time target machine.
This presentation shows how CAF implements Model-Based Design. Code generation converts Simulink models into C or HDL production code that integrates into the rest of the software running on the microprocessors, DSPs, or FPGAs. Testing is done first on a fully simulated Simulink environment on a host PC. Then, hardware-in-the-loop testing is performed where the device being tested is the actual controller electronics running the generated code, and a Speedgoat target machine is running the simulated plant model and controlling the execution of the tests. The tests are reused on both the PC and HIL environments, and so are the Simscape Electrical plant models, which are deployed onto an FPGA in the Speedgoat target machine that achieves sample times as low as a microsecond.
Model-Based Design, while helping CAF fulfil all safety requirements, allows for a shorter development cycle as the activity of hand coding the control algorithms is eliminated; an activity which is inherently error-prone. The improved control strategy, already more efficient energy-wise, has made it possible to execute two separate control algorithms in the same electronics where previously only one could be executed.
Published: 25 May 2021