Linux ERT target for MathWorks' Simulink® 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.
Linux ERT target uses heavily real-time capabilities of real-time variant of the Linux kernel. The resulting control system supports sampling frequencies up to 20 kHz.
- We will present the ert_linux project at Amper exhibition from 18th to 21st March 2014 in Brno, Czech Republic.
- Linux ERT at Embedded World exhibition – 25 until 27 February 2014 - Visit DCE CTU developers and researchers at the OSADL booth (hall 5 booth 276).
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 Michal Sojka's blog post. UIO driver and blockset has been implemented to support Humusoft data acquisition cards (MF624 for now).
UIO driver for the MF624 card is already included in the Linux mainline kernel. More documentation for this driver can be found on DCE HW Wiki page.
Standard distribution Linux kernel does not guarantee bounded latencies for many operations. The use of real-time variant of Linux 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.
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 SMI 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.
A long period evaluation data of different combinations of Linux kernel version runing on many CPU architectures and boards from many vendors is OSADL Quality Assurance Farm. 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.
- Lintarget at Source Forge
- project download area contains released versions of the Linux target and CANopen based distributed system
- Linux ERT source code repository
version updated for real-time and native GNU/Linux host/target system setup
- Humusoft MF624 card support blockset
initial version of blockset supporting analog and digital input/output, IRC, PWM and PWM measurement for MF624 cards.
The Linux ERT has been initially developed at DCE of CTU in order to create a dynamic environment model for hardware (airplane) in the loop testing of a fly-by-wire system at AERO Vodochody a.s.. Simulink has been run on Windows host computer initially and code generated for GNU/Linux embedded target system was compiled under MinGW/MSYS environment and then uploaded to PowerPC based BOA5200 computer. The target computer was equipped with two CAN interfaces. CANopen blockset based on CANfestival project was used to control distributed servosystem used to simulate fly-by-wire system load. Simulink CANopen blockset integrates a SocketCAN driver configuration and CAN messages processing support to the generated code and enables the user to develop distributed embedded control applications with CANopen communication.
Lukáš Hamáček, “RTW target for Linux with CANopen support”, Master Thesis, Prague 2009. (Pdf)
- Moving Slide parallel kinematic/robot control
- 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 respective page for more information about project.
- Michal Sojka
- firstname.lastname@example.org ,
teacher, researcher and developer at DCE CTU.
- Pavel Píša
- email@example.com ,
teacher, researcher and developer at DCE CTU.
- Rostislav Lisový
former CTU master study programe student, Linux related projects developer at DCE now.
- Libor Waszniowski
former DCE CTU researcher responsible for the project with AERO Vodochody.
- Lukáš Hamáček
- former CTU master student.
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.