Integrated Design and Implementation of Embedded Control Systems with Scilab
Active In SP
Joined: Sep 2010
15-10-2010, 10:49 AM
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.
With the availability of ever more powerful and cheaper products, the number of embedded devices deployed in the real world has been far greater than that of the various general-purpose computers such as desktop PCs. The evidence includes the fact that of the 9 billion processors manufactured in 2005, less than 2% were used in PCs, Macs, and Unix workstations, while the remainder went into embedded systems. An embedded system is an application-specific computer system that is physically encapsulated by the device it controls. It is generally a part of a larger system and is hidden from end users. There are a few different architectures for embedded processors, such as ARM, PowerPC, x86, MIPS, etc. Some embedded systems have no operating system, while many more run real-time operating systems and complex multithreaded programs. Nowadays embedded systems are used in numerous application areas, for example, aerospace, instrument, industrial control, transportation, military, consumer electronics, and sensor networks. In particular, embedded controllers that implement control functions of various physical processes have become unprecedentedly popular in computer-controlled systems . The use of embedded processors has the potential of reducing the size and cost, increasing the reliability, and improving the performance of control systems. The majority of embedded control systems in use today are implemented on microcontrollers or programmable logic controllers (PLC). Although microcontrollers and programmable logic controllers provide most of the essential features to implement basic control systems, the programming languages for embedded control software have not evolved as in other software technologies. A large number of embedded control systems are programmed using special programming languages such as sequential function charts (SFC), function block languages, or ladder diagram languages, which generally provide poor programming structures. On the other hand, the complexity of control software is growing rapidly due to expanding requirements on the system functionalities. As this trend continues, the old way of developing embedded control software is becoming less and less efficient.
There are quite a lot of efforts in both industry and academia to address the above-mentioned problem. One example is the ARTIST2 network of excellence on embedded systems design (artist-embedded.org). Another example is the CEmACS project and implimentation (hamilton.ie/ cemacs/) that aims to devise a systematic, modular, model-based approach for designing complex automotive control systems. From a technical point of view, a classical solution for developing complex embedded control software is to use the Matlab/Simulink platform that has been commercially available for many years. For instance, Bucher and Balemi developed a rapid controller prototyping system based on Matlab, Simulink and the Real-Time Workshop toolbox; Chindris and Muresan presented a method for using Simulink along with code generation software to build control applications on programmable system-on-chip devices. However, these solutions are often complicated and expensive. Automatic generation of executable codes directly from Matlab/Simulink models may not always be supported. It is also possible that the generated codes do not perform satisfactorily on embedded platforms, even if the corresponding Matlab/Simulink models are able to achieve very good performance in simulations on PC. Consequently, the developers often have to spend significant time dealing with such situations. As computer hardware is becoming cheaper and cheaper, embedded software dominates the development cost in most cases. In this context, more affordable solutions that use low-cost, even free, software tools rather than expensive proprietary counterparts are preferable.
The main contributions of this paper are multifold. First, a design methodology that features the integration of controller design and its implementation is introduced for embedded control systems. Secondly, a low-cost, reusable, reconfigurable platform is developed for designing and implementing embedded control systems based on Scilab and Linux, which are freely available along with source code. Finally, a case study is conducted to test the performance of the developed platform, with preliminary results presented. The platform is built on the Cirrus Logic EP9315 (ARM9) development board running a Linux operating system. Since Scilab was originally designed for general-purpose computers such as PCs, we port Scilab to the embedded ARM-Linux platform. To enable data acquisition from sensors and control of physical processes, the drivers for interfacing Scilab with several communication protocols including serial, Ethernet, and Modbus are implemented, respectively.
The developed platform has the following main features:
It enables developers to perform all phases of the development cycle of control systems within a unified environment, thus facilitating rapid development of embedded control software. This has the potential of improving the performance of the resulting system.
It makes possible to implement complex control strategies on embedded platforms, for example, robust control, model predictive control, optimal control, and online system optimization. With this capability, the embedded platform can be used to control complex physical processes.
It significantly reduces system development cost thanks to the use of free and open source software packages. Both Scilab and Linux can be freely downloaded from the Internet, thus minimizing the cost of software.
While Scilab has attracted significant attention around the world, limited work has been conducted in applying it to the development/implementation of practically applicable control applications. Bucher et al. presented a rapid control prototyping environment based on Scilab/Scicos, where the executable code is automatically generated for Linux RTAI. The generated code runs as a hard realtime user space application on a standard PC. The changes in the Scilab/Scicos environment needed to interface the generated code to the RTAI Linux OS are described. Hladowski et al. developed a Scilab-compatible software package for the analysis and control of repetitive processes. The main features of the implemented toolkit include visualization of the process dynamics, system stability analysis, control law design, and a user-friendly interface. Considering a control law designed with Scicos and implemented on a distributed architecture with the SynDEx tool, Ben Gaid et al. proposed a design methodology for improving the software development cycle of embedded control systems. Mannori et al. presented a complete development chain, from the design tools to the automatic code generation of stand alone embedded control and user interface program, for industrial control systems based on Scilab/Scicos. The rest of this paper is organized as follows. In the next Section, we introduce the primary software tool used, i.e., Scilab. Section 3 discusses the software design lifecycle in embedded control systems and presents the design methodology adopted in this paper. In Section 4, the implementation of the platform is described. Details of three major components, i.e., hardware, software, and interfaces, are given. The developed system is tested in Section 5 using an illustrative example. Experimental results are presented. We conclude the paper in Section 6.
for more details, please visit