# Matlab: Implement filter with no denominator

A filter like this: $z^{4}\cdot\frac{2 + z^{-1} - 3z^{-3} + ...}{1 - 0.9z^{-1}}$ seems hard for me to implement. The fraction part is easy:

filtered_signal = filter([2 1 -3 ...], [1 -0.94], signal);


But how is the $z^{4}$ part being implemented?

• What does z^4 mean? Isn’t it just a shift? LTI? – user28715 May 15 '18 at 11:40
• Well, it references a value that is 4 samples in the future, so to speak.. – Alon May 15 '18 at 11:47
• And the zeros are? – user28715 May 15 '18 at 12:01
• I do not understand your question... zeros of what? – Alon May 15 '18 at 12:16
• Z^4. What else. – user28715 May 15 '18 at 17:23

$z^{4}$ is not a causal system. So it is physically not realizable.

But mathematicaly you can multiply $z^{-4}$ on both sides: $z^{-4}\cdot H(z)=\frac{2z^{-4} +z^{-5} -3z^{-6}...}{1-0.94 z{-^1}}$

Let's name $z^{-4}\cdot H(z) =H'(z)$ It follows $H'(z)= z^{-4}\cdot\frac{Y(z)}{X(z)}$ and $H'(z)\cdot X(z)= z^{-4}\cdot Y(z)$

It means your output is delayed by 4 samples. On dsp you first output 4 zeros samples.

If it's $z^{-4}$ you simply can append 4 zeros at the beginning of the nominator in the filter function. It is the same as multipling the $z^{-4}$ with the fraction. So you will get $H(z)=\frac{2z^{-4} +z^{-5} -3z^{-6}...}{1-0.94 z{-^1}}$

filtered_signal = filter([0 0 0 0 2 1 -3 ...], [1 -0.94], signal);


A second aproach is to filter first with $\frac{(z^{-4})}{1}$

So first filter

filtered_signal1 = filter([0 0 0 0 1], [1 ], signal);


Than do

 filtered_signal = filter([ 2 1 -3 ...], [1 -0.94], filtered_signal1);


It's an odd notation but simple enough: \$z^4% simeply means "shift the signal 4 samples to the left". That means its non-causal and can't therefore be implemented directly in a physical system.

In practice, the workaround that works most of the time is to add overall "causality delay" to the system until everything is causal again. Whether this is applicable here or not, depends on the specifics of your application.

• its a filter for an audio signal that is entirely known when the filter is applied. Does this change your answer? – Alon May 16 '18 at 11:24