Recursive IIR Identification — System Identification/Recursive
System_Identification/Recursive/Recursive_IIR_Identification · 2 input / 2 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text
Description#
The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.
Recursive IIR Identification
System Identification / Recursive
Identifies a discrete transfer function while the model runs, by recursive least squares. One sample of the input/output pair goes in per step, and the coefficient estimates come straight back out – so the identified model is available on the canvas, live, and can drive the rest of the diagram.
Ports
- u – the excitation signal, scalar.
- y – the measured response, scalar.
- Num / Den – the running coefficient estimates, updated every step and sized from the configured orders.
Parameters
- Numerator Order – the order of the identified numerator. It must not exceed the denominator order: the difference is the model's intrinsic input delay, and a negative one is not causal.
- Denominator Order – the order of the identified denominator, and so the model's order.
- Forgetting Factor – how fast old data is discounted, in (0,1]. 1 weighs every sample equally and settles on a fixed model; slightly below 1 (0.95–0.99) tracks a system that drifts, at the cost of a noisier estimate.
- Sampling Time (s) – the rate the estimator is updated at, and the rate the identified model belongs to. Zero or less inherits the solver's rate.
Notes
- Discrete only. The estimate needs a warm-up: until enough history has been seen, the outputs hold their initial values.
- Identification quality depends on the excitation – a signal that does not stir the dynamics cannot identify them.
Code export
All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. Every one re-implements the same recursion step for step – same regressor convention, same warm-up gate, same covariance update – with the orders, and so every array bound, fixed at export time, so the exported coefficients track the in-app ones sample for sample.
The three HDL targets are simulation-only: they carry the recursion in double arithmetic and quantize only on the way out to the fixed-point signal ports. The covariance spans roughly twelve decades and needs a division per step, neither of which the Q16.16 signal format can carry; a synthesizable fixed-point version would need its own scaled datapath.
Noncausal orders (numerator above denominator) are refused: each generator returns nothing so the export fails loudly for that language rather than emitting a recursion with a negative delay.
Simulink bridge
Neither direction. System identification blocks have no Simulink equivalent, so the bridge reports this block with that reason instead of silently dropping it.
Code facts#
| Fact | Value |
|---|---|
| registered type | System_Identification/Recursive/Recursive_IIR_Identification |
| family | System_Identification/Recursive |
| solver environment class | ICoreBlock_0_System_Identification_1_Recursive_2_Recursive_IIR_Identification |
| source | src/ICoreSDK/ICoreBlockLibrary/Blocks/System_Identification/Recursive/IIR/ICoreBlock_0_System_Identification_1_Recursive_2_Recursive_IIR_Identification.cpp |
| header | src/ICoreSDK/ICoreBlockLibrary/Blocks/System_Identification/Recursive/IIR/ICoreBlock_0_System_Identification_1_Recursive_2_Recursive_IIR_Identification.h |
| default size on canvas | 90 × 70 px |
| ports at insert | 2 in, 2 out |
| code generators implemented | Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text |
Ports#
| # | Direction | Signal type | Description label |
|---|---|---|---|
| 1 | in | ICoreDouble | — |
| 2 | in | ICoreDouble | — |
| 3 | out | ICoreDouble | — |
| 4 | out | ICoreDouble | — |
Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.
Configuration variables#
| Config variable | Default | Simulink parameter |
|---|---|---|
Numerator Order | 1 | — |
Denominator Order | 2 | — |
Forgetting Factor | 1 | — |
Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.
Simulink bridge#
| support | Support::None |
| Simulink path | — |
| port-count rule | PortsParam::None |
SampleTime parameter | yes |
Caveat (shown to the user): system identification blocks have no Simulink equivalent
Catalog contract: src/ICoreSDK/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h
Description vs code#
The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:
B0Ports lists 3 entries for 4 ports (2 in, 2 out) — grouped, or one undocumented? a reader must say
The verdict above is
tools/docs/check_block_descriptions.py(P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.
Sample results#
The same rig also ran:
| Stimulus | What it is | Output range |
|---|---|---|
impulse | Impulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair) | 0 … 0 |
ramp | Ramp: slope 1 from t = 0 | 0 … 1 |
sine | Sine Wave: amplitude 1, 2 rad/s, no phase, no bias | 0 … 0.9801 |
table | Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample | 0 … 1.2 |
Plotted: step — Step: 0 -> 1 at t = 1 s
Category dynamic · sample time 0.1 · 60 steps · commit ccf005c8 · produced by docsSample --out <folder> --steps 60 · data docs/generated/samples/System_Identification__Recursive__Recursive_IIR_Identification.json · the SVG is generated from those numbers by tools/docs/plot_svg.py, so it is a run and not a drawing (R-D10).