Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform


Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Auto-Covariance help

There are 8 messages in this thread.

You are currently looking at messages 0 to 8.


Auto-Covariance help - Raeldor - 2011-03-07 19:42:00

Hi All,

I'm trying to calculate the auto co-variance of a 16khz audio signal.
The signal has been normalized between -1.0 and 1.0.  I am using the
following explanation of co-variance to calculate the auto-covariance
by comparing the signal against itself with a time shift 'm'...

http://www.ehow.com/how_5208932_calculate-covariances.html

I am taking the auto-covariance values for each of m=0 to m=(number of
samples / 5) and then normalizing them using the m=0 value as the max.

I was expecting white noise to show as low co-variance values, and
harmonics to show as high values, but they seem to be about the same.
I must be doing something wrong here, can anyone spot my mistake?

Thanks
Ray

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - dvsarwate - 2011-03-07 21:53:00



On Mar 7, 6:42=A0pm, Raeldor <rael...@gmail.com> wrote:
> Hi All,
>
> I'm trying to calculate the auto co-variance of a 16khz audio signal.
> The signal has been normalized between -1.0 and 1.0. =A0I am using the
> following explanation of co-variance to calculate the auto-covariance
> by comparing the signal against itself with a time shift 'm'...
>
> http://www.ehow.com/how_5208932_calculate-covariances.html
>
> I am taking the auto-covariance values for each of m=3D0 to m=3D(number o=
f
> samples / 5) and then normalizing them using the m=3D0 value as the max.
>
> I was expecting white noise to show as low co-variance values, and
> harmonics to show as high values, but they seem to be about the same.
> I must be doing something wrong here, can anyone spot my mistake?
>
> Thanks
> Ray

Perhaps you are confusing the different notions
of covariance of two random variables and the
auto-covariance function of a time series or
discrete-time sequence or continuous-time signal?
The link you posted seems to be telling you how
to compute the first, but it appears that you want
the second.

Dilip Sarwate
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - Rune Allnor - 2011-03-07 23:26:00

On Mar 8, 1:42=A0am, Raeldor <rael...@gmail.com> wrote:
> Hi All,
>
> I'm trying to calculate the auto co-variance of a 16khz audio signal.
> The signal has been normalized between -1.0 and 1.0. =A0I am using the
> following explanation of co-variance to calculate the auto-covariance
> by comparing the signal against itself with a time shift 'm'...
>
> http://www.ehow.com/how_5208932_calculate-covariances.html
>
> I am taking the auto-covariance values for each of m=3D0 to m=3D(number o=
f
> samples / 5) and then normalizing them using the m=3D0 value as the max.
>
> I was expecting white noise to show as low co-variance values, and
> harmonics to show as high values, but they seem to be about the same.
> I must be doing something wrong here, can anyone spot my mistake?

That kind of analysis is done in frequency domain. The recipe you
posted is done in time domain.

Rune
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - Raeldor - 2011-03-08 01:08:00

On Mar 7, 8:26=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On Mar 8, 1:42=A0am, Raeldor <rael...@gmail.com> wrote:
>
> > Hi All,
>
> > I'm trying to calculate the auto co-variance of a 16khz audio signal.
> > The signal has been normalized between -1.0 and 1.0. =A0I am using the
> > following explanation of co-variance to calculate the auto-covariance
> > by comparing the signal against itself with a time shift 'm'...
>
> >http://www.ehow.com/how_5208932_calculate-covariances.html
>
> > I am taking the auto-covariance values for each of m=3D0 to m=3D(number=
 of
> > samples / 5) and then normalizing them using the m=3D0 value as the max=
.
>
> > I was expecting white noise to show as low co-variance values, and
> > harmonics to show as high values, but they seem to be about the same.
> > I must be doing something wrong here, can anyone spot my mistake?
>
> That kind of analysis is done in frequency domain. The recipe you
> posted is done in time domain.
>
> Rune

Isn't auto-covariance just the same as co-variance but using the
sample time-signal offset?

I see your point about the frequency domain now.  I guess I need to
run this on the results of the FFT rather than the original input
signal?

Thanks
Ray
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - Rune Allnor - 2011-03-08 01:15:00

On Mar 8, 7:08=A0am, Raeldor <rael...@gmail.com> wrote:
> On Mar 7, 8:26=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On Mar 8, 1:42=A0am, Raeldor <rael...@gmail.com> wrote:
>
> > > Hi All,
>
> > > I'm trying to calculate the auto co-variance of a 16khz audio signal.
> > > The signal has been normalized between -1.0 and 1.0. =A0I am using th=
e
> > > following explanation of co-variance to calculate the auto-covariance
> > > by comparing the signal against itself with a time shift 'm'...
>
> > >http://www.ehow.com/how_5208932_calculate-covariances.html
>
> > > I am taking the auto-covariance values for each of m=3D0 to m=3D(numb=
er of
> > > samples / 5) and then normalizing them using the m=3D0 value as the m=
ax.
>
> > > I was expecting white noise to show as low co-variance values, and
> > > harmonics to show as high values, but they seem to be about the same.
> > > I must be doing something wrong here, can anyone spot my mistake?
>
> > That kind of analysis is done in frequency domain. The recipe you
> > posted is done in time domain.
>
> > Rune
>
> Isn't auto-covariance just the same as co-variance but using the
> sample time-signal offset?

There are any number of definitions of these terms, depending on
who you talk with and in what context. I don't like the per-sample
normalization that is done in the recipe you refer to. The
normalization means the covariance you compute depends non-linearly
on the data.

