Control System Design Based on Modern Embedded Systems

0 downloads 0 Views 512KB Size Report
promising ways to control engineering: Embedded Systems. We describe categories of ... 8112, pp. 491–498, 2013. c Springer-Verlag Berlin Heidelberg 2013 ...
Control System Design Based on Modern Embedded Systems Ahmed Khamis1 , Dawid Zydek1 , Grzegorz Borowik2 , and D. Subbaram Naidu1 1

Department of Electrical Engineering, Idaho State University, Pocatello, ID, USA {khamahme,zydedawi,naiduds}@isu.edu 2 Institute of Telecommunications, Warsaw University of Technology, Poland [email protected]

Abstract. The functionality and complexity of real-world engineering control systems is increasing significantly due to continuous growth in requirements and their details. Since this trend is predicted to grow even stronger, the old control solutions will be becoming less and less efficient. There are several approaches to designing modern control systems that meet the current and future needs. In this paper, we focus on one of the promising ways to control engineering: Embedded Systems. We describe categories of embedded systems and an engineering approach to control systems design based on the embedded systems. All related challenges are presented considering weaknesses of traditional systems. For the described embedded control system, a design methodology is given as well. Our discussion focuses on approach based on Field-Programmable Gate Array (FPGA) as a solution with huge potential. Finally, we share our thoughts on further trends in modern embedded control systems. Keywords: embedded systems, embedded control design, real-time control.

1

Introduction

In advance of the development of automatic control solutions, electromechanical relay was the standard way of machine control. By 1960s, electromechanical relays were the control module of choice for most control system engineers. Several systems still use relay-based controls [1]. A Programmable Logic Controller (PLC) is an electronic device that is designed specifically for the control of mechanisms and processes. The purpose of a PLC was to directly substitute electromechanical relays as logic elements, replacing them with a solid-state digital computer containing a stored program. The computer was able to emulate the interconnection of many relays to achieve certain logical tasks. Instead of wires, there could be bits inside of a memory circuit that would order the logics [4]. An embedded system is a special-purpose integration of computer hardware and software designed to perform a particular function, and in most cases with real-time computing constraints. It is usually embedded as part of a larger system including hardware and other mechanical parts [12]. Alternatively, a generalpurpose computer, e.g. a personal computer, can do several different tasks. R. Moreno-D´ıaz et al. (Eds.): EUROCAST 2013, Part II, LNCS 8112, pp. 491–498, 2013. c Springer-Verlag Berlin Heidelberg 2013 

492

A. Khamis et al.

Embedded systems have become very important as they control many of the common devices in our daily life. The embedded systems can be a single microcontroller chip or may be a large framework with multiple elements, peripheral devices and other mechanical parts [18]. In this paper, we discuss the main categories of embedded systems based on functionality and performance; and the effect of the complexity of real-world on the embedded control systems engineering requirements. Embedded control system architecture and methodology are also addressed. We also study the disadvantages of traditional control systems and how the development of recent embedded control technology can overcome these weaknesses. The reminder of this paper is organized as follows: Section 2 presents different categories of the embedded systems. Section 3 poses the engineering challenges and requirements of embedded systems applications. The design aspects of embedded control systems are discussed in Section 4, while their development is presented in Section 5. The paper is summarized in Section 6.

2

Categories of Embedded Systems

Embedded systems have very limited resources; particularly the computational power and the memory size. On the other hand, for solving specific real-time application, the simpler design is reflected in both hardware and software [12]. Based on functionality and performance requirements, there are three main categories of embedded systems as described below. 2.1

Stand-Alone Embedded Systems

Stand-alone systems are the systems that work in stand-alone mode. They take inputs, process them and produce the desired output. The input can be, for example, electrical signals from transducers. The output can be, for example, electrical signals to drive an LCD display for displaying information to the users. Such systems do not have many software modules and redundant functions. Embedded systems used in stand-alone Digital Video Recorder (DVR) belong to this category [9]. 2.2

Real-Time Systems

