Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 15 May 2017 09:37:02 -0500 From: Randy Yates Newsgroups: comp.dsp Subject: Re: How to downsample this signal? Organization: Garner Underground, Inc. References: <878tm0puch.fsf@digitalsignallabs.com> Date: Mon, 15 May 2017 10:37:01 -0400 Message-ID: <871srqrxte.fsf@garnerundergroundinc.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cancel-Lock: sha1:nWim+XJhpBjC6910QxlWRtz3Os4= MIME-Version: 1.0 Content-Type: text/plain Lines: 74 X-Trace: sv3-M4Y/GCxmW3+nMBlgSbcFVG1Goue3sTh9xGkC/GlVwUU4nvjueA9flM2x715cQyuGqAwvEmjenYRBHI7!hFxqlRTFSX1dFsCFG/y7q3fWs4QHex1sL4CKTfmcCCY+Alpkd1Pno2YBN6pZL502jCulibrpfTVe!bw== X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4221 Xref: csiph.com comp.dsp:33827 Piotr Wyderski writes: > Thank you all for your input. > > Randy Yates wrote: > >> What I don't understand is why, with the sledgehammer processor >> you have, you don't do a decent polyphase filter with a good >> FIR? > > It is a hobby project and I had 15 years of break with any form > of DSP, at least understood as *signal* processing. I believe > I still understand the math behind it, but I know only a limited > number of "tricks". Polyphase representation is totally new to > me, so are its applications to decimation/interpolation. > > The FIR filter has many advantages, e.g. maintaining linear phase > will be easy, but the "direct" approach implied a FIR of insanely > high order, so I didn't pursue the idea and drifted towards IIR, > with which I had some positive experience, especially with CICs > used in my SDR project. > > As far as I can see, the polyphase FIR approach should be the right > choice for me. I am still not sure whether I am able to design a > filter in this topology correctly, but well, it's what we call > "learning". Thank you for bringing it to my attention. Hey, you are most welcome. "Polyphase filtering" sounds really complicated, but (like many things in this field) it's just a term for something quite simple: don't compute values you're just going to throw away. For example, if you are decimating by 8, you ultimately throw away 7 out of every 8 samples. So if you're throwing them away, don't compute them in the first place. Duh! Armed with this technique, you essentially increase the effective number of filter taps by M, where M is the decimation factor. So if you could afforst 200 taps at full rate, you could actually afford 8*200 = 1600 taps when decimating by 8. > > BTW, the processor is not as sledgehammer as it may sound, especially > due to the very limited RAM resources available to the DSP unit (2 banks > of 128 24-bit words each, period.). The main processor (an ARM) has > everything needed to the job, except of low latency guarantees, which > is enough to kick it out of the scene. Whatever I can do, I must do > using the DFB block. Currently the unknown is the definition of > "whatever", but I'm aiming at saturating the block. Hmm. Well then you may be up against a wall. Also if you have a requirement for low-latency, a long FIR is out. But note that even though CICs can be considered IIR, they also can be considered a simple boxcar averager so they will have N/2 latency for a length-N boxcar. I think there are ways to compute polyphase IIRs too but I've never done that. PS: Rick has some good material in his book on polyphase filtering, CIC decimators, etc. @BOOK{lyonsthird, title = "{Understanding Digital Signal Processing}", edition = "third", author = "{Richard~G.~Lyons}", publisher = "Prentice Hall", year = "2011"} Good luck! -- Randy Yates, Embedded Firmware Developer Garner Underground, Inc. 866-260-9040, x3901 http://www.garnerundergroundinc.com