Saturday, September 11, 2010

Model Based Design (MBD)

Model Based Design of Embedded Systems

Target platforms needed to be the first choice when developing systems using assembler. Moving on to C, designers had more flexibility. But they were quickly locked into a specific target as the run-time libraries prevented migration to different platforms. Platform choice was less of an issue when there were fewer targets available. Yet these days, the options are mindboggling. It's no longer just a choice between processor A and processor B. Digital signal processors (DSPs), digital signal controllers (DSCs), multiple core processors, and even FPGAs are viable targets for embedded systems. With embedded solutions, it is target. Optimizing system cost, performance, and flexibility means choosing the proper target. But these days, software is such an important part of the solution, the choice of target and software tools is tied together? means, unless you use abstraction to disconnect these choices. This progression leads to model-based design.
Model-Based Design (MBD) is a mathematical and visual method of addressing problems associated with designing complex control systems. Model-Based Design is a process that enables faster, more cost-effective development of dynamic systems, including control systems, signal processing, and communications systems. In Model-Based Design, a system model is at the center of the development process, from requirements development, through design, implementation, and testing. The model is an executable specification that is continually refined throughout the development process. After model development, simulation shows whether the model works correctly.
When software and hardware implementation requirements are included, such as fixed-point and timing behavior, you can automatically generate code for embedded deployment and create test benches for system verification, saving time and avoiding the introduction of manually coded errors. Automatic program synthesis allows the generation of C code or a representation in a hardware description language (HDL). The HDL emulation can then be co-simulated in the system context to study behavior of an implementation at a cycle accurate level. This reduces expensive hardware iteration, facilitates analysis of system characteristics with detailed component implementation models, and mitigates the need for extensive test bench design.
MBD provides an efficient approach for establishing a common framework for communication throughout the design process while supporting the development cycle ("V" diagram). In Model-based design, development is manifested in these four steps:
  • Modeling a plant,
  • Analyzing and synthesizing a controller for the plant,
  • Simulating the plant and controller, and
  • Integrating all these phases by deploying the controller.
The model-based design paradigm is significantly different from traditional design methodology. Rather than using complex structures and extensive software code, designers can use MBD to define models with advanced functional characteristics using continuous-time and discrete-time building blocks. These built models used with simulation tools can lead to rapid prototyping, software testing, and verification. Not only is the testing and verification process enhanced, but also, in some cases, hardware-in-the-loop simulation can be used with the new design paradigm to perform testing of dynamic effects on the system more quickly and much more efficiently than with traditional design methodology.

Figure 1: Development Cycle ("V" diagram)


The important steps in MBD approach are:

  1. System identification (modeling the plant) an iterative process: -     By acquiring and processing raw data from a real-world system and choosing a mathematical algorithm with which to identify a mathematical model, the plant model is identified. Various kinds of analysis and simulations can be performed using the identified model before it is used to design a model-based controller.

  2. Controller analysis and synthesis: -    The mathematical model conceived in step 1 is used to identify dynamic characteristics of the plant model. A controller can be then be synthesized based on these characteristics.

  3. Offline simulation: -    The time response of the dynamic system to complex, time-varying inputs is investigated. This is done by simulating a simple LTI or a non-linear model of the plant with the controller. Simulation allows specification, requirements, and modeling errors to be found immediately, rather than later in the design effort.

  4. Deployment: -    Ideally this is done via automatic code generation from the controller developed in step 3. It is unlikely that the controller will work on the actual system as well as it did in simulation, so an iterative debugging process is done by analyzing results on the actual target and updating the controller model. Model based design tools like VisSim allow all these iterative steps to be performed in a unified visual environment.
Figure 2: Design Approach

Model-Based Design solution include:

  • Algorithmic design & modeling using Mathworks products
  • "Translation" of Matlab/Fortran/C into Simulink Models
  • Creating generic custom toolboxes
  • Integration of legacy C-Code into Simulink blocks
  • Automatic code generation using RTW/RTW Embedded Coder
  • Verification & Validation

Model-Based Design allows us to improve efficiency by:

  • Using a common design environment across project teams
  • Linking designs directly to requirements
  • Integrating testing with design to continuously identify and correct errors
  • Refining algorithms through multidomain simulation
  • Automatically generating embedded software code
  • Developing and reusing test suites
  • Automatically generating documentation
  • Reusing designs to deploy systems across multiple processors and hardware targets


With regard to the designing of embedded systems there are several challenges that the control engineers face and they are:

  • Delivering products to market faster at lower cost
  • Delivering implementations for increasingly complex systems
  • Producing superior quality products
  • Fewer system prototypes
  • Flexible enough to adjust to last minute changes

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.