DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Crash on filtering generated sine wave

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
John Sigurdson



Joined: 03 Mar 2005
Posts: 8
Location: San Diego CA

PostPosted: Sun Aug 07, 2005 3:09 pm    Post subject: Crash on filtering generated sine wave Reply with quote

I'm trying to estimate the roll off in dB for the bandpass filter by generating a 100 Hz sine wave and then setting the bandpass low cutoff just above 100Hz (150 Hz) and hi cut off at some 10s of kHz. But every time I try to bandpass filter the generated sine wave, DPlot crashes.

Details, I generate a sine wave with Y=sin(x) in degrees from 0 to 36000 degrees with one point every 5 degrees, the correct sine wave is generated. Then, I modify the X axis with X = X/36000 so that the X axis is labled from zero to 1 and modify axis lables to X as seconds and Y as psi.

An FFT on this sine wave yields a proper frequency spectrum with a single peak at 100 Hz. However, if I attempt to filter that sine wave with a bandpass filter with any settings - e.g., w/the low cut off set to 150 Hz and the high cut off set to 40000 Hz, Dplot crashes and disappears altogether.

The bandpass filter works well at the settings mentions and many others for other waveforms and recorded real data, so I cannot figure out what's going wrong.

John
_________________
John Sigurdson
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Aug 07, 2005 3:21 pm    Post subject: Reply with quote

John,
Quote:
The bandpass filter works well at the settings mentions and many others for other waveforms and recorded real data, so I cannot figure out what's going wrong.


Me either, for now, but the semi-good news is I get the same results. Will let you know as soon as this is fixed. Thanks for pointing out the problem.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Aug 09, 2005 12:52 am    Post subject: Reply with quote

John,
The bandpass filter can become unstable (in other words blow up with an overflow error) if either the low or high frequencies are greater than half the sampling rate (in your case half of 7200 Hz). I've updated the input dialog to complain in this case. If run from a macro the filter will simply fail w/o a crash. You can get the update using Help>Check for Updates.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
John Sigurdson



Joined: 03 Mar 2005
Posts: 8
Location: San Diego CA

PostPosted: Tue Aug 09, 2005 3:01 am    Post subject: Reply with quote

Dave,

Thanks for the solution and quick reply. Much appreciated.

John
_________________
John Sigurdson
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group