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

Chebyshev Type I Design — Control Systems/Polynomials

fc

Control_Systems/Polynomials/Chebyshev_Type_I_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.

Chebyshev Type I Design

Control Systems / Polynomials

Designs a digital Chebyshev Type I filter of order N and reports its coefficients, with the cutoff arriving on a port. It is MATLAB's cheby1: the analog equiripple-passband prototype, 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.

A Type I filter trades ripple in the passband for a steeper transition than a Butterworth of the same order. 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 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. A smaller value flattens the passband and softens the transition; a larger one does the reverse. Default 1.5.
  • 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, the ripple 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.

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). cheby1 is a MATLAB function, and the two Simulink blocks that carry a Chebyshev Type I 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 even-order response does not start at 1. A Type I response of odd order is 1 at zero frequency; one of even order starts a whole ripple low, at 10−Rp/20. That is cheby1's convention, and it is carried here rather than normalized away – a block that forced both to 1 would scale every numerator coefficient by a constant, leave the poles exactly right, and differ from MATLAB in a way a response plot does not show.
  • 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 and the denominator becomes (z−1)N. The committed documentation sample shows it at fc = 0 – every entry of b below 4e−23, against a = [1, −3, 3, −1] to eight digits.
  • Dividing by a[0] is safe here, and it is not on Bilinear Transform. a[0] is a sum of dj·T… terms with every dj and T strictly positive, so it cannot vanish. Polynomials / Bilinear Transform takes its analog denominator from a port, where the same quantity can pass through zero, so that block leaves the scale alone.
  • 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 cheby1 on any coefficient is 6.8e−14 at order 8, and 8.9e−16 at order 3. The expansion is less well conditioned as the order rises, which is what that spread measures.
  • 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/Chebyshev_Type_I_Design
familyControl_Systems/Polynomials
solver environment classICoreBlock_0_Control_Systems_1_Polynomials_2_Chebyshev_Type_I_Design
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Polynomials/Chebyshev_Type_I_Design/ICoreBlock_0_Control_Systems_1_Polynomials_2_Chebyshev_Type_I_Design.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Polynomials/Chebyshev_Type_I_Design/ICoreBlock_0_Control_Systems_1_Polynomials_2_Chebyshev_Type_I_Design.h
default size on canvas138 × 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.5—
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 a Chebyshev Type I filter is a MATLAB function (cheby1), 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).

Chebyshev Type I Design -- cheby1 on a wire, with the cutoff on a port The prototype is written down here; everything past it -- the prewarped bilinear map, the clamp on the cutoff, the normalization and all ten emitted bodies -- lives in ICoreFilterDesignSupport, shared with Chebyshev Type II Design and Bessel Design.

The analog prototype is the Type I pole set, with the passband ripple Rp in decibels as its one parameter:

eps = sqrt(10^(Rp/10) - 1) mu = asinh(1/eps) / N theta_k = pi(2k - 1) / (2N) pole pair -sinh(mu)sin(theta_k) +- i cosh(mu)cos(theta_k)

Each pair is written as the REAL quadratic s^2 + 2a*s + (a^2 + b^2) with a = sinh(mu)sin(th) and b = cosh(mu)cos(th); an odd order adds the real factor s + sinh(mu). There are no finite zeros, so the numerator is the single constant that sets the response at zero frequency: 1 for an odd order, 10^(-Rp/20) for an even one.

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 cheby1(N, 1.5, Wn) on any coefficient is 6.8e-14 at order 8, and 8.9e-16 at order 3. For the record, cheby1(3, 1.5, 0.35) reports

b 0.044371372946915483 0.13311411884074645 0.13311411884074645 0.044371372946915483 a 1 -1.4028996282420148 1.1589972042668903 -0.40112659244955162

Sample results#

Chebyshev Type I Design — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sampleChebyshev Type I 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[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
0.40.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
0.8-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
1.20.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
1.6-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
20.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
2.4-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
2.80.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
3.2-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
3.60.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
4-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
4.40.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]
4.8-2[1.207e-23, 3.621e-23, 3.621e-23, 1.207e-23][1, -3, 3, -1]
5.20.5[1.489e-6, 4.467e-6, 4.467e-6, 1.489e-6][1, -2.973, 2.947, -0.9739]

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)1.207e-23 … 1.176e-5
rampRamp: slope 1 from t = 01.207e-23 … 0.002038
sineSine Wave: amplitude 1, 2 rad/s, no phase, no bias1.207e-23 … 1.174e-5
stepStep: 0 -> 1 at t = 1 s1.207e-23 … 1.176e-5

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 6d2a32943e8a43f61031df0ab843ecb40e59b166 · produced by docsSample --out <folder> --blocks Chebyshev_Type_I_Design Chebyshev_Type_II_Design Bessel_Design --steps 60 · data docs/generated/samples/Control_Systems__Polynomials__Chebyshev_Type_I_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).