Main Content

Configurer les conditions de simulation

Sélectionner un solveur, définir les conditions initiales, choisir un jeu de données d'entrée et spécifier la taille de pas

Après avoir créé un modèle dans Simulink®, vous pouvez configurer la simulation pour qu'elle s'exécute de manière rapide et précise sans apporter de modifications structurelles au modèle.

La première étape de configuration de la simulation est la sélection d'un solveur. Par défaut, Simulink sélectionne automatiquement un solveur à pas variable. Vous pouvez ajuster les options du solveur ou en sélectionner un autre dans le volet « Solver » de la boîte de dialogue « Configuration Parameters ».

Il peut arriver qu'une simulation ralentisse ou se bloque. Utilisez Solver Profiler pour identifier les goulots d'étranglement de la simulation et obtenir des recommandations afin d'améliorer la performance du solveur.

Fonctions

développer tout

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

Paramètres du modèle

développer tout

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

Taille de pas et tolérance d'erreur

Max step sizeMaximum step size for variable-step solver
Min step sizeMinimum step size for variable-step solver
Initial step sizeSize of first time 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

Détection des passages par zéro

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

Options de calcul du solveur

Integration methodIntegration for nonadaptive odeN variable-step solver (depuis R2020a)
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

Options de gestion des tâches et des pas d'échantillonnage

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 (depuis 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

Taille de pas

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

Détection des passages par zéro

Enable zero-crossing detection for fixed-step solverOption to use zero-crossing detection with fixed-step solver (depuis 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 (depuis R2022a)
Maximum number of zero-crossings per stepMaximum number of zero crossings to locate in a single time step (depuis R2022a)

Options de calcul du solveur

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

Options de gestion des tâches et de pas d'échantillonnage

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 targetEnable 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 (depuis 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 behavior when algebraic loop detected during compilation
Minimize algebraic loopDiagnostic behavior when the software is unable to resolve artificial algebraic loops
Block priority violationDiagnostic behavior when the software detects block priority specification error
Min step size violationDiagnostic behavior when minimum step size violation occurs
Consecutive zero-crossings violationDiagnostic behavior when zero-crossing violation occurs
Automatic solver parameter selectionDiagnostic behavior when the software changes a solver parameter value
State name clashDiagnostic behavior when more than one state has same name

Rubriques

Solveurs dans Simulink

Informations d'état

Solver Profiler

Boucles algébriques