View previous topic :: View next topic |
Author |
Message |
John Sigurdson
Joined: 03 Mar 2005 Posts: 8 Location: San Diego CA
|
Posted: Sun Aug 07, 2005 3:09 pm Post subject: Crash on filtering generated sine wave |
|
|
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 |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Sun Aug 07, 2005 3:21 pm Post subject: |
|
|
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 |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Tue Aug 09, 2005 12:52 am Post subject: |
|
|
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 |
|
|
John Sigurdson
Joined: 03 Mar 2005 Posts: 8 Location: San Diego CA
|
Posted: Tue Aug 09, 2005 3:01 am Post subject: |
|
|
Dave,
Thanks for the solution and quick reply. Much appreciated.
John _________________ John Sigurdson |
|
Back to top |
|
|
|