StepResponseCheck block

Requirements.ChecksInFixedWindow.StepResponseCheck  ยท source

Icon of StepResponseCheck

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

Examples.Elementary.StepResponse.

Parameters

NameTypeDescription
target parameterStepTargetThe target: the stepping signal after the step, or the yRef input
metric parameterStepMetricThe metric bounded
bound parameterRealThe 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 parameterBoolean= true: an overshoot / undershoot / steady-state error bound in percent of |deltaY|; false: in u's unit
threshold parameterRealA step is a change of r between two samples of at least this (0: any change)
samplePeriod parameterSI.TimeThe sampling period of the metrics
level1 parameterRealLower rise-time level (fraction of the change)
level2 parameterRealUpper rise-time level
band parameterRealSettling band: a fraction of the change (bandIsFraction) or absolute
bandIsFraction parameterBoolean= true: band is a fraction of |deltaY|
T_window parameterSI.Time0: the window runs to the next step; > 0: closes T_window after the step
scale parameterRealScale of the margin: margin = robustness/scale, with scale the requirement's tolerance (1 = the raw robustness in the metric's unit)
computeMargin parameterBoolean= true, if the normalized margin output is provided

Components and variables

NameTypeDescription
uModelica.Blocks.Interfaces.RealInputThe response
rModelica.Blocks.Interfaces.RealInputThe stepping signal
yRefModelica.Blocks.Interfaces.RealInputThe reference (target = Reference)
yRequirements.Interfaces.PropertyOutputProperty output signal
marginRequirements.Interfaces.MarginOutputNormalized margin of the check: >= 0 exactly when the check holds, in units of scale
valueModelica.Blocks.Interfaces.RealOutputThe metric's running value (its final value at the window's close)
stepResponseRequirements.SignalAnalysis.StepResponseComputes the step-response metrics of u after each step of r