1
$\begingroup$

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?

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

$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);
$\endgroup$
1
$\begingroup$

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.

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

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.