Contenuto principale

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Configurazione delle condizioni di simulazione

Selezionare il risolutore, impostare le condizioni iniziali, scegliere l'insieme dei dati di input, impostare la dimensione del passo

Dopo aver costruito un modello in Simulink®, è possibile configurare la simulazione per eseguirla in modo rapido e accurato senza apportare modifiche strutturali al modello.

Il primo passo per configurare la simulazione è selezionare un risolutore. Per impostazione predefinita, Simulink seleziona automaticamente un risolutore a passo variabile. È possibile sincronizzare con precisione le opzioni del risolutore o selezionarne uno diverso nel riquadro Risolutore della finestra di dialogo Parametri di configurazione.

A volte una simulazione può rallentare o bloccarsi. Utilizzare il Solver Profiler per identificare i colli di bottiglia nella simulazione e ottenere consigli per migliorare le prestazioni del risolutore.

Funzioni

espandi tutto

openDialogOpen configuration parameters dialog
closeDialogClose configuration parameters dialog
Simulink.BlockDiagram.getAlgebraicLoopsIdentify and analyze algebraic loops in a model
solverprofiler.profileModelProgrammatically analyze solver performance for model using Solver Profiler

Impostazioni modello

espandi tutto

Start timeSimulation start time
Stop timeSimulation stop time
TypeChoice of variable- or fixed-step solver
SolverSolver that computes states and outputs for simulation

Dimensione del passo e tolleranza all'errore

Max step sizeMaximum step size to allow in simulations that use variable-step solvers
Min step sizeMinimum step size for variable-step solver
Initial step sizeSize of first step for variable-step solver
Number of consecutive min stepsNumber of steps less than or equal to minimum step size allowed before minimum step size violation occurs
Relative toleranceRelative tolerance for solver tolerance calculation
Absolute toleranceAbsolute tolerance for solver tolerance calculation
Auto scale absolute toleranceOption to scale absolute tolerance based on state values
Shape preservationOption to preserve shape of states using derivative information at each time step

Rilevamento dello zero-crossing

Zero-crossing controlOption to control how zero-crossing detection is enabled in the model
AlgorithmAlgorithm for zero-crossing detection with variable-step solver
Time toleranceDefinition of consecutive zero crossings
Signal thresholdState value at which adaptive zero-crossing algorithm can stop bracketing
Number of consecutive zero crossingsThreshold for issuing diagnostic due to consecutive zero crossings

Opzioni di calcolo del risolutore

Integration methodIntegration for nonadaptive odeN variable-step solver
Maximum orderOrder of numerical differentiation formulas used for ode15s solver
Solver reset methodOption to specify whether solver recomputes Jacobian matrix during solver reset
Solver Jacobian MethodMethod implicit solvers use to compute Jacobian matrix
Extrapolation orderExtrapolation order for ode14x fixed-step solver
Number of Newton's iterationsNumber of Newton's method iterations used by ode14x and ode1be solvers
Daessc modeMode of operation for daessc solver
Continuous state refinement methodMethod daessc solver uses to refine continuous state values (Da R2025a)

Opzioni delle attività e dei tempi di campionamento

Automatically handle rate transition for data transferOption to ensure integrity of data transfer between different sample times in deployed code
Allow multiple tasks to access inputs and outputsOption to treat root-level input and output ports as part of each connected task in rate-based model (Da R2021b)
Higher priority value indicates higher task priorityPriority ordering for real-time system targets
Deterministic data transferDeterministic data transfer behavior for automatically inserted Rate Transition blocks

Dimensione del passo

Fixed-step size (fundamental sample time)Step size for fixed-step solver

Rilevamento dello zero-crossing

Enable zero-crossing detection for fixed-step solverOption to use zero-crossing detection with fixed-step solver (Da R2022a)
Zero-crossing controlOption to control how zero-crossing detection is enabled in the model
Maximum number of bracketing iterationsMaximum number of iterations performed when locating zero crossing (Da R2022a)
Maximum number of zero-crossings per stepMaximum number of zero crossings to locate in a single time step (Da R2022a)

Opzioni di calcolo del risolutore

Solver Jacobian MethodMethod implicit solvers use to compute Jacobian matrix
Extrapolation orderExtrapolation order for ode14x fixed-step solver
Number of Newton's iterationsNumber of Newton's method iterations used by ode14x and ode1be solvers

Opzioni delle attività e dei tempi di campionamento

Periodic sample time constraintOption to specify constraints on model sample times
Sample time propertiesDiscrete sample time periods, offsets, and priorities
Treat each discrete rate as a separate taskOption to enable multitasking execution
Allow tasks to execute concurrently on targetOption to enable concurrent tasking behavior for model
Automatically handle rate transition for data transferOption to ensure integrity of data transfer between different sample times in deployed code
Allow multiple tasks to access inputs and outputsOption to treat root-level input and output ports as part of each connected task in rate-based model (Da R2021b)
Higher priority value indicates higher task priorityPriority ordering for real-time system targets
Deterministic data transferDeterministic data transfer behavior for automatically inserted Rate Transition blocks
Algebraic loopDiagnostic action to take when the software detects algebraic loop during compilation
Minimize algebraic loopDiagnostic action to take when the software is unable to resolve artificial algebraic loops
Block priority violationDiagnostic action to take when the software detects block priority specification error
Min step size violationDiagnostic action to take when minimum step size violation occurs
Consecutive zero-crossings violationDiagnostic action to take when zero-crossing violation occurs
Automatic solver parameter selectionDiagnostic action to take when the software changes a solver parameter value
State name clashDiagnostic action to take when more than one state has same name

Argomenti

Risolutori in Simulink

Informazioni sullo stato

Solver Profiler

Loop algebrici

Esempi in primo piano