DSPRelated.com
Forums

PSD, CPSD and Coherence for pulse-like signals

Started by pater May 25, 2013
Hi everybody!

This is my first post in this community, and while I'm pretty happy to have
joined it, I feel rather dejected by the apparent ease of the questions I'm
about to ask you.

I'm working on a classifier that identifies the "type" of the signals it
receives, and is based on the similarity with a set of known signals.

The first basic approach I tried involved the evaluation of the difference
between the Discrete Fourier Transform of the input signal and those of the
known ones: the correct result would be the one with the minimum
difference. Though it seemed promising, I wanted to investigate more on the
topic, and I stumbled upon a forum post in which someone was suggesting the
use of the coherence to estimate the similarity between signals.

Now, I've been reading a lot around the web, but every definition I found
refers to the Cross Power Spectral Density of the signals! Now, my time
signals aren't periodic: they just last a few milli-seconds: does it have
any sense to speak about power densities? They are energy signals!

I'm getting a lot confused, because I don't know if I can actually use
these tools to study pulse-like signals or not.

Can anyone please enlighten me? Thank you all in advance.


Classification is about distinctive features.
If your signal has outstanding features in frequency domain, use
frequency domain.  If not, use something else.

Vladimir Vassilevsky
DSP and Mixed Signal Designs
www.abvolt.com




On 5/25/2013 11:43 AM, pater wrote:
> Hi everybody! > > This is my first post in this community, and while I'm pretty happy to have > joined it, I feel rather dejected by the apparent ease of the questions I'm > about to ask you. > > I'm working on a classifier that identifies the "type" of the signals it > receives, and is based on the similarity with a set of known signals. > > The first basic approach I tried involved the evaluation of the difference > between the Discrete Fourier Transform of the input signal and those of the > known ones: the correct result would be the one with the minimum > difference. Though it seemed promising, I wanted to investigate more on the > topic, and I stumbled upon a forum post in which someone was suggesting the > use of the coherence to estimate the similarity between signals. > > Now, I've been reading a lot around the web, but every definition I found > refers to the Cross Power Spectral Density of the signals! Now, my time > signals aren't periodic: they just last a few milli-seconds: does it have > any sense to speak about power densities? They are energy signals! > > I'm getting a lot confused, because I don't know if I can actually use > these tools to study pulse-like signals or not. > > Can anyone please enlighten me? Thank you all in advance. > >
pater <95187@dsprelated> wrote:
 
> This is my first post in this community, and while I'm pretty happy to have > joined it, I feel rather dejected by the apparent ease of the questions I'm > about to ask you.
> I'm working on a classifier that identifies the "type" of the signals it > receives, and is based on the similarity with a set of known signals.
Note that "classifier" is a term used in machine learning. While you probably do need to ask here, you might also need to look into the literature of machine learning. See for example: http://work.caltech.edu/library/ There is also a very reasonably priced book that goes along with it, and the lectures are also on you-tube if you like that better. But I believe you will need both DSP and machine learning techniques.
> The first basic approach I tried involved the evaluation of the difference > between the Discrete Fourier Transform of the input signal and those of the > known ones: the correct result would be the one with the minimum > difference. Though it seemed promising, I wanted to investigate more on the > topic, and I stumbled upon a forum post in which someone was suggesting the > use of the coherence to estimate the similarity between signals.
The main theme of machine learning is to avoid overfitting. If you have sample data, you need to fit on the generalization, not on the specific properties of the input data.
> Now, I've been reading a lot around the web, but every definition I found > refers to the Cross Power Spectral Density of the signals! Now, my time > signals aren't periodic: they just last a few milli-seconds: does it have > any sense to speak about power densities? They are energy signals!
Well, yes, but if you integrate each over the same time period, then the energy will be right. Also, if you integrate in frequency space, then you have to also figure out the units. Much of the math is based on signals of infinite extent, even though real signals aren't. -- glen
On May 25, 12:43&#4294967295;pm, "pater" <95187@dsprelated> wrote:
> > I've been reading a lot around the web, but every definition I found > refers to the Cross Power Spectral Density of the signals! Now, my time > signals aren't periodic: they just last a few milli-seconds: does it have > any sense to speak about power densities? They are energy signals! >
the only difference (or at least, the *main* difference) between energy signals and power signals is one of scaling in their definition. power signals, beheld for a finite amount of time, are essentially energy signals. this comes from what one might learn when they take a course in Metric Spaces or Functional Analysis. most of these definitions of correlation or spectral density are based upon the definition of the inner product: energy signals: +inf <u,v> = SUM{ u[n] conj{v[n]} } n=-inf don't worry too much about the complex conjugate operation if both u[n] and v[n] are real. for power signals, it's: +N <u,v> = lim 1/(2N+1) SUM{ u[n] conj{v[n]} } limit as N->inf n=-N now, if your Cross Power Spectral Density is the Fourier Transform of the cross-correlation FT{ <u[n], v[n-m]> } that definition works for either power or energy signals. when you interpret how much "stuff" is in a segment of frequency space it's either "watts per Hz" for power signals or "joules per Hz" for energy or something like that (assuming u[n] and v[n] are in "volts" and applied to a 1 ohm resistor). r b-j
Thank you both!

