Model-based design speeds control system design productivity

MathWorks Australia
By Paul Barnard, Controls Design Automation Mktg Director, The MathWorks, Inc.
Tuesday, 13 December, 2005


When developing embedded control systems, designers are being squeezed by two trends: shrinking development cycles and growing design intricacy. The 'divide and conquer' strategy for developing these complex systems means coordinating the resources of people with expertise in a wide range of disciplines. This, in turn, has made the traditional, text-based approach of embedded system design obsolete. Model-based design is a mathematical and visual method of addressing the problems associated with designing complex control systems, and has been used successfully in many motion control, industrial equipment, aerospace and automotive applications.

Model-based design enables the control system design team to use a model of the system throughout the entire development cycle, from requirements planning through conceptual design and on to detailed design and verification. The model is a behavioural description of the control system software, of the physical system that the software controls, and of the system's operational environment. Derived from system requirements, the model can provide more accurate and detailed information about how the system works than can text-based specifications. The system model is an executable specification that you can simulate at various steps throughout the system's development. From this specification you can automatically generate real-time software for testing, prototyping and embedded implementation. In addition, the specification is not prone to translation errors that may occur in manually passing traditional documentation between developers working on different design tasks.

Model-based design brings software development closer to the front end of the embedded system's design. Control system designers can start evaluating software designs without waiting for prototype products and real-time targets. As design team members develop the system, they add additional detail to the model, allowing it to more accurately represent the evolving system (Figure 1).

Model-based design offers significant advantages over traditional, text-based design methods:

  • A model-based design environment allows the mathematical modelling of the physical system's behaviour, design of the software and modelling of its behaviour, and the simulation of the entire system model to accurately predict and optimise performance.
  • You can visualise the desired system with more knowledge and implementation details than you can with text-based documentation because model complexity can be managed by hierarchical partitioning.
  • With model-based design you can locate and correct errors early in system design, where the time and financial impact of system modification is minimised.
  • Model-based design lets you automatically generate the documentation you need to describe the system and archive its design.
  • After verification of the correct model operation, accurate and stable real-time production software can be automatically generated for system deployment and testing. This eliminates error-prone manual code generation from requirements and specification documentation.
  • Model-based design provides a common design environment for all developers, facilitating general communication, data analysis and system verification between different development groups.
  • Design reuse is facilitated with model-based design, both for system upgrading and for developing derivative systems with expanded capabilities.

Embedded control example (power window controller)

An example where a model-based design approach simplifies design effort and saves design time is in the development of an automotive power-window controller. The model captures all information about the system, allowing the design to start without the need to build a prototype of the window system components, create embedded processor target hardware and write software.

Figure 2a shows a model of the controller and a simple mechanical model that represents all of the system's specifications. The block labelled 'control' is a hierarchical element that hides the complexity of the actual controller design (Figure 2b).

Once the designer is satisfied with the results of the modelling effort and simulation, real-time software that represents the controller design (Figure 2b) can be automatically generated and used for testing and implementation.

Software tools for model-based design

To successfully use model-based design techniques for embedded-control applications, you should have a graphics-centric tool suite for tasks such as algorithm design, model definition, system simulation, optimisation and validation, and code generation.

System modelling

For modelling the system, you need an interactive tool that allows the modelling, simulation and analysis of dynamic, multi-domain systems. The latter feature is critical for many systems that need design and analysis in the mechanical, electrical and other domains. The modelling tool should let you build a block diagram model of the system, simulate the system's behaviour, evaluate the performance of the model and refine the design as necessary to meet system specifications. A tight link with an algorithmic-design tool will allow you to easily combine changes in both system algorithms and architecture to accelerate design optimisation.

Algorithm design

To design the control-system algorithms, you need a tool that lets you design the algorithms and visualise the results in a fashion that is intuitive to the systems engineer. The algorithmic design tool should be flexible enough to handle several types of inputs, including data from instruments, external databases, other programs and external routines in the form of user input in languages such as C.

Since many control systems are event-driven, you also need a tool that allows you to design and simulate parts of the target system that benefit from the use of state diagrams in their design. This capability will let you develop and visualise event-driven system models without being an expert in finite-state-machine (FSM) theory.

Rapid prototyping

Use software that will let you take your controller models and easily run them in real time on a general-purpose development platform or on your system's actual target hardware. You should be able to adjust system parameters in real time and capture system run-time data. This concept of 'rapid prototyping' helps to ensure that real-time execution of the controller software will provide the system performance desired.

Production code generation

After finishing the design of your control-system software, you have to create the production code that will run on the actual system. You can do this by hand, but the task is tedious and can allow errors to creep into the final code. A better choice is to have a software tool that will automatically generate the production code from the finished system model. A well-designed automatic code generation tool will allow you to generate, test and deploy production code, usually in C, on virtually any embedded-system hardware. The automatically generated code should be close to hand-generated code with respect to execution speed and memory footprint, while meeting industry-standards requirements for that code.

Documentation

Finally, you should have some help in the part of system development that every engineer hates: generating documentation. Having a documentation-generation tool that is coupled to your system development tools can save time in producing the documentation you need to explain the details and archive the design of your control system. Links to commonly used formal-requirements management systems along with office productivity tools such as Word, Excel and HTML browsers will also speed up the system documentation process, allowing you to move on to your next system-design challenge.

Related Articles

Collaborative robots: the smarter way forward

Robots that can work side by side with humans are changing the way manufacturing is done.

AOG bringing the best of the best to Perth in 2015

With more than 620 companies queuing up to participate in this year's annual Australasian Oil...

Understanding data storage technologies

With the growing amounts of data being stored by industrial organisations today, understanding...


  • All content Copyright © 2024 Westwick-Farrow Pty Ltd