LinearSystems::MatchedZTransform Function

void MatchedZTransform(TVec *z, TVec *p, double FS = 1);

Transform the zeros and poles of a filter in s-domain to z-domain.

#NameTypeDescription
1zTVec *
2pTVec *
3FS = 1double
Remarks:

Transform the zeros Z and poles P of a filter from s-domain to z-domain, where FS is the sampling frequency. The transformation is defined as ([1], p. 224): s + a -> 1 - z^(-1)e^(-a/FS)

FS - sampling frequency
a - pole or zero

If the analog system has zeros with center frequencies greater then half the sampling frequency, their z-plane positions will be greatly aliased [1]. The transformation has the advantage of not affecting the phase response of the original transfer function.

References:

[1] Theory and application of digital signal processing, Lawrence R. Rabiner and Bernard Gold. Prentice-Hall, 1975

Examples
#include "MtxExpr.h"
#include "Units.IIrFilters.h"
#include "Units.LinearSystems.h"
#include "Units.SignalUtils.h"

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

void Example()
{
    Vector z(0);
    Vector p(0);
    Vector num(0);
    Vector den(0);
    Vector Response(0);
    Vector FreqFr(0);
    double k, Wc, BW;
    double FS = 2;
    int Order = 5; //design a fifth order filter.

    BesselAnalog(Order, z, p, k);  //design analog protype
    Wc = 0.5;
    LowpassToLowpass(z, p, k, Wc);  //frequency transformation in s-domain
    MatchedZTransform(z, p, FS);
    k = k/ComputeGain(z, p, 1);
    z.Size(p.Length, false);
    z.SetVal(-1); //add missing zeros at -1
    ZeroPoleToTransferFun(num, den, z, p, k);
    FrequencyResponse(num, den, Response, 64, false, TSignalWindowType::wtRectangular, 0); //zero padding set to 64
}
See Also: LinearSystems::Bilinear
Declared in Dew::Signal::Units::LinearSystems · Dew.Signal/Units.LinearSystems.h · Cross-compiler