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