Generated reference › Elliptic Design — Control Systems/Polynomials
kind: generated#block#control-systems-polynomials

Elliptic Design — Control Systems/Polynomials

fc

Control_Systems/Polynomials/Elliptic_Design · 1 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.

Elliptic Design

Control Systems / Polynomials

Designs a digital elliptic (Cauer) filter of order N and reports its coefficients, with the cutoff arriving on a port. It is MATLAB's ellip: the analog prototype that ripples in both bands, denormalized to the cutoff and mapped to z by the bilinear transform prewarped at that same cutoff, so the passband edge sits at exactly fc.

An elliptic filter buys the steepest transition of any prototype in this family at a given order, and pays for it with ripple everywhere and the worst group delay of the four. It is what to reach for when the order is the thing being minimized. Everything follows from one number, T = tan(πfc/fs); both polynomials are then divided by a[0], so the denominator is monic and the answer is MATLAB's exactly.

It designs; it does not filter. Feed b and a to Discrete / Transfer Fcn Direct Form II Time Varying, which takes them on ports and so retunes with them.

Ports

  • fc – the passband-edge frequency in Hz, the point at which the response has fallen by the full passband ripple. Scalar. Clamped into (0, fs/2) – see Notes, the clamp is a live branch.
  • b – the numerator's coefficients, descending powers of z, as a column of N + 1 entries.
  • a – the denominator's, the same length, with a[0] = 1.

Parameters

  • Order – N, a whole number from 1 to 8. Both outputs are N + 1 long. Default 3.
  • Filter Type – which prototype mapping is used:
    • Lowpass – passes below the cutoff. Default.
    • Highpass – passes above it. The same prototype with s and 1/s exchanged, which swaps the roles of (z−1) and (z+1).
  • Passband Ripple (dB) – Rp, the peak-to-peak depth of the passband ripple in decibels. Strictly positive, from 1e−4 to 60. Default 1.
  • Stopband Attenuation (dB) – Rs, how far down the stopband ripple is held, in decibels. From 3 to 200, and it must be strictly greater than the passband ripple – there is no prototype otherwise, and ellipap refuses the same pair. Default 40.
  • Sample Rate (Hz) – fs, the rate the filter is designed FOR, and the rate the cutoff is measured against. Strictly positive. This is not the block's own rate. Default 100.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Code export

All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. The order, the type, both ripple figures and the rate are structural and are baked into the generated body, so nothing is exposed as a tunable parameter on the generated core; the prototype coefficients and the integer expansions are inlined. No generated core contains a complex number: the elliptic prototype is built in complex arithmetic at configuration time and what is emitted is the real polynomial it produces.

The three HDL targets are simulation-only, and deliberately: a tangent and a reciprocal do not belong in a Q16.16 datapath. Both are evaluated in real and the values convert at the port boundary, which is what the Trigonometry family does for the same reason. The seven software targets are exact.

Simulink bridge

None (Support::None). ellip is a MATLAB function, and the two Simulink blocks that carry an elliptic design – Analog Filter Design and Lowpass IIR Filter Design, both in the DSP System Toolbox's design library – do the design internally and expose no part of it: each takes a signal in and gives a filtered signal out, so neither has coefficients a diagram could read. There is therefore no library path this block could name. The bridge reports it rather than dropping it silently, and it has no parity testbench; code export verification still covers it across all ten languages. No configuration of it crosses either, including "Sampling Time (s)", which has no counterpart to be written to.

Notes

  • Algebraic, with no state: the output depends only on the current input.
  • The cutoff is the PASSBAND edge, as on Butterworth Design and Chebyshev Type I Design – and not as on Chebyshev Type II Design, whose port carries a stopband edge. The two ripple figures are independent of it.
  • b is not a scaled corner expansion. Like Chebyshev Type II, this prototype has finite zeros on the imaginary axis; they map onto the unit circle, so the digital numerator is palindromic and carries true nulls in the stopband.
  • The even-order response does not start at 1. As with Chebyshev Type I, an odd order is 1 at zero frequency and an even order starts a whole ripple low, at 10−Rp/20. That is ellip's convention and it is carried here rather than normalized away.
  • The clamp is a live branch, not a safety net. fc is clamped into (0, fs/2) by (|x−lo| − |x−hi| + lo + hi)/2, branchless and identical in this block and in all ten emitted bodies, so they agree bit for bit. It exists because VHDL's TAN raises an error at π/2, which stops a simulation rather than returning a bad number. A cutoff at or below zero therefore designs at the bottom of the band rather than failing: T → 0, the numerator collapses to its own floor and the denominator becomes (z−1)N.
  • Measured against R2026a, at fs = 4 Hz over orders 1 to 8, cutoffs 0.7 Hz and 1.1 Hz and both types: the largest disagreement with ellip on any coefficient is 8.9e−15 at order 6, and 5.6e−16 at order 3 – the closest of the four prototypes here to its reference at high order, which is worth saying because it is the one built in complex arithmetic.
  • No state space: one scalar in and two vectors out, so there is no A/B/C/D to merge and model reduction correctly declines it.

