Integrated Design and Implementation of Embedded Control Systems with Scilab

Longhua Ma, Feng Xia, Zhe Peng

Abstract

Developing embedded control systems traditionally involves a fragmented workflow where control designs are manually translated into low-level code. This paper presents a low-cost, open-source alternative by porting the Scilab/Scicos environment to an ARM-Linux platform. By bridging the gap between high-level simulation and hardware implementation, the authors demonstrate a unified workflow that reduces development time and costs while ensuring algorithm compatibility on resource-constrained hardware.

Introduction

The traditional development cycle for embedded control systems is often inefficient and costly. Control engineers typically design and simulate algorithms in high-level environments like Matlab/Simulink, after which software engineers must manually recode these designs into C or assembly for specific target hardware. This "separated" approach is not only expensive due to proprietary software costs but is also error-prone and time-consuming.

Furthermore, it often leads to performance mismatches: an algorithm that performs perfectly in a PC-based simulation may fail on an embedded platform due to resource constraints or timing issues that were not accounted for during the design phase. To address these challenges, the authors propose a unified environment where the design tool, Scilab, runs directly on the target embedded hardware (ARM-Linux).

The Scilab/Scicos environment running on the target platform, demonstrating a discrete-time controller simulation.

Methodology

The proposed system utilizes a layered architecture to bridge the gap between high-level modeling and low-level execution on embedded hardware.

Hardware and Software Porting

The implementation uses a Cirrus Logic EP9315 development board featuring a 200 MHz ARM920T processor. A significant portion of the work involved porting Scilab/Scicos—an open-source alternative to Matlab—to the ARM-Linux platform. This required several key technical steps:

  • Cross-compilation: Building a Fortran (g77) cross-compiler for the ARM architecture, as much of Scilab’s core is written in Fortran.
  • GUI Integration: Implementing TinyX (a lightweight X server) and Joe’s Window Manager (JWM) to provide a functional graphical user interface on the embedded device.
  • Driver Development: Creating custom I/O drivers for Serial, Ethernet, and Modbus protocols, compiled as shared objects (.so) to allow Scilab to interact with the physical world.

System Architecture

The architecture is structured into three primary layers: hardware, interfaces, and software. This modularity allows the control algorithms to interact with physical processes through standardized interfaces, ensuring that the core logic remains portable.

Layered architecture of the embedded controller, showing the relationship between hardware, interfaces, and control software.

Key Insights and Results

The transition to an "Integrated Platform" represents a significant shift away from the traditional V-model of development. In the V-model, implementation is a separate, later stage that often reveals flaws in the initial design. By contrast, the integrated approach allows for modeling, synthesis, simulation, and implementation to occur concurrently within the same environment on the actual target hardware.

Experimental Validation: The authors successfully demonstrated the platform using a water tank control experiment. In this setup, the ARM-Linux board acted as a PID controller, communicating via Ethernet with a PC simulating the water tank dynamics. The system achieved stable control with sampling periods of 0.1s and 0.5s. The 0.1s sampling rate provided superior performance, successfully maintaining the desired setpoint after a brief transient phase.

Conclusion and Future Work

This work highlights the viability of open-source tools like Scilab and Linux for professional-grade industrial control. While standard Linux jitter may limit extremely high-speed applications (e.g., kHz-rate motor control), the platform provides a robust, low-cost solution for many embedded control scenarios. Future work will focus on testing the platform with physical sensors and actuators and exploring more computationally intensive control strategies on modern hardware.

Summary updated

Abstract

Embedded systems are playing an increasingly important role in control engineering. Despite their popularity, embedded systems are generally subject to resource constraints and it is therefore difficult to build complex control systems on embedded platforms. Traditionally, the design and implementation of control systems are often separated, which causes the development of embedded control systems to be highly timeconsuming and costly. To address these problems, this paper presents a low-cost, reusable, reconfigurable platform that enables integrated design and implementation of embedded control systems. To minimize the cost, free and open source software packages such as Linux and Scilab are used. Scilab is ported to the embedded ARM-Linux system. The drivers for interfacing Scilab with several communication protocols including serial, Ethernet, and Modbus are developed. Experiments are conducted to test the developed embedded platform. The use of Scilab enables implementation of complex control algorithms on embedded platforms. With the developed platform, it is possible to perform all phases of the development cycle of embedded control systems in a unified environment, thus facilitating the reduction of development time and cost.
BibTeX
@inproceedings{ma2008integrated,
  author = {Longhua Ma and Feng Xia and Zhe Peng},
  title = {{Integrated Design and Implementation of Embedded Control Systems with Scilab}},
  booktitle = {Sensors},
  year = {2008},
  doi = {10.3390/s8095501},
}
Figure