Not a good thing, if you don't know how to deal with it.

> I see your point about the frequency domain now. =A0I guess I need to
> run this on the results of the FFT rather than the original input
> signal?

Yep. Assuming you use a suitable linear version of the covariance.

Rune
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - Tim Wescott - 2011-03-08 03:22:00

On Mon, 07 Mar 2011 22:08:20 -0800, Raeldor wrote:

> On Mar 7, 8:26 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>> On Mar 8, 1:42 am, Raeldor <rael...@gmail.com> wrote:
>>
>> > Hi All,
>>
>> > I'm trying to calculate the auto co-variance of a 16khz audio signal.
>> > The signal has been normalized between -1.0 and 1.0.  I am using the
>> > following explanation of co-variance to calculate the auto-covariance
>> > by comparing the signal against itself with a time shift 'm'...
>>
>> >http://www.ehow.com/how_5208932_calculate-covariances.html
>>
>> > I am taking the auto-covariance values for each of m=0 to m=(number
>> > of samples / 5) and then normalizing them using the m=0 value as the
>> > max.
>>
>> > I was expecting white noise to show as low co-variance values, and
>> > harmonics to show as high values, but they seem to be about the same.
>> > I must be doing something wrong here, can anyone spot my mistake?
>>
>> That kind of analysis is done in frequency domain. The recipe you
>> posted is done in time domain.
>>
>> Rune
> 
> Isn't auto-covariance just the same as co-variance but using the sample
> time-signal offset?

Yes.

> I see your point about the frequency domain now.  I guess I need to run
> this on the results of the FFT rather than the original input signal?

I'm not sure what you're reading into Rune's comment.  You can compute an 
autocovariance using an FFT quicker than you can compute one 'the hard 
way' -- but you don't _have_ to.  And the computations are considerably 
different: for the time-domain autocovariance you do the flip-slide-
multiply thing, for the FFT autocovariance you take the FFT, then find 
the magnitude squared, then take the IFFT.

-- 
http://www.wescottdesign.com
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - Rune Allnor - 2011-03-09 00:39:00

On Mar 8, 7:15=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On Mar 8, 7:08=A0am, Raeldor <rael...@gmail.com> wrote:
>
>
>
>
>
> > On Mar 7, 8:26=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>
> > > On Mar 8, 1:42=A0am, Raeldor <rael...@gmail.com> wrote:
>
> > > > Hi All,
>
> > > > I'm trying to calculate the auto co-variance of a 16khz audio signa=
l.
> > > > The signal has been normalized between -1.0 and 1.0. =A0I am using =
the
> > > > following explanation of co-variance to calculate the auto-covarian=
ce
> > > > by comparing the signal against itself with a time shift 'm'...
>
> > > >http://www.ehow.com/how_5208932_calculate-covariances.html
>
> > > > I am taking the auto-covariance values for each of m=3D0 to m=3D(nu=
mber of
> > > > samples / 5) and then normalizing them using the m=3D0 value as the=
 max.
>
> > > > I was expecting white noise to show as low co-variance values, and
> > > > harmonics to show as high values, but they seem to be about the sam=
e.
> > > > I must be doing something wrong here, can anyone spot my mistake?
>
> > > That kind of analysis is done in frequency domain. The recipe you
> > > posted is done in time domain.
>
> > > Rune
>
> > Isn't auto-covariance just the same as co-variance but using the
> > sample time-signal offset?
>
> There are any number of definitions of these terms, depending on
> who you talk with and in what context. I don't like the per-sample
> normalization that is done in the recipe you refer to. The
> normalization means the covariance you compute depends non-linearly
> on the data.
>
> Not a good thing, if you don't know how to deal with it.

Actually, the recipe seems to be OK. One just has to read the text
in excrutiating detail to figure out exactly what is going on.
That's why so many prefer to see these things expressed as maths.

Rune
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Auto-Covariance help - HardySpicer - 2011-03-09 03:14:00

On Mar 8, 7:08=A0pm, Raeldor <rael...@gmail.com> wrote:
> On Mar 7, 8:26=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>
>
> > On Mar 8, 1:42=A0am, Raeldor <rael...@gmail.com> wrote:
>
> > > Hi All,
>
> > > I'm trying to calculate the auto co-variance of a 16khz audio signal.
> > > The signal has been normalized between -1.0 and 1.0. =A0I am using th=
e
> > > following explanation of co-variance to calculate the auto-covariance
> > > by comparing the signal against itself with a time shift 'm'...
>
> > >http://www.ehow.com/how_5208932_calculate-covariances.html
>
> > > I am taking the auto-covariance values for each of m=3D0 to m=3D(numb=
er of
> > > samples / 5) and then normalizing them using the m=3D0 value as the m=
ax.
>
> > > I was expecting white noise to show as low co-variance values, and
> > > harmonics to show as high values, but they seem to be about the same.
> > > I must be doing something wrong here, can anyone spot my mistake?
>
> > That kind of analysis is done in frequency domain. The recipe you
> > posted is done in time domain.
>
> > Rune
>
> Isn't auto-covariance just the same as co-variance but using the
> sample time-signal offset?
>
> I see your point about the frequency domain now. =A0I guess I need to
> run this on the results of the FFT rather than the original input
> signal?
>
> Thanks
> Ray

It's just autocorrelation when the signal is stationary. The Freq
domain is more effecient using FFTs.
Find the inverse FFT of the Periodogram which has been averaged.

Hardy
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.