Você está na página 1de 27

Best Practices for Model Based Design (MBD)

By Jonathan Friedman, Ph.D. Industry Marketing Manager MathWorks

2014 The MathWorks, Inc. 1

Traditional Workflow
RESEARCH REQUIREMENTS SPECIFICATIONS
Requirement Documents Difficult to analyze Difficult to manage as they change

DESIGN
EDA Electrical Components Algorithm Design Embeddable Algorithms MCAD/ MCAE Mechanical Components

Paper Specifications Easy to misinterpret Difficult to integrate with design

Physical Prototypes Incomplete and expensive Prevents rapid iteration No system-level testing

IMPLEMENTATION
C/C++ Embedded Software VHDL, Verilog Hardware

Manual Coding Time consuming Introduces defects and variance Difficult to reuse

Traditional Testing Design and integration issues found late Difficult to feed insights back into design process Traceability

INTEGRATION AND TEST

Model-Based Design Workflow


RESEARCH REQUIREMENTS

DESIGN

Environment Models TEST & VERIFICATION Physical Components Algorithms

IMPLEMENTATION C, C++
MCU DSP VHDL, Verilog FPGA ASIC Other CAD Tools Other hardware

INTEGRATION

Adoption of Model-Based Design


Virtual Verification & Validation Fully Leveraged Model-Based Design

System Validation

Closed-loop Simulation

HardwareIn-Loop

Simulation based Development

Graphical Specs

Rapid Prototyping

Graphical Programming

Simulation

Real-Time Testing

Production

Best Practice # 1: Identify the problem you are trying to solve


Have metrics that identify the weak points in your current process Attack your greatest weaknesses first Monitor your Return on Investment (ROI)

Example 1: Missed release dates

Example 2: Excessive software defects Example 3: Prototype hardware availability

Lear Delivers Quality Body Control Electronics Faster Using Model-Based Design
Challenge
Design, verify, and implement high-quality automotive body control electronics

Solution
Use Model-Based Design to enable early and continuous verification via simulation, SIL, and HIL testing

Lear automotive body electronic control unit.

Results
Requirements validated early. Over 95% of issues fixed before implementation, versus 30% previously Development time cut by 40%. 700,000 lines of code generated and test cases reused throughout the development cycle Zero warranty issues reported

We adopted Model-Based Design not only to deliver better-quality systems faster, but because we believe it is a smart choice. Recently we won a project that several of our competitors declined to bid on because of its tight time constraints. Using Model-Based Design, we met the original delivery date with no problem."
Jason Bauman Lear Corporation

Link to user story

Best Practice # 2: Use models for at least two things Rule of Two

Overcome startup costs and resistance to change ROI increases with multi-use models

Example 1: Validate requirements through simulation and add new functionality through rapid prototyping Example 2: System specification and automatic code generation Example 3: Development time reduced and additional design complexity without staff increases

10

Airbus Develops Fuel Management System for the A380 Using Model-Based Design

Challenge
Develop a controller for the Airbus A380 fuel management system

Airbus A380, the worlds largest commercial aircraft.

Solution
Use MATLAB, Simulink, and Stateflow for Model-Based Design to model and simulate the control logic, communicate the functional specification, and accelerate the development of simulators
Model-Based Design gave us advanced visibility into the functional design of the system. We also completed requirements validation earlier than was previously possible and simulated multiple simultaneous component

Results

Months of development time eliminated Models reused throughout development Additional complexity handled without staff increases

failures, so we know what will


happen and have confidence that the control logic will manage it.
Christopher Slack Airbus

Link to user story

11

Best Practice # 3: Use the models for production code generation

To ensure success you must connect models to real system Enable a culture of modeling by removing temptation and option to write code Executable code is what makes machines move and generates profits

12

Toyota Uses MathWorks Tools to Increase Quality, Reduce Costs, and Speed Time to Market of New Vehicles
Challenge
Speed up design, increase quality, and reduce R&D costs by finding an alternative to traditional design methods

Solution
Use MathWorks tools for control design to prototype, model, test, and refine control strategies in an integrated design environment
MATLAB, Simulink, and Stateflow have become the de facto standard at Toyota for simulation, data processing, and

Results
Deliver a better product to market faster and at a lower cost Reduce time to embedded code Forge a pathway to innovation

controls design. It would be


impossible to list all of the applications for these tools at Toyota.
Akira Ohata Toyota

Link to user story

13

Best Practice # 4: Treat models as the sole source of truth

Remove the temptation to hack code by hand late in a program when under time pressure

Prevent divergence of code and model

14

Eurocopter Uses Model-Based Design to Accelerate Development of DO-178B Certified Systems


Challenge
Speed up DO-178 development cycle while stabilizing system and software definitions by using models for validation and reusing the data for verification

Solution
Develop Plan for Software Aspects of Certification (PSAC)

EC130 Air Conditioning Software developed with Embedded Coder.

consistent with latest recommendations from European Aviation Safety Agency (EASA) for DO-178B, taking into account DO-178C concepts for Model-Based Design Create models in Simulink for software architecture, high-level requirements, and low-level requirements Generate flight source code using Embedded Coder

Using Simulink for systems and software development has provided efficient means to validate the requirements and design the system and saves

Results

Early requirements validation and execution of simulation test cases with Simulink Seamless object code verification by reusing simulation test cases EASA approval for the software certification with use of code generated by Embedded Coder

time on verification and


validation.
Ronald Blanrue Eurocopter Group Avionic System Avionic Certification/EADS Expert 15