Embedded systems are called real-time systems when they have to do some specific work in a specific period of time. Real-time systems can be categorized into hard real-time systems, soft real-time systems, and hybrid real-time systems. Hard real-time systems are the systems that work against some rigorous deadlines. Missing a deadline may cause severe consequences. On the other hand, in soft real-time systems a delay of milliseconds in executing some commands can occur without causing damage to the equipment. Hybrid real-time systems are the systems that demonstrate both hard and soft restrictions on its performance.

Control System Design Based on Modern Embedded Systems

2.3

493

Network Information Appliances

Embedded systems that are provided with network interfaces and accessed by networks (e.g. LAN, MAN, or WAN) are called networked information appliances [20]. These embedded systems are connected to a network, typically a network running TCP/IP protocol suite, such as the Internet or a company’s Intranet. These systems have significantly developed in recent years.

3

Challenges in Engineering Applications of Embedded Systems

Many of the benefits and requirements of the embedded systems, e.g. low cost and small size are typical for embedded systems in general. Some challenges are more specifically associated with engineering applications [2]. Engineering requirements vary extremely from application to application, but typical special engineering requirements are presented in this section. 3.1

Availability and Reliability

Availability is the degree to which a system or subsystem is operating in a steady state at the start of a task, when the task is called for at a random time. Reliability is the ability of a system or subsystem to perform its required functions under specified conditions for some period of time. 3.2

Safety

Safety in the context of embedded systems deals with minimizing the frequency of accidents (e.g. death, injuries, or system damage). As an example, a gas leak at an oil platform should be immediately detected and followed by a safe shutdown process. Otherwise, expensive damage or even human lives could be at risk. 3.3

Real-Time Deterministic Response

The definition of real-time varies with the application. Some applications can be described as slow real-time systems, e.g. the temperature in a chemical reaction at a certain point may need to be measured no more than once per second. On the other hand, protection devices for high-voltage equipment are fast real-time systems. In this case, voltages need to be sampled thousands of times per second to response within a fraction of a power-cycle. 3.4

Power Consumption

Apparently, the power consumption of industrial electronics may appear minor requirement because of the great quantity of power is available. However, this power is not always available. Even when power is available, high power consumption increases the size and weight requirements of the power supply [19].

494

3.5

A. Khamis et al.

Lifetime

Designing an embedded system requires taking into account the complete product life cycle, from initial product concept, through its operational period, and finally into replacement with newer equipment.

4

Embedded Control Systems Design

As control systems increase in complexity and functionality, in many cases it is not possible to use analog controllers. Currently almost all controllers are digitally implemented on computers [10]. Many difficulties with analog controllers can be avoided by using a digital computer [16]. 4.1

Structure

The general architecture of an embedded control system consists of four main components: the physical system that is being controlled, a sensor that contains an Analog-to-Digital (A/D) converter, an embedded controller, an actuator that contains a Digital-to-Analog (D/A) converter, and, in some cases, a network, as shown in Fig. 1. The most basic operations within the control loop are sensing, control, and actuation [8].

Fig. 1. General structure of embedded control systems

The A/D converter is used to transform the continuous-time outputs of the physical system into digital signals at sampling times. The controller takes these digital outputs and generates sequence of control instructions according to specific control algorithms. The D/A converter is used to transform the digital signals into continuous-time signals that can be applicable to the controlled system. In case of networked environment, the sequences of sampled data need to be transferred from the sensor to the controller, and the control commands must be transferred from the controller to the actuator. Both transformations are done over the communication network, which can be wire line or wireless [11]. In a multitasking embedded control system, multiple tasks need to be performed at the same time. Each task takes a finite amount of computation at time. Tasks may compete for the use of the same embedded controller when they run simultaneously, as illustrated in Fig. 2.

Control System Design Based on Modern Embedded Systems

495

Fig. 2. A multitasking embedded control system

4.2

Design Methodology

Traditionally, the development cycle of a control system consists of two main steps: controller design and implementation. These two steps are often separated, as shown in V shaped trajectory called V-model [14], as illustrated in Fig. 3. Moving downward starting from set of requirements in the V-model, the control engineers describe the physical processes using mathematical equations. The model should be a close approximation of the real system. Then, the control algorithms are designed. In the V-model, simulation is the bottom of the left stroke. Simulation is used to optimize system performance before a new system is built. After the control algorithms have been designed and verified in the first step, they need to be implemented. Moving up in the right stroke, the software engineers develop the programs executing the control algorithms designed in the first step. The implemented modules are then composed together according to the design. Next, they are tested and modified until the system is eventually constructed. Testing will take place many times before the satisfactory performance is achieved. System test is the last step of the right stroke of the V-model.

