PS Integrator

Integrate physical signal

  • Library:
  • Simscape / Foundation Library / Physical Signals / Linear Operators

Description

The PS Integrator block outputs the integral of its input at the current time step. The following equation represents the output of the block:

y(t)=t0tu(t)dt+y0

where

uPhysical signal at the input port I
y0Initial condition
yPhysical signal at the output port O
tTime

The PS Integrator block is a dynamic system with one state, its output. The PS Integrator block's input is the state's time derivative:

x=y(t)

x0=y0

x˙=u(t)

The solver computes the output of the PS Integrator block at the current time step, using the current input value and the value of the state at the previous time step. To support this computational model, the PS Integrator block saves its output at the current time step for use by the solver to compute its output at the next time step. The block also provides the solver with an initial condition for use in computing the block's initial state at the beginning of a simulation run. The default value of the initial condition is 0 s. You can specify another value for the initial condition as a parameter on the block dialog box.

The block performs integration of the input signal over time, therefore the unit of the output signal equals the unit of the input signal multiplied by the unit of time, s. For example, if the input signal is in m/s, then the output signal is in m. The unit specified for the Initial condition parameter must be commensurate with the unit of the output signal.

Ports

Input

expand all

Input physical signal.

The port name is not visible in the block icon, but you can see this name in the underlying source file (accessible by clicking the Source code link in the block dialog box).

Output

expand all

Output physical signal.

The port name is not visible in the block icon, but you can see this name in the underlying source file (accessible by clicking the Source code link in the block dialog box).

Parameters

expand all

Specify the initial condition for use in computing the block's initial state at the beginning of a simulation run.

The unit specified for the Initial condition parameter must match the unit of the output signal. By default, the input signal is unitless. Then the output signal is in s, and the Initial condition parameter unit is also s. If your input signal has a physical unit, multiply this unit by a unit of time to set the correct unit for the Initial condition parameter. For example, if the input signal is in m/s, then specify the Initial condition parameter unit as m.

Compatibility Considerations

expand all

Behavior changed in R2019a

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2007a