Blocchi
Per creare un modello Simulink®, aggiungere blocchi a un diagramma a blocchi, quindi collegare e configurare tali blocchi. È possibile assegnare valori ai parametri numerici del blocco che controllano i calcoli del blocco durante la simulazione e regolare le proprietà del blocco che controllano l'aspetto.
Regolare i parametri e le proprietà dei blocchi per:
Sperimentare i valori dei parametri durante la progettazione del modello.
Abbinare i risultati della simulazione ai dati misurati, stimando i valori dei parametri.
Progettare un algoritmo di controllo efficiente ottimizzando i valori dei parametri.
Documentare i blocchi e personalizzare l'aspetto.
Definire le costanti di sistema creando variabili globali che possono essere condivise tra blocchi e modelli.
Funzioni
Classi
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 (Da R2021a) |
Simulink.VariantVariable | Create variant parameter object (Da R2021a) |
Argomenti
Parametri del blocco
- 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.
Proprietà del blocco
- Specify Block Properties
Control block appearance and add custom documentation to blocks. Specify block execution priority and callbacks. - Specify Blocks to Execute First or Last
Specify block execution order. - Associating User Data with Blocks
Associate your own data, such as a numeric variable, with a block.