# Matched pole zero discretization

There are several techniques to discretize continuous-time transfer functions to discrete-time transfer functions. Some of them, such as, zero-order-hold, forward euler or Tustin, are well known. Matched-pole zero is less well known. It is described in Feedback Control of Dynamic systems chapter 8, pages 571 - 575 here.

In summary Matched-pole zero is applied as follows:

1. Map poles and zeros according to the relation $z = e^{sT}$, herein $T$ is the sampling period.
2. If the numerator is of lower order then the denominator, add powers of $(z + 1)$ to the numerator until numerator and denominator are of equal order.
3. Set the DC or low-frequency gain of $H(z)$ equal to that of $H(s)$.

Now the book gives several examples as well as numerical examples:

1. $$H(s) = 0.81 \frac{s + 0.2}{s + 2} \underset{MPZ}{\Rightarrow} H(z) = 0.389 \frac{z - 0.82}{z - 0.135}$$ with sampling frequency of 6 rad/sec.

2. $$H(s) = \frac{5}{s + 5} \underset{MPZ}{\Rightarrow} H(z) = 0.143\frac{z + 1}{z - 0.715}$$ with sampling frequency of 100 rad/sec

3. $$H(s) = \frac{5}{s + 5} \underset{MPZ}{\Rightarrow} H(z) = 0.405 \frac{z + 1}{z - 0.189}$$ with sampling frequency of 20 rad/sec

Now Matlab offers a standard routine for converting a continuous time transfer function to discrete time. However, what Matlab calls matched pole zero is actually the modified matched pole zero method, described on page 575. Therefor, I have implemented the method myself in Matlab for first order systems. However, my methods give different, but near similar results. Now I want to know my written function is indeed the correct implementation and why there is a difference between results.

Hs.a = [2 1];
Hs.b = 0.81*[0.2 1];
Hz = mpz1(Hs,1/(6/(2*pi)))

Hs.a = [5 1];
Hs.b = [5 0];
Hz = mpz1(Hs,1/(100/(2*pi)))

Hs.a = [5 1];
Hs.b = [5 0];
Hz = mpz1(Hs,1/(20/(2*pi)))

function Hz = mpz1(Hs,Ts)
%          b(1)               1
% H(s) = -------- = b(1) * --------
%        s + a(1)          s + a(1)
%
%        b(2)*s + b(1)          s + b(1)/b(2)
% H(s) = ------------- = b(2) * -------------
%           s + a(1)              s + a(1)
%
if Hs.b(2) ~= 0
% Set gain
Ks = Hs.b(2);

% Normalize
Hs.b(1) = Hs.b(1)/Hs.b(2);

% Set Hz
Hz.b(1) = -exp(-Hs.b(1)*Ts);
else
% Set gain
Ks = Hs.b(1);

% Normalize
Hs.b(1) = 1;

% Set Hz
Hz.b(1) = 1;
end

Hz.a(1) = -exp(-Hs.a(1)*Ts);
Hz.a(2) = 1;
Hz.b(2) = 1;

% Calculate discrete gain
Kz = Ks*(Hs.b(1)/Hs.a(1))/((1 + Hz.b(1))/(1 + Hz.a(1)));
Hz.b = Kz*Hz.b;

end

• the map $z = e^{sT}$ is there, implicitly or otherwise, for any discretization of the transfer function, since this is a conformal mapping which sends stable continuous time poles to stable discrete time poles. You can actually derive the discrete time state transition matrix from the derivative matrix in continuous time using a similar argument. The discrete representation of a system for a fixed sampling time is unique, so if MATLAB and you get different results, there's a bug in your code somewhere... – SZN May 31 '16 at 15:34