Fig. 3. Traditional development process of control software

In resource-constrained embedded environments, it is clear that the traditional design methodology cannot guarantee the desired time-based performance. Furthermore, the development cycle of a system with good performance may possibly take a long time, making it hard to support rapid development, that is very important for commercial embedded products [11].

496

5 5.1

A. Khamis et al.

Development of Embedded Control Technology Recent Embedded Control Systems

The functionality, complexity and reliability of embedded control systems are of increasing interests and demands. Although researchers have achieved some successes in the embedded real-time control [5,6,10,15]; there are still some challenges and weaknesses: – Implementation of complex control algorithms involves heavy programming task. Currently, most embedded software development platforms are utilizing object oriented programming languages, e.g. C++ or Java. The advantage lies in flexibility, but at the same time it brings many challenges for the engineers. In addition, the quality and reliability of the hand-written code always cannot be guaranteed. So, many advanced control algorithms still could not be applied in the practical engineering applications [7]. – Hard real-time systems need improvement. Currently, most commercial embedded controllers adopt Microsoft Windows CE or Linux as Operating System (OS). Since most generic embedded OSes are soft real-time systems, they are still not appropriate for high performance control of fast response systems. However, they are much better than OSes for PCs. – Time and cost of developing embedded control systems are still too high. Usually, the development of embedded control systems is more complex than that of PC-based control systems. The design and implementation of embedded control systems are often done separately, which makes the development of the systems highly time-consuming and costly. Currently developed networked embedded real-time controller enables integrated design and implementation of embedded control systems. It uses rapid prototyping and network technology. With the developed platform, the design and implementation of a complex control system will become relatively simple and the development time can be significantly reduced. The overall architecture of the networked embedded real-time controller is shown in Fig. 4 [7]. The main features of the networked embedded real-time controller include: i) High performance of the controller based on dual-core processor: ARM with

Fig. 4. System architecture of networked embedded real-time controller

Control System Design Based on Modern Embedded Systems

497

Digital Signal Processor (DSP); ii) Possibility of implementation complex control strategies on the embedded platform enhanced by the computational capacity of Matlab; iii) Reduction of the development time; iv) Parameter tuning and signal monitoring can be done by Internet; v) Applicability to a variety of fields such as control engineering, optimization, fault diagnoses and education [7]. 5.2

Embedded Control Using FPGAs

Modern FPGAs allow the implementation of efficient multicore processors. As a consequence, FPGAs can be first viewed as programmable microcontrollers where designers can combine one or several processors with dedicated peripherals and computing hardware accelerators [17]. They can be seen as real System-onChip (SoC) digital platforms. Modern FPGAs have additional units that make the applications design easier and more efficient; and they provide embedded memories and embedded logic blocks for arithmetic calculations [3]. Designers can also use pure specific hardware architectures for rigorous applications in terms of performance. Thus, the design and real-time implementation of control loops with sampling frequency exceeding few hundred MHz is now possible. The main disadvantage of this technology is the cost. FPGAs are more expensive comparing to their DSP and microcontroller; however, considering the cost per function, an FPGA may be more attractive than a microcontroller. Another disadvantage is the difficulty to integrate mixed Analog/Digital converters, within current FPGAs. This drawback is overcome with the modern FPGAs that integrate Analog/Digital converters [13].

6

Summary

At present, many requirements are associated with engineering applications. These new requirements make the traditional control system less efficient. Embedded systems are playing a vital role in control engineering. One of the most recent techniques of the embedded control systems is a networked embedded real-time controller, on which simulation, modeling and real-time control can be easily implemented to meet the new requirements of complex control applications. FPGA-based controllers represent a very efficient way to high-demand control applications. They take the advantages of reconfiguration capability, very large number of gates and transistors, and supported protocols. FPGAs are appropriate for high-speed applications. Indeed, FPGAs provide many benefits in terms of safety, rapidity, and power consumption that places them as a leading solution for current and future control systems.

