Rotational Model Settings

Purpose

Configure settings for an individual mechanical model.

Library

Mechanical / Rotational / Model Settings

Description

../../_images/rotationalmodelsettings.svg

The Rotational Model Settings block lets you configure parameter settings that influence the code generation for a particular mechanical system, see also Code Generation for Physical Systems.

The block affects the mechanical system that it is attached to by its rotational terminal. At most one Model Settings block may be attached to an individual state-space system. A mechanical model can be split into multiple state-space systems if the underlying model equations are fully decoupled. Note that a rotational system and a translational system that are coupled e.g. with a Rack and Pinion have coupled model equations. See also the options Enable state-space splitting and Display state-space splitting in the Simulation Parameters.

Parameters

Switching algorithm

This parameter allows you two choose between two algorithms to determine the clutch states in the generated code. See Switching Algorithm for details.

Matrix coding style

This setting allows you to specify the format used for storing the state-space matrices for a physical model. When set to sparse, only the non-zero matrix entries and their row and column indices are stored. When set to full, matrices are stored as full \(m \times n\) arrays. When set to full (inlined), the matrices are additionally embedded in helper functions, which may enable the compiler to further optimize the matrix-vector-multiplications at the cost of increased code size.