LinearSystems.ComputeGain Method

Overload List

#SignatureDescription
1function ComputeGain(const z: TVec; const p: TVec; Val: TCplx): Double;Returns gain of a filter with zeroes in z and poles in p.
2function ComputeGain(const z: TVec; const p: TVec; Val: Double): Double;Evaluate the gain of a zero-pole rational polynomial at a point.

Overload 1: function ComputeGain(const z: TVec; const p: TVec; Val: TCplx): Double;

Returns gain of a filter with zeroes in z and poles in p.

#NameTypeDescription
1zTVec
2pTVec
3ValTCplxscalar

Returns: Double

Remarks:

Val parameter defines the value at which to evaluate the rational polynomial.

Overload 2: function ComputeGain(const z: TVec; const p: TVec; Val: Double): Double;

Evaluate the gain of a zero-pole rational polynomial at a point.

#NameDescription
1zZeros of the rational polynomial (may be empty
2real or complex-conjugate).
3pPoles of the rational polynomial (may be empty
4real or complex-conjugate).
5ValPoint at which to evaluate
6the overload taking a Double evaluates on the real axis, the TCplx overload at a complex point.

Returns: Double - The real-valued gain as defined above.

Remarks:

Evaluates the monic zero-pole product at the value Val and returns a real number. With zeros z_1 ... z_n and poles p_1 ... p_m the rational function is H(x) = ((x-z_1)...(x-z_n))/((x-p_1)...(x-p_m)) . ((x-z1)...(x-zn))/((x-p1)...(x-pn)) Longrightarrow ((Val-z1)...(Val-zn))/((Val-p1)...(Val-pn)) = number

x - variable
z1..zn - zeros
p1..pn - poles

Because the coefficients are assumed real, the routine returns the ratio of the REAL PARTS of the two products rather than the real part of the quotient: Result = (Re[prod_i (Val-z_i)])/(Re[prod_j (Val-p_j)]) . For a real Val both products are real and this equals Re[H(Val)]; for a complex Val the two conventions differ, and this routine uses the real-part ratio above. Empty z or p contributes a unit product. The denominator must have a non-zero real part, otherwise the result is not finite.