uy$(instance)Integrator Icon

Integrator

Outputs y = ∫k*u dt, corresponding to the transfer function $1/s$.

This component extends from SISO

Usage

Integrator(x0=0, k=1.0)

Parameters:

NameDescriptionUnitsDefault value
x0Initial value of the integrator state0
kGain1

Connectors

  • u - This connector represents a real signal as an input to a component (RealInput)
  • y - This connector represents a real signal as an output from a component (RealOutput)

Variables

NameDescriptionUnits
xState of Integrator

Behavior

\[ \begin{align} \frac{\mathrm{d} x\left( t \right)}{\mathrm{d}t} &= k u\left( t \right) \\ y\left( t \right) &= x\left( t \right) \end{align} \]

Source

# Outputs `y = ∫k*u dt`, corresponding to the transfer function ``1/s``.
component Integrator
  extends SISO
  # State of Integrator
  variable x::Real
  # Initial value of the integrator state
  parameter x0::Real = 0
  # Gain
  parameter k::Real = 1.0
relations
  initial x = x0
  der(x) = k*u
  y = x
metadata {"JuliaSim": {"icons": {"default": "jsml://BlockComponents/Integrator.svg"}}}
end
Flattened Source
# Outputs `y = ∫k*u dt`, corresponding to the transfer function ``1/s``.
component Integrator
  u = RealInput() [{
    "JuliaSim": {
      "placement": {"icon": {"iconName": "input", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }]
  y = RealOutput() [{
    "JuliaSim": {
      "placement": {"icon": {"iconName": "output", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }]
  # State of Integrator
  variable x::Real
  # Initial value of the integrator state
  parameter x0::Real = 0
  # Gain
  parameter k::Real = 1.0
relations
  initial x = x0
  der(x) = k*u
  y = x
metadata {"JuliaSim": {"icons": {"default": "jsml://BlockComponents/Integrator.svg"}}}
end

Test Cases

  • Examples
  • Experiments
  • Analyses