A Model-Driven Co-Design Framework for Fusing Control and Scheduling Viewpoints
Abstract
:1. Introduction
1.1. State-of-the-Art
1.2. Contributions
1.3. Structure
2. Framework for Fusing Control and Scheduling Viewpoints
2.1. System Model
2.2. Framework Steps
Step 1: Controller Design
Step 2: Software Design
Step 3: Model Introspection
3. Analysis and Co-Simulation of Controller Design
3.1. Jitter Analysis
3.2. Controller Modeling in CPAL
3.3. Co-simulation in MATLAB/Simulink
4. Timing Verification Using Schedulability Analysis
4.1. Worst-Case Execution Time (WCET) Measurement
4.2. FIFO Scheduling to Simplify Design and Verification
- Deterministic execution order: the execution order of FIFO scheduling with offset and strictly periodic task activation is uniquely and statically determined. This means that whatever the execution platform and the task execution times, be it in simulation mode in a design environment or at run-time on the actual target, the task execution order will remain identical. Beyond the task execution order, the reading and writing events that can be observed outside the tasks occur in the same order. This property, leveraged by the CPAL design flow [16], provides a form of timing equivalent behavior between development and run-time phases which eases the implementation of the application and the verification of its timing correctness.
- Execution time sustainability: FIFO scheduling is sustainable in the tasks’ execution times, meaning that if a task set is deemed schedulable and the execution times of the tasks are reduced, the task set remains schedulable.
4.3. FIFO Schedulability Analysis
Algorithm 1 Worst-Case Response time |
|
5. Evaluation and Results
5.1. Motivating Example : Cruise Control ECU
5.2. Controller Design
5.2.1. (Step 1. a) Stability Verification Using Jitter Margin Concept
5.2.2. (Step 1. b) Co-Simulation CPAL/Simulink
5.3. (Step 2) Software Design
5.4. (Step 3) Introspection Features for Run-Time Verification
6. Related Works
- TrueTime: this MATLAB/Simulink-based tool [2] enables the simulation of the temporal behavior of controller tasks executed on a multitasking real-time kernel. In TrueTime, it is possible to evaluate the performance of control loops subject to the latencies of the implementation. TrueTime offers a configurable kernel block, network blocks, protocol-independent send and receive blocks and a battery block. These blocks are Simulink S-functions written in C++. TrueTime is an event-based simulation using zero-crossing functions. The tasks are used to model the execution of user code and are written as code segments in a MATLAB script or in C++. It models a number of code statements that are executed sequentially.
- T-Res: this more recent tool [4] is also developed using a set of custom Simulink blocks created to simulate timing delays dependent on code execution, scheduling of tasks and communication latencies, and verifying their impact on the performance of control software. T-Res is inspired from TrueTime and provides a more modular approach to the design of controller models enabling to define the controller code independently from the model of the task.
7. Conclusion and Future Work
Supplementary Materials
Acknowledgments
Author Contributions
Conflicts of Interest
Abbreviations
BET | Bounded Execution Time contract |
CPAL | Cyber-Physical Action Language |
CPS | Cyber-Physical Systems |
ECU | Electronic Control Unit |
FIFO | First In First Out |
LET | Logical Execution Time contract |
MDE | Model-Driven Engineering |
PID | Proportional Integral Differential |
SDLC | Software Development Life Cycle |
StA | Sensing to Actuation Delay |
SWC | Software Component |
TOL | Timing Tolerance contract |
WCET | Worst-Case Execution Time |
ZET | Zero Execution Time contract |
References
- Lampke, S.; Schliecker, S.; Ziegenbein, D.; Hamann, A. Resource-Aware Control-Model-Based Co-Engineering of Control Algorithms and Real-Time Systems. SAE Int. J. Passeng. Cars Electron. Electr. Syst. 2015, 8, 106–114. [Google Scholar] [CrossRef]
- Cervin, A.; Henriksson, D.; Lincoln, B.; Eker, J.; Årzén, K.E. How Does Control Timing Affect Performance? Analysis and Simulation of Timing Using Jitterbug and TrueTime. IEEE Control Syst. Mag. 2003, 23, 16–30. [Google Scholar] [CrossRef]
- Torngren, M.; Henriksson, D.; Arzen, K.E.; Cervin, A.; Hanzalek, Z. Tool Supporting the Co-Design of Control Systems and their Real-Time Implementation: Current Status and Future Directions. In Proceedings of the Conference on Computer Aided Control Systems Design (IEEE CACSD), Munich, Germany, 4–6 October 2006; pp. 1173–1180. [Google Scholar]
- Morelli, M.; Cremona, F.; Di Natale, M. A System-Level Framework for the Evaluation of the Performance Cost of Scheduling and Communication Delays in Control Systems. In Proceedings of the 5th International Workshop on Analysis Tools and Methodologies for Embedded and Real-Time Systems, Madrid, Spain, 8–11 July 2014. [Google Scholar]
- Sundharam, S.M.; Havet, L.; Altmeyer, S.; Navet, N. A Model-Based Development Environment for Rapid-prototyping of Latency-sensitive Automotive Control Software. In Proceedings of the 2016 Sixth International Symposium on Embedded Computing and System Design (ISED), Patna, India, 15–17 December 2016; pp. 228–233. [Google Scholar]
- Ziegenbein, D.; Hamann, A. Timing-Aware Control Software Design for Automotive Systems. In Proceedings of the 52nd Annual Design Automation Conference, San Francisco, CA, USA, 7–11 June 2015; p. 56. [Google Scholar]
- Derler, P.; Lee, E.A.; Törngren, M.; Tripakis, S. Cyber-Physical System Design Contracts. In Proceedings of the 2013 ACM/IEEE International Conference on Cyber-Physical Systems (ICCPS), Philadelphia, PA, USA, 8–11 April 2013; pp. 109–118. [Google Scholar]
- Nuzzo, P.; Sangiovanni-Vincentelli, A.L.; Bresolin, D.; Geretti, L.; Villa, T. A Platform-Based Design Methodology With Contracts and Related Tools for the Design of Cyber-Physical Systems. Proc. IEEE 2015, 11, 2104–2132. [Google Scholar] [CrossRef]
- Kirsch, C.M.; Sokolova, A. The Logical Execution Time Paradigm. In Advances in Real-Time Systems; Springer: Berlin, Germany, 2012; pp. 103–120. [Google Scholar]
- Aminifar, A.; Samii, S.; Eles, P.; Peng, Z.; Cervin, A. Designing High-Quality Embedded Control Systems with Guaranteed Stability. In Proceedings of the 2012 IEEE 33rd Real-Time Systems Symposium (RTSS), San Juan, PR, USA, 4–7 December 2012; pp. 283–292. [Google Scholar]
- Lincoln, B.; Cervin, A. Jitterbug: A tool for Analysis of Real-Time Control Performance. In Proceedings of the 41st IEEE Conference on Decision and Control, Las Vegas, NV, USA, 10–13 December 2002; Volume 2, pp. 1319–1324. [Google Scholar]
- Sundharam, S.M.; Altmeyer, S.; Navet, N. Poster Abstract: An Optimizing Framework for Real-Time Scheduling. In Proceedings of the 22nd IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS 2016), Vienna, Austria, 11–14 April 2016. [Google Scholar]
- Altmeyer, S.; Sundharam, S.M.; Navet, N. The Case for FIFO Real-Time Scheduling; Technical Report, 24935; University of Luxembourg: Luxembourg-city, Luxembourg, 2016. [Google Scholar]
- Gerber, R.; Hong, S. Slicing Real-Time Programs for Enhanced Schedulability. ACM Trans. Program. Lang. Syst. 1997, 19, 525–555. [Google Scholar] [CrossRef]
- Cervin, A. Stability and Worst-Case Performance Analysis of Sampled-Data Control Systems with Input and Output Jitter. In Proceedings of the IEEE American Control Conference (ACC), Montreal, QC, Canada, 27–29 June 2012; pp. 3760–3765. [Google Scholar]
- Navet, N.; Fejoz, L.; Havet, L.; Sebastian, A. Lean Model-Driven Development through Model-interpretation: The CPAL design flow. In Proceedings of the 8th European Congress on Embedded Real Time Software and Systems (ERTS 2016), Toulouse, France, 27–29 January 2016. [Google Scholar]
- The CPAL Programming Language. Available online: https://www.designcps.com/wp-content/uploads/cpal-intro.pdf (accessed on 23 January 2018).
- Fejoz, L.; Navet, N.; Sundharam, S.M.; Altmeyer, S. Demo Abstract: Applications of the CPAL Language to Model, Simulate and Program Cyber-Physical Systems. In Proceedings of the 2016 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), Vienna, Austria, 11–14 April 2016. [Google Scholar]
- Sundharam, S.M.; Altmeyer, S.; Navet, N. Model Interpretation for an AUTOSAR Compliant Engine Control Function. In Proceedings of the 7th International Workshop on Analysis Tools and Methodologies for Embedded and Real-Time Systems (WATERS), Toulouse, France, 5 July 2016. [Google Scholar]
- Navet, N.; Fejoz, L. CPAL: High-Level Abstractions for Safe Embedded Systems. In Proceedings of the International Workshop on Domain-Specific Modeling, Amsterdam, The Netherlands, 30 October 2016; pp. 35–41. [Google Scholar]
- Wilhelm, R.; Engblom, J.; Ermedahl, A.; Holsti, N.; Thesing, S.; Whalley, D.; Bernat, G.; Ferdinand, C.; Heckmann, R.; Mitra, T.; et al. The Worst-Case Execution-Time Problem—Overview of Methods and Survey of Tools. ACM Trans. Embed. Comput. Syst. 2008, 7, 36:1–36:53. [Google Scholar] [CrossRef]
- Cazorla, F.J.; Quiñones, E.; Vardanega, T.; Cucu, L.; Triquet, B.; Bernat, G.; Berger, E.; Abella, J.; Wartel, F.; Houston, M.; et al. Proartis: Probabilistically Analyzable Real-time Systems. ACM Trans. Embed. Comput. Syst. 2013, 12, 94. [Google Scholar] [CrossRef]
- Nasri, M.; Davis, R.I.; Brandenburg, B.B. FIFO with Offsets: High Schedulability with Low Overheads. In Proceedings of the 24th IEEE Real-Time and Embedded Technology and Applications Symposium, (RTAS 2018), Porto, Portugal, 11–13 April 2018. [Google Scholar]
- Pellizzoni, R.; Lipari, G. Feasibility Analysis of Real-Time Periodic Tasks with Offsets. Real Time Syst. 2005, 30, 105–128. [Google Scholar] [CrossRef]
- George, L.; Rivierre, N.; Spuri, M. Preemptive and Non-Preemptive Real-Time Uni-Processor Scheduling; Research Report, 2966; Institut National de Recherche et Informatique et en Automatique (INRIA): Paris, France, 1996. [Google Scholar]
- Ripoll, I.; Crespo, A.; Mok, A.K. Improvement in Feasibility Testing for Real-Time Tasks. Real-Time Syts. 1996, 11, 19–39. [Google Scholar] [CrossRef]
- Speed Cruise Control System Using Simulink® and Stateflow®—System Model. Available online: https://nl.mathworks.com/help/plccoder/examples/speed-cruise-control-system-using-simulink-and-stateflow.html (accessed on 30 August 2017).
- Cervin, A.; Lincoln, B.; Eker, J.; Arzén, K.E.; Buttazzo, G. The Jitter Margin and Its Application in the Design of Real-Time Control Systems. In Proceedings of the 10th International Conference on Real-Time and Embedded Computing Systems and Applications (Citeseer), Gothenburg, Sweden, 25–27 August 2004; pp. 1–9. [Google Scholar]
- George, L.; Minet, P. A FIFO Worst Case Analysis for a Hard Real-Time Distributed Problem with Consistency Constraints. In Proceedings of the 17th International Conference on Distributed Computing Systems (ICDCS ’97), Baltimore, MD, USA, 27–30 May 1997; pp. 441–448. [Google Scholar]
- Leontyev, H.; Anderson, J.H. Tardiness Bounds for FIFO Scheduling on Multiprocessors. In Proceedings of the 19th Euromicro Conference on Real-Time Systems (ECRTS ’07), Pisa, Italy, 4–6 July 2007; pp. 71–82. [Google Scholar]
- Sangiovanni-Vincentelli, A.; Damm, W.; Passerone, R. Taming Dr. Frankenstein: Contract-based Design for Cyber-Physical Systems. Euro. J. Contr. 2012, 18, 217–238. [Google Scholar] [CrossRef]
- Benveniste, A.; Caillaud, B.; Nickovic, D.; Passerone, R.; Raclet, J.B.; Reinkemeier, P.; Sangiovanni-Vincentelli, A.; Damm, W.; Henzinger, T.; Larsen, K.G. Contracts for System Design; Research Report, 8147; Institut National de Recherche et Informatique et en Automatique (INRIA): Rennes, France, 2012. [Google Scholar]
- Singhoff, F.; Legrand, J.; Nana, L.; Marcé, L. Cheddar: A Flexible Real-time Scheduling Framework. ACM SIGAda Ada Lett. 2004, 24, 1–8. [Google Scholar] [CrossRef]
- Harbour, M.G.; García, J.G.; Gutiérrez, J.P.; Moyano, J.D. MAST: Modeling and Analysis Suite for Real-Time Applications. In Proceedings of the 13th IEEE Euromicro Conference on 2001 Real-Time Systems, Delft, The Netherlands, 13–15 June 2001; pp. 125–134. [Google Scholar]
task-set | |
pseudo task-set | |
number of tasks | n N |
job index | N |
task worst-case execution time with no interference | R |
task period | R |
task relative deadline | R |
task absolute deadline | R |
task release time | R |
task finish time | R |
task worst-case response time | R |
task best-case response time | R |
task processor demand | R |
task busy-period | L R |
input jitter also known as sampling jitter | R |
output jitter also known as response-time jitter | R |
input-to-output delay also known as latency | R |
k-th sensing time instance | R |
k-th actuation time instance | R |
nominal input-output delay | R |
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sundharam, S.M.; Navet, N.; Altmeyer, S.; Havet, L. A Model-Driven Co-Design Framework for Fusing Control and Scheduling Viewpoints. Sensors 2018, 18, 628. https://doi.org/10.3390/s18020628
Sundharam SM, Navet N, Altmeyer S, Havet L. A Model-Driven Co-Design Framework for Fusing Control and Scheduling Viewpoints. Sensors. 2018; 18(2):628. https://doi.org/10.3390/s18020628
Chicago/Turabian StyleSundharam, Sakthivel Manikandan, Nicolas Navet, Sebastian Altmeyer, and Lionel Havet. 2018. "A Model-Driven Co-Design Framework for Fusing Control and Scheduling Viewpoints" Sensors 18, no. 2: 628. https://doi.org/10.3390/s18020628
APA StyleSundharam, S. M., Navet, N., Altmeyer, S., & Havet, L. (2018). A Model-Driven Co-Design Framework for Fusing Control and Scheduling Viewpoints. Sensors, 18(2), 628. https://doi.org/10.3390/s18020628