StepResponseCheck block
Requirements.ChecksInFixedWindow.StepResponseCheck
ยท source
One step-response metric of u after a step of r, bounded: Property and margin
Syntax
property = StepResponseCheck(u=..., r=..., metric=..., bound=...).y;
Description
One metric of the step response of u after a step of r, bounded: the metric is computed by an inner SignalAnalysis.StepResponse at every samplePeriod, and the Property output y is Undefined before the first step, Undecided from a step to the earliest sample at which the bound is provably met or broken -- an overshoot exceeding its bound, a level not reached bound after the lower level (rise time) or after the step (delay time), the band left after the deadline (settling time), a damping or decay ratio known from two or three extrema -- and decided at the window's close otherwise (the peak is only known then; the steady-state error is read there). The window closes at the next step of r or T_window after the step; a window that runs to the end of the run stays Undecided, its running value and margin the evidence. A window closed by the next step is judged on the previous sample's metrics (the step resets them) and the new window is Undecided from the sample after.
The bound of an overshoot, undershoot or steady-state error is a percent of the change |deltaY| when boundIsPercent (a disturbance step, whose change is below a quarter of its deviation, has no base: the property is Undefined), else in u's unit; the bound of a time is in seconds; the damping ratio must be at least the bound, every other metric at most.
Margin
Output margin (present if computeMargin = true) is the signed distance of the running metric to
its bound -- bound - value, zeta - bound for the damping ratio -- divided by
scale, followed while the window is open (after an early decision too, so a violated overshoot's
margin reaches the eventual peak's) and held after the close: at every decided sample margin ≥ 0 exactly
when the check holds, and at the window's close it is the margin of the closed window. Set
scale to the requirement's tolerance.
The metrics are sampled, so an instant is known to one samplePeriod. Where a step-response requirement is also evaluated on the stored trajectory after the run (at the full resolution of the result), the decided Property and the margin of this block agree with that evaluation to one sampling period in time. A target the response's final value is only known after the run and is not offered here.
Example
Parameters
| Name | Type | Description |
|---|---|---|
target parameter | StepTarget | The target: the stepping signal after the step, or the yRef input |
metric parameter | StepMetric | The metric bounded |
bound parameter | Real | The bound: at most (at least for the damping ratio) -- in percent of the change when boundIsPercent, seconds for a time, u's unit otherwise |
boundIsPercent parameter | Boolean | = true: an overshoot / undershoot / steady-state error bound in percent of |deltaY|; false: in u's unit |
threshold parameter | Real | A step is a change of r between two samples of at least this (0: any change) |
samplePeriod parameter | SI.Time | The sampling period of the metrics |
level1 parameter | Real | Lower rise-time level (fraction of the change) |
level2 parameter | Real | Upper rise-time level |
band parameter | Real | Settling band: a fraction of the change (bandIsFraction) or absolute |
bandIsFraction parameter | Boolean | = true: band is a fraction of |deltaY| |
T_window parameter | SI.Time | 0: the window runs to the next step; > 0: closes T_window after the step |
scale parameter | Real | Scale of the margin: margin = robustness/scale, with scale the requirement's tolerance (1 = the raw robustness in the metric's unit) |
computeMargin parameter | Boolean | = true, if the normalized margin output is provided |
Components and variables
| Name | Type | Description |
|---|---|---|
u | Modelica.Blocks.Interfaces.RealInput | The response |
r | Modelica.Blocks.Interfaces.RealInput | The stepping signal |
yRef | Modelica.Blocks.Interfaces.RealInput | The reference (target = Reference) |
y | Requirements.Interfaces.PropertyOutput | Property output signal |
margin | Requirements.Interfaces.MarginOutput | Normalized margin of the check: >= 0 exactly when the check holds, in units of scale |
value | Modelica.Blocks.Interfaces.RealOutput | The metric's running value (its final value at the window's close) |
stepResponse | Requirements.SignalAnalysis.StepResponse | Computes the step-response metrics of u after each step of r |