When DC is unavailable for gain matching (HPF cases with zeros at the origin), the matched-Z implementation picks a non-zero test frequency w_c. The current code evaluates H_c at s = w_c (real) and H_d at z = exp(w_c * Ts), which is off the unit circle. This matches Octave's @tf/c2d.m behavior.
The question is whether H_c should be evaluated at s = jw_c (imaginary axis) and H_d at z = exp(jw_c*Ts) (unit circle), since those are the standard definitions of frequency response for continuous and discrete systems respectively.
For LPF, w_c = 0 always so both formulations agree and this does not manifest. The difference only appears for HPF.
I could not find an authoritative reference that specifies which evaluation point is correct for the non-DC case. Raised by AI reviewer in PR #47.
When DC is unavailable for gain matching (HPF cases with zeros at the origin), the matched-Z implementation picks a non-zero test frequency w_c. The current code evaluates H_c at s = w_c (real) and H_d at z = exp(w_c * Ts), which is off the unit circle. This matches Octave's @tf/c2d.m behavior.
The question is whether H_c should be evaluated at s = jw_c (imaginary axis) and H_d at z = exp(jw_c*Ts) (unit circle), since those are the standard definitions of frequency response for continuous and discrete systems respectively.
For LPF, w_c = 0 always so both formulations agree and this does not manifest. The difference only appears for HPF.
I could not find an authoritative reference that specifies which evaluation point is correct for the non-DC case. Raised by AI reviewer in PR #47.