0
$\begingroup$

What is the best way to design a FIR filter with a given linear phase response, such that each frequency inside the passband is phase shifted according to: $$H(f)=e^{i2\pi f k}$$ where $k$ is factor that I want to specify. I also want to specify the number of taps $N$. Note that the effective shift is bigger than the tap length $N$.

I don't really care about the bandwidth of the passband, but it has to be at least 1 MHz at a sampling of 100 MHz. The amplitude should be relatively flat inside the passband.

In python there is a lot of functions which allow me to specify a passband and how flat it is, but I have not found any way to control the phase according to my needs.

$\endgroup$
1
$\begingroup$

What you want is basically a delay

$$x(t-\tau) \Rightarrow e^{-j\omega \tau}$$

If you can live with $k$ being quantized you can simply use a single tap delay FIR filter. If you need more granularity you need to implement a fractional dealy. I would cascade a shot fractional FIR filter with a long single tab bulk delay filter.

If $k$ is positive the filter becomes a non-causal. The best way to deal with this depends a bit on your application. If you do off-line processing, you just need to delay all other signals paths by the same amount.

$\endgroup$
2
  • $\begingroup$ My problem is that I need a shift that is bigger than the tap length. Basically I am trying to predict a future sample, assuming that the signal is a sum of not-changing sinusoids. $\endgroup$ – FIRphaseLIn Oct 16 '20 at 16:32
  • $\begingroup$ a) A deley can be any number of samples long. The impulse response is basically a nunch of zeros followed by a single 1. b) if you want to do some non-causal extrapolation, please ask a separate question about this. This has not a lot to do with the question as asked. $\endgroup$ – Hilmar Oct 16 '20 at 17:06

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.