Modelica as a design tool for hardware-in-the-loop simulation

Marco Bonvini
Dipartimento di Elettronica e Informazione, Politecnico di Milano, Italy

Filippo Donido
Dipartimento di Elettronica e Informazione, Politecnico di Milano, Italy

Alberto Leva
Dipartimento di Elettronica e Informazione, Politecnico di Milano, Italy

Ladda ner artikelhttp://dx.doi.org/10.3384/ecp09430087

Ingår i: Proceedings of the 7th International Modelica Conference; Como; Italy; 20-22 September 2009

Linköping Electronic Conference Proceedings 43:42, s. 378-385

Visa mer +

Publicerad: 2009-12-29

ISBN: 978-91-7393-513-5

ISSN: 1650-3686 (tryckt), 1650-3740 (online)


This paper focuses on the automatic generation of microcontroller code for hardware-in-the-loop simulation using Modelica models. In this work a test is presented and commented in which Modelica is used to specify a control system; the inline integration code is obtained from the Modelica model and executed part on a PC; and part on a microcontroller board. The presented application; albeit created basically for educational purposes; covers quite different scenarii; therefore evidencing the usefulness of Modelica in the addressed context; and providing as a consequence some future research directions.

The contribution aspect of this work is twofold: on one side the entire cross-compilator software chain is built within the same framework; on the other hand; all the involved software tools are opensource (mainly GPL) licensed; making the application extremely modular and extensible. Furthermore this work will be included in the next release of the open source Modelica environment SimForge; thus enriching its Modelica back-ends support.


Inga nyckelord är tillgängliga


[1] The arduino home page. http://www.arduino.cc.

[2] S. B. Choi; Y. T. Choi; and D. W. Park. A Sliding Mode Control of a Full-Car Electrorheological Suspension System Via Hardware in-the-Loop Simulation. Journal of Dnamic Systems; Measurements and Control; 122:114–121; March 2000. doi: 10.1115/1.482435.

[3] Politecnico di Milano sede di Cremona. Simforge: a graphical modelica environment. https://trac.wd.dei.polimi.it/simforge.

[4] Filippo Donida. Xml schema for dae representation with the openmodelica compiler; 09 2009. http://home.dei.polimi.it/donida/Projects/AutoEdit/Images/DAE.xsd.

[5] R. Ernst. Codesign of embedded systems: status and trends. Design & Test of Computers; IEEE; 15(2):45–54; Apr-Jun 1998. doi: 10.1109/54.679207.

[6] H. Hanselmann. Hardware-in-the-Loop Simulation Testing and its Integration into a CACSD Toolset. In IEEE International Symposium on Computer Aided Control System Design; pages 152–156. IEEE; September 1996.

[7] K. S. Hong; H. C. Sohn; and J. K. hedrick. Modified Skyhook Control of Semi-Active Suspensions: A New Model; Gain Scheduling; and Hardware-in-the-loop Tuning. Journal of Dynamic Systems; Measurements and Control; 124:158–167; March 2002. doi: 10.1115/1.1434265.

[8] R. Isermann; J. Schaffnit; and S. Sinsel. Hardware-in-the-loop simulation for the design and testing of engine-control systems. Control Engineering Practice; 7:643–653; August 1999. doi: 10.1016/S0967-0661(98)00205-6.

[9] M. Linjama; T. Virvalo; J. Gustafsson; J. Lintula; V. Aaltonen; and M. Kivikoski. Hardware-in-the-loop environment for servo system controller design; tuning and testing. Microprocessors and microsystems; 24:13–21; December 2000. doi: 10.1016/S0141-9331(00)00062-4.

[10] MIT. Maxima; a computer algebra system; 1960. http://maxima.sourceforge.net/.

[11] A. Ptak and K. Foundy. Real-time spacecraft simulation and hardware-in-the-loop testing. In Real-Time Technology and Applications Symposium; 1998. Proceedings. Fourth IEEE; pages 230–236; Jun 1998.

[12] P. S. Shiakolas and D. Piyabongkarn. Development of a Real-Time Digital Control System With a Hardware-in-the-Loop Magnetic Levitation Device for Reinforcement of Controls Education. IEEE Transaction on Control Education; 46(1):79–87; February 2003. doi: 10.1109/TE.2002.808268.

[13] G. Stoeppler; T. Menzel; and S. Douglas. Hardware-in-the-loop simulation of machine tools and manufacturing systems. Computing & Control Engineering Journal; 16(1):10–15; Feb.-March 2005. doi: 10.1049/cce:20050101.

Citeringar i Crossref