Electrical Model Settings

Purpose

Configure settings for an individual electrical model.

Library

Electrical / Model Settings

Description

../../_images/electricalmodelsettings.svg

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

The block affects the electrical circuit that it is attached to by its electrical terminal. At most one Model Settings block may be attached to an individual state-space system. An electrical model can be split into multiple state-space systems if the underlying model equations are fully decoupled. See also the options Enable state-space splitting and Display state-space splitting in the Simulation Parameters.

Parameters

Target

This setting controls whether a physical model will be executed on the CPU or the FlexArray solver of a target. The default is CPU. The option FlexArray should be chosen only if the target has a FlexArray solver. Currently, this applies to the PLECS RT Box 2, 3 and 4 using version 3.0 or newer of the RT Box Target Support Package.

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. This parameter applies only to code generation for the CPU target.