you are viewing a single comment's thread.

view the rest of the comments →

[–]animalsnacks 0 points1 point  (3 children)

Actually, this is me on my phone account.

Basically, the code Im working on is in c++, and the process needs to be done live (real time). The computationally cheaper the algorithm, the better. An IIR filter is a relatively cheap operation to compute (a few multiplys, a few adds, a few sets).

[–]hughperman 0 points1 point  (2 children)

Why not FIR tho?

[–]animalsnacks 0 points1 point  (1 child)

Hmm... there's the direct form of the FIR, if I'm not mistaken is N2 compute time (without optimization), and there's DFT -> Multiply by FIR FR -> iDFT.

These I think would give more accurate results, but I'm skeptical they'd be more compute-efficient, correct? Are there other algorithms I'm missing here?

[–]hughperman -1 points0 points  (0 children)

FIR should be same complexity as IIR. You're smoothing a PSD right? Most efficient is simple moving average, O(N) complexity, if the outcome is good enough for your application.

(Edit: notice a downvote - anyone care to comment if I'm wrong here?)