Integrator
IconIntegrator
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:
Name | Description | Units | Default value |
---|---|---|---|
x0 | Initial value of the integrator state | – | 0 |
k | Gain | – | 1 |
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
Name | Description | Units |
---|---|---|
x | State 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
Related
- Examples
- Experiments
- Analyses