## Documentation |

On this page… |
---|

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 you continually refine 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.

Model-Based Design allows you 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 multi-domain 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

There are six steps to modeling any system:

Defining the System

Identifying System Components

Modeling the System with Equations

Building the Simulink

^{®}Block DiagramRunning the Simulation

Validating the Simulation Results

You perform the first three steps of this process outside of the Simulink software environment before you begin building your model.

The first step in modeling a dynamic system is to fully define the system. If you are modeling a large system that can be broken into parts, you should model each subcomponent on its own. Then, after building each component, you can integrate them into a complete model of the system.

For example, the `sldemo_househeat` example
model of the heating system of a house is broken down into three main
parts:

Heater subsystem

Thermostat subsystem

Thermodynamic model subsystem

The most effective way to build a model of this system is to consider each of these subsystems independently.

The second step in the modeling process is to identify the system components. Three types of components define a system:

**Parameters**— System values that remain constant unless you change them**States**— Variables in the system that change over time**Signals**— Input and output values that change dynamically during a simulation

In Simulink, parameters and states are represented by blocks, while signals are represented by the lines that connect blocks. For each subsystem that you identified, ask yourself the following questions:

How many input signals does the subsystem have?

How many output signals does the subsystem have?

How many states (variables) does the subsystem have?

What are the parameters (constants) in the subsystem?

Are there any intermediate (internal) signals in the subsystem?

Once you have answered these questions, you should have a comprehensive list of system components, and you are ready to begin modeling the system.

The third step in modeling a system is to formulate the mathematical equations that describe the system. For each subsystem, use the list of system components that you identified to describe the system mathematically.

Your model may include:

Algebraic equations

Logical equations

Differential equations, for continuous systems

Difference equations, for discrete systems

You use these equations to create the block diagram in Simulink.

After you have defined the mathematical equations that describe each subsystem, you can begin building a block diagram of your model in Simulink.

Build the block diagram for each of your subcomponents separately. After you have modeled each subcomponent, you can then integrate them into a complete model of the system.

After you build the Simulink block diagram, you can simulate the model and analyze the results.

Simulink allows you to interactively define system inputs, simulate the model, and observe changes in behavior. This allows you to quickly evaluate your model.

Finally, you must validate that your model accurately represents the physical characteristics of the dynamic system.

You can use the linearization and trimming tools available from
the MATLAB^{®} command line, plus the many tools in MATLAB and
its application toolboxes to analyze and validate your model.

Was this topic helpful?