Building the Model
Simulink® provides a set of predefined blocks that you can combine to create a detailed block diagram of your system. Tools for hierarchical modeling, data management, and subsystem customization enable you to represent even the most complex system concisely and accurately.
The Simulink Library Browser contains a library of blocks commonly used to model a system. These include:
- Continuous and discrete dynamics blocks, such as Integration and Unit Delay
- Algorithmic blocks, such as Sum, Product, and Lookup Table
- Structural blocks, such as Mux, Switch, and Bus Selector
The Simulink Library Browser.
You can build customized functions by using these blocks or by incorporating hand-written MATLAB®, C, Fortran, or Ada code into your model.
Your custom blocks can be stored in their own libraries within the Simulink Library Browser.
Simulink add-on products let you incorporate specialized components for aerospace, communications, PID control, control logic, signal processing, video and image processing, and other applications. Add-on products are also available for modeling physical systems with mechanical, electrical, and hydraulic components.
Building and Editing the Model
You build a model by dragging blocks from the Simulink Library Browser into the Simulink Editor. You then connect these blocks with signal lines to establish mathematical relationships between system components. Graphical formatting tools, such as smart guides and smart signal routing, help you control the appearance of your model as you build it. You can add hierarchy by encapsulating a group of blocks and signals as a subsystem in a single block.
The Simulink Editor gives you complete control over what you see and use within the model. For example, you can add commands and submenus to the editor and context menus. You can also add a custom interface to a subsystem or model by using a mask that hides the subsystem's contents and provides the subsystem with its own icon and parameter dialog box.
Navigating Through the Model Hierarchy
The Explorer bar and Model Browser in Simulink help you navigate your model. The Explorer bar indicates the level of hierarchy that you are currently viewing and lets you move up and down the hierarchy. The Model Browser provides a complete hierarchical tree view of your model, and like the Explorer bar, can be used to move through the levels of hierarchy.
Managing Signals and Parameters
Simulink models contain both signals and parameters. Signals are time-varying data represented by the lines connecting blocks. Parameters are coefficients that define system dynamics and behavior.
Simulink helps you determine the following signal and parameter attributes:
- Data type—single, double, signed, or unsigned 8-, 16- or 32-bit integers; Boolean; enumeration; or fixed point
- Dimensions—scalar, vector, matrix, N-D, or variable-sized arrays
- Complexity—real or complex values
- Minimum and maximum range, initial value, and engineering units
If you choose not to specify data attributes, Simulink determines them automatically via propagation algorithms, and conducts consistency checking to ensure data integrity.
Block dialog box showing the Signal Attributes tab.
These signal and parameter attributes can be specified either within the model or in a separate data dictionary. You can then use the Model Explorer to organize, view, modify, and add data without navigating through the entire model.
Next: Simulating the Model
The Simulink Model Explorer.