Targeting the Scicos Codegenerator for embedded ... - Scilab
Recommend Documents
The result is a full open source rapid prototyping system based on Linux RTAI,. RTAI-Lab and ... time network or in a local machine and can be used to mix Scilab/Scicos with Matlab/Simulink/RTW generated ... code generator which translate the graphic
eBooks Modeling and Simulation in Scilab/Scicos with ScicosLab 4.4 Free Download, Free Download Modeling and Simulation
George Goulas, Panayiotis Alefragis, Nikolaos S. Voros. Technological Educational Institute of Mesolonghi, Greece. {ggoulas, alefrag, voros}@teimes.gr.
Jul 26, 2013 - A company must be able to take such a chip and pro- gram it, based ... Array (FPGA), in addition to it being affordable since it could be ... [4], and still getting an optimized binary for a given hardware .... The Scilab compiler engi
2 Creating a basic scicos block ... 2.1.1 job the task parameter of GUI function: ....
programs written in C and type 5 is used for programming in Scilab. In the C.
with a Rapid Control Prototyping (RCP) suite based on Scilab/. Scicos and a PC
computer. ... control system development namely specification, modeling,
identification ..... Using predictive control calculation based on object model
equation on ...
SciLab. A short introduction to working with SciLab. SCILAB ......................................
................................................................................................................... 1.
It bases on a numerical, programming and graphics environment; similar in
operation but different .... Scilab doesn't have Visualize GUI as Matlab. Scilab has
...
Scilab. Solve the following system of Equations. 3 x + 2 y = 10. 1.5 x – 2 y = 10 ...
Scilab. Or,. A * b = c. Where b={x y} c={10. 10}. A=[3. 2. 1.5 −2]. Page 5 ...
Scilab Enterprises S.A.S -‐ 143 bis rue Yves Le Coz -‐ 78000 Versailles (France)
.... The left and right keys are used to change the instructions and the up and ...
limited spread of Scilab is lack of good tutorials in English, which makes learning
Scilab a .... Scilab's tools for creating GUIs are poor compared with Matlab. ▫.
Calculation accuracy 29. Solving differential equations 30. Chapter 3 – Useful
Scilab functions. In analysis 32. In probability and statistics 32. To display and
plot ...
Sep 1, 2011 - ScicosLab is an Open Source software package whose ..... available by Scicos that lets you write custom code within a block with a standard ...
models are designed using a block diagram editor, but an underlying language ... block, we end up with a multi-frequency activation clock: the sum (union) of.
Migrating to from Simulink to Scicos with respect to real time programs.
Supervisor: .... This implementation allows users to use a block in Simulink
representing ...
Page 3. iii. Table of Contents. I. Scilab .............................................................................
......................................... 1 abort . ...... Page 5 ...
Jun 26, 2013 ... SPB - S 31119:1993. – SPB - NF EN ISO 11819-1:1997. – CPB - NF S 31-119-2:
2000. ○ .... //%F : no outlier suppression. //type of campaign.
Page 3. Page 4. iv. Table of Contents ..... getscilabmode .............................................
........................................................ 63 getshell . ... Page 5. Scilab manual v global .
Page 1. Scilab manual. Page 2. Scilab manual. Page 3. Page 4. iv. Table of
Contents. I. Scilab . ..... Page 5. Scilab manual v global .
EXEMPLE 2 : PILOTAGE D'UN MOTEUR À COURANT CONTINU. 31. EXEMPLE
3 : AXE ASSERVI D'ANGIOGRAPHIE BI-PLAN. 42. 3 - modélISatIon et ...
Page 3. iii. Table of Contents. I. Scilab .............................................................................
......................................... 1. 1. Scilab keywords . ...... Page 5 ...
Page 2. Manual Scilab. Page 3. iii. Índice. I. Scilab .......................................................
............................................................... 1 abort . ...... Page 5. Manual Scilab v.
Page 3. Page 4. iv. Table des matières ..... getscilabmode ..........................................
........................................................... 66 getshell . ... Page 5. Scilab manual v.
Targeting the Scicos Codegenerator for embedded ... - Scilab
Implementation. Examples. Conclusions. Outline. 1 Rapid Controller Prototyping.
2 Linux RTAI. 3 Scilab/Scicos and Linux RTAI. 4 Implementation. 5 Examples.
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Targeting the Scicos Codegenerator for embedded applications Ing. Roberto Bucher Scuola Universitaria Professionale della Svizzera Italiana (SUPSI)
Paris - 1.7.2009
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Objectives
(Prices in Euro) Core SW Control SW Graphical GUI Code generator RT target
Commercial Control design environment 1950.1000.3000.7500.3000.-
Proposed solution 0.0.0.0.0.-
Conclusions
Rapid Controller Prototyping
Objectives
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Outline
1
Rapid Controller Prototyping
2
Linux RTAI
3
Scilab/Scicos and Linux RTAI
4
Implementation
5
Examples
6
Conclusions
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Introduction
Control Design Loop specification
verification
modelling identification
implementation
control design
simulation
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Introduction
Rapid Controller Prototyping - Requirements
2 main components 1 2
An OS with hard real-time features A Computer Aided Control System Design environment including a code generator
→ Linux RTAI + RTAI-Lab + Scilab/Scicos
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Basics
The Linux RTAI project
Hard real-time extension to the Linux OS Based on the ADEOS pipeline (with some improvements!) Free Open Source Software (FOSS) Implementation of hard real-time controllers using general purpose hardware Same PC for the controller design, the hard real-time controller task and the soft real-time monitor task Hard real-time in kernel and user space Distributed control through the net rpc module
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Basics
Linux RTAI - Features
Latency: < 10µs depending on the HW Typical sampling frequencies: 1 . . . 10kHz
National Radio Astronomy Observatory controlled with Linux RTAI - West Virginia
http://www.gb.nrao.edu/43m/
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Add-ons
Add-ons for Scilab/Scicos
The link between Scilab/Scicos and Linux RTAI is implemented through: A code generator → RTAICodeGen .sci. A rtmain.c (main file for the real-time task) specific for the Scilab/Scicos environment. An external ”template Makefile” A new scicos palette RTAI-Lib.cosf. Macros for the new blocks (Scicos interface functions). A RTAI library specific for the new Scicos blocks (Scicos implementation functions).
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
The code generator
RTAICodeGen .sci
The code generator used in RTAI is a modification of the standard Scicos code generator Only stand-alone generation with specific main procedure (rtmain.c) Sensors and actuators are integrated in the Scicos block diagram as specific custom peripheral blocks Each block can be identified by a name which is then referred in RTAI-Lab
3 threads: Main thread rtMain Hard RT thread rt BaseRate Communication thread with the GUI client application rt HostInterface
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
The ”main” file
The rt BaseRate thread NAME(MODEL,_init)();
SOFT real−time
WaitTimingEvent
NAME(MODEL,_isr)(double t);
HARD real−time
N End? Y
NAME(MODEL,_end)();
SOFT real−time
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Adding new blocks
Adding a new block
Each new block needs An interface function (“.sci”) An implementation function (“.c”)
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
The inverted pendulum
The Inverted Pendulum
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
The inverted pendulum
The Inverted Pendulum Particular of the RF encoder
Conclusions
Rapid Controller Prototyping
Linux RTAI
The inverted pendulum
The Inverted Pendulum
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
The inverted pendulum
The Inverted Pendulum
Encoder+RF sender Driver
RF receiver i1
M1
φ1 CAN BUS
PC with HRT controller
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
The inverted pendulum
The Inverted Pendulum
y u φ
Klqr
Reduced order obsever
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
The inverted pendulum
The Inverted Pendulum The Scicos scheme 1
Switch 1 0.2
Scope SCOPE Safety block
Real Plant
ABS
Input_ref
LQR_controller
Sine Swingup_controller
Rapid Controller Prototyping Ball on beam
Ball on Beam
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping Ball on beam
Ball on Beam
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Ball on beam
Ball on Beam The Scicos scheme
1
extdata siginp.dat
Scope SCOPE
−K− Controllore + Osservatore
Ball on beam
Scope
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Ball on beam
Ball on Beam The anti-windup controller
1
1 x+=Ax+Bu y=Cx+Du
2 3
Mux
C + O Direct
+ 1
+ Sum
Saturazione x+=Ax+Bu y=Cx+Du
C + O Feedback
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Ball on beam
Ball on Beam The CANopen blocks
1
Epos canopen sync
Epos Analog 0x02 0
1
Epos motor I 0x02
Mathemati.. Expression
INIT ENC 1s X0
Epos encoder 0x02
INIT ENC 1s PHI0
num(z) den(z)
1
2
Rapid Controller Prototyping Ball on beam
Videos
Sample Videos
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Examples
Conclusions
Conclusions
Conclusions
Open source!!! Complete and stable. Able to solve complex control problems in a simple way. It runs parallel to a MATLAB/Simulink/RTW environment in my student laboratory
Rapid Controller Prototyping
Linux RTAI
Scicos
Implementation
Questions
Questions?
Thank You www.rtai.org www.dti.supsi.ch/∼bucher/scilab.html www.dti.supsi.ch/∼smt/laboO4.html