A co-simulation approach for system-level analysis of embedded control systems
Summary (4 min read)
Introduction
- In modern means of transport like the automotive and avionics domain, many important control applications are implemented on heterogeneous distributed embedded systems that may consist of up to hundreds of Electronic Control Units (ECUs) as well as various sensors, actuators, and field bus systems.
- Given these, DSE approaches assist the designer with an optimization loop that performs system synthesis and evaluation: During system synthesis, a candidate implementation of the system is derived by selecting architecture components, binding of tasks onto the components, routing of messages, and scheduling tasks and messages.
- When increasing the degree of freedom for the system designer by enabling variation in architecture, task mapping, routing, and scheduling, there exists a gap between the model of the controller’s implementation and the required data for the control performance analysis, i. e., a model of the plant.
- The work at hand presents a possibility to close this gap through co-simulation of an advanced system model including the controller and an advanced plant model.
- Moreover, it enables to take design constraints like the stability of the control application or application-specific constraints like maximum braking distance into account.
III. ESL DESIGN FUNDAMENTALS
- This work introduces the aspect of control quality into system design by developing adequate models for controllers and an evaluation of controllers and plants based on cosimulation.
- The ESL design approach as employed here starts with an executable specification, i. e., a behavioral model of the functionality of the system.
- From this, a graph-based exploration model is derived.
- During DSE, implementations are obtained by mapping the application onto the architecture in a process termed system synthesis.
- The quality of each implementation with respect to given objectives and its compliance with given design constraints is determined in an evaluation step.
A. Executable Specification
- In [7], a library for modeling and simulating actor-oriented behavioral models termed SysteMoC is presented.
- In actor-oriented models, actors, which encapsulate the system functionalities, are potentially executed concurrently and communicate over dedicated abstract channels.
- The functions encapsulated in an actor are partitioned into actions and guards and are activated during transition of a the finite state machine (FSM) R that also represents the communication behavior of the actor (i. e., the number of tokens consumed and produced in each actor activation).
- Actors are only permitted to communicate with each other via channels, to which the actors are connected by ports.
- In a SysteMoC actor, the communication behavior is separated from its functionality, which is a collection of functions that can access data on channels via ports.
B. Exploration Model
- For the DSE, an exploration model termed specification defines the available hardware components as well as the processing tasks that need to be distributed in the system.
- This graph-based specification (see Fig. 3(c)) consists of the plattform architecture, the application, and a relation between these two views, the mapping constraints: .
- The architecture is modeled by a graph ga(R,Ea) and represents all available interconnected components, i. e., hardware resources.
- The edges Ea model available communication links between resources.
- The application is modeled by an application graph gt(T∪ C,Et) that represents the behavior of the system.
C. System Synthesis
- From the specification of the system that implicitly includes all design alternatives, a system level implementation has to be deduced, respectively synthesized.
- This implementation corresponds to the hardware/software system that will be implemented.
- The synthesis thereby involves the following steps: .
- The allocation α ⊆ R denotes the subset of the available resources that are actually used and implemented in the embedded system. .
- The schedule φ can be either static (with predefined start times of the tasks) or dynamic (with assigned periods or deadlines to the tasks).
IV. CONTROLLER MODELING FOR ESL DESIGN
- Introducing a novel design objective (design constraint) requires (a) an adequate modeling and consideration during system synthesis and (b) providing an evaluation technique to quantify the design objective (to check for compliance with the design constraint).
- This section introduces the proposed system modeling approach.
- The employed control quality analysis technique based on co-simulation is presented in the next section.
A. Controller and Executable Specification
- Control systems with feedback possess multiple advantages in comparison to open-loop systems.
- The structure of a quite general feedback control system is as follows, see Fig. 3(a):.
- The latter uses timebased block diagrams to present functional units that exchange data via signals .
- Hence, there exists a significant similarity between Matlab/Simulink modeling and actor-oriented models as employed in ESL design that is the base of an automatic transformation pattern to derive an actor-based executable specification from Matlab/Simulink code: For every (non-hierarchical) block in Matlab/Simulink, a corresponding SysteMoC actor is stored in an actor library.
- In case the control engineer specified an S-function block, an empty actor stub with correct channels is created and has to be filled manually.
B. Control Application Exploration Model
- To take into account feedback control systems during DSE, the control applications are transformed to graphs gt(T ∪ C,Et).
- Looking at a single control application, the control application graph ap has to represent the control application of its state space model according to Fig.
- Note that this definition allows multiple sensor, controller, and actuator tasks that may be required to control a single plant.
- The proposed exploration model may, in case the behavioral model can or shall not be derived as an intermediate step, be directly derived from the state-space model of the controller.
V. CONTROL QUALITY EVALUATION BY CO-SIMULATION
- A co-simulation approach for control quality evaluation is presented.
- First, the used performance estimation technique based on virtual prototyping of the system implementation is introduced.
- By co-simulating a Matlab/Simulinkbased plant model and the virtual prototype of the system, i. e., sensors, controllers, and actuators mapped to architecture components, see [21], application-specific metrics such as the braking distance can be used to reflect control quality.
A. Performance Simulation by Virtual Prototyping
- A key aspect of the evaluation phase addressed in this work is performance simulation.
- The goal is to evaluate the system behavior, i. e., the behavior of tasks and their communication when mapped to system components.
- To execute a performance simulation for a VP, the concept of Virtual Processing Components (VPCs) [22] is used, a custom library for performance simulation of SystemC models.
- A VPC model consists of three components: (1) the resources in the system, (2) the mapping of the tasks to the resources, and (3) the routing that specifies the communication paths.
- For a proper timing simulation, the computation delay is determined by the mapping.
B. Co-Simulation
- Complex control applications often consist of multiple control loops that interact with each other to a large extend.
- In fact, application-specific control quality metrics may become both comprehensive design objectives such as the braking distance and valuable design constraints such as the maximum slip of a wheel to ensure maneuverability of a car.
- 3) The SystemC simulator computes the control vector u(τi).
- 5) The co-simulation interface invokes the Simulink simulation while at the same time, the SystemC simulator advances its simulation time to the beginning of the next sampling time τi+1 and is suspended by the co-simulation interface.
- 7) After the delay di has passed, the co-simulation interface updates the control vector in the plant with the value of u(τi) by invoking the Matlab/Simulink simulation engine.
VI. CASE STUDY: BRAKE-BY-WIRE
- As a case study, a Brake-by-Wire (BbW) system from the automotive domain shall serve as an example where applicationspecific control quality measures may serve as comprehensive design objectives and constraints.
- The BbW system contains several networked ECUs that communicate over a field bus to control the braking process on the four wheels, see Fig. 7. A simplified vehicle model based on the Quarter Car Model [24] is used here as the plant.
- The ABS controller monitors the deceleration of the four wheels.
- Comparing VP 1, VP 2, and VP 3, reducing sampling interval results in decreased braking distance and, hence, improved control quality but consumes more bandwidth.
- With the slip value in VP 5 being always in the optimal range between 0.04 and 0.2, the ABS functionality is perfectly guaranteed according to the specification.
VII. CONCLUSION
- This must be considered by design automation approaches to achieve safe system implementations of high quality.
- This work presents a tool flow at the Electronic System Level (ESL) that enables the modeling, analysis, and optimization of a distributed controller systems with quality of control being considered as principal design objectives and constraints.
- This co-simulation not only allows to determine metrics from the control theory domain like quadratic cost or stability but also application-specific control quality metrics like the maximum braking distance.
- A presented model transformation combines the traditional development process of control applications with state-of-the-art ESL techniques, ensuring model consistency while enabling a high degree of automation.
Did you find this useful? Give us your feedback
Citations
55 citations
43 citations
28 citations
16 citations
References
3,309 citations
"A co-simulation approach for system..." refers background in this paper
...As pointed out in [5], classic system modeling languages like C are agnostic of the system behavior and may only cover functional behavior of a controller....
[...]
726 citations
"A co-simulation approach for system..." refers methods in this paper
...Several existing works employ TrueTime to simulate and evaluate control systems, see [14], [15], [16], [17]....
[...]
213 citations
"A co-simulation approach for system..." refers background in this paper
..., the distribution of end-to-end delays may have a significant impact on control quality [1]....
[...]
180 citations
"A co-simulation approach for system..." refers background in this paper
...consideration is included in a controller synthesis with the discipline being often referred to as Control-Scheduling-CoDesign [2]....
[...]
...This consideration is included in a controller synthesis with the discipline being often referred to as Control-Scheduling-CoDesign [2]....
[...]
174 citations
"A co-simulation approach for system..." refers background in this paper
...Model of Architecture (MoA) see [19], such as processors, buses, memory units, etc....
[...]
...The vast majority of ESL design approaches, see [19] for a survey, is inspired by the Y-chart approach as schematically included in Fig....
[...]