LinearSystems.ZeroPoleToTransferFun Method

procedure ZeroPoleToTransferFun(const Num: TVec; const Den: TVec; const z: TVec; const p: TVec; k: Double);

Convert transfer function from zero-pole to numerator-denominator form.

#NameTypeDescription
1NumTVec
2DenTVec
3zTVec
4pTVec
5kDoublescalar

Result: stored in self (calling object)

Remarks:

Convert a rational polynomial defined with zeros Z and poles P and gain K in to its numerator Num and denominator Den form. The numerator will be scaled by K and both polynomials are assumed to have only real coefficents. (Poles and zeros can still be complex, if they have complex conjugated pairs.)

        num(s)      (s-sz1)*...*(s-szn)
H(s) = -------- = K*-------------------
        den(s)      (s-sp1)*...*(s-spn)

szn - n'th zero
spn - n'th pole
K - system gain
Examples
uses MtxExpr, Math387, MtxVec, MtxVecTee, MtxVecEdit, LinearSystems;

procedure TForm1.Button1Click(Sender: TObject);
var z,p,num,den: Vector;
k: Double;
begin
    z.SetIt(false,[3,4]);
    p.SetIt(false,[1,2]);
    k := 1;
    ZeroPoleToTransferFun(num,den,z,p,k);
    ViewValues(num);
    ViewValues(den);
    //        num = [1, -7,  12]
    //        den = [1, -3,   2]
end;
See Also: LinearSystems.ZeroPoleToStateSpace, LinearSystems.StateSpaceToTransferFun, LinearSystems.StateSpaceToZeroPole, LinearSystems.TransferFunToZeroPole