Is it possible to implement realtime DSP algorithms on PC using a NI PC acquisition card like NI PCI-4461?

In A New FXLMS Algorithm with Off-line and On-line Secondary-Path Modeling Scheme for Active Noise Control of Power Transformers, they run a real time ANC algorithm using a PC.

But my thinking is: PC is not real time. Any application running on it will be non-real-time and maybe interrupted by any other apps or windows services. Then how can these guys run real-time ANC on a PC?

  • 1
    $\begingroup$ Depends on how do you define "real-time" ... ? $\endgroup$
    – Juha P
    Commented Aug 23, 2022 at 13:23
  • $\begingroup$ @JuhaP Real-time for accoustic active noise cancellation. $\endgroup$ Commented Aug 24, 2022 at 5:43
  • $\begingroup$ yes, but how much latency is maximum (in ns,ms)? MayhWorks FileExchange lists couple implementation so, you can try if those works for you se.mathworks.com/matlabcentral/fileexchange?q=FXLMS $\endgroup$
    – Juha P
    Commented Aug 24, 2022 at 15:34

1 Answer 1


There is two parts to "real time"

  1. Continuity: the system can takes in a continuous stream of samples and puts out continuous stream of the same rate. This can go on forever: no samples are lost.
  2. Latency: that's the delay that the processing introduces and the delay between the input and the output streams.

PCs can certainly do continuous real time processing . Typically PCs don't process one sample at a time, but they buffer up a larger number of samples, process them in one go and than output a full buffer again. That's how they get around the "OS is doing a lot of other stuff at the same time" constraint.

However the buffering introduces a lot of latency (100s or 1000s of samples for audio processing). In many cases this is not a problem and in other cases it is.

The article requires a sign-in that I don't have, so I can't read the full thing. I'm guessing that they have a feed-forward real time processing part that is updated in non-real time using some supervisory process. Feed-back cancellation requires extremely low latency and you can't do it on a PC. Note that they also call it "Control" not "Cancellation", so it may be something different than ANC headsets or ear buds.

  • $\begingroup$ Thx, They're using feedback fxlms and you can use 'sci-hub' to access that paper. $\endgroup$ Commented Aug 25, 2022 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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