Reply by Richard Owlett March 12, 20062006-03-12
Anonymous wrote:

> Should work, but try storing convolution output to something other than an > input, e.g. > > zz = conv(xx,yy); > xx = zz; > > You should also try a smaller sequence, say 10000 samples, first and then > increase the size slowly. Sometimes matlab, because it allows dynamically > resizing arrays, can get stuck in malloc cycles or memory swaps and can seem > to take forever. Especially if your machine doesn't have a lot of memory. > > -Clark >
I have no experience with matlab. HOWEVER, Scilab has a command (stacksize) to set/report availability of some type of memory. I found that I had to explicitly set it to an appropriately large value to process similarly sized FFT's. [Scilab's help seems to indicate that that memory can be automatically dynamically allocated -- boy does that sentence mess with normal grammar] Does matlab have similar? [I'm even more a Scilab newbie than I am a DSP newbie] [This information is worth what you paid for it ;]
> <buggue@hotmail.com> wrote in message > news:1142156054.386572.263770@u72g2000cwu.googlegroups.com... > >>I am trying to implement a bandpass filter on a signal data, xx. It is >>of 200,000 samples and the sampling frequency is 40 kHz. >> >>I am using a butter filter function and my program is as followed: >> >>HalfFs = Fs/2 >>Wp = [1000 1550]/HalfFs; Ws = [950 1600]/HalfFs; >>Rp = 3; Rs = 40; >> >>%Calculate the minimum order of Butterworth filter >>[n,Wn] = buttord(Wp,Ws,Rp,Rs) >> >>[b,a] = butter(n,Wn); >> >>yy - filter (b,a,xx); >>xx = conv(xx,yy); >> >>my program always hang upon the convolution step...does anybody knows >>how to solve this program? >> > > >
Reply by Jerry Avins March 12, 20062006-03-12
silverlex wrote:
> I broke up data xx into segments of data of 200 samples each and > performed > convolution. After this i will put the data back into xx. > > At this point, i realised that there are now a total of 399,000 samples > instead > of 200,000!! By performing convolution of the filter signal to the > original data the > number of samples increased by almost twice!! > > may i know whether is this suppose to be the correct thing?
399,000 is exactly correct number. I wonder if the result is correct, though. In convolution, each member of one set is multiplied by all members of the other. I don't see how you can process subsets and maintain that relationship. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by silverlex March 12, 20062006-03-12
I broke up data xx into segments of data of 200 samples each and
performed
convolution. After this i will put the data back into xx.

At this point, i realised that there are now a total of 399,000 samples
instead
of 200,000!! By performing convolution of the filter signal to the
original data the
number of samples increased by almost twice!!

may i know whether is this suppose to be the correct thing?

Reply by Mike Yarwood March 12, 20062006-03-12
"Anonymous" <someone@microsoft.com> wrote in message 
news:%eWQf.65735$no3.58770@tornado.southeast.rr.com...
> Should work, but try storing convolution output to something other than an > input, e.g. > > zz = conv(xx,yy); > xx = zz; > > You should also try a smaller sequence, say 10000 samples, first and then > increase the size slowly. Sometimes matlab, because it allows dynamically > resizing arrays, can get stuck in malloc cycles or memory swaps and can > seem > to take forever. Especially if your machine doesn't have a lot of memory. > > -Clark > > <buggue@hotmail.com> wrote in message > news:1142156054.386572.263770@u72g2000cwu.googlegroups.com... >> I am trying to implement a bandpass filter on a signal data, xx. It is >> of 200,000 samples and the sampling frequency is 40 kHz. >> >> I am using a butter filter function and my program is as followed: >> >> HalfFs = Fs/2 >> Wp = [1000 1550]/HalfFs; Ws = [950 1600]/HalfFs; >> Rp = 3; Rs = 40; >> >> %Calculate the minimum order of Butterworth filter >> [n,Wn] = buttord(Wp,Ws,Rp,Rs) >> >> [b,a] = butter(n,Wn); >> >> yy - filter (b,a,xx); >> xx = conv(xx,yy); >> >> my program always hang upon the convolution step...does anybody knows >> how to solve this program? >>
yy - filter (b,a,xx); doesn't seem to do anything best of luck - Mike
Reply by Anonymous March 12, 20062006-03-12
Should work, but try storing convolution output to something other than an
input, e.g.

zz = conv(xx,yy);
xx = zz;

You should also try a smaller sequence, say 10000 samples, first and then
increase the size slowly. Sometimes matlab, because it allows dynamically
resizing arrays, can get stuck in malloc cycles or memory swaps and can seem
to take forever. Especially if your machine doesn't have a lot of memory.

-Clark

<buggue@hotmail.com> wrote in message
news:1142156054.386572.263770@u72g2000cwu.googlegroups.com...
> I am trying to implement a bandpass filter on a signal data, xx. It is > of 200,000 samples and the sampling frequency is 40 kHz. > > I am using a butter filter function and my program is as followed: > > HalfFs = Fs/2 > Wp = [1000 1550]/HalfFs; Ws = [950 1600]/HalfFs; > Rp = 3; Rs = 40; > > %Calculate the minimum order of Butterworth filter > [n,Wn] = buttord(Wp,Ws,Rp,Rs) > > [b,a] = butter(n,Wn); > > yy - filter (b,a,xx); > xx = conv(xx,yy); > > my program always hang upon the convolution step...does anybody knows > how to solve this program? >
Reply by March 12, 20062006-03-12
I am trying to implement a bandpass filter on a signal data, xx. It is
of 200,000 samples and the sampling frequency is 40 kHz.

I am using a butter filter function and my program is as followed:

HalfFs = Fs/2
Wp = [1000 1550]/HalfFs; Ws = [950 1600]/HalfFs;
Rp = 3; Rs = 40;

%Calculate the minimum order of Butterworth filter
[n,Wn] = buttord(Wp,Ws,Rp,Rs)

[b,a] = butter(n,Wn);

yy - filter (b,a,xx);
xx = conv(xx,yy);

my program always hang upon the convolution step...does anybody knows
how to solve this program?