0
$\begingroup$

I have designed a Butterworth highpass filter (HPF) of 4th order with cutoff frequency high enough to give a gain of $3$ at high frequencies. I want to find the inverse $z$-transform using MATLAB.

L=4;
OSR = 16;
[b,a] = butter(L,0.259,'high');
b = b/b(1);
fvtool(b,a);
H = tf(b,a,[],'variable','z^-1');

iztrans doesn't seem to support tf or zpk.

$\endgroup$
  • $\begingroup$ Can you please rephrase this question because the way it is put at the moment is more about doing things in MATLAB and less about DSP. In the meantime, if you were aware of the z-transform's poles and zero locations, how would you go about finding the inverse? $\endgroup$ – A_A Jan 5 '17 at 15:04
1
$\begingroup$

The function iztrans only supports symbolic expressions. This should do the trick:

[num,den] = tfdata(H); syms z H_sym = poly2sym(cell2mat(num),z)/poly2sym(cell2mat(den),z); h_inv = iztrans(H_sym);

$\endgroup$
  • $\begingroup$ the code seems ok , but then can u tell me what actually is being done here and when i open h_inv in workspace , i don't see any data in it,why? $\endgroup$ – Ashik Anuvar Jan 5 '17 at 6:30
  • $\begingroup$ First, you store in two different variables (num and den) the coefficientes of the numerator and the denominator, respectively, of your transfer function. Then, using the function poly2sym you use those coefficientes to create a symbolic polynomial with the previously declared symbolic variable z. So now you are all set to pass this function to iztrans, which only accepts symbolic expressions as inputs. Don't use the Workspace to see h_inv, just write h_inv and press Enter in the commandline and you'll see the result (or use MuPAD for a more friendly visualization). $\endgroup$ – Tendero Jan 5 '17 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.