Title :
Benchmarking and optimisation of Simulink code using Real-Time Workshop and Embedded Coder for inverter and microgrid control applications
Author :
Roscoe, A.J. ; Blair, S.M. ; Burt, G.M.
Author_Institution :
Univ. of Strathclyde, Glasgow, UK
Abstract :
When creating software for a new power systems control or protection device, the use of auto-generated C code via MATLAB Simulink Real-Time Workshop and Embedded Coder toolboxes can be a sensible alternative to hand written C code. This approach offers the benefits of a simulation environment, platform independence and robust code. This paper briefly summarises recent experiences with this coding process including the pros and cons of such an approach. Extensive benchmarking activities are presented, together with descriptions of simple (but non-obvious) optimisations made as a result of the benchmarking. Examples include replacement of certain Simulink blocks with seemingly more complex blocks which execute faster. ¿S functions¿ are also designed for certain key algorithms. These must be fully ¿in-lined¿ to obtain the best speed performance. Together, these optimisations can lead to an increase in execution speed of more than 1.4à in a large piece of auto-generated C code. An example is presented, which carries out Fourier analysis of 3 signals at a common (variable) frequency. The overall speed improvement relative to the baseline is 2.3Ã, of which more than 1.4à is due to non-obvious improvements resulting from benchmarking activities. Such execution speed improvements allow higher frame rates or larger algorithms within inverters, drives, protection and control applications.
Keywords :
benchmark testing; invertors; motor drives; power system analysis computing; power system control; power system measurement; power system protection; Fourier analysis; Simulink code; auto-generated C code; coding process; embedded coder; inverter application; microgrid control application; power systems control; real-time workshop; Application software; Embedded software; Inverters; MATLAB; Power system control; Power system protection; Power system simulation; Real time systems; Robustness; Software tools; Inverters; Motor drives; Power electronics; Power system control; Power system measurements; Power system protection;
Conference_Titel :
Universities Power Engineering Conference (UPEC), 2009 Proceedings of the 44th International
Conference_Location :
Glasgow
Print_ISBN :
978-1-4244-6823-2