Solver Arrays

Specify a list of variables or constants that can be referenced by other entities

In the below formulations, the vectors x(t) (states), u(t) (inputs), and y(t) (outputs) are referred to as solver arrays.

Dynamic systems can be characterized in two ways:

Linear Dynamical Systems

These are defined by four constant matrices: A, B, C, and D, related to the system as follows:

  • State dynamics: xd(t) = A x(t) + B u(t)
  • System outputs: y(t) = C x(t) + D u(t)
  • A (State matrix): Defines the system dynamics. For n states, A is an n × n matrix. Either A, B, or A + B must be non-singular.
  • B (Input matrix): Defines how inputs affect states. For m inputs, B is an n × m matrix.
  • C (Output matrix): Defines how states affect outputs. For p outputs, C is a p × n matrix.
  • D (Feedthrough matrix): Defines how inputs directly affect outputs. D is a p × m matrix.
Nonlinear Dynamical Systems

These are defined by two vector functions, F() and G(), related to the system as follows:

  • State dynamics: xd(t) = F(x(t), u(t))
  • System outputs: y(t) = G(x(t), u(t))
  • F(x, u): Returns the time derivative of the state vector given the current state x(t) and input u(t).
  • G(x, u): Returns the outputs given the current state x(t) and input u(t).

Both functions can be implemented through user-defined subroutines (for example, StateEquations) or by coupling with another solver.

Solver Array Properties

Descriptions of solver array properties in the Property Editor.

Table 1.
Property Name Description
General
Name Name of the entity
Variable Name The variable name, a unique identifier string of the entity
ID A unique identifying integer
Properties
Type Array type options

If X or Y are selected, no other information is needed. All other types have additional options available as described below.

X

Stores the state array for control elements, such as StateEquations and ControlSISOs.

Y

Stores the output array for control elements, such as StateEquations and ControlSISOs.

U

Stores the input array for control elements, such as StateEquations and ControlSISOs. This type contains a list of IDs for Solver Variable elements that define the inputs to the modeling elements.

  • Variables: List of solver variables.
IC

Stores a set of numbers, primarily for specifying initial conditions in control elements, such as StateEquations and ControlSISOs. This type can also be used to define numeric sets for access within a user-written subroutine.

Data source options:

  • File: Reference to an external file that contains data values. Several commonly used file formats are supported, such as .csv and .txt, as well as other data formats supported by HyperGraph such as .abf, .plt, .dac, .rsp, and so on. The Type and Requests are blocks and sub-blocks of data and a component is a vector (or column) within the sub-block. While using a .csv or a .txt as a data file, set the Type to Unknown. Request will appear as Block 1. If headers are specified for columns, those headers will appear under Component. Otherwise, they would be listed as Column 1, Column 2, and so on.
  • Value: List of data values.
  • Math: Expression to define the array mathematically.
PLANT_INPUT

Stores the input array to the mechanical system or plant in Inspire. It is used either as input signals in co-simulation with another solver or for generating the B and D matrices of the state-space representation during linearization (Eigenanalysis).

Properties:

  • Variables: List of solver variables.
  • Use in linearization: Defines if the solver array should be used in Eigenanalysis.
  • Hold order: Specifies the order of interpolation applied to the control signal(s). Possible options are 0, 1, and 2.
  • Use sampling time: Specifies the sample time of an input port. A value of 0.0 indicates continuous sampling, while any positive value indicates discrete sampling. Negative values are not allowed. The default is 0.0, and in most cases this setting does not need to be changed unless the model requires discrete sampling.
  • Use offset time: Specifies the sample time offset for each input port. If the sampling period is nonzero, the offset must be strictly less than the sampling period. If the sampling period is 0.0 (continuous), the offset defaults to 0.0. In most cases, this value does not need to be changed from its default, except in models that require discrete sampling.
  • User-defined: Alternatively, PLANT_INPUT can be defined via a user subroutine, allow you to specify the properties of the array using user subroutines.

    • For User expr, provide an expression with the USER solver function with parameters being passed to the user subroutine.
    • Turn on Use local file and function name to provide a local file for the subroutine. Otherwise, Inspire Motion will search for the subroutine within its search path.
      1. Specify a Local file where the subroutine code can be accessed by the solver. If this option is not specified, the application will search for a subroutine following its user subroutine loading rules.
        Note: The type of file to be specified will depend on the selected function type. For example, if DLL/SO is selected, you can specify a file with a .dll extension (for Windows) or an .so extension (for Linux).
      2. Select a Function type from the dropdown menu:
        • DLL/SO
        • Python
        • MatLab
        • Compose
      3. Specify the Function name in the subroutine that defines the entity, or accept the default name provided by the application.
PLANT_OUTPUT

Stores the output array from the mechanical system or plant in Inspire. It is used either as output signals in co-simulation with another solver or for generating the C and D matrices of the state-space representation during linearization (Eigenanalysis).

The properties are similar to PLANT_INPUT.

Notes and Tags
Attachment Candidate Add an attachment candidate tag. See Attachments.