References 1. Comparative strategies for implementing embedded control systems. Tech. rep., Automation and Productivity Institute, Stow, Massachusetts (1995) 2. Apneseth, C.: Embedded systems technology in ABB. Tech. rep., Embedded system technologies (2006)

498

A. Khamis et al.

3. Borowik, G., L  uba, T.: Decomposing pattern matching circuit. In: Moreno-D´ıaz, R., Pichler, F., Quesada-Arencibia, A. (eds.) EUROCAST 2009. LNCS, vol. 5717, pp. 563–570. Springer, Heidelberg (2009) 4. Bryan, L., Bryan, E.: Programmable Controllers: Theory and Implementation, 2nd edn. Industrial Text Company (1997) 5. Bucher, R., Balemi, S.: Rapid controller prototyping with Matlab/Simulink and Linux. Control Engineering Practice 14, 185–192 (2006) 6. Chindris, G., Muresan, M.: Deploying Simulink Models into System-On-Chip Structures. In: 29th International Spring Seminar on Electronics Technology, ISSE 2006, pp. 313–317 (2006) 7. Fang, Z., Fu, Y.: A networked embedded real-time controller for complex control systems. In: Control and Decision Conference (CCDC), pp. 3210–3215 (2011) 8. Feng, X., You-xian, S.: Control and Scheduling Codesign: Flexible Resource Management in Real-Time Control Systems. Springer (2008) 9. Kamal, R.: Embedded System: Architecture, Programming and Design. Tata McGraw-Hill Education, New Delhi (2003) 10. Labiak, G., Borowik, G.: Statechart-based controllers synthesis in FPGA structures with embedded array blocks. International Journal of Electronics and Telecommunications 56, 13–24 (2010) 11. Ma, L., Xia, F., Peng, Z.: Integrated Design and Implementation of Embedded Control Systems with Scilab. Sensors 8(9), 5501–5515 (2008) 12. Malinowski, A., Yu, H.: Comparison of embedded system design for industrial applications. IEEE Transactions on Industrial Informatics 7(2), 244–254 (2011) 13. Monmasson, E., Idkhajine, L., Cirstea, M., Bahri, I., Tisan, A., Naouar, M.: FPGAs in industrial control applications. IEEE Transactions on Industrial Informatics 7 (2011) 14. ˚ Arz´en, K.E., Bernhardsson, B., Eker, J., Cervin, A., Persson, P., Nilsson, K., Sha, L.: Integrated Control and Scheduling, Research Report. Tech. rep., Dept. Automatic Control. Lund Institute of Technology, Lund, Sweden (1999) 15. Thompson, H., Ramos-Hernandez, D., Fu, J., Jiang, L., Choi, I., Cartledge, K., Fortune, J., Brown, A.: A flexible environment for rapid prototyping and analysis of distributed real-time safety-critical systems. Control Engineering Practice 15, 77–94 (2007) 16. Wittenmark, B., ˚ Astr¨ om, K., ˚ Arz´en, K.E.: Computer Control: An overview. IFAC Professional Brief (2002) 17. Zydek, D., Chmaj, G., Shawky, A., Selvaraj, H.: Location of Processor Allocator and Job Scheduler and Its Impact on CMP Performance. Int. Journal of Electronics and Telecommunications 58, 9–14 (2012) 18. Zydek, D., Selvaraj, H., Gewali, L.: Synthesis of processor allocator for torusbased chip multiprocessors. 2010 Seventh International Conference on Information Technology: New Generations (ITNG), 13–18 (2010), doi:10.1109/ITNG.2010.145 19. Zydek, D., Selvaraj, H., Borowik, G., Luba, T.: Energy characteristic of a processor allocator and a network-on-chip. International Journal of Applied Mathematics and Computer Science 21(2), 385–399 (2011), doi:10.2478/v10006-011-0029-7 20. Zydek, D., Shlayan, N., Regentova, E., Selvaraj, H.: Review of packet switching technologies for future NoC. In: 19th International Conference on Systems Engineering, ICSENG 2008, vol. 47, pp. 306–311 (2008), doi:10.1109/ICSEng.2008.47