Bloques
Para crear un modelo de Simulink®, debe añadir bloques al diagrama de bloques y, a continuación, conectarlos y configurarlos. Puede asignar valores a los parámetros numéricos del bloque, que controlan sus cálculos durante la simulación, y ajustar las propiedades del bloque, que controlan el aspecto.
Ajuste los parámetros y propiedades de los bloques para hacer lo siguiente:
Experimentar con los valores de los parámetros mientras se diseña un modelo.
Cotejar los resultados de la simulación con los datos medidos calculando los valores de los parámetros.
Diseñar un algoritmo de control eficiente optimizando los valores de los parámetros.
Documentar bloques y personalizar el aspecto.
Definir las constantes del sistema creando variables globales que se pueden compartir entre bloques y modelos.
Funciones
Clases
Simulink.DualScaledParameter | Specify name, value, units, and other properties of Simulink dual-scaled parameter |
Simulink.Parameter | Store, share, and configure parameter values |
Simulink.VariantControl | Create a variant control variable object (desde R2021a) |
Simulink.VariantVariable | Create variant parameter object (desde R2021a) |
Temas
Parámetros de bloque
- Set Block Parameter Values
Blocks have numeric parameters that determine how they calculate output values. To control the calculations that blocks perform, you can specify parameter values. - Share and Reuse Block Parameter Values by Creating Variables
To set multiple block parameters to the same value, you can use a numeric variable that you create and store in a workspace such as the base workspace, a model workspace, or a data dictionary. - Use Variant Parameters to Reuse Block Parameters with Different Values
Design one model for many variants of a system that differ in block parameter values. - Parameter Interfaces for Reusable Components
For each block parameter in a reusable component, specify the same value for all instances of the component or a different value for each instance. - Organize Related Block Parameter Definitions in Structures
Increase model readability and reduce the effort of model maintenance by aggregating block parameter values into structures. - Tune and Experiment with Block Parameter Values
As you construct a model you can experiment with block parameters, such as the coefficients of a Transfer Fcn block, to help you decide which blocks to use. - Optimize, Estimate, and Sweep Block Parameter Values
Use parameter sweeping to tune control parameters, estimate unknown model parameters, and test the robustness of a control algorithm by taking into consideration uncertainty in the real-world system. - Switch Between Sets of Parameter Values During Simulation and Code Execution
Switch between independent sets of values for the same block parameters by storing the sets in an array of structures. - Control Block Parameter Data Types
Control the data type that Simulink and the generated code use to store block parameter values in computer memory. - Specify Minimum and Maximum Values for Block Parameters
Fully specify your design and optimize the generated code by setting minimum and maximum values for numeric block parameters. - Programmatically Specify Block Parameters and Properties
To write scripts that modify block behavior, determine the programmatic names and supported values of block parameters and properties.
Propiedades de un bloque
- Specify Block Properties
Control block appearance and add custom documentation to blocks. Specify block execution priority and callbacks. - Associating User Data with Blocks
Associate your own data, such as a numeric variable, with a block.