procedure TransferFunToZeroPole(const z: TVec; const p: TVec; out k: Double; const Num: TVec; const Den: TVec);
Convert transfer function from numerator-denominator to zero-pole form.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | z | TVec | |
| 2 | p | TVec | |
| 3 | k | Double | |
| 4 | Num | TVec | |
| 5 | Den | TVec |
Result: stored in self (calling object)
Remarks:
Convert a transfer function defined with numerator Num and denominator Den in to its zero-pole form with zeros Z, poles P and gain K. The routine calls PolyRoots routine from the Polynoms unit. Numerator and denominator can be real or complex.
A rational polynomial can be converted to zero pole form by finding the roots of the numerator and denominator: (x^2 - 7x + 12)/(x^2 - 3x + 2) Zero pole form:
((x-3)(x-4))/((y-2)(y-1))
Examples
uses MtxExpr, Math387, MtxVec, MtxVecTee, MtxVecEdit,
LinearSystems;
procedure TForm1.Button1Click(Sender: TObject);
var z,p,num,den: Vector;
k: Double;
begin
num.SetIt(false,[1,-7,12]);
den.SetIt(false,[1,-3, 2]);
TransferFunToZeroPole(z,p,k,num,den);
ViewValues(z);
ViewValues(p);
// z = [4 , 3]
// p = [2 , 1]
// k = num[0]/den[0] = 1;
end;