PS Ramp
R2026bGenerate constantly increasing or decreasing physical signal
Libraries:
Simscape /
Foundation Library /
Physical Signals /
Sources
Description
The PS Ramp block generates a physical signal that remains at a specified initial value and then, starting at a specified time, changes by a specified rate. The Slope, Start time, and Initial output parameters determine the characteristics of the output signal:
The Initial output and Slope parameter values determine whether the output signal is a scalar, vector, or matrix. If one of them is a vector or a matrix, the other must be a vector or a matrix of the same size, or a scalar. The output signal is then also a vector or a matrix of the same size.
The unit of Initial output determines the output signal unit.
The unit of Slope multiplied by unit of time must be commensurate with the unit of Initial output.
The output remains at the Initial output until the Start time, then increases or decreases based on the Slope:
Positive Slope values indicate the increase rate.
Negative Slope values indicate the decrease rate.
The table shows examples of block output for various combinations of scalar and nonscalar block parameter values.
| Block Parameters | Output |
|---|---|
Slope
Start time
Initial input
|
|
Slope
Start time
Initial input
|
|
Slope
Start time
Initial input
|
|
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"fl_lib/Physical Signals/Sources/PS Ramp"
Example: add_block("fl_lib/Physical Signals/Sources/PS Ramp","myModel/myBlock",MakeNameUnique="on")
For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.




