Ramp
SourcesThe Ramp block generates a linearly increasing signal that starts at a specified time and increases at a constant rate (slope). This block is commonly used to create reference signals, test system tracking performance, or simulate gradual changes in control inputs.
The Ramp block has no input ports and produces a single output signal that remains constant at the initial value until the start time, then increases linearly according to the specified slope.
Mathematical Model
The Ramp block implements:
Where:
tis the current simulation timeinitialValueis the output value before the start timestartTimeis the time at which the ramp beginsslopeis the rate of change per second
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | trigger |
Trigger | number | Optional |
| ← Out | out |
Output | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
slope |
Slope | number | 1 |
|
startTime |
Start Time | number | 0 |
|
initialValue |
Initial Value | number | 0 |
|
finalValue |
Final Value | number | 10 |
Maximum output value when Enable Final Value is true |
enableFinalValue |
Enable Final Value | boolean | false |
When enabled, the ramp will stop at the Final Value |
Usage Examples
Unit Ramp
Generate a 1:1 increasing signal starting at t=0:
Ramp (slope: 1, startTime: 0) → Integrator → Scope
Slow Pressure Increase
Simulate a system where pressure increases by 0.5 bar every second starting after 2 seconds:
Ramp (slope: 0.5, startTime: 2, initialValue: 0) → BoilerSystemRemarks & Best Practices
- Continuous Change: Unlike the Step block, Ramp provides a continuous (but non-smooth) transition.
- WASM Performance: High-performance implementation ensure accurate tracking in real-time.
- Indefinite Increase: Note that the output continues to increase forever unless stopped or saturated by a downstream block.
Related Components
- Step: For instantaneous signal changes
- Constant: For non-varying signal sources
- SignalGenerator: For periodic waveforms