190 likes | 319 Vues
This comprehensive overview delves into model-based software development for embedded systems, presenting essential concepts and practical applications. The content covers key aspects such as Behavior-Driven Development (BDD), Interface Block Diagrams (IBD), assurance diagrams, and various software development methodologies. It highlights the design processes for systems like the Extended Care System, which connects patients with health care providers. Challenges in requirements specification, system architecture, and functional decomposition are also discussed, alongside relevant modeling techniques and examples using mathematical representations.
E N D
Modellbasierte Software-Entwicklung eingebetteter Systeme Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut für offene Kommunikationssysteme FOKUS
Wochenquiz • Was sind BDDs, IBDs? Gemeinsamkeiten & Unterschiede? • Wozu werden Zusicherungsdiagramme verwendet? • Wie kann man Strategien formalisieren? • Welche Vorgehensmodelle kennen Sie? • Welche Sichten auf ein eingebettetes System werden modelliert?
A Development Process Model • Read the requirements specification • Put all information into an abstract class diagram of the subject domain • Identify all actors in a use case diagram • Define sequences of interaction for the use cases in sequence diagrams • Put sequence diagrams in activity diagrams / state machines • Derive a system class model • Design a communication diagram to define concrete interaction • Derive a design class model • Derive an implementation class model • Generate code
Example: Extended Care System • System to connect patients and health care people • Main purpose: provide quick help in the case of an emergency • e.g., a fall to the ground, cardiac arrest, apnea or general immobility • scenario: collapse of the patient (e.g., while walking) • Correctness: call help iff help is needed • if help is needed, a call must be issued • there must not be false emergency calls • Idea • sensors attached to the body recognize abnormal condition (e.g., powerful acceleration, change in the barometric altitude, higher heart rate, ...) • sensors exchange and consolidate their measurement results • call an emergency service provider for further processing the alarm
System Structure of the ECS Components • Ventricular Assist Device (VAD) • blood pump with controller and control laptop • has to be protected from misusage • Body Area Network (BAN) • different sensor nodes attached to the body • wireless communication, ad-hoc networking, leader election • not a medical device (not used for diagnosis or therapy) • Telematics Systems (TMS) • telematic module, server, client software • online monitoring, alert handling, data logging • data protection
Challenges • Requirements specification • Design and evaluation of system architectures • Interface definitions • Not handled: • early validation • security analysis • testing and testability • functional safety
Boundaries of the System • modeled by a ibd (context diagram) • service provider as part of the environment
Goals and Requirements • Modeled via requirements diagrams
Use Cases • Main use cases of the system
Structural Investigation of Requirements • Information to be exchanged in a class model
Functional Decomposition • Deployment of functionality onto nodes
Architecture • Package diagram for the distribution
Towards an Implementation • Sensor behavior as activity / state machine diagrams
3.2 physikalische Modellierung 1. Identifikation der relevanten Umgebungsgrößen 2. Repräsentation durch mathematische Variablen 3. Eigenschaften / Relationen der Variablen festlegen • die relevanten Variablen sind im Allgemeinen zeitabhängig Funktionen über der Zeit! • Zustand: Wert aller Funktionen zu einem gegebenen Zeitpunkt • Trajektorie: Veränderung des Zustandes in der Zeit • Festlegung: überwachte und geregelte Variablen („monitorierte“ und „kontrollierte“ Größen)
Zulauf Füllstands-anzeiger max min Ablauf Beispiel Füllstandsregelung • Randbedingungen • Füllhöhe ändert sich als Funktion von Zu- und Ablauf • Überlauf wenn voll, kein Auslauf wenn leer • informelle Anforderungen für Steuerung des Zulaufs • Füllstand soll zwischen min und max gehalten werden • Wenn f < min, Zulauf einschalten • Wenn f > max, Zulauf ausschalten • Stellvertretend für Heizungsthermostat, Batterieladegerät, Dämmerungslicht, …
Modellierung mit Scicos • Idee • Flussdiagramme (wie ibd) • Blöcke tragen mathematische Semantik (wie par) • Verbindungen signalisieren Ströme • Kontinuierliche Daten wie Strom, Spannung, Fluid, Masse, … • Diskrete Daten wie Events • Umformung der Eingangsströme in Ausgangsströme • Industriestandard: Simulink • Alternative Scicos / Xcos • Aufbauend auf numerischer Mathematik-Software Scilab des INRIA • Modellierung durch Zusammenschalten von Blöcken • IDE: ScicosLab
Beispiel Wassertank • f´(t)= k1*z(t) – k2*a(t) • 0 ≤ f(t) ≤ max