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
Crash on filtering generated sine wave
-
- Posts: 8
- Joined: Thu Mar 03, 2005 2:31 am
- Location: San Diego CA
Crash on filtering generated sine wave
John Sigurdson
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
John,
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.
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
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
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
support@dplot.com
-
- Posts: 8
- Joined: Thu Mar 03, 2005 2:31 am
- Location: San Diego CA