blockTriangleAndStep
Multiple steps and triangles
Information
The step output starts from stepOffset and increases to stepOffset + stepHeight in stepNumbersteps. The total duration of all step changes is equal to T.
During each step the triangle output is increased from
triangleOffset to triangleOffset + triangleHeight
and back to triangleOffset.
This way a variable sweep (triangleOffset) can be performed for different
stepwise changed variables (step).
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | T | 1 | Total time of varying outputs |
| Integer | stepNumber | 5 | Number of steps |
| Real | stepHeight | 1 | Total step height |
| Real | stepOffset | 0 | Offset |
| Modelica.Units.SI.Time | startTime | 0 | Start time |
| Real | triangleHeight | 1 | Height of triangle output |
| Real | triangleOffset | 0 | Offset of triangle output |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealOutput | step | ||
| Modelica.Blocks.Interfaces.RealOutput | triangle |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Sources.Ramp | ramp | ||
| Modelica.Blocks.Math.RealToInteger | realToInteger | ||
| Modelica.Blocks.Math.IntegerToReal | integerToReal | ||
| Modelica.Blocks.Math.Feedback | feedback | ||
| Modelica.Blocks.Sources.Constant | constantOffset | ||
| Modelica.Blocks.Math.Add | add | ||
| Modelica.Blocks.Math.Gain | gain | ||
| Modelica.Blocks.Sources.Trapezoid | trapezoid | ||
| Modelica.Blocks.Sources.Step | const | ||
| Modelica.Blocks.Nonlinear.Limiter | limiter |