DSPRelated.com
Forums

who understands signal detection?

Started by theColdest March 7, 2005
I'm trying to write my first signal detection algorithm in Matlab...
but it's been several years since I've done any DSP... so it's slow
going.  if anyone has a little free-time, can you look at these M-files
and see if you can spot what I'm doing wrong?

the data files can be acquired here:
http://www.podoboq.com/podoboq=AD/basic_detect.zip

the two examples are simple (Class 1 - everything known a priori)
versions of what I am trying to do.  Unfortunately, I only have 299
data points to work with, and a sampling rate of 1Hz (Nyquist =3D=3D
0=2E5Hz).  I am using a Wiener estimation filter for pre-processing, and
for the detection I am using an uncorrelated Wiener-style
high-resolution detection filter.  "run_me1.m" uses a single sine pulse
centered at 100 seconds for the signal I'm trying to detect, and
"run_me2.m" has two sine pulses, one centered at 100 seconds and the
other centered at 250 seconds.

I'm not sure if I'm making a DSP-related error or just an error in the
way I'm manipulating the data in Matlab, but it doesn't seem to work.
after the estimation phase, you can see the pulse coming out at 100
seconds, but then the final output seems like garbage.  Aren't you
supposed to get a narrow impulse at each place where a detection
occurs???  I understand that there is a stistical aspect to this as
wel, but I haven't even got that far yet.

What about SNR?  In this case the ratio is 1:1.  Do I need to
RMS-normalize something before filtering?  I've experimented with all
sorts of things, but maybe I'm just forgetting something dumb!

I'd hugely appreciate any help.  thnx!!!=20

-ColdCold

"theColdest" <uyay6acg-th5x@yahoo.com> wrote in message 
news:1110237592.957310.168590@o13g2000cwo.googlegroups.com...
I'm trying to write my first signal detection algorithm in Matlab...
but it's been several years since I've done any DSP... so it's slow
going.  if anyone has a little free-time, can you look at these M-files
and see if you can spot what I'm doing wrong?

the data files can be acquired here:
http://www.podoboq.com/podoboq&#4294967295;/basic_detect.zip

the two examples are simple (Class 1 - everything known a priori)
versions of what I am trying to do.  Unfortunately, I only have 299
data points to work with, and a sampling rate of 1Hz (Nyquist ==
0.5Hz).  I am using a Wiener estimation filter for pre-processing, and
for the detection I am using an uncorrelated Wiener-style
high-resolution detection filter.  "run_me1.m" uses a single sine pulse
centered at 100 seconds for the signal I'm trying to detect, and
"run_me2.m" has two sine pulses, one centered at 100 seconds and the
other centered at 250 seconds.

I'm not sure if I'm making a DSP-related error or just an error in the
way I'm manipulating the data in Matlab, but it doesn't seem to work.
after the estimation phase, you can see the pulse coming out at 100
seconds, but then the final output seems like garbage.  Aren't you
supposed to get a narrow impulse at each place where a detection
occurs???  I understand that there is a stistical aspect to this as
wel, but I haven't even got that far yet.

What about SNR?  In this case the ratio is 1:1.  Do I need to
RMS-normalize something before filtering?  I've experimented with all
sorts of things, but maybe I'm just forgetting something dumb!

I'd hugely appreciate any help.  thnx!!!

-ColdCold

**************

If you really mean that the sample rate == Nyquist then the data isn't 
sampled at a high enough rate.
It is necessary that the sample rate > Nyquist or, said another way, 
Bandwidth<fs/2 and NOT Bandwidth==fs/2.

The link to the files was broken when I tried it....

Fred


"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:f62dnSe6hZ8ZYrHfRVn-1w@centurytel.net...
> > "theColdest" <uyay6acg-th5x@yahoo.com> wrote in message > news:1110237592.957310.168590@o13g2000cwo.googlegroups.com... > > the data files can be acquired here: > http://www.podoboq.com/podoboq&#4294967295;/basic_detect.zip > > > -ColdCold > > ************** > > The link to the files was broken when I tried it....
Strange--there is some kind of hidden dash character in the URL right before /basic. This one works: http://www.podoboq.com/podoboq/basic_detect.zip
where did I say that the sample rate == Nyquist?  Please re-read.

fs == 1 Hz.  meaning Nyquist == 0.5 Hz.

data is at http://www.podoboq.com/podoboq/basic_detect.zip

thank you, one and all...

I think you can only expect sharp maxima in the correlation, if the 
bandwidth is high. If the signal is rather smooth, the maximum will also be.

Andre

theColdest wrote:

> where did I say that the sample rate == Nyquist? Please re-read. > > fs == 1 Hz. meaning Nyquist == 0.5 Hz. > > data is at http://www.podoboq.com/podoboq/basic_detect.zip > > thank you, one and all... >
-- Please change no_spam to a.lodwig when replying via email!
"theColdest" <uyay6acg-th5x@yahoo.com> wrote in message 
news:1110269468.175891.198290@g14g2000cwa.googlegroups.com...
> where did I say that the sample rate == Nyquist? Please re-read. > > fs == 1 Hz. meaning Nyquist == 0.5 Hz. > > data is at http://www.podoboq.com/podoboq/basic_detect.zip >
Oh! A nontrivial slip of the keyboard..... sorry about that. if fs ==1Hz then Nyquist is < 0.5Hz and not == 0.5Hz! Or, the other way around, if Nyquist is 0.5Hz then fs must be >1.0Hz. The only difference here being == vs. > or < depending on the expression. Fred
I see... yes indeed.  you are correct, sir.  :)

hmmmm, the signal in my example is a blackman-windowed sine pulse
lasting 20 seconds, with white noise added.  is that too smooth a
signal to be detected??  gosh, I hope not.  it seems like there must be
just one simple piece that I am doing wrong?  No?

Fred Marshall wrote:

   ...

> if fs ==1Hz then Nyquist is < 0.5Hz ...
I think too much can be made of that truth. That condition assures that the original waveform can be reconstructed. If one has equality instead, the component at Fs/2 can't be completely reconstructed but there is no aliasing. Is not completely being reconstructed a more serious impediment than having been removed? 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;
meanwhile... we digress.  ( this has nothing to do with my signal
detection problem.  :-)

if somebody can unzip the data into a Matlab working directory and try
them out... shouldn't any detection filter (e.g. a classical detector
or a Wiener-uncorrelated high-res detector, etc.) produce a narrow
pulse around 100 seconds (and in the second example, also at 250
seconds) ?????  I use a Wiener estimation filter to pre-process, but
its results look pretty much the same in both examples (a pulse coming
out only around 100 seconds) which seems great in example one, but in
example two, where is the pulse at 250 seconds.  (weird)  uggggh.