Well, I'm pretty new to Machine Learning and Pattern Recognition, though
I've recently been reading on these subjects.

My signals actually have distinctive spectra, and that's why I've been
using the approach I described before.

As for the features, well, how am I supposed to identify them? I mean, I
don't have parameters like height, color or weight: I just have some 1024
samples. I assume they all count for a single feature, don't they?

I should buy a book anyway, it's just that I didn't want to get my hands
too dirty with this stuff, and this is why I'm getting stuck at these
little problems. I just hope you might have enough time and will to help me
understand the basics so that I can proceed on my own. Thank you again.
>that definition works for either power or energy signals. when you >interpret how much "stuff" is in a segment of frequency space it's >either "watts per Hz" for power signals or "joules per Hz" for energy >or something like that (assuming u[n] and v[n] are in "volts" and >applied to a 1 ohm resistor). > > >r b-j >
Thanks r b-j you've been pretty exhaustive, I've been studying Functional Analysis, but it was a few years ago now and we didn't focus too much on these "pratical" things. That's what have misled me. Thank you again. I assume then that, given that the CSPD is "legal" to use with pulses, the statistical correlation can be used as well!
pater <95187@dsprelated> wrote:
 
> Well, I'm pretty new to Machine Learning and Pattern Recognition, though > I've recently been reading on these subjects.
This is the book: http://www.amazon.com/gp/product/1600490069 The book is $28 new, not so bad for a textbook these days. The Youtube videos cover 14 of the 18 chapters. There are no more sessions of the online course scheduled, though. (Some people work better with due dates for assignments.) -- glen
On Sat, 25 May 2013 13:18:59 -0500, "pater" <95187@dsprelated> wrote:

>Thank you both! > >Well, I'm pretty new to Machine Learning and Pattern Recognition, though >I've recently been reading on these subjects. > >My signals actually have distinctive spectra, and that's why I've been >using the approach I described before. > >As for the features, well, how am I supposed to identify them? I mean, I >don't have parameters like height, color or weight: I just have some 1024 >samples. I assume they all count for a single feature, don't they?
In the previous paragraph you said you have distinctive spectra. What makes them distinctive? Is there anything distinctive in the time domain? Exploit the features that you have and know about, and then use the techniques that can best detect those features in whichever domain they are best exploited. You can do cross-correlation in either the time or frequency domain, and you do generalized cross-correlation (which is different than traditional statistical cross-correlation) in many cases.
>I should buy a book anyway, it's just that I didn't want to get my hands >too dirty with this stuff, and this is why I'm getting stuck at these >little problems. I just hope you might have enough time and will to help me >understand the basics so that I can proceed on my own. Thank you again.
Since your burst length is not unreasonably long, 1024 samples if I understand correctly, there may be a number of things that you can do. Much will depend on how distinctive the features are for each signal that you need to detect/classify, and how correlted/uncorrelated they may be from each other, and whether or not the detection may need to be coherent or not to be effective, how low of an SNR you need to work in or what channel impairments there may be, etc., etc. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
>On May 25, 12:43=A0pm, "pater" <95187@dsprelated> wrote: >> >> I've been reading a lot around the web, but every definition I found >> refers to the Cross Power Spectral Density of the signals! Now, my time >> signals aren't periodic: they just last a few milli-seconds: does it
have
>> any sense to speak about power densities? They are energy signals! >> > > >the only difference (or at least, the *main* difference) between >energy signals and power signals is one of scaling in their >definition. power signals, beheld for a finite amount of time, are >essentially energy signals.
The difference between power and energy is power is an instantaneous value, and energy is power integrated over time. We so often use fudged concepts of power and energy, especially in signal processing, that we tend to lose sight of that. What we typically refer to as power in signals is power integrated over one or more cycles of the signal, and that is really an energy value we are talking about. Regards, Steve
steveu <31473@dsprelated> wrote:

(snip on power and energy)

> The difference between power and energy is power is an instantaneous value, > and energy is power integrated over time. We so often use fudged concepts > of power and energy, especially in signal processing, that we tend to lose > sight of that. What we typically refer to as power in signals is power > integrated over one or more cycles of the signal, and that is really an > energy value we are talking about.
Yes, but you can then divide by the time interval, and get an average power. That makes it easier to compare when the integration time might be different. If a quantity has a natural time period. Especially if it has a non-zero power over a relatively short time, then total energy might be more useful. Measurements of bombs, for example, might be in energy released, or earthquakes. On the other hand, even for a bomb where total energy is most significant, releasing the energy in a shorter time might matter. But yes, they can still sometimes be used wrong. -- glen