Ramp
SourcesGenerates a linearly increasing or decreasing signal starting at a specified simulation time and advancing at a constant slope (rate of change). Unlike the discontinuous amplitude jump of a Step block, the Ramp block produces a continuous waveform ideal for generating smooth acceleration profiles, constant-velocity motion setpoints, soft-start power trajectories, and evaluating velocity tracking error constants () in closed-loop control systems. Supports optional clamping at a target finalValue and external edge-triggered resetting.
Mathematical Model
Without final value clamping (enableFinalValue = false), the output trajectory is defined as:
where denotes initialValue, denotes slope, and denotes startTime.
When final value clamping is activated (enableFinalValue = true), the output saturates smoothly at :
- For positive slope ():
- For negative slope ():
In the Laplace domain (), the transform of an unbounded delayed ramp is:
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
Example 1: Velocity Error Constant () Tracking Assessment
In high-precision motion servomechanisms, calculating the steady-state tracking error under constant-speed velocity tracking requires a ramp input. Connecting a Ramp block with slope = 5.0 rad/s, startTime = 1.0 s, and initialValue = 0.0 into a position control loop allows engineers to quantify the velocity error constant , confirming Type-1 loop stiffness.
Example 2: Industrial Pump Soft-Start Pressure Ramp
In high-pressure water transmission pipelines, starting pumps abruptly generates damaging water hammer pressure shocks. Configuring a Ramp block with slope = 10.0 bar/s, startTime = 0.5 s, initialValue = 0.0 bar, finalValue = 80.0 bar, and enableFinalValue = true creates a controlled 8-second soft-start trajectory that smoothly brings system pressure up to working limits.
Remarks & Best Practices
- Continuous Waveform with Corner Discontinuity: The output position is continuous (), but its derivative changes abruptly at , allowing adaptive ODE solvers to adjust step sizes cleanly.
- Edge-Triggered Reset Terminal: Applying a rising edge to the bottom
triggerinput reloadsinitialValueand restarts the ramp timing from the current simulation instant. - Infinite Linear Excursion Warning: When
enableFinalValue = false, the output grows without bound over long simulation horizons; always verify that downstream actuators incorporateSaturationprotection. - Double Pole at the Origin: In frequency analysis, a ramp excitation has a double pole at (), causing non-zero steady-state tracking lag in Type-1 systems and divergence in Type-0 systems.
Related Components
- Step: Generates an abrupt step transition between two values.
- RateLimiter: Restricts the maximum derivative of an arbitrary incoming signal.
- Clock: Generates an unscaled linear simulation time signal ().
- Saturation: Clamps signal excursions between configurable limits.