Architecture-driven development of Climate Control Software LMS Imagine.Lab Embedded Software Designer Siemens DF PL Restricted Siemens AG 2017 Realize innovation.
Content 1 Overview 3 2 LMS Imagine.Lab Embedded Software Designer 5 3 Architecture-driven development of climate controller 6 4 Key takeaways 17 Page 2
Electric vehicle climate controller Architecture-driven software development Car Controller Objective: To estimate the impact of the air conditioning system both on the passenger thermal comfort and on the vehicle range Focus: Architecture driven development of control software unit Page 3
Electric vehicle climate controller Architecture-driven software development Page 4
LMS Imagine.Lab Embedded Software Designer To help build the Digital Twin of On-board software Software Architects Embedded Software Engineers Build digital twin of the code LMS Embedded Software Designer Avoid bugs much early in the development lifecycle V&V Engineers Page 5 Front load testing and verification activities
1. Create, import Create or import software architecture Directly implement or import software architectures from SysML Abstract Models Interface Models Software Architectures can be defined in LMS Embedded Software Designer with the help of Block Interfaces and Abstract Blocks System Architectures defined in SysML can be Imported in LMS Embedded Software Designer Page 6
LMS Embedded Software Designer Software Architecture Car Controller Page 7
LMS Embedded Software Designer Software Architecture Car Controller Page 8
2. Model Enhancing software architecture, modeling code and software test specifications Draw code & validation plan first before implementing and testing High level abstractions enabled by extensible DSLs Data-dictionary, units, conversion rules etc. Abstraction supported by appropriate DSLs to represent different perspective of system architecture Test cases as reusable models Testable and verifiable specifications in the form of contracts pre and post conditions and/or assertions in the code Graphical Test Requirement Multi-paradigm Textual Logical Data Models Physical Units and Conversion Rules Unit Test Design Page 9
LMS Embedded Software Designer Data Continuity and traceability Car Controller Page 10
LMS Embedded Software Designer Variant aware architecture and implementation Aircraft Controller Page 11
3. Create, reuse Software implementation Implement Implementation from scratch in LMS Embedded Software Designer Decision Table, Mathematical Formulae Library blocks IDE Enforced Type Checking Block OK Rules Syntactical checks of the source code Warning Correct typographical and syntactical errors Check violation of coding rules (MISRA) Check units compatibility Reuse Toolset to migrate C-code to MBSE paradigm Options to: Re-use existing C-code with no modifications Import specified variant configurations (variant- aware import of legacy code) Perform formal verification on imported C-code with minimal effort Improve quality through editor validations: Eliminate issues due to incompatible and inconsistent product variant configurations Make product variant specific code smart, easy-to-maintain and enhance Integrate Quick transformation of control strategies developed as Simulink models into production-ready C-code Import of: Simulink and Stateflow models Model initialization data Benefits: Integrate strategies available as Simulink models with existing C-code Reduce time to bring control strategies into production Improve quality Page 12
LMS Embedded Software Designer Software implementation Aircraft Controller Page 13
4. Validate Ensure quality and robustness of the implementation Unit Tests (Open-loop testing) Block Test vectors Unit testing & integration testing with plant models Creating and Managing tests Integration Tests (Closed-loop testing) Block Concrete values for I/O & global Batch mode simulation can be performed Execute block Simulation spanning multiple cycles Test case successful Result not as expected Contract verifications Assertion verifications Visual representation of test results Test vector generation Test case successful Result not as expected Export to LMS Amesim & Simulink Traceability between requirements & implementation, between results and specifications Controller modeled in LMS Embedded Software Designer and plant taken from LMS Amesim Simulation in LMS Amesim using native solvers and results are brought back to LMS Embedded Software Designer Page 14
4. Validate Ensure quality and robustness of the implementation Data Flow Analysis Static, formal analysis & coverage measurements Model Checking Block Rules Invalid right shift operation on signed integer Block Assertions Block Whitebox Analysis Data flow analysis Abstract interpretation Use of uninitialized variable Formal verification OK Warning Proof Counterexample Invalid operation on signed integers Use of uninitialized variable Assumed Guarantee Analysis Redundant parameter declaration Warning such as Array index can only be positive is thrown Robustness analysis (/0, memory access checks, overflow, underflow) Assertion analyses Abstraction specific properties Code Coverage Analysis Page 15
LMS Embedded Software Designer Unit Test and Formal Verification Aircraft Formal Verification Controller Unit tests Requirement driven verification Page 16
Integrated model-driven software engineering Benefits Typical Challenges SW development is spread across different teams resulting in fragmentation of process and data artifacts Robustness of the model/code issues found later in the production phases Issues of proper design automation, change request and impact analysis Managing and testing different software variants Solution Benefits Reduced release time with Integrated model-driven SW engineering from Software Architecture to Deployment, with traceability across design levels Arch > Implementation > Test > V&V Predictable and smooth integration to improve architecture decision making for partitioning, network and communication design Provide automation based on design rules and conditions to quickly check errors on the fly and assess different design decisions and impact of changes Early design error detection while performing tradeoff and incremental changes Address the many variations of software with integrated variant model and testing and verification Page 17
Vijay Bahadur Singh Application Engineer Siemens PLM / Simulation & Test Solutions Department bahadur.singh@siemens.com