FROM HYBRID SYSTEM SIMULATION TO REAL-TIME IMPLEMENTATION Rachid Djenidi, Christophe Lavarenne, Ramine Nikoukhah, Yves Sorel and Serge Steer INRIA Rocquencourt BP105 - 78153 Le Chesnay Cedex, France Email: ramine.nikoukhah@inria.fr 11th European Simulation Symposium and Exhibition, Erlangen-Nuremberg, oct 1999 KEYWORDS Dynamic modelling, Real-time, Multiprocessors, Hy- brid simulation. ABSTRACT Scicos is a hybrid system simulator. In the context of automatic control, such systems are usually obtained by interconnecting a model of the environment with the model of the controller. Simulation is used to validate the controller which is usually designed using a simpli- fied model of the environment. But even if the controller does perform properly during simulation, there is no guarantee that it can actually be used. For that, the con- troller algorithm must be implemented on the available hardware and satisfy the real-time constraints. SynDEx is a specialized software used for optimized real-time implementation on multiprocessor architectures. Scicos- SynDEx interface provides an environment in which controller implementability can be easily tested and con- troller parameters adjusted iteratively, if necessary; not to mention the generation of the real-time code for the controller hardware. This interface not only speeds up the design process, but also assures that the real-time code has the same properties as the controller model used for the simulation. INTRODUCTION In this paper, we present a software environment based on the hybrid system simulator Scicos and the optimized real-time code generation software SynDEx. In this en- vironment, controllers can be designed, tested in a re- alistic environmental model, and real-time code for the implementation of the controller can be generated on the desired hardware (target architecture), which is of- ten distributed. SCICOS Scicos (Scilab Connected Object Simulator) is a Scilab package 1 for modeling and simulation of dynamical sys- tems including both continuous and discrete time sub- systems. Scicos includes a graphical editor for con- structing models by interconnecting blocks (represent- ing predefined basic functions or user defined functions) (Nikoukhah and Steer 1997). Scicos blocks can have input and output ports of two types: regular and activation. Input ports receive Scicos signals and output ports generate them. Scicos blocks are activated by activation signals which are received on their activation input ports. A block with no input acti- vation port is permanently active (called time dependent) otherwise it inherits its activation times from the union of activations times of its regular input signals. Associated with each signal, in Scicos, is a set of time intervals, called activation times, on which the signal can evolve (Benveniste 1998). Outside their activation times, Scicos signals remain constant (see Figure 1). The acti- vation time set is a union of time intervals and isolated points called events. Signals in Scicos are generated by blocks activated by activation signals. An activation signal causes the block to evaluate its outputs and new internal states as a func- tion of its inputs and previous internal states. The output signals inherit their activation time sets from the gener- ating block. The outgoing signals of output activation ports are ac- tivation signals generated by the block. Consider for example, the Clock block which generates an activation signal composed of a train of regularly spaced events in time. If the output of this block is connected to the input activation port of a scope block, it specifies at what times the value of the inputs of the scope must be sampled for display. 1 Free Matlab like software available by anonymous ftp from ftp.inria.fr in directory INRIA/Scilab.