LinearSystems::TransferFunToZeroPole Function

void TransferFunToZeroPole(TVec *z, TVec *p, double &k, TVec *Num, TVec *Den);

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

#NameTypeDescription
1zTVec *
2pTVec *
3kdouble &
4NumTVec *
5DenTVec *
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
#include "MtxExpr.h"
#include "Units.LinearSystems.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Signal;
using namespace Dew::Signal::Units::LinearSystems;

void Example()
{
    Vector z(0);
    Vector p(0);
    Vector num(3);
    Vector den(3);
    double k;

    num.Values(0) = 1;
    num.Values(1) = -7;
    num.Values(2) = 12;
    den.Values(0) = 1;
    den.Values(1) = -3;
    den.Values(2) = 2;
    k = 1;
    TransferFunToZeroPole(z, p, k, num, den);
    //        z = [4 , 3]
    //        p = [2 , 1]
    //        k = num[0]/den[0] =  1;
}
See Also: LinearSystems::ZeroPoleToStateSpace, LinearSystems::StateSpaceToTransferFun, LinearSystems::StateSpaceToZeroPole, LinearSystems::ZeroPoleToTransferFun
Declared in Dew::Signal::Units::LinearSystems · Dew.Signal/Units.LinearSystems.h · Cross-compiler