"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
- <title>[[!meta title="Linux Target for Simulink® Embedded Coder"]]</title>
+ <title>[[!meta title="Linux Target for Simulink® Embedded Coder®"]]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link><style type="text/css">
#main_content {max-width: 70em}
</head>
<body>
-<div id="main_content">
+<div id="main_content" style="max-width: 60em;">
<p>
-Linux ERT target is based on <a href="http://www.mathworks.com/">MathWorks</a>' generic Unix target
-for <a href="http://en.wikipedia.org/wiki/Simulink">Simulink</a> Embedded Coder®. It allows to compile
-dynamic model/control system designed in Simulink to the C-code and combine it with target specific
-support functions. The resulting executable/controller is then run model in real-time on the target system.
-The recent version is optimized to use real-time capabilities of
-<a href="http://rt.wiki.kernel.org/">real-time variant</a> of
-<a href="http://en.wikipedia.org/wiki/Linux">Linux</a> kernel.
-The control system smaplink frequencies up to 20 kHz with no losing sample per months
-can be achieved by carefully selected x86 or embedded system (see <a href="http://www.osadl.org/">OSADL</a>
-<a href="http://www.osadl.org/Quality-assurance-at-the-OSADL-QA-Farm.osadl-services-qa.0.html">Quality Assurance Farm</a>).
+
+[[!img ert_linux_snapshot1.png size="300x" align=right alt="Screenshot or ert_linux"]]
+
+Linux ERT target
+for <a href="http://www.mathworks.com/">MathWorks</a>' <a href="http://en.wikipedia.org/wiki/Simulink">Simulink</a>®
+Embedded Coder® allows to compile a model of designed control system
+to the C-code and combine it with target specific support functions.
+The resulting executable/controller can be run in real-time on the
+target Linux system. The running dynamic system can be augmented via
+tunable block parameters in the Simulink model and data can be
+acquired and visualized with Simulink scopes.
</p>
+<p>
+ Linux ERT target uses heavily real-time capabilities
+ of <abbr title="PREEMPT RT">real-time</abbr> variant of the Linux
+ kernel. The resulting control system supports sampling frequencies
+ up to 20 kHz.</p>
+
<div>
<b>Page Contents</b>
<ul>
<li>
-Linux ERT at Embedded World exhibition - 25 till 27 February 2014 - Visit
+ We will present the a paper <a href="https://www.osadl.org/?id=2018">Usable Simulink Embedded Coder Target for Linux</a>
+ and RPi motor control demonstartion at <a href="https://www.osadl.org/RTLWS-2014.rtlws-2014.0.html">16th Real Time Linux Workshop</a>
+ taking place on 12 and 13 October 2014 in Dusseldorf Germany.</li>
+<li>
+ We will present the ert_linux project
+ at <a href="http://www.amper.cz/en/online-catalog/list-of-exhibitors.html/e9595_0-fakulta-elektrotechnicka-cvut-v-praze">Amper
+ exhibition</a> from 18th to 21st March 2014 in Brno, Czech Republic.</li>
+<li>
+Linux ERT at Embedded World exhibition – 25 until 27 February 2014 - Visit
<a href="http://www.ask-embedded-world.de/index.php5?id=342793&Action=showCompany">DCE CTU</a>
developers and researchers at the OSADL booth (hall 5 booth 276).
</li>
</ul>
-<h2 id="prjbackground">Project Background</h2>
-
-<p>
-The Linux ERT has been initially designed at <a href="#dce">DCE of CTU</a> to develop and realize dynamic environment model
-for hardware (airplane) in the loop testing of fly-by-wire system at <a href="http://www.aero.cz/en">AERO Vodochody a.s.</a>.
-Simulink has been run on Windows host computer initially and code generated for GNU/Linux embedded target
-system was compiled under <a href="http://en.wikipedia.org/wiki/Mingw">MinGW/MSYS</a> environment and then uploaded
-to PowerPC based <a href="http://rtime.felk.cvut.cz/hw/index.php/Boa5200">BOA5200</a> computer.
-The target computer was equipped by two CAN interfaces. <a href="http://en.wikipedia.org/wiki/Canopen">CANopen</a>
-blockset based on <a href="http://canfestival.org/">CANfestival</a> is used to control distributed
-servosystem used to simulate fly-by-wire system load. Simulink CANopen blockset integrates a
-<a href="http://en.wikipedia.org/wiki/Socketcan">SocketCAN</a> driver configuration and CAN messages
-processing support to the generated code and enables the user to develop distributed embedded
-control applications with CANopen communication.</p>
-
-<p><img width=600 src="LinTarget.JPG" alt="Original code generation workflow"></p>
-
-<p><img width=600 src="CANopenExample.JPG" alt="Model including node controlled over CANopen"></p>
-
-<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>
-
<h2 id="linuxnative">Native Linux Real-Time and I/O Cards Support</h2>
-<p>The Linux ERT target is updated and optimized to use Linux kernel timing mechanism with lower
-maximal latencies now. Matlab/Simulink run on GNU/Linux desktop system as development system is supported now.
-More information about update can be found on respective <a href="http://rtime.felk.cvut.cz/~sojka/blog/on-generating-linux-applications-from-simulink/">Michal Sojka's blog page</a>.
-UIO driver and blockset has been implemented to support
+<p>Current version of the Linux ERT target is optimized to use the
+proper Linux kernel timing mechanism with bounded maximal latencies.
+Matlab/Simulink running on GNU/Linux desktop system as development
+system is supported. More information about current version can be
+found
+in <a href="http://rtime.felk.cvut.cz/~sojka/blog/on-generating-linux-applications-from-simulink/">Michal
+Sojka's blog post</a>. UIO driver and blockset has been implemented to
+support
<a href="http://www.humusoft.com/produkty/datacq/">Humusoft data acquisition cards</a> (MF624 for now).</p>
-<p>UIO (User Space I/O) driver for the MF624 card is already included in Linux kernel mainline. More
-documentation for this driver can be found in Rostislav Lisový master thesis and on <a href="http://rtime.felk.cvut.cz/hw/index.php/Humusoft_MF6xx"></a>DCE HW Wiki page</p>
+<p><abbr title="User Space I/O">UIO</abbr> driver for the MF624 card
+is already included in the Linux mainline kernel. More documentation
+for this driver can be found
+on <a href="http://rtime.felk.cvut.cz/hw/index.php/Humusoft_MF6xx">DCE
+HW Wiki page</a>.</p>
+
+<h2 id="platformselect">RT-Capable Platform and Kernel</h2>
+<p>
+Standard distribution Linux kernel does not guarantee bounded latencies for many operations.
+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>
+kernel is required to make system durable. This kernel variants minimizes regions
+where switch to the highest priority (i.e. Linux ERT generated) task is blocked by
+kernel when servicing system calls for other tasks.
+</p>
+<p>
+Selection of the right version of the kernel is not enough for non-disruptive
+operation. Computer system hardware selection is critical as well. The system
+has to provide enough computational power for compiled in blocks data evaluation
+evaluation and Linux kernel services processing. Other critical disturbance sources
+are hardware caused latencies and lags in a program processing by CPU. The source
+can be bus systems load by other subsystems (i.e. graphic processor memory access,
+peripheral DMA - SSD, SD-card, Flash controller etc.). The other critical source of
+latencies in x86 based systems is <a href="http://en.wikipedia.org/wiki/System_Management_Mode">SMI</a>
+processing. The SMI enable and processing is under BIOS and motherboard vendor control
+and this problem cannot be resolved by operating system. This means that proper
+hardware selection is critical.
+</p>
+<p>
+A long period evaluation data of different combinations of Linux kernel version
+runing on many CPU architectures and boards from many vendors is <a href="http://www.osadl.org/">OSADL</a>
+<a href="http://www.osadl.org/Quality-assurance-at-the-OSADL-QA-Farm.osadl-services-qa.0.html">Quality Assurance Farm</a>.
+According to these track records carefully selected x86 or embedded GNU/Linux system can run
+real-time tasks with sampling frequencies up to 20 kHz with no losing sample per months.
+</p>
<h2 id="download">Source Code and Download</h2>
<dl>
<dt>Lintarget at Source Forge</dt>
- <dd><a href="http://sourceforge.net/projects/lintarget/">http://sourceforge.net/projects/lintarget/</a>
- <br>project download area contains original Linux target code for CANopen based distributed system
+ <dd><a href="https://sourceforge.net/projects/lintarget/files/">project download area</a>
+ contains released versions of the Linux target and CANopen based distributed system
</dd>
- <dt>Updated Linux ERT core support</dt>
+ <dt>Linux ERT source code repository</dt>
<dd><a href="http://rtime.felk.cvut.cz/gitweb/ert_linux.git">http://rtime.felk.cvut.cz/gitweb/ert_linux.git</a>
<br>version updated for real-time and native GNU/Linux host/target system setup
</dd>
</dl>
+<h2 id="prjbackground">Project Background</h2>
+
+<p>
+The Linux ERT has been initially developed at <a href="#dce">DCE of
+CTU</a> in order to create a dynamic environment model for hardware
+(airplane) in the loop testing of a fly-by-wire system
+at <a href="http://www.aero.cz/en">AERO Vodochody a.s.</a>. Simulink
+has been run on Windows host computer initially and code generated for
+GNU/Linux embedded target system was compiled
+under <a href="http://en.wikipedia.org/wiki/Mingw">MinGW/MSYS</a>
+environment and then uploaded to PowerPC
+based <a href="http://rtime.felk.cvut.cz/hw/index.php/Boa5200">BOA5200</a>
+computer. The target computer was equipped with two CAN
+interfaces. <a href="http://en.wikipedia.org/wiki/Canopen">CANopen</a>
+blockset based on <a href="http://canfestival.org/">CANfestival</a>
+project was used to control distributed servosystem used to simulate
+fly-by-wire system load. Simulink CANopen blockset integrates a
+<a href="http://en.wikipedia.org/wiki/Socketcan">SocketCAN</a> driver configuration and CAN messages
+processing support to the generated code and enables the user to develop distributed embedded
+control applications with CANopen communication.</p>
+
+[[!img LinTarget.JPG size=300x alt="Original code generation workflow"]]
+[[!img CANopenExample.JPG size=300x alt="Model including node controlled over CANopen"]]
+
+<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>
+
+<h2 id="applications">Systems Controlled Linux Target for Embedded Coder</h2>
+
+Some more information about concrete examples of controlled systems/setups:
+
+<dl>
+ <dt><b>Moving Slide</b> parallel kinematic/robot control</dt>
+ <dd>The Linux ERT target is used at Adaptive Systems Department (Academy of Sciences
+ of Czech Republic, UTIA institute) to realize control system for parallel kinematics
+ control research projects. See <a href="moving-slide/index.html">respective page for more
+ information about project</a>.
+ </dd>
+ <dt><b>Raspberry Pi</b> minimal components DC motor servo control</dt>
+ <dd><a href="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi</a> is low cost
+ hardware which does not implement any usual motor control peripherals in hardware.
+ Yet fully preemptive variant of Linux kernel latencies are so low that fast signals
+ processing in software allows to implement precise DC motor feedback control
+ for incremental encoder inputs changing up to 15 kHz.
+ See <a href="rpi-motor-control/index.html"> respective page for more information
+ about project</a>.
+ </dd>
+</ul>
+
<h2 id="contributors">Project Contributors</h2>
<dl>
</dd>
<dt>Libor Waszniowski</dt>
<dd><a href="mailto:xwasznio@fel.cvut.cz">xwasznio@fel.cvut.cz</a>
- <br>the former DCE CTU researcher responsible for project founding and delivery to AERO Vodochody.
+ <br>former DCE CTU researcher responsible for the project with AERO Vodochody.
</dd>
<dt>Lukáš Hamáček</dt>
- <dd><a href="mailto:xwasznio@fel.cvut.cz">xwasznio@fel.cvut.cz</a>
- <br>former CTU master study programe student.
+ <dd>
+ former CTU master student.
</dd>
</dl>
-<p id="dce"><b>DCE</b> - <a href="http://dce.fel.cvut.cz/" target="_blank">Department of Control Engineering</a> -
+<p id="dce"><b>DCE</b> – <a href="http://dce.fel.cvut.cz/" target="_blank">Department of Control Engineering</a> –
<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>
-<h2>Acknowledgement</h2>
+<h2>Acknowledgment</h2>
<p>This work was supported by Ministry of Industry and Trade of the Czech Republic under Project
FT—TA3/044 during period of 2006 to 2009 years.</p>