-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <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}
- </style>
-</head>
-<body>
-
-<div id="main_content" style="max-width: 60em;">
-
-<p>
-
-[[!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 <a href="https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch">real-time
- variant of the Linux kernel</a> that provides bounded maximal
- latencies. The resulting control system supports sampling
- frequencies up to 20 kHz.</p>
-
-<div>
-<b>Page Contents</b>
-
-[[!toc]]
-</div>
-
-<h2 id="news">Recent News</h2>
-
-<ul>
-<li>
- 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.
- The <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux.pdf">Paper</a>
- and <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux-rtlws2014.pdf">slides</a>
- are available from our <a href="http://rtime.felk.cvut.cz/publications/">publications archive</a>.
- </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="linuxnative">I/O and communication interface support</h2>
-
-<ul>
- <li>
- <p><a href="http://www.humusoft.com/data/session.php?redirect=/produkty/datacq/mf624/&lang=en">Humusoft
- MF624 data acquisition card</a>.</p>
-
- <p><abbr title="User Space I/O">UIO</abbr> driver and Simulink
- blockset has been developed. The UIO driver is
- already <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06849faab58fc7ff9f4eae2532380c2a746a6f47">included
- in the mainline Linux kernel</a>. Simulink blockset is available
- from
- a <a href="https://rtime.felk.cvut.cz/gitweb/mf624-simulink.git">separate
- repository</a>.
- </p>
- <p>
- More documentation about the UIO driver can be found
- on <a href="http://rtime.felk.cvut.cz/hw/index.php/Humusoft_MF6xx">DCE
- HW Wiki page</a>.</p>
- </li>
- <li>
- <p>
- The Bhanderi's <a href="http://www.mathworks.com/matlabcentral/fileexchange/15792-comedi-toolbox-v1-0-for-linux-based-rtw-targets">ComediToolbox</a>
- suitable for most Linux <a href="http://www.comedi.org/">Comedi</a> driver supported analog and digital
- inputs/output cards has been successfuly tested with <b>ert_linux target</b>. The little updated version
- with target configuration example is available in <b>lintarget</b> project
- <a href="https://sourceforge.net/projects/lintarget/files/">download area</a>.
- </p>
- </li>
- <li>
- <p>
- The basic blocks for <a href="can_bus/index.html">CAN messages sending and receiption</a>
- under Linux are implemented.
- </p>
- </li>
-</ul>
-
-
-<!-- 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>. -->
-
-<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="https://sourceforge.net/projects/lintarget/files/">project download area</a>
- contains released versions of the Linux target and CANopen based distributed system
- </dd>
- <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>
- <dt>Humusoft MF624 card support blockset</dt>
- <dd><a href="http://rtime.felk.cvut.cz/gitweb/mf624-simulink.git">http://rtime.felk.cvut.cz/gitweb/mf624-simulink.git</a>
- <br>initial version of blockset supporting analog and digital input/output, IRC, PWM and PWM measurement for MF624 cards.
- </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>
- <dt>Usable Simulink Embedded Coder Target for Linux</dt>
- <dd>Michal Sojka, Pavel Pisa<br>
- <a href="https://www.osadl.org/RTLWS-2014.rtlws-2014.0.html">16th Real-Time Linux Workshop</a>,
- Düsseldorf, Germany, October 2014.
- The <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux.pdf">paper (PDF)</a>
- and <a href="http://rtime.felk.cvut.cz/publications/public/ert_linux-rtlws2014.pdf">slides (PDF)</a>
- are available from our
- <a href="http://rtime.felk.cvut.cz/publications/">publications archive</a>.
- </dd>
-</dl>
-
-<h2 id="contributors">Project Contributors</h2>
-
-<dl>
- <dt>Michal Sojka</dt>
- <dd><a href="mailto:sojkam1@fel.cvut.cz">sojkam1@fel.cvut.cz</a> ,
- homepage <a href="http://rtime.felk.cvut.cz/~sojka/">http://rtime.felk.cvut.cz/~sojka/</a>
- <br>teacher, researcher and developer at DCE CTU.
- </dd>
- <dt>Pavel Píša</dt>
- <dd><a href="mailto:pisa@cmp.felk.cvut.cz">pisa@cmp.felk.cvut.cz</a> ,
- homepage <a href="http://cmp.felk.cvut.cz/~pisa/">http://cmp.felk.cvut.cz/~pisa/</a>
- <br>teacher, researcher and developer at DCE CTU.
- </dd>
- <dt>Rostislav Lisový</dt>
- <dd><a href="mailto:lisovros@fel.cvut.cz">lisovros@fel.cvut.cz</a>
- <br>former CTU master study programe student, Linux related projects developer at DCE now.
- </dd>
- <dt>Libor Waszniowski</dt>
- <dd><a href="mailto:xwasznio@fel.cvut.cz">xwasznio@fel.cvut.cz</a>
- <br>former DCE CTU researcher responsible for the project with AERO Vodochody.
- </dd>
- <dt>Lukáš Hamáček</dt>
- <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> –
-<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>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>
-
-</div>
-
-</body>
-</html>