Best Practice # 5: Use migration to Model-Based Design as a learning opportunity

Learn what really happens in the current system Solicit help on process and tools, not on translation Focus on value-added features first Conversion is a tremendous learning and quality improvement opportunity

True even in small code footprints and efficient organizations

16

Best Practice # 6: Focus on design, not on coding


Software design is still taking place Software engineers establish and manage the code generation infrastructure Model refinement continues after the controls engineers finish their work and before model is ready to generate code, especially in a fixedpoint implementation Legacy code must be integrated and maintained
17

FLIR Accelerates Development of Thermal Imaging FPGA

Challenge
Accelerate the implementation of advanced thermal imaging filters and algorithms on FPGA hardware
Raw image (left) and image after applying filter developed with HDL Coder (right).

Solution
Use MATLAB to develop, simulate, and evaluate algorithms, and use HDL Coder to implement the best algorithms on FPGAs

With MATLAB and HDL Coder we are much more responsive to marketplace needs. We now embrace change, because we can take a new idea to a real-time-capable hardware prototype in just a few weeks. There

Results
Time from concept to field-testable prototype reduced by 60% Enhancements completed in hours, not weeks Code reuse increased from zero to 30%

is more joy in engineering, so weve


increased job satisfaction as well as customer satisfaction.
Nicholas Hogasten FLIR Systems

Link to user story

18

Best Practice # 7: Integrate the development process

Develop a comprehensive plan


Training Modeling Style Enforcement. Supporting Tools Configuration Management Requirements Management Process

Develop new metrics

19

GM Standardizes on Model-Based Design for Hybrid Powertrain Development

Challenge
Develop new hybrid powertrain technology for GM vehicles
Badge for GMs Two-Mode Hybrid powertrain, which is used in vehicles across several product lines.

Solution
Standardize on MathWorks tools and Model-Based Design for control systems design and production code generation
The Two-Mode Hybrid powertrain took Model-Based Design to a new level within GM. This project provided the confidence and experience we needed to apply MathWorks tools for Model-Based Design on other large-scale global

Results
Aggressive delivery date met Worldwide collaboration and communication enabled Designs reused across product lines

engineering programs."
Kent Helfrich General Motors
Link to user story

20

Best Practice # 8: Designate a champion who has influence and budgetary control

Assign priority Assign people Acquire tools, equipment, and services Sometimes act as a consensus builder Sometimes act as a benevolent dictator

21

Lockheed Martin Joint Strike Fighter

THREE AIRCRAFT, A SINGLE MODEL, AND 80% COMMON CODE. THATS MODEL-BASED DESIGN.

To develop the unprecedented threeversion F-35, engineers at Lockheed Martin created a common system model to simulate the avionics, propulsion, and other systems and generate final flight code. The result: reusable designs, rapid implementation, and global teamwork. To learn more, visit mathworks.com/mbd
Accelerating the pace of engineering and science

22

Best Practice # 9: Have a long-term vision


Good things come to those who have a vision and work hard to achieve it The full transition from hand-coded, textual languages takes 2-3 years to fully implement in a production organization Research organizations often have fewer constraints and less legacy code, and can move faster

23

Best Practice # 10 : Partner with your tool suppliers


Suppliers bring the experience of working with entire industries and can help you avoid common pitfalls, accelerate your ROI breakeven point and quickly achieve productivity and quality goals

Do it yourself

Effort

Leverage the suppliers experience

Time

24

Mazda Speeds Next-Generation Engine Development of SKYACTIV TECHNOLOGY

Challenge
Optimize the efficiency of SKYACTIV engines while meeting strict emissions standards worldwide
Mazdas SKYACTIV-D engine.

Solution
Use Simulink and Model-Based Calibration Toolbox to accelerate the generation and development of optimal calibration settings, ECU-embeddable models, and engine models for HIL simulation
Model-Based Calibration Toolbox not only enabled us to identify optimal calibration settings for the SKYACTIVD engine, it greatly reduced the engineering effort required. The models it generated accelerated control logic development, provided valuable insights, and made it easy to try new ideas.
Shingo Harada Mazda
Link to user story

Results
Engine calibration workload minimized Model complexity cut in half Model accuracy improved

25

Mazda Speeds Next-Generation Engine Development of SKYACTIV TECHNOLOGY

Challenge
Optimize the efficiency of SKYACTIV engines while meeting strict emissions standards worldwide
Mazdas SKYACTIV-D engine.

Solution
Use Simulink and Model-Based Calibration Toolbox to accelerate the generation and development of optimal calibration settings, ECU-embeddable models, and engine models for HIL simulation
Model-Based Calibration Toolbox not only enabled us to identify optimal calibration settings for the SKYACTIVD engine, it greatly reduced the engineering effort required. The models it generated accelerated control logic development, provided valuable insights, and made it easy to try new ideas.
Shingo Harada Mazda
Link to user story

Results
Engine calibration workload minimized Model complexity cut in half Model accuracy improved

26

Best Practices for Establishing a Model-Based Design Culture


1. Identify the problem you are trying to solve 2. Use models for at least two things Rule of Two 3. Use models for production code generation 4. Treat models as the sole source of truth 5. Use migration as a learning opportunity 6. Focus on design, not on coding 7. Integrate the development process 8. Designate champions with influence, expertise, and budgetary control 9. Have a long-term vision 10. Partner with your tool suppliers

http://www.mathworks.com/tagteam/40538 _SAE-2007-01-0777-Best-Practices-forMBD-Culture.pdf
27

Você também pode gostar