Logiciel open source de calcul numérique

Passer au contenu principal

Model based design - a free tool-chain

Simon Mayr, Upper Austria University of Applied Sciences


Model-Based Design (MBD) is a mathematical and visual method of addressing problems associated with designing complex control, signal processing and communication systems. It is used in many motion controls, industrial equipment, aerospace, and automotive applications. Model-based design is a methodology applied in designing embedded software. During the past years there is a growing interest of more and more medium to small size engineering companies in order to cut down development time and costs. Common tool-chains are quite expensive commercial solutions due to the origin of MBD in aerospace and automotive industries. The main idea of this presentation is the MBD development with a complete free (or low-cost if target hardware is included) tool-chain from the modeling and control design to the hardware realization using an integrated development environment (IDE).

MBD – tool-chain

The plant modeling and control design steps are already possible in the standard Scilab-Xcos. Plant modeling can be done by using the Xcos Add-on Coselica for example. System identification and simulation verification is done in Scilab-Xcos too. For more dedicated control laws the system has to be described in mathematical terms, i.e., in form of ODEs. Such equations can be included into Xcos without effort. Of course, these ODEs can be used as plant model too, alternatively to Coselica. After the controller has been developed and tested in the simulation environment, it must be converted into C- code and transferred to the target. We make use of our own generator X2C. The code generator X2C, see [1], was originally developed more than ten years ago at the JK-University Linz, Austria as a Simulink extension generating assembler code for TI-DSPs.


As a reference application the well-known cart system is presented. As common to real world applications the vehicle load capacity is not known. We assume the vehicle mass m1, linear friction coefficient d1 and static friction coefficient FC as unknown but constant. In order to identify the physical relevant parameters and get rid of time derivatives we apply some exact filtering technique on the measured position x linear in the unknown parameters [2], which is solved using a standard recursive least square algorithm. For the adaptive self-tuning control (STC) approach the filters and a standard RLS algorithm are implemented in combination with a linear state control law parameterized in m1 and d1.

[1] X2C in Scilab-Xcos, 2013, http://www.mechatronic-simulation.org/ 
[2] JJE. Slotine, W. Li, Applied nonlinear control, Prantice-Hall, 1991

Paper signed by Simon Mayr, Gernot Grabmair, Upper Austria University of Applied Sciences