Code facts#

FactValue
registered typeControl_Systems/Polynomials/Elliptic_Design
familyControl_Systems/Polynomials
solver environment classICoreBlock_0_Control_Systems_1_Polynomials_2_Elliptic_Design
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Polynomials/Elliptic_Design/ICoreBlock_0_Control_Systems_1_Polynomials_2_Elliptic_Design.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Polynomials/Elliptic_Design/ICoreBlock_0_Control_Systems_1_Polynomials_2_Elliptic_Design.h
default size on canvas132 × 80 px
ports at insert1 in, 2 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoublefc
2outICoreDoubleb
3outICoreDoublea

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 variableDefaultSimulink parameter
Order3—
Filter TypeLowpass%~%Highpass~~Lowpass—
Passband Ripple (dB)1—
Stopband Attenuation (dB)40—
Sample Rate (Hz)100—

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.

supportSupport::None
Simulink path—
port-count rulePortsParam::None
SampleTime parameteryes

Caveat (shown to the user): designing an elliptic filter is a MATLAB function (ellip), not a Simulink library block -- the two blocks that carry the design, Analog Filter Design and Lowpass IIR Filter Design in the DSP System Toolbox, take a signal in and give a filtered signal out, so neither exposes the coefficients this block emits and there is no path a diagram could name; the block is reported rather than dropped when a model crosses

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The lists agree. check_block_descriptions.py finds no disagreement between the description's Ports, Parameters, Code export and Simulink bridge lists and the code's.

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.

File banner (developer view)#

The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).

Elliptic Design -- ellip on a wire, with the cutoff on a port The prototype lives in ICoreFilterDesignSupport, which is where the complex arithmetic and the fused-multiply note that goes with it belong; this file is the block around it.

The elliptic (Cauer) prototype ripples in BOTH bands and is the steepest of the four at a given order. It takes a passband ripple Rp and a stopband attenuation Rs, and its cutoff is the PASSBAND edge -- the same end of the band Chebyshev Type I measures from, and the opposite end from Chebyshev Type II.

Verified against MATLAB R2026a rather than asserted, at fs = 4 Hz over orders 1 through 8, cutoffs 0.7 Hz and 1.1 Hz and both types: the largest disagreement with ellip(N, 1, 40, Wn) on any coefficient is 8.9e-15 at order 6, and 5.6e-16 at order 3. For the record, ellip(3, 1, 40, 0.35) reports

b 0.074773045800914345 0.14677715894592769 0.14677715894592769 0.074773045800914345 a 1 -1.2658263973378978 1.0500803389813473 -0.34115353214976557

-- the same palindromic numerator Chebyshev Type II has, and for the same reason: the prototype's zeros are on the imaginary axis and map onto the unit circle.

Sample results#

Elliptic Design — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sampleElliptic Design — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample-202012345t (s)in ICoreDouble-Out-0out ICoreDouble-Out-0 [4x1] entry 0out ICoreDouble-Out-1 [4x1] entry 0
tin ICoreDouble-Out-0out ICoreDouble-Out-0 [4x1] entry 0out ICoreDouble-Out-1 [4x1] entry 0
0-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
0.40.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
0.8-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
1.20.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
1.6-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
20.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
2.4-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
2.80.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
3.2-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
3.60.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
4-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
4.40.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]
4.8-2[2.174e-9, -2.174e-9, -2.174e-9, 2.174e-9][1, -3, 3, -1]
5.20.5[0.001072, -0.001064, -0.001064, 0.001072][1, -2.969, 2.938, -0.9697]

Every 4th of 60 samples, from the table stimulus.

The same rig also ran:

StimulusWhat it isOutput range
impulseImpulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair)2.174e-9 … 0.002123
rampRamp: slope 1 from t = 02.174e-9 … 0.01309
sineSine Wave: amplitude 1, 2 rad/s, no phase, no bias2.174e-9 … 0.002122
stepStep: 0 -> 1 at t = 1 s2.174e-9 … 0.002123

Plotted: table — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample

Category static · sample time 0.1 · 60 steps · commit 6057e212d71b485ded7807c10901789c77a7d636 · produced by docsSample --out <folder> --blocks Elliptic_Design --steps 60 · data docs/generated/samples/Control_Systems__Polynomials__Elliptic_Design.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).