]> rtime.felk.cvut.cz Git - ert_linux_web.git/blob - index.html
d07888bfdd262d71947d6336d6281385cc444d13
[ert_linux_web.git] / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2    "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5   <title>[[!meta title="Linux Target for Simulink® Embedded Coder®"]]</title>
6   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7   <link><style type="text/css">
8     #main_content {max-width: 70em}
9   </style>
10 </head>
11 <body>
12
13 <div id="main_content" style="max-width: 60em;">
14
15 <p>
16
17 [[!img ert_linux_snapshot1.png size="300x" align=right alt="Screenshot or ert_linux"]]
18
19 Linux ERT target
20 for <a href="http://www.mathworks.com/">MathWorks</a>' <a href="http://en.wikipedia.org/wiki/Simulink">Simulink</a>®
21 Embedded Coder® allows to compile a model of designed control system
22 to the C-code and combine it with target specific support functions.
23 The resulting executable/controller can be run in real-time on the
24 target Linux system. The running dynamic system can be augmented via
25 tunable block parameters in the Simulink model and data can be
26 acquired and visualized with Simulink scopes.
27 </p>
28
29 <p>
30   Linux ERT target uses heavily real-time capabilities
31   of <a href="https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch">real-time
32   variant of the Linux kernel</a> that provides bounded maximal
33   latencies. The resulting control system supports sampling
34   frequencies up to 20 kHz.</p>
35
36 <div>
37 <b>Page Contents</b>
38
39 [[!toc]]
40 </div>
41
42 <h2 id="news">Recent News</h2>
43
44 <ul>
45 <li>
46   We will present the a paper <a href="https://www.osadl.org/?id=2018">Usable Simulink Embedded Coder Target for Linux</a>
47   and RPi motor control demonstartion at <a href="https://www.osadl.org/RTLWS-2014.rtlws-2014.0.html">16th Real Time Linux Workshop</a>
48   taking place on 12 and 13 October 2014 in Dusseldorf Germany.
49   The <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux.pdf">Paper</a>
50   and <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux-rtlws2014.pdf">slides</a>
51   are available from our <a href="http://rtime.felk.cvut.cz/publications/">publications archive</a>.
52   </li>
53 <li>
54   We will present the ert_linux project
55   at <a href="http://www.amper.cz/en/online-catalog/list-of-exhibitors.html/e9595_0-fakulta-elektrotechnicka-cvut-v-praze">Amper
56   exhibition</a> from 18th to 21st March 2014 in Brno, Czech Republic.</li>
57 <li>
58 Linux ERT at Embedded World exhibition – 25 until 27 February 2014 - Visit
59 <a href="http://www.ask-embedded-world.de/index.php5?id=342793&amp;Action=showCompany">DCE CTU</a>
60 developers and researchers at the OSADL booth (hall 5 booth 276).
61 </li>
62 </ul>
63
64 <h2 id="linuxnative">I/O and communication interface support</h2>
65
66 <ul>
67   <li>
68     <p><a href="http://www.humusoft.com/data/session.php?redirect=/produkty/datacq/mf624/&lang=en">Humusoft
69     MF624 data acquisition card</a>.</p>
70
71     <p><abbr title="User Space I/O">UIO</abbr> driver and Simulink
72       blockset has been developed. The UIO driver is
73       already <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06849faab58fc7ff9f4eae2532380c2a746a6f47">included
74       in the mainline Linux kernel</a>. Simulink blockset is available
75       from
76       a <a href="https://rtime.felk.cvut.cz/gitweb/mf624-simulink.git">separate
77       repository</a>.
78     </p>
79     <p>
80       More documentation about the UIO driver can be found
81       on <a href="http://rtime.felk.cvut.cz/hw/index.php/Humusoft_MF6xx">DCE
82       HW Wiki page</a>.</p>
83   </li>
84   <li>
85     <p>
86       The Bhanderi's <a href="http://www.mathworks.com/matlabcentral/fileexchange/15792-comedi-toolbox-v1-0-for-linux-based-rtw-targets">ComediToolbox</a>
87       suitable for most Linux <a href="http://www.comedi.org/">Comedi</a> driver supported analog and digital
88       inputs/output cards has been successfuly tested with <b>ert_linux target</b>. The little updated version
89       with target configuration example is available in <b>lintarget</b> project
90       <a href="https://sourceforge.net/projects/lintarget/files/">download area</a>.
91     </p>
92   </li>
93   <li>
94     <p>
95       The basic blocks for <a href="can_bus/index.html">CAN messages sending and receiption</a>
96       under Linux are implemented.
97     </p>
98   </li>
99 </ul>
100
101
102 <!-- Current version of the Linux ERT target is optimized to use the proper -->
103 <!-- Linux kernel timing mechanism with bounded maximal latencies. -->
104 <!-- Matlab/Simulink running on GNU/Linux desktop system as development -->
105 <!-- system is supported. More information about current version can be -->
106 <!-- found -->
107 <!-- in <a href="http://rtime.felk.cvut.cz/~sojka/blog/on-generating-linux-applications-from-simulink/">Michal -->
108 <!-- Sojka's blog post</a>. -->
109
110 <h2 id="platformselect">RT-Capable Platform and Kernel</h2>
111
112 <p>
113 Standard distribution Linux kernel does not guarantee bounded latencies for many operations.
114 The use of <a href="http://rt.wiki.kernel.org/">real-time variant</a> of <a href="http://en.wikipedia.org/wiki/Linux">Linux</a>
115 kernel is required to make system durable. This kernel variants minimizes regions
116 where switch to the highest priority (i.e. Linux ERT generated) task is blocked by
117 kernel when servicing system calls for other tasks.
118 </p>
119 <p>
120 Selection of the right version of the kernel is not enough for non-disruptive
121 operation. Computer system hardware selection is critical as well. The system
122 has to provide enough computational power for compiled in blocks data evaluation
123 evaluation and Linux kernel services processing. Other critical disturbance sources
124 are hardware caused latencies and lags in a program processing by CPU. The source
125 can be bus systems load by other subsystems (i.e. graphic processor memory access,
126 peripheral DMA - SSD, SD-card, Flash controller etc.). The other critical source of
127 latencies in x86 based systems is <a href="http://en.wikipedia.org/wiki/System_Management_Mode">SMI</a>
128 processing. The SMI enable and processing is under BIOS and motherboard vendor control
129 and this problem cannot be resolved by operating system. This means that proper
130 hardware selection is critical.
131 </p>
132 <p>
133 A long period evaluation data of different combinations of Linux kernel version
134 runing on many CPU architectures and boards from many vendors is <a href="http://www.osadl.org/">OSADL</a>
135 <a href="http://www.osadl.org/Quality-assurance-at-the-OSADL-QA-Farm.osadl-services-qa.0.html">Quality Assurance Farm</a>.
136 According to these track records carefully selected x86 or embedded GNU/Linux system can run
137 real-time tasks with sampling frequencies up to 20&nbsp;kHz with no losing sample per months.
138 </p>
139
140 <h2 id="download">Source Code and Download</h2>
141
142 <dl>
143   <dt>Lintarget at Source Forge</dt>
144     <dd><a href="https://sourceforge.net/projects/lintarget/files/">project download area</a>
145        contains released versions of the Linux target and CANopen based distributed system
146     </dd>
147   <dt>Linux ERT source code repository</dt>
148     <dd><a href="http://rtime.felk.cvut.cz/gitweb/ert_linux.git">http://rtime.felk.cvut.cz/gitweb/ert_linux.git</a>
149        <br>version updated for real-time and native GNU/Linux host/target system setup
150     </dd>
151   <dt>Humusoft MF624 card support blockset</dt>
152     <dd><a href="http://rtime.felk.cvut.cz/gitweb/mf624-simulink.git">http://rtime.felk.cvut.cz/gitweb/mf624-simulink.git</a>
153        <br>initial version of blockset supporting analog and digital input/output, IRC, PWM and PWM measurement for MF624 cards.
154     </dd>
155 </dl>
156
157
158 <h2 id="prjbackground">Project Background</h2>
159
160 <p>
161 The Linux ERT has been initially developed at <a href="#dce">DCE of
162 CTU</a> in order to create a dynamic environment model for hardware
163 (airplane) in the loop testing of a fly-by-wire system
164 at <a href="http://www.aero.cz/en">AERO Vodochody a.s.</a>. Simulink
165 has been run on Windows host computer initially and code generated for
166 GNU/Linux embedded target system was compiled
167 under <a href="http://en.wikipedia.org/wiki/Mingw">MinGW/MSYS</a>
168 environment and then uploaded to PowerPC
169 based <a href="http://rtime.felk.cvut.cz/hw/index.php/Boa5200">BOA5200</a>
170 computer. The target computer was equipped with two CAN
171 interfaces. <a href="http://en.wikipedia.org/wiki/Canopen">CANopen</a>
172 blockset based on <a href="http://canfestival.org/">CANfestival</a>
173 project was used to control distributed servosystem used to simulate
174 fly-by-wire system load. Simulink CANopen blockset integrates a
175 <a href="http://en.wikipedia.org/wiki/Socketcan">SocketCAN</a> driver configuration and CAN messages
176 processing support to the generated code and enables the user to develop distributed embedded
177 control applications with CANopen communication.</p>
178
179 [[!img LinTarget.JPG size=300x alt="Original code generation workflow"]]
180 [[!img CANopenExample.JPG size=300x alt="Model including node controlled over CANopen"]]
181
182 <p>Lukáš Hamáček, “<b>RTW target for Linux with CANopen support</b>”, Master Thesis, Prague 2009. (<a href="dp_2009_hamacek_lukas.pdf">Pdf</a>)</p>
183
184 <h2 id="applications">Systems Controlled Linux Target for Embedded Coder</h2>
185
186 Some more information about concrete examples of controlled systems/setups:
187
188 <dl>
189   <dt><b>Moving Slide</b> parallel kinematic/robot control</dt>
190     <dd>The Linux ERT target is used at Adaptive Systems Department (Academy of Sciences
191       of Czech Republic, UTIA institute) to realize control system for parallel kinematics
192       control research projects. See <a href="moving-slide/index.html">respective page for more
193       information about project</a>.
194     </dd>
195   <dt><b>Raspberry Pi</b> minimal components DC motor servo control</dt>
196     <dd><a href="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi</a> is low cost
197       hardware which does not implement any usual motor control peripherals in hardware.
198       Yet fully preemptive variant of Linux kernel latencies are so low that fast signals
199       processing in software allows to implement precise DC motor feedback control
200       for incremental encoder inputs changing up to 15&nbsp;kHz.
201       See <a href="rpi-motor-control/index.html"> respective page for more information
202       about project</a>.
203     </dd>
204   <dt>Usable Simulink Embedded Coder Target for Linux</dt>
205     <dd>Michal Sojka, Pavel Pisa<br>
206     <a href="https://www.osadl.org/RTLWS-2014.rtlws-2014.0.html">16th Real-Time Linux Workshop</a>,
207     Düsseldorf, Germany, October 2014.
208     The <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux.pdf">paper (PDF)</a>
209     and <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux-rtlws2014.pdf">slides (PDF)</a>
210     are available from our
211     <a href="http://rtime.felk.cvut.cz/publications/">publications archive</a>.
212     </dd>
213 </dl>
214
215 <h2 id="contributors">Project Contributors</h2>
216
217 <dl>
218   <dt>Michal Sojka</dt>
219     <dd><a href="mailto:sojkam1@fel.cvut.cz">sojkam1@fel.cvut.cz</a> ,
220        homepage <a href="http://rtime.felk.cvut.cz/~sojka/">http://rtime.felk.cvut.cz/~sojka/</a>
221        <br>teacher, researcher and developer at DCE CTU.
222     </dd>
223   <dt>Pavel Píša</dt>
224     <dd><a href="mailto:pisa@cmp.felk.cvut.cz">pisa@cmp.felk.cvut.cz</a> ,
225        homepage <a href="http://cmp.felk.cvut.cz/~pisa/">http://cmp.felk.cvut.cz/~pisa/</a>
226        <br>teacher, researcher and developer at DCE CTU.
227     </dd>
228   <dt>Rostislav Lisový</dt>
229     <dd><a href="mailto:lisovros@fel.cvut.cz">lisovros@fel.cvut.cz</a>
230        <br>former CTU master study programe student, Linux related projects developer at DCE now.
231     </dd>
232   <dt>Libor Waszniowski</dt>
233     <dd><a href="mailto:xwasznio@fel.cvut.cz">xwasznio@fel.cvut.cz</a>
234        <br>former DCE CTU researcher responsible for the project with AERO Vodochody.
235     </dd>
236   <dt>Lukáš Hamáček</dt>
237     <dd>
238        former CTU master student.
239     </dd>
240 </dl>
241
242
243 <p id="dce"><b>DCE</b> – <a href="http://dce.fel.cvut.cz/" target="_blank">Department of Control Engineering</a> –
244 <a href="http://www.cvut.cz/en" target="_blank">Czech Technical University in Prague</a>, <a href="http://www.fel.cvut.cz/en" target="_blank">Faculty of Electrical Engineering</a></p>
245
246 <h2>Acknowledgment</h2>
247
248 <p>This work was supported by Ministry of Industry and Trade of the Czech Republic under Project 
249 FT—TA3/044 during period of 2006 to 2009 years.</p>
250
251 </div>
252
253 </body>
254 </html>