# 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)={\displaystyle \underset{{t}_{0}}{\overset{t}{\int}}u(t)dt}+{y}_{0}$$

where

`u` | Physical signal at the input port I |

`y` | Initial condition |

`y` | Physical signal at the output port O |

`t` | Time |

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)$$

$${x}_{0}={y}_{0}$$

$$\dot{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 either a block parameter or an additional input signal:

To define the initial condition as a block parameter, specify the

**Initial condition source**parameter as`Internal`

and enter the value and unit in the**Initial condition**fields.To provide the initial condition from an external source, specify the

**Initial condition source**parameter as`External`

. An additional physical signal input port,**X0**, appears below the block's input port. Connect the external initial condition signal to port**X0**.

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, or the unit of the external initial condition signal at port
**X0**, must be commensurate with the unit of the output signal.

### Resetting the State

The block can reset its state to the specified initial condition based on an external
signal. By default, the **External reset** parameter is set to
`None`

. To cause the block to reset its state, select one of the
other **External reset** choices:

Select

`Rising`

to reset the state when the reset signal rises from a negative or zero value to a positive value.Select

`Falling`

to reset the state when the reset signal falls from a positive value to a zero or negative value.Select

`Either`

to reset the state when the reset signal changes from zero to a nonzero value, from a nonzero value to zero, or changes sign.

When you select either of these options, a trigger port **R** appears
below the block's input port. Connect the reset physical signal to port
**R**.

## Ports

### Input

### Output

## Parameters

## Model Examples

## Extended Capabilities

## Version History

**Introduced in R2007a**