Reply by manish April 12, 20052005-04-12
My 2 cents on the discussion:

The high pass filter has a sine-square shape, peaking at omega== pi.
This is indeed a high pass filter. according to my calculation its
3-db point is at 2-radians or 114 degrees approximately. You need a
lowpass filter which cuts off anything above pi/8. So combining the
two filter is a peculiar thing, as you are  not even reaching the
pass-band of your HPF.
Anyway, assuming that your application does need sine-square frequency
shaped data, you CAN combine the two filters in any order you like.
As both the filters are LTI systems, 
---hpf---lpf--->
is equivalent to 
---lpf---hpf--->
And they are as equivalent as anything can be (except for the finite
precision effects).
However, you can not commute the downsampling operation anywhere, as
it is not a LTI system (sigh).
So you can try 3 cases:
two as mentioned above, and third: convolve the two filters.
You will have to watch out for finite precision effects.

Regards
Manish

"tarangdadia@gmail.com" <tarangdadia@gmail.com> wrote in message news:<1113267384.021960.171490@l41g2000cwc.googlegroups.com>...
> Bhaskar, > > I had used that phrase that it is given by system designer cos that is > kind of fixed part in the circuit. As I had earlier mentioned that the > input samples are all singel bit long and filter is [1 -2 1]. It is > just used to readjust the level of the signal and more specifically for > error correction. I am talking about multi stage sigma-delta modulator. > The output has to be error corrected using [1 -2 1] filter ( or in > other word a HPF). My specific band of interest is 0 -> Fs/24. This > filter will essentially remove the noise from my pass band and I will > have less noise and hence higher SNR in my required bandwidth. > > I actually was calling AAF as low pass filter, but I did not quite > understand why it is not common to call LPF as AAF. Are there any other > function other than anti-aliasing? I would appreciate little more > insight into this notation. > > Thanks a lot. > Tarang
Reply by tara...@gmail.com April 12, 20052005-04-12
Jim,

I wanted to optimize the operation such that I can complete the
operation with minimum number of computation. I wanted to know whether
I can decimate first and then pass it thru filter.

But from the responses I have got so far I think this is what I have to
do now.

My Input is still 64K long. I will have 2 FIR filters, I will convolve
them and get another filter.

Finally I will get my output samples by computing the taps only which I
need at output.

I wanted to do something mentioned in this article, using noble
identity, but I think with the HPF filter of [1 -2 1] I will not be
able to do that.

figure 2 in http://cnx.rice.edu/content/m10432/latest/

My aim is not to optimize the filter structure itself but to optimize
the whole operation for minimum number of computation.

Thanks for ur inputs.
Tarang

Reply by tara...@gmail.com April 11, 20052005-04-11
Bhaskar,

I had used that phrase that it is given by system designer cos that is
kind of fixed part in the circuit. As I had earlier mentioned that the
input samples are all singel bit long and filter is [1 -2 1]. It is
just used to readjust the level of the signal and more specifically for
error correction. I am talking about multi stage sigma-delta modulator.
The output  has to be error corrected using [1 -2 1] filter ( or in
other word a HPF). My specific band of interest is 0 -> Fs/24. This
filter will essentially remove the noise from my pass band and I will
have less noise and hence higher SNR in my required bandwidth.

I actually was calling AAF as low pass filter, but I did not quite
understand why it is not common to call LPF as AAF. Are there any other
function other than anti-aliasing? I would appreciate little more
insight into this notation.

Thanks a lot.
Tarang

Reply by jim April 11, 20052005-04-11

"tarangdadia@gmail.com" wrote:
> > Jim, > > HPF that I am using is [1 -2 1]. I need to have that in place because > systems engineer asked me to ;-). It may not be the best HPF but I > believe systems engineers word for it that will be good enough for our > system.
Your original question was and apparently still is how can I optimize the process of filtering with a high pass filter, then a low pass filter, then decimate? My suggestion ignores your question and introduces a fresh idea - why don't you try your proccess in an unoptimized form first to see if its really does what you want. Or, better yet why don't you just consider what happens when you first apply a high pass filter and then a low pass filter. The fact that you have anything left at all will be because the filters are not very good. That seems to me to be more of an accident rather than a matter of design. -jim ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply by Bhaskar Thiagarajan April 11, 20052005-04-11
<tarangdadia@gmail.com> wrote in message
news:1113097162.173722.188860@l41g2000cwc.googlegroups.com...
> Randy, > > The filter I have in place currently is a high pass filter(hpf). I > understand that I will have to incorporate another anti-aliasing > filter(AAF) before decimating. So now my new problem would be to > optimize this operation > > 64ksamples-->hpf-->aaf-->decimate. > > will have to incorporate all 3 operations into just a single operation. > > > >However, your intuition was onto something - there is no need to > >compute the samples which you are going to throw away anyway. For > >example, assume you're decimating by 8 and the filter's output samples > >are denoted y[n+0], y[n+1], ..., y[n+7], y[n+8], y[n+9], ... . Since > >you're throwing away y[k], 8 !| k, (k is not divisible by 8), you only > >need to compute the filter for y[n+0], y[n+1*8], y[n+2*8], etc.]]] > > I understand that over here we are combining decimation and filtering . > I was wondering if I could combine all 3 operation hpf+aaf+decimate > into just one operation and how would the I get the resultant matrix or > rather what would it be.
What is your final band of interest? Your rather sloppy high pass is going to kill your DC component but also quite a bit of signal all the way to fs/4. I understand that this has been 'specified' by the system designers, but it's useful to understand why. Also, it isn't common to call the low pass filter before the decimation stage as an 'anti-alias filter' (although that is one of it's primary purposes). So you might introduce some confusion by using that term in this context. Cheers Bhaskar
> Thanks for your help. > Tarang >
Reply by tara...@gmail.com April 10, 20052005-04-10
Jim,

HPF that I am using is [1 -2 1]. I need to have that in place because
systems engineer asked me to ;-). It may not be the best HPF but I
believe systems engineers word for it that will be good enough for our
system.

Tarang


jim wrote:
> "tarangdadia@gmail.com" wrote: > > > > Thanks Tim. > > > > This does make sense. I will try to simulate the solution in Matlab
and
> > see if I get something rolling here. > > What you have revealed so far doesn't sound good. I'm have a hard
time
> picturing what sort of 3 tap hpf you could have that would leave you > with much of anything in the way of amplitude after applying a proper > A-A filter and decimating by 8. > > -jim > > ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World!
120,000+ Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
=----
Reply by jim April 10, 20052005-04-10

"tarangdadia@gmail.com" wrote:
> > Thanks Tim. > > This does make sense. I will try to simulate the solution in Matlab and > see if I get something rolling here.
What you have revealed so far doesn't sound good. I'm have a hard time picturing what sort of 3 tap hpf you could have that would leave you with much of anything in the way of amplitude after applying a proper A-A filter and decimating by 8. -jim ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply by tara...@gmail.com April 10, 20052005-04-10
Thanks Tim.

This does make sense. I will try to simulate the solution in Matlab and
see if I get something rolling here.

Tarang

Reply by tara...@gmail.com April 9, 20052005-04-09
Randy,

The filter I have in place currently is a high pass filter(hpf). I
understand that I will have to incorporate another anti-aliasing
filter(AAF) before decimating. So now my new problem would be to
optimize this operation

64ksamples-->hpf-->aaf-->decimate.

will have to incorporate all 3 operations into just a single operation.


>However, your intuition was onto something - there is no need to >compute the samples which you are going to throw away anyway. For >example, assume you're decimating by 8 and the filter's output samples >are denoted y[n+0], y[n+1], ..., y[n+7], y[n+8], y[n+9], ... . Since >you're throwing away y[k], 8 !| k, (k is not divisible by 8), you only >need to compute the filter for y[n+0], y[n+1*8], y[n+2*8], etc.]]]
I understand that over here we are combining decimation and filtering . I was wondering if I could combine all 3 operation hpf+aaf+decimate into just one operation and how would the I get the resultant matrix or rather what would it be. Thanks for your help. Tarang
Reply by Tim Wescott April 9, 20052005-04-09
tarangdadia@gmail.com wrote:

>>That is correct, you can't. I would question whether a length = 3 >>filter is going to do you much good for decimating data by a factor of > > 8 > >>-- you would at least need a length = 8 filter and probably more. > > > > I forgot to mention one more thing abt the filter. It is not normal > anti-aliasing filter. It is a high pass filter and I have to high pass > 64k samples. I still will need a anti-aliasing filter(which will be > more than 8 tap filter in order to take adv of polyphase filtering) to > remove the unncessary out-of-band freq components. > > >>You _can_ reduce your workload by only computing the filter for the >>decimation times. This is a large subset of polyphase filtering. > > > I am aiming to do this but am wondering is there a way in which I can > combine the high pass filter, a anti-aliasing filter (low pass filter) > and decimation together into one operation so that computations are > minimized. > > One more thing 64K samples are all one bit long..basically its a binary > bit stream. > > Tarang >
The fact that it's a high-pass, and that you're already dealing with the anti-aliasing with a polyphase filter makes a huge difference. You should certainly be able to do some high-pass filtering after the fact. It certainly feels like you can combine the high-pass and the anti-aliasing in the polyphase filtering -- if nothing else you should be able to convolve the filter from which you are deriving your polyphase filter coefficients by the high-pass filter coefficients. At worst you'll end up with a filter that's a couple of taps longer, but that shouldn't kill you. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com