This page contains a Flash digital edition of a book.
Software: Complex system? Model-Based Design’s got it covered


Increasingly complex system designs need simulation, code generation tools Interview with Dr. Jon Friedman, MathWorks


EDITOR’S NOTE


“I think automatic code generation, test vector generation, or property proving aren’t about taking the human out of that process. They’re about adding tools to the engineer’s quiver.” So said our interviewee, Jon Friedman from MathWorks. In this exclusive interview, editor Chris Ciufo gets a firsthand education in Model-Based Design and why it’s becoming essential in air- and spacecraft systems. Edited excerpts follow.


What is Model-Based Design, and why is it important?


FRIEDMAN: Model-Based Design is the way the industry has been moving for a while, because sometimes (such as in the case of spacecraft), you can’t really stick a prototype up in space and start tweak- ing it. And with aircraft, nobody wants to fly in an aircraft that you’re changing the wings on as it flies. What’s taken hold probably in the last decade or so is the notion that modeling is an important part of all the system aspects including the physical, mechanical, electrical, or hydraulics components as well as the embedded software components.


At the center of Model-Based Design is an executable model that simulates the over- all system-level design. So engineers start with an executable specification, linked back to the base-level requirements. And a lot of times those requirements are cap- tured in the natural language environment such as Word, Excel, DOORS, or some requirements tool.


Why use Model-Based Design and what are the perhaps less-obvious benefits?


FRIEDMAN: There are two main things: One is that testing can start at the model level. Another is [handling] functional requirements, both in terms of how the system should perform and things the system should not do. Returning to our spacecraft example, the solar panels should not deploy until the vehicle is on orbit. That type of logic can start to be tested in a simulation environment, and worst-case, Monte Carlo, robustness,


and many other types of simulations can be used. So [basically it’s] designing with simulation.


Where does automatic code generation fit in – or does it?


FRIEDMAN: Yes, it fits in. Since every- thing is in the model including the algorithm, the next step is to use automatic code generation technology. Automatic code generation technology has been around for probably about 10 or 15 years. And the idea there is that code can be generated from the physical models to do HIL [Hardware in the Loop] testing, or the algorithm code can be generated and used to do real-time test- ing. Then the same models can also be used for production code generation of the flight control or on a commercial aircraft for the avionics system. Because the models have links to the original requirements, the code that gets generated also contains those links. This capability is particularly important when engineers have to conform to DO-178B, where every line of code has to be traced back to a requirement. All that traceability is established automatically.


What about legacy code – does it work well in Model-Based Design environments?


FRIEDMAN: Yes. Many applications are built from both existing legacy code and automatically generated code. What engineers tend to do a lot is reuse exist- ing designs and add or update parts of the design. For this work, they pull the legacy code into the modeling environment and


24 March/April 2011 MILITARY EMBEDDED SYSTEMS


create models of the new parts. They can then complete their design work in the modeling environment and code gen- erated from the models. Next they can integrate the legacy code and generated code together and pull the application back into the modeling environment to make sure the integrated code still provides the same functionality that they designed and verified by performing model-in-the-loop testing. From the model-level testing, they will often move to hardware-in-the-loop testing in a real-time simulator to perform further verification.


What about testing with Model-Based Design?


FRIEDMAN: The testing and verification activity with Model-Based Design is paramount. Traditionally using a V or waterfall method, testing gets done at the end. Within Model-Based Design, when the executable specifications are created, requirements tests can be developed inside the modeling environment to ensure that requirements have been met. So engineers are testing continuously throughout the design process in the modeling environ- ment. Then they can use those same tests at the code level by either linking to an IDE to enable PIL (Processor-in-the-Loop) testing – or engineers can pull code into the modeling environment and do software- in-the-loop testing.


Which MathWorks offerings provide Model-Based Design?


FRIEDMAN: Our platform product for Model-Based Design is called Simulink. It’s a graphical environment, which uses


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48