Filtering In Frequency Domain v Time Domain

How in the world did PSR get into this thread?

It was a stepping stone to using Excel for match filtering.

***But PSR isn't much of anything like matched filtering in terms of
implementation.....

The both use a reference that doesn't correlate much or often with the
noise.





I thought we were
talking about matched filters and whether there were any differences
between time domain implementation and frequency domain implementation.

It's no longer of interest so feel free to ignore it.

***OK.  You're welcome.

OK, I found a description:http://techdoc.kvindesland.no/radio/ymse1/20061216153544735.pdf

Geez.  This looks a lot like a phase-locked loop (PLL) receiver of the
sort that's used, for example, in deep space communications.

The time multiplication step is the heart of PSR and lock in.

***Actually the time multiplication step is a trivial part of it.   The
heart of it is getting the frequency and phase adjusted to get lock.

That's not always an issue with PSR.  In some important cases the
reference is inherently in phase with the signal.  Phi will certainly
be close enough to zero to be ignored.

OTOH it is _always_ necessary to multiply the signal by some reference
with a known phase angle in either PPL, lock in or PSR.





  In those
applications, the data bandwidth is very low so that the receiver
bandwidth can be very low (thus improving SNR at the output).

Matched filters are most often used in pulse systems like radar and
sonar; although they tend to work better in radar.  There's a ton of
literature on the subject.

PLL receivers tend to work on continuous signals.  There is generally a
"lock" period to get the phase right and the receiver can also "lose lock".

The phase may not always be known in which case it won't work for
precision amplitude measurements.  It may very well be worse than the
noise.

***The phase is never known unless there's a phase reference as in a
suppressed carrier control system and that's mostly used to know the *sign*.

Depends on the situation.  Sometimes it's not enough to matter.

The difference seems rather stark to me.
It would be surprising if the two types of reference or "adaptive"
filtering weren't compared before now.
Well, there's nothing adaptive in this conversation yet...  

Match along with Weiner and probably a host of other signal bandwidth
filters are called "adaptive filters."  
Correction. Adaptive filters have a transfer function that varies
with time.

Weiner filters are not adaptive.

Some would include lock-in and
PSR.

Even noise determination and subtraction is sometimes called "adaptive
filtering" although that might be another example of indiscriminate
use of words.

So, is that
yet another new topic?  Why should it be so surprising since they are so
very much different in terms of system objectives?

Sometimes it's easier to look at every category a thing could fall
under.

One is for short, known
signals (known modulation if you will) and the other is for long, known
frequency, signals of unknown modulation.  That may not be the best
description but it's close enough for now.
A lot more cycles [time] should be necessary with PSR to get the same
reduction of noise as FFT reference filtering.
***FFT has nothing to do with it.  It just complicates things a bit if
you go that way.

You'll need to get a Fourier transform somehow and FFT is the most
efficient way to get it.

With a FFT you know everything possible about the signal and with
reference filtering in the frequency domain, all that information is
utilized.  That may be why they call the match filter the "optimal"
filter.  It may be the absolute best you can do.
***A matched filter is the optimal linear filter for maximizing the
signal to noise ratio (SNR) in the presence of additive noise.  

Looks like we may agree on that..

FFT has
nothing to do with it.
With PSR you only know or need to know the phase angle.  Many lock in
systems simply multiply with a square wave.  All the information in
the wave form is tossed with PSR.
***With PSR you generally don't know the phase angle.  That's why lock
is something that has to be accomplished with the implementation and not
by the designer in some a priori fashion ...

Even if true how would that change the fact that PSR doesn't utilize
as much information as match filtering and therefore cannot clean up a
signal in as short a time?

which is what I think is
meant by "know or need to know the phase angle".  Perhaps there's a
different intent.
So, it appears you're pondering a *system design* question in addition
to your original question about matched filtering.
The PSR is only of interest now if it was possible to somehow glean a
phase angle, maybe by comparing the reference * signal with the
reference * reference or the signal * signal.  If that's not possible
then the phase angle will have to be determined by some kind of
convolution / match filtering.
Do you mean "phase angle" or do you mean "delay"?  

Delay would be better since it isn't a simple sine curve.  In fact, it
generally won't even be periodic.

Well, at least one
can reasonably ask this question in the context of radar or sonar.  In
some systems *relative* phase might be used to differentiate between
various physically-separated target elements.  But one inch in 50 miles
is rarely of interest on an absolute basis.  What *are* you trying to do
in a system context?

Determine a magnitude of an signal with a SNR of 2 - 20.

If the delay is more than 1.5% of the pulse period and the SNR is over
10, then a filter that don't correct for the delay will cause more
harm than good.

I'd rather have the noise.

Bret Cahill- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
 
A time lag or phase shift in the reference doesn't seem to matter one
bit using IMPRODUCT of the reference and signal in Excel's FFT.  This
is true with noise which it filters quite well in just one cycle.

Sounds very familiar.  Does this mean we're getting somewhere?  
IMPRODUCT looked like it might have something to do with complex
conjugates.

(a + bi) * (c + di) = ac - bd + (ad + bc)i

One
learns best by hands-on, eh?
Most wouldn't call a simulator with contrived noise "hands on" but it
will save all kinds of time and money for any project that does get to
the real hands on stage. Not only does it eliminate a lot of unforced
errors but even more, it improves judgement on what to watch out for.

It's not that hard to research and/or measure what might be the actual
numbers so simulators should be used before doing anything.

Now you're doing a complex multiply of complex frequency sequences,
which is equivalent to a time domain circular convolution, and seem
interested that the results are what we tried to tell you they would be.

Did you compute an ABS after the multiply?
IMABS after the INV FFT.

It's straightforward:

1. make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

2. in the next column move it up or down some cells for the clean
signal with a time shift

3. make noise for the entire sample time and add it to the clean
signal

4. FFT both the noisy signal and ref.

5. IMPRODUCT the noisy signal and ref.

6. Inverse FFT

8. IMABS or IMREAL then ABS

9. AVERAGE for magnitude.

Now shift the referance in time to be along side the signal and repeat
the above for the same magnitude. It's pretty interesting that an
entire time period can be covered with what seems to be one operation.

To see the noise reduction ABS the original ref and signal, AVERAGE
both and divide the filtered by the unfiltered. In that one case it
reduced the error from a SNR=2 pure sine wave noise from 26% error to
3%.

PSR might take 20 - 50 times as long to do that.

And, really, using IMPRODUCT in frequency *should* generate different
complex results with different alignments of the reference or of the
signal in time.  
Next time I'll check.

But, the magnitudes or ABS at each frequency should be
the same from one trial to the next.  
That is true even for IMABS of the transforms.


Bret Cahill
 
On Mar 10, 3:07 pm, Bret Cahill <Bret_E_Cah...@yahoo.com> wrote:
A time lag or phase shift in the reference doesn't seem to matter one
bit using IMPRODUCT of the reference and signal in Excel's FFT.  This
is true with noise which it filters quite well in just one cycle.
Sounds very familiar.  Does this mean we're getting somewhere?  

IMPRODUCT looked like it might have something to do with complex
conjugates.

(a + bi) * (c + di) = ac - bd + (ad + bc)i

One
learns best by hands-on, eh?

Most wouldn't call a simulator with contrived noise "hands on" but it
will save all kinds of time and money for any project that does get to
the real hands on stage.  Not only does it eliminate a lot of unforced
errors but even more, it improves judgement on what to watch out for.

It's not that hard to research and/or measure what might be the actual
numbers so simulators should be used before doing anything.

Now you're doing a complex multiply of complex frequency sequences,
which is equivalent to a time domain circular convolution, and seem
interested that the results are what we tried to tell you they would be..
Did you compute an ABS after the multiply?

IMABS after the INV FFT.

It's straightforward:

1.  make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

2.  in the next column move it up or down some cells for the clean
signal with a time shift

3.  make noise for the entire sample time and add it to the clean
signal

4. FFT both the noisy signal and ref.

5.  IMPRODUCT the noisy signal and ref.

6.  Inverse FFT

8.  IMABS or IMREAL then ABS

9.  AVERAGE for magnitude.

Now shift the referance in time to be along side the signal and repeat
the above for the same magnitude.  It's pretty interesting that an
entire time period can be covered with what seems to be one operation.

To see the noise reduction ABS the original ref and signal, AVERAGE
both and divide the filtered by the unfiltered.  In that one case it
reduced the error from a SNR=2 pure sine wave noise from 26% error to
3%.

PSR might take 20 - 50 times as long to do that.
Actually PSR got the error down to 8% in just one cycle.

And, really, using IMPRODUCT in frequency *should* generate different
complex results with different alignments of the reference or of the
signal in time.  

Next time I'll check.

But, the magnitudes or ABS at each frequency should be
the same from one trial to the next.  

That is true even for IMABS of the transforms.

Bret Cahill
 
On 3/10/2011 3:07 PM, Bret Cahill wrote:
1. make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

2. in the next column move it up or down some cells for the clean
signal with a time shift

3. make noise for the entire sample time and add it to the clean
signal

4. FFT both the noisy signal and ref.

5. IMPRODUCT the noisy signal and ref.

6. Inverse FFT

8. IMABS or IMREAL then ABS

9. AVERAGE for magnitude.
OK. So, I'll add some comments:

1. make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

***I used a 10-period sinusoid with 10 samples per period which filled
about 60% of the data-filled part of the arrays.

2. in the next column move it up or down some cells for the clean
signal with a time shift

***Because of what is going to happen next, this won't matter........
(why do I keep repeating myself on this?) Well, of course it affects
the position of the peak in the circular convolution but that's all.

3. make noise for the entire sample time and add it to the clean
signal

***OK

***Plot both the signal and the signal plus noise.

4. FFT both the noisy signal and ref.

***Well, really you want to compute the "time inversed complex
conjugate" of the signal and then FFT that. Since it's real, just flip
the order of the column to get the time reversal.

***Don't forget to zero pad enough to avoid temporal aliasing at step.
I doubled their lengths with zero-valued samples.

IMABS both results and plot.

5. IMPRODUCT the noisy signal and ref.

***Yep

IMABS the Product and plot.

6. Inverse FFT

***OK

8. IMABS or IMREAL then ABS

9. AVERAGE for magnitude.

***I'm not sure that works very well. Why not peak pick here? The peak
should occur when there's the maximum SNR and it occurs when there's the
maximum overlap in the noiseless case. There are likely more
sophisticated ways I'm sure.

***Why not use the abs of the FFT and peak pick there? Need to watch
scale factor. Likely signal dependent....

***Since it's magnitude you want, check out Rick Lyon's recent article
on this topic. I cited it in a recent post here. Helps estimate
magnitude when using and FFTs and when frequency isn't right on one of
the FFT frequency samples.

Note: if you use a square sine burst as a test case signal then it's
really easy to see things in all the results. The noiseless case is
interesting - yielding a triangular envelope. And that gives some idea
of what happens as you add noise, helps in scaling, etc.

I'd rather use Matlab or Scilab for something like this but it was
instructive to use Excel. Not too bad a way for relatively small sequences.

Fred
 
1.  make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

2.  in the next column move it up or down some cells for the clean
signal with a time shift

3.  make noise for the entire sample time and add it to the clean
signal

4. FFT both the noisy signal and ref.

5.  IMPRODUCT the noisy signal and ref.
and also IMPRODUCT the ref by itself as a "control" to see the error.

6.  Inverse FFT
Inv FFT ref * ref.

8.  IMABS or IMREAL then ABS
and ref * ref.

9.  AVERAGE for magnitude.

OK.  So, I'll add some comments:

1.  make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

***I used a 10-period sinusoid with 10 samples per period which filled
about 60% of the data-filled part of the arrays.
It's important to keep track of how much of what you may be calling
"padding" because phase sensitive rectification (time domain)
multiplies the noise by zero in this time period and comes out looking
pretty respectable.

One more comment about PSR:

To compare PSR with the FFT filter it should be necessary to take the
SQRT of the PSR output, or, to avoid dividing by zero, the
SQRT(ABS(PSR)).

This may or may not be true for the FFT filter.

Both the PSR and FFT filters can be compared with simple
rectification.

There may be a proof that shows the FFT filter will beat PSR every
time.

2.  in the next column move it up or down some cells for the clean
signal with a time shift

***Because of what is going to happen next, this won't matter........
That was only to show it works.

(why do I keep repeating myself on this?)  Well, of course it affects
the position of the peak in the circular convolution but that's all.

3.  make noise for the entire sample time and add it to the clean
signal

***OK

***Plot both the signal and the signal plus noise.
Always check for errors, how it looks, the SNR, etc.

4. FFT both the noisy signal and ref.

***Well, really you want to compute the "time inversed complex
conjugate" of the signal and then FFT that.  Since it's real, just flip
the order of the column to get the time reversal.
That didn't seem to do anything except change the sign of the final
inv FFT.

***Don't forget to zero pad enough to avoid temporal aliasing at step.
I doubled their lengths with zero-valued samples.
Are you using the highest frequency in the ref to determine that time?

I tried about 10% of that time and was off by 33% in one test. I
attributed that to the fact that the CORREL of the noise with the
signal was over 0.93%.

IMABS both results and plot.
Always check.

5.  IMPRODUCT the noisy signal and ref.

***Yep

IMABS the Product and plot.

6.  Inverse FFT

***OK

8.  IMABS or IMREAL then ABS

9.  AVERAGE for magnitude.

***I'm not sure that works very well.  Why not peak pick here?  
Would that work for any arbitrary wave form?

The peak
should occur when there's the maximum SNR and it occurs when there's the
maximum overlap in the noiseless case.  There are likely more
sophisticated ways I'm sure.
Dividing the inv FFT ref by the inv FFT [cleaned up] signal at each
point in time produces a column of mostly correct answers with some
discontinuities.

Taking the MEDIAN of that will sometimes give better results than
AVERAGE.

***Why not use the abs of the FFT and peak pick there?  Need to watch
scale factor.  Likely signal dependent....
MAX(ABS())

***Since it's magnitude you want, check out Rick Lyon's recent article
on this topic.  I cited it in a recent post here.  Helps estimate
magnitude when using and FFTs and when frequency isn't right on one of
the FFT frequency samples.
I'll check it out.

Note:  if you use a square sine burst as a test case signal then it's
really easy to see things in all the results.  The noiseless case is
interesting - yielding a triangular envelope.  And that gives some idea
of what happens as you add noise, helps in scaling, etc.
Square waves seem to be harder to FFT filter. Maybe discontinuities
are harder to transform.

Fortunately square waves don't happen by accident.

I'd rather use Matlab or Scilab for something like this but it was
instructive to use Excel.  Not too bad a way for relatively small sequences.
Everyone has Excel. It is easy to Email a file and show them what
they can expect. That's the whole point of modeling. No one wants to
spend a lot of money and then be standing around saying "duh"
completely clueless as to why its not working.

You can even post a noisy signal on newsgroups so anyone can copy and
paste into Excel and take a look at it.


0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.034926578
0.039095806
0.043080717
0.046877171
0.050481545
0.053890757
0.057102276
0.06011414
0.062924962
0.065533943
0.067940873
0.070146137
0.072150713
0.073956173
0.075564674
0.076978952
0.078202311
0.079238615
0.080092266
0.08076819
0.081271818
0.081609061
0.081786289
0.081810302
0.081688305
0.081427874
0.081036928
0.080523695
0.079896675
0.07916461
0.078336442
0.077421276
0.076428346
0.075366971
0.07424652
0.07307637
0.071865867
0.070624286
0.069360797
0.068084419
0.066803987
0.065528115
0.064265159
0.063023181
0.06180992
0.060632753
0.059498672
0.058414251
0.057385619
0.05641844
0.055517883
0.054688608
0.053934744
0.053259876
0.052667028
0.052158655
0.051736637
0.051402265
0.051156248
0.050998704
0.050929169
0.050946596
0.051049367
0.051235301
0.051501663
0.051845188
0.052262088
0.052748077
0.053298395
0.053907827
0.05457073
0.055281065
0.056032423
0.056818056
0.057630913
0.058463672
0.059308776
0.06015847
0.061004838
0.061839842
0.062655359
0.063443222
0.06419526
0.064903335
0.065559382
0.066155449
0.066683736
0.067136631
0.067506748
0.067786963
0.067970449
0.068050709
0.068021609
0.067877408
0.067612788
0.067222878
0.066703283
0.066050104
0.065259959
0.064330003
0.063257942
0.062042049
0.060681173
0.059174748
0.0575228
0.055725949
0.053785412
0.051702998
0.049481106
0.047122717
0.044631383
0.042011218
0.03926688
0.036403556
0.033426942
0.03034322
0.027159037
0.023881476
0.02051803
0.017076572
0.013565324
0.009992824
0.006367891
0.00269959
-0.001002804
-0.004729845
-0.008471951
-0.012219447
-0.015962602
-0.019691669
-0.023396923
-0.027068704
-0.030697452
-0.034273748
-0.037788353
-0.041232244
-0.044596648
-0.047873083
-0.051053385
-0.054129747
-0.057094744
-0.059941368
-0.062663051
-0.06525369
-0.067707676
-0.070019908
-0.072185815
-0.074201376
-0.076063126
-0.077768177
-0.079314219
-0.080699531
-0.081922983
-0.082984039
-0.083882754
-0.084619771
-0.085196312
-0.085614173
-0.085875708
-0.085983818
-0.085941933
-0.085753993
-0.085424426
-0.084958126
-0.084360427
-0.083637075
-0.082794201
-0.081838286
-0.080776132
-0.079614828
-0.078361712
-0.077024338
-0.075610435
-0.074127873
-0.072584624
-0.070988719
-0.069348213
-0.067671143
-0.065965491
-0.064239141
-0.062499846
-0.060755185
-0.059012528
-0.057279002
-0.055561449
-0.0538664
-0.052200037
-0.050568165
-0.048976181
-0.047429047
-0.045931266
-0.044486857
-0.043099333
-0.041771684
-0.04050636
-0.039305255
-0.038169697
-0.037100439
-0.036097651
-0.035160915
-0.034289229
-0.033480999
-0.032734053
-0.032045641
-0.031412444
-0.030830589
-0.03029566
-0.029802718
-0.029346315
-0.028920517
-0.028518932
-0.028134727
-0.02776066
-0.027389112
-0.02701211
-0.026621367
-0.026208312
-0.025764124
-0.025279773
-0.024746053
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Can anyone clean it up w/o the reference?


Bret Cahill
 
If the noise is in the "padding."



0
0.002598479
0.005187839
0.007759
0.010302963
0.012810843
0.015273916
0.01768365
0.020031743
0.022310161
0.024511174
0.026627384
0.028651762
0.030577675
0.034926578
0.039095806
0.043080717
0.046877171
0.050481545
0.053890757
0.057102276
0.06011414
0.062924962
0.065533943
0.067940873
0.070146137
0.072150713
0.073956173
0.075564674
0.076978952
0.078202311
0.079238615
0.080092266
0.08076819
0.081271818
0.081609061
0.081786289
0.081810302
0.081688305
0.081427874
0.081036928
0.080523695
0.079896675
0.07916461
0.078336442
0.077421276
0.076428346
0.075366971
0.07424652
0.07307637
0.071865867
0.070624286
0.069360797
0.068084419
0.066803987
0.065528115
0.064265159
0.063023181
0.06180992
0.060632753
0.059498672
0.058414251
0.057385619
0.05641844
0.055517883
0.054688608
0.053934744
0.053259876
0.052667028
0.052158655
0.051736637
0.051402265
0.051156248
0.050998704
0.050929169
0.050946596
0.051049367
0.051235301
0.051501663
0.051845188
0.052262088
0.052748077
0.053298395
0.053907827
0.05457073
0.055281065
0.056032423
0.056818056
0.057630913
0.058463672
0.059308776
0.06015847
0.061004838
0.061839842
0.062655359
0.063443222
0.06419526
0.064903335
0.065559382
0.066155449
0.066683736
0.067136631
0.067506748
0.067786963
0.067970449
0.068050709
0.068021609
0.067877408
0.067612788
0.067222878
0.066703283
0.066050104
0.065259959
0.064330003
0.063257942
0.062042049
0.060681173
0.059174748
0.0575228
0.055725949
0.053785412
0.051702998
0.049481106
0.047122717
0.044631383
0.042011218
0.03926688
0.036403556
0.033426942
0.03034322
0.027159037
0.023881476
0.02051803
0.017076572
0.013565324
0.009992824
0.006367891
0.00269959
-0.001002804
-0.004729845
-0.008471951
-0.012219447
-0.015962602
-0.019691669
-0.023396923
-0.027068704
-0.030697452
-0.034273748
-0.037788353
-0.041232244
-0.044596648
-0.047873083
-0.051053385
-0.054129747
-0.057094744
-0.059941368
-0.062663051
-0.06525369
-0.067707676
-0.070019908
-0.072185815
-0.074201376
-0.076063126
-0.077768177
-0.079314219
-0.080699531
-0.081922983
-0.082984039
-0.083882754
-0.084619771
-0.085196312
-0.085614173
-0.085875708
-0.085983818
-0.085941933
-0.085753993
-0.085424426
-0.084958126
-0.084360427
-0.083637075
-0.082794201
-0.081838286
-0.080776132
-0.079614828
-0.078361712
-0.077024338
-0.075610435
-0.074127873
-0.072584624
-0.070988719
-0.069348213
-0.067671143
-0.065965491
-0.064239141
-0.062499846
-0.060755185
-0.059012528
-0.057279002
-0.055561449
-0.0538664
-0.052200037
-0.050568165
-0.048976181
-0.047429047
-0.045931266
-0.044486857
-0.043099333
-0.041771684
-0.04050636
-0.039305255
-0.038169697
-0.037100439
-0.036097651
-0.035160915
-0.034289229
-0.033480999
-0.032734053
-0.032045641
-0.031412444
-0.030830589
-0.03029566
-0.029802718
-0.029346315
-0.028920517
-0.028518932
-0.028134727
-0.02776066
-0.027389112
-0.02701211
-0.026621367
-0.026208312
-0.025764124
-0.025279773
-0.024746053
-0.026751656
-0.028759152
-0.030760151
-0.032745771
-0.034707145
-0.03663547
-0.038522038
-0.040358279
-0.0421358
-0.043846417
-0.0454822
-0.047035499
-0.048498984
-0.049865679
-0.051128986
-0.052282723
-0.053321146
-0.054238976
-0.055031424
-0.055694213
-0.056223594
-0.056616365


Bret Cahill
 
On Mar 11, 1:48 pm, Bret Cahill <BretCah...@peoplepc.com> wrote:
I'd rather use Matlab or Scilab for something like this but it was
instructive to use Excel.  Not too bad a way for relatively small sequences.

Everyone has Excel.  It is easy to Email a file and show them what
they can expect.  That's the whole point of modeling.  No one wants to
spend a lot of money and then be standing around saying "duh"
completely clueless as to why its not working.
FYI, Scilab and Octave are both free and replicate a large portion of
MATLAB's functionality. I use and prefer MATLAB, but there are free
alternatives. That type of environment is much better suited for
analyzing this sort of problem than Excel is.

Jason
 
On Mar 11, 11:10 am, Jason <cincy...@gmail.com> wrote:
On Mar 11, 1:48 pm, Bret Cahill <BretCah...@peoplepc.com> wrote:

I'd rather use Matlab or Scilab for something like this but it was
instructive to use Excel.  Not too bad a way for relatively small sequences.

Everyone has Excel.  It is easy to Email a file and show them what
they can expect.  That's the whole point of modeling.  No one wants to
spend a lot of money and then be standing around saying "duh"
completely clueless as to why its not working.

FYI, Scilab and Octave are both free and replicate a large portion of
MATLAB's functionality. I use and prefer MATLAB, but there are free
alternatives. That type of environment is much better suited for
analyzing this sort of problem than Excel is.
Thanks. I'll check them out. What I really need is some way to get
noise and histograms to get a better idea of what to expect.


Bret Cahill
 
On 3/11/2011 10:52 AM, Bret Cahill wrote:
If the noise is in the "padding."
I just explained why you can't let that happen..... You get temporal
overlap or "aliasing". So, it *must* be avoided - not an option really
unless you want to create anomalous examples.

The original sequence is easily determined to be:

Normalized to:
sample interval = 1 second; sample rate = 1Hz
time window = 256 seconds
frequency interval = 1/256 Hz.

and, of course, one can rescale time and frequency to suit.

The embedded signal is at 1/256 Hz with an amplitude of 2*9.2294/256 =
0.0721 and is advanced in time 62 seconds. That is a cosine with phase
of 87.68 degrees .. even though the ends are chopped off.
I have not tried to determine any phase error due to the chopping off -
there may be some but I rather doubt it.
It has a DC component of 0.00873 which is due to the ends being chopped
off asymmetrically and 2nd and 3rd harmonics noticeable due to the same
sharp edges.

If the signal is correlated with a reference cosine by multiplying in
frequency, the result is a sinewave shaped output with a peak at 62
seocnds which corresponds to the delay and phase mentioned above. The
amplitude of the peak is 9.2294 which, divided by 256 and multiplied by
2 is 0.0721 as above.

Did I get it close enough?

Fred
 
On 3/11/2011 10:48 AM, Bret Cahill wrote:

6. Inverse FFT

Inv FFT ref * ref.
??????

8. IMABS or IMREAL then ABS

and ref * ref.
?????


OK. So, I'll add some comments:

1. make a reference pulse -- a polynomial is fast and easy -- with
zeros above and below

***I used a 10-period sinusoid with 10 samples per period which filled
about 60% of the data-filled part of the arrays.

It's important to keep track of how much of what you may be calling
"padding" because phase sensitive rectification (time domain)
multiplies the noise by zero in this time period and comes out looking
pretty respectable.
***No it does not do that. The padding is just to add samples so the
sequences are long enough to be circularly convolved.
The alternative is to NOT do circular convolution, just linear temporal
convolution. Of course then we'd not be talking about FFTs. If the
sequences are zero-padded, the latter is exactly the same as the former
.... which is what you want.

One more comment about PSR:

To compare PSR with the FFT filter it should be necessary to take the
SQRT of the PSR output, or, to avoid dividing by zero, the
SQRT(ABS(PSR)).

This may or may not be true for the FFT filter.

Both the PSR and FFT filters can be compared with simple
rectification.

There may be a proof that shows the FFT filter will beat PSR every
time.
***There really IS NO "FFT filter". There is an implementation of
filtering (which can just as readily be purely in the time domain) that
is *implemented* in the frequency domain in order to drastically reduce
the number of computations necessary in many cases. Otherwise, why do it?

4. FFT both the noisy signal and ref.

***Well, really you want to compute the "time inversed complex
conjugate" of the signal and then FFT that. Since it's real, just flip
the order of the column to get the time reversal.

That didn't seem to do anything except change the sign of the final
inv FFT.
***It's the classical definition of a matched filter and, depending on
the waveform, may make a difference.
***Don't forget to zero pad enough to avoid temporal aliasing at step.
I doubled their lengths with zero-valued samples.

Are you using the highest frequency in the ref to determine that time?
***No. The highest frequency has nothing to do with it. Of course, you
have to select the proper sample interval/rate.

I'm just mindful of the formula for how many nonzero samples come out of
a convolution. For one array with M samples and another with N samples
it is: M + N -1.

If one does it in the frequency domain then the sequences must have the
same length "L" so you can compute the product in frequency element for
element.

One way to look at it is this:
To circularly convolve two sequences you want there to be a point in the
rotation where they don't overlap or, at a minimum, where they overlap
on but one sample.
If the signal is length "N" and the reference is length "M", then
The signal sequence has to have M zeros and it ends up length N + M
the reference sequence has to have N zeros and it ends up length M + N
and then it's OK for them to overlap on just one sample each and this
means we may, if we wish, subtract 1 to get M + N -1 for both sequences.

I started with a signal nonzero over M=100 samples and noise nonzero
over N=256 samples sorta with the assumption that the signal was
transient and buried *somewhere* in that noise - the alignment, etc.
which may be of interest.
So, that means there will be 355 nonzero output samples.
Since we plan to do an Excel power-of-2 length FFT, that goes to 512.
So I padded them both with zeros out to length 512.
The zeros only make room for the output.....
If you don't do this and still multiply in frequency then you get
temporal overlap in the result - which is generally viewed as at least
unfortunate...
***I'm not sure that works very well. Why not peak pick here?

Would that work for any arbitrary wave form?
***I think it depends on the objective. In some broad sense you're
measuring a correlation coefficient as a function of time. So, what
does that mean in your system context and to your objective is the
question.
- If your objective is to determine temporal placement then that means
finding a properly registered temporal peak I do believe in just about
every case.
- If your objective is to find frequency then ditto but in the frequency
domain.
- If your objective is to find amplitude then you might look in either
domain but need to be calibrated somehow - which is waveform dependent.

The peak
should occur when there's the maximum SNR and it occurs when there's the
maximum overlap in the noiseless case. There are likely more
sophisticated ways I'm sure.

Dividing the inv FFT ref by the inv FFT [cleaned up] signal at each
point in time produces a column of mostly correct answers with some
discontinuities.
***Dividing????

Note: if you use a square sine burst as a test case signal then it's
really easy to see things in all the results. The noiseless case is
interesting - yielding a triangular envelope. And that gives some idea
of what happens as you add noise, helps in scaling, etc.

Square waves seem to be harder to FFT filter. Maybe discontinuities
are harder to transform.
***Sorry, I meant a gated sine burst - thus square or gate envelope not
a square wave. i.e. a rectangular window shape.
Fred
 
If the noise is in the "padding."

I just explained why you can't let that happen..... You get temporal
overlap or "aliasing". So, it *must* be avoided - not an option really
unless you want to create anomalous examples.
Unless you know exactly when the signal cycle starts and ends noise
for a short time just before and after the signal cycle time period is
unavoidable. This can be reduced by increasing the "padding" but it
cannot be entirely eliminated.

The original sequence is easily determined to be:

Normalized to:
sample interval = 1 second; sample rate = 1Hz
time window = 256 seconds
frequency interval = 1/256 Hz.

and, of course, one can rescale time and frequency to suit.

The embedded signal is at 1/256 Hz with an amplitude of 2*9.2294/256 =
0.0721 and is advanced in time 62 seconds. That is a cosine with phase
of 87.68 degrees .. even though the ends are chopped off.
I have not tried to determine any phase error due to the chopping off -
there may be some but I rather doubt it.
It has a DC component of 0.00873 which is due to the ends being chopped
off asymmetrically and 2nd and 3rd harmonics noticeable due to the same
sharp edges.

If the signal is correlated with a reference cosine by multiplying in
frequency, the result is a sinewave shaped output with a peak at 62
seocnds which corresponds to the delay and phase mentioned above. The
amplitude of the peak is 9.2294 which, divided by 256 and multiplied by
2 is 0.0721 as above.

Did I get it close enough?
Even if you know the curves it would still be ambiguous as to what was
supposed to be the noise and what was supposed to be the signal.

The intended ref or signal was:

(6.28318-A15*2*PI()/220)*(3.14159-A15*2*PI()/220)*(A15*2*PI())/220^2

where A15 = 0, A16 = 1, A17 = 2 . . .

The intended noise was:

0.03*SIN(F15/15) + 0.03*SIN(F15/50)

where F1 = 0, F2 = 1 . . .

The correlation is so high, 0.93 so good filtering could not be
expected.


Bret Cahill
 
On 3/11/2011 2:23 PM, Bret Cahill wrote:
If the noise is in the "padding."

I just explained why you can't let that happen..... You get temporal
overlap or "aliasing". So, it *must* be avoided - not an option really
unless you want to create anomalous examples.

Unless you know exactly when the signal cycle starts and ends noise
for a short time just before and after the signal cycle time period is
unavoidable. This can be reduced by increasing the "padding" but it
cannot be entirely eliminated.

The original sequence is easily determined to be:

Normalized to:
sample interval = 1 second; sample rate = 1Hz
time window = 256 seconds
frequency interval = 1/256 Hz.

and, of course, one can rescale time and frequency to suit.

The embedded signal is at 1/256 Hz with an amplitude of 2*9.2294/256 =
0.0721 and is advanced in time 62 seconds. That is a cosine with phase
of 87.68 degrees .. even though the ends are chopped off.
I have not tried to determine any phase error due to the chopping off -
there may be some but I rather doubt it.
It has a DC component of 0.00873 which is due to the ends being chopped
off asymmetrically and 2nd and 3rd harmonics noticeable due to the same
sharp edges.

If the signal is correlated with a reference cosine by multiplying in
frequency, the result is a sinewave shaped output with a peak at 62
seocnds which corresponds to the delay and phase mentioned above. The
amplitude of the peak is 9.2294 which, divided by 256 and multiplied by
2 is 0.0721 as above.

Did I get it close enough?

Even if you know the curves it would still be ambiguous as to what was
supposed to be the noise and what was supposed to be the signal.

The intended ref or signal was:

(6.28318-A15*2*PI()/220)*(3.14159-A15*2*PI()/220)*(A15*2*PI())/220^2

where A15 = 0, A16 = 1, A17 = 2 . . .

The intended noise was:

0.03*SIN(F15/15) + 0.03*SIN(F15/50)

where F1 = 0, F2 = 1 . . .

The correlation is so high, 0.93 so good filtering could not be
expected.


Bret Cahill
I did not realize that we were playing games with anomalous situations.

I could just as well give you a signal called "11" and ask what its
constituents are.
Then answer 1,2,3,5.

No "filter" is going to separate these things out:

1) the first term in the "noise" is a sinusoid which is not resolved by
the time frame used. So, all it can do is spill into the adjacent bins.

2) the second term in the "noise" is a sinusoid which is chopped off at
1/2 period - so it splatters to the max.

3) the "noise" isn't random noise so matched filtering is not the
optimum filter. So, why are we talking about it. "Good filtering could
not be expected" indeed! We aren't even talking about what kind of
filter might be optimum for this anomalous case.

4) "noise" is generally meant to refer to random noise. This "noise"
signal is more like what one would call "interference".

5) The "signal" contains what is nearly the lowest resolvable frequency
for the time window - plus some higher frequency terms. So all it can
do is spill into adjacent bins, etc.

There's nothing to be learned from this - except that there can be
ill-posed questions and likely, trolls.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"Fred Marshall" wrote in message
news:4Tzep.9989$Lj7.5758@en-nntp-03.dc1.easynews.com...
There's nothing to be learned from this - except that there can be
ill-posed questions and likely, trolls.
Speaking of which, have a look at these stupidities

http://groups.google.ca/groups/search?hl=en&as_q=&as_epq=GymyBobism&as_oq=&as_eq=&num=100&scoring=&lr=&as_sitesearch=&as_qdr=&as_drrb=b&as_mind=1&as_minm=1&as_miny=2003&as_maxd=1&as_maxm=1&as_maxy=2008&as_ugroup=&as_usubject=&as_uauthors=m+II&safe=off


"I think MII should be careful, we can all
complain about people if we put our minds to it."

Steve
----
"If M2 dont like his posts do as we all do to trolls ignore
them or killfile them, but to try and stifle or block freedom of expression
no matter how silly is the worse crime."

The Rifleman
----
"Do you think I'm making this stuff up? If so, please just go ahead and
killfile
me. To be honest, your off topic polittical posts seem to outnumber your SW
posts by a margin of about 30 to 1.


More SW, please, or I won't be seeing any of your posts."


Michael Bryant
------


My 'GymyBobism' collection...updated daily:
=========================================
## some '#' bracketed text added for clarification ##
## all cut and paste, NO modifications of ANY kind ##
## 100 % Pure GymyBob. Accept no substitutes! ##



We need less morons like another clone of Moron II here.
## My fifteen minutes of FAME! ##


Your car alternator will charge your car batery up to 15.4 volts in
cold weather.

NTSC redefined it slightly off 60Hz so that power supply ripple
will move on the screen (two slightly black bands that scroll
up/down your screen

You sure spent a lot of time trying to convince me you don't knwo what
I am talking about...LOL

Voltage does not indicate state of charge well.

At 11.6 volts a 12v battery is about 50-70% charged still.

Polish solar panels are what americans called "flashlights"

There should be subsidies for solar panels but control of prices to boot.

Propane will disapate and freeze when it evaporates.

Gasoline is not nearly as volatile as hydrogen.

When I use pot I imagine everythging is perfect.

Many people have browsers that economize the download

Just another threading error creating confusion

Learn how to thread or sit back and watch for a few years.

Try to stay on topic and on thread too bean brain.

Perhaps try Outlook Express or another browser that knows how to
thread posts.

Bottom posting was the was in the 70s and 80s before threading
browsers were available cheap like OE

Another Forte Agent person that doesn't understand threading.

You use Mozzilla and haven't learned to thread.

Try Outlook Express so you can understand threading maybe.

I have been noticing many threading errors everywhere on Usenet lately.

People with OE don't seem to have the petty problems with subject
lines changing, intermingled posts and downloading binary files with
mixed posts, random pieces and many other problems all the nonOE
people have.

Bottom posting has been obsoletely by threading browsers.

Forwarding does not include headers.

Call your damn ISP and tell them your browser is multiple posting.

90% of the people in America have never operated a computer.

Let's say youre solar cell was trying to put out
14.3 volts DC and you stuck a 10 ohm meter in series with a charged
13.8 volt DC battery.

Your troll was too obvious. Try to engage the mark in conversation
first so there is, at least, some stake, like friendship for the
person listening. When the friendship is well developed then attack.
Not too obvious at first or you will lose your audience. This will
enhance your troll points.

I think outside opinions are worth much more than sales hype from the
company that made the product.
## Referring to *factory* charging specifications for the batteries
they make ##

This is power grid induction through capacitive proximity

You can get fooled with another ground in the house finding it's way
back to the transformer neutral.

A thought I have is rain water from a roof on a three story home
through a micro-turbine.

Setback thermostats only work efficiently for small differentials,
dependant on the time duration.

Breakers are good for one time usage of one fault and then they need
to be replaced for any warrantied usage.

If the breaker interupts a fault, it should be replaced.No warranty
will honoured after that.

I don't have a link at this time

There are no hydrogen molecules in water and the oxygen in water isn't
flammable either.

Water is inert and contains no energy to be used. Get some basic chemistry
first.

Quite simply put, for some of the boneheads here.

NiCads and NiMh batterries are designed to take a current charge forever.

Oh yeah, I can charge a battery and use it six months later fully
charged. The nicads will be cooked because you keep them on charge,
just in case you need them but when you remember them six months
later they are cooked and won't last 5 minutes in the camera.

It takes a complete idiot to deny they can short out all by
themselves. Three, loose in a bag can short themselves out.
## referring to AA batteries doing the physically impossible ##

Did they have electricity back in 1994?

I have been around so long with this stuff I believe I invented the
diode in 1941 but I am not familiar with the solar panel usage
requirements of them. (no P & N substrate explanations please. I wrote
the GE manual...LOL)

NOTE: do not pass ground wires through metal holes or cable clamps
with two screws on a metal surface.

There is **NOT*** enough energy in a lightning bolt to power your
house for more than an hour...if that. Do the math.
The figures escape me but let's say it puts out a roughly MWatt of
power for 100 nanoseconds?
100 x 10-9 x 1 x 106 / 3600 (sec/hr) = 0.0027 wH
oooops.... Wouldn't light your home for a 1/2 second.
OK..OK.. multiply the figures time 100 or 1000. Now it would light a
100W bulb for 1 second.

The IEEE-232 standards were never followed or known by many.

Fossil fuels are still renewable and being cxreated as we speak.

Children are venerially created.

If you want to discuss this then fine, otherwise go fuck yourself like
your mother did.

Can you let go of my dick before it explodes on ya, goofball?

Petroleum is not related to Natural gas.

I would rather work at my $100/hour job than at chopping wood for
hours to save $3/hour

I have no license, I wire and inspect other's wiring for a job and
work for a medium size electrical utility.

As a design engineer of transformers for 10 years I happen to know you
are full of shit.

I am a Protection & Control Tech by profession and have experience
with control systems

Try spelling "bus" correctly! Maybe your brain will start again.
Probaby not, you fucking loser.
## Referring to the correctly spelled word 'buss' as used in real
electrical terminology ##
## http://tinyurl.com/5ctml ##

X10 signals are transmitted just after the voltage waveform zero
crossing. This is in order to avoid conflicts with SCR and Triac peak
waveform switching spikes from load type devices such as lamp dimmers.
## control module misinformation ##

Besides when they on any line they will pull of the meter as a
disconnect point.
## speaking of power line guys miles away removing YOUR electrical
meter for THEIR safety ##

My workplace has been throwing out huge digitizing pallettes (like 24
x 36" units)
## in alt.sewing.mach-embroider ##

The majority prefers top posting.

Not one of your suggesters listened to what the OP requested...LOL

Get your tear ducts flushed by a knowledgeable optometrist.

Not many materials have the huge exponential resistance/heat curve
aluminum does. Overload doesn't make it glow like copper...it flashes
and explodes.

A bathroom fan motor would never push hot air down ten feet or cold up
ten feet.

Bathroom fans have a hard time pushing 55 cfm through a 3-4" pipe 20
horizontal feet. They are made to vent smells and humid air horizontally
only.

Why not spend the money on a contract with the grid company and get an
exclusive line to your house and never have brownouts.

Usenet rules dictate top posting for readability

Many cell modems are set up to filter bottom posts out.

Cell modems do not cut off anything.

What security flaws.
##referring to Outlook Express##

10 pounds per gallon Imperial. That gallon is totally unique to the
US....ooops..I think all gallons are unique to the US now.

The standard Imperial gallon the whole world used weighs 10 pounds
exactly.

The copper isn't worth more than 5 cents per pound. It is classed a
mixed copper and nobody wants it.

Hey moron! The copper is considered "mixed" copper and is worth about
$0.02 per pound, if he seperates it all.

Just don't ever lose weight. Toxins are stored in your fat cells.

Did you know, **NO***, I repeat ***NO*** death has ever been related
to PCBs?

Insulated square copper wires from a dry transformer are not 99%
copper and take a lot of work to remove the insulation.

I have tonnes of insulated copper wire if you want it. I think you
could almost have for the picking it up. How many bins can you take
per year

50 lbs? We have it by the bin full. Mostly #6 to 650 MCM. I beleive
you would have to leave a bin and then pick it up full later to
compete with the current scrapper.

Can't this tranformer be used by somebody to generate a second 120V
from a single phase 120V inverter? It sounds pretty beefy.

BTW: once you knock the wedge out of the coil form the laminations
will be easier to get out. This keeps them from buzzing until the
varnish and other impregnations go into it.

All you guys have a bad Christmas or Jewish and didn't see Santa or
something?

Run each signal twisted with a ground for noise. RD twisted with gnd
as a pair, TD twisted around ground as a pair etc... This means
signal/logic ground not power ground or case ground, if they are
different. Do not
connect the other ends of the ground conductors.

Tar pitch in a flourescent ballast does ***NOT*** contain PCBs and
probably never did.

Religion is not genetic or even herodigious

I believe the warmest part of the lake is just below the ice. As the
water frezes it rises to the top and joins the other ice formations.

Gel cell won't cut it when it comes to putting out 100A or more. They
cook in one spot and the rest of the electrolyte doesn't circulate
fast enough.

There is nothing standard about USanian measurements. They changed
their sizes to avoid trading with the rest of the world. This worked
for a few centuries but the rest of the world moved on to the metric
system to avert the confusion the US caused.

Ever put your ohmmeter (do I need to explain an ohmmeter also?) across
a capacitor? It measures infinity after charging to the supply voltage
because the electrolyte is an insulator.

Electrolytes are not conductors of electricity in a capacitor.

If the electrolyte conducted it would be a resistor.

I doubt they are 4 farads. More likely 4 microfarads uf.
## referring to 4000mfd caps ##

Sometimes it is an ego boost to have these so-called "professionals"
come and beg for information because they can't our toys do what the
good guys can but I would never hire them given a choice.

Do you measure altitude in degrees? Many aeronautical people would
disagree with you.
## referring to solar azimuth/altitude thread ##

My house is filled with motion detectors. They don't all operate
lights. They mostly signal my house control computer and it decides
what to do and when.

Enlighten please (like it really matters...LOL)

I will hand stitch my embroidery before I would pay that kind of
money...LOL

A 50Hz transformer needs double the iron a 60Hz transformer needs for
the same VA capacity.

Does it test CTs with real current or just voltage?

It doesn't really matter where the secondary current comes from,
secondary exciting or primary current exciting, the voltage developed
or excited across it will be about the same.
## talking about an OPEN circuit CT transformer ##

High voltage spikes want to keep going at the end and this is where
your saturating core transformer core is located behind the fuse.

Moving a kill-a-watt unit around is like using it on somebody else's
house and telling the person's load.

oooops. A flourescent with a filament?
## not knowing how most fluorescents start up ##

You are a stupid basterd.

Ever considered anxiety medication? Chest pains for a man is a classic
symptom.

When confronted with many websites stating the otherwise he won't
address the issue but repeats his crap again like a child stamping his
feet.
## Oh, the Irony! ##

What are you doing up at this ungawdly hour? I just got finished
embroidering about 10 items, including a flight bag for golf clubs.
## in alt.sewing.mach-embroider ##

I just love women with front loading bobbins.
## in alt.sewing.mach-embroider ##

I doubt a 6 needle machine would be faster than a 1 needle machine
unless you do repetitive patterns.
## in alt.sewing.mach-embroider ##

I had many problems with this and damaged my machine a few times. It
was the needles. Find ones that have very little "hip" bump around the
eye of the needle.
## in alt.sewing.mach-embroider ##

I have found doctors absolutely ignorant and totally obstinet on
these kind of issues.

I put my first child on Ritalin for a year or so when quite young. It
beat going to prison for beating him black and blue.

I made a big mistake and should have "drugged" all of my children the
same.

I did the chem.cut medication stuff for a few years with my first
child and then found Naturopathic Doctors using homeopathy to get more
lasting relief.

Homeopathics saved me thousands of dollars for operations I did not
have on my children

Accupunture worked for my 1 and two year old children for ailments
after the medical doctors could do nothing for.

Placebo is a completely natural cure for many ailments.

Polio Vaccine? They stopped giving that one long before HIV was invented.

You have no idea what you are talking about and either does anybody
else here.

See if you can replace it with a thermal acting unit. They have a
rachet on a shaft that holds thew contacts closed.
## confusing motor overload with breaker ##

What are you doing in my group?

Milk is just plain poison for humans.

I am not a chemist but I know that cow's milk calcium molecules are a
huge irritant to human digestion and usually results in calcium
deficiencies

See an accupunturist for the pain and circulation
See a chiropractor to keep the structure good.
See a naturopathic doctor for the chemical imbalance.
See a medical doctor for a some poison that will make her life shorter.

Even an honest Doctor will take yoy they arte totally ignorant of
nutrition.

The medical doctors will play the time game and probably just let him
die after removing half his organs because they may be a problem.

Some things mankind should just not eat too much of and it isn't meat
typically and this may not be consistent for all people.

Do not listen to the stories of addiction. Yes, they are tough to stop
but so is insulin for a diabetic. I have stopped taking mine and it
wasn't that bad but after months of regressing I chose to return like
the other half the population.

Make sure your wrists are well warmed up before putting sudden jerky
movements to them.

Make up your mind before you mouth off like the usual Internet piece
of shit. This is a rough group and if you had followed the usual
recommendations you would have known that and have nothing to say
about it.
## in misc.kids.health, alt.support.breast-implant,
misc.health.alternative ##

Bad practice to ground yourself when working on electronics. It
increases the chance of injury or death by electrical shock and also
increases the chance of static discharge to the circuit chips. Ground
is a potential too.

Oink...Oink...just take it out. What could be simpler?
## in soc.support.fat-acceptance, alt.support.big-folks ##

No hyphen in the word multi-syllabic.

## Gymy Bob's endorsement of anal sex censored##
## sorry, I have my limits ##

A complete fucking idiot spurted out his piehole:
## in misc.health.alternative ##

I was born depressed and never realized until about 3 years ago. I am
52 and went for medication because of anxiety.

The English can't stand each other, let alone other cultures.
If you don't believe me brother just ask the rest of my family that I
disowned.

I find most Americans likeable and they find me likeable after they
open their wallets far enough to make me that way.
How many american dollars will it take to make you suck their dicks?
## in alt.support.attn-deficit, misc.health.alternative ##

How much for a blow job?

Believe me, "America" is so far behind on internet usage over many
South American countries. They just don't happen to post in English
and not many of you could possibly understand other languages even exist.

WTF is CBT? Chekaslovakia Book Therapy?

Try your left hand. It feels like somebody else's hand sometimes.
## pdaxs.services.massage, misc.health.alternative, alt.backrubs,
alt.health.massage-therapy ##

OK, you're not a moron. You are above average for Nova Scotia.

Another tidbit for the brainless twit with the big mouth here

Pehaps magnesium supplementation would allow these buffoons to utilize
some
of their already overloaded calcium intake.

This guy is a total buffoon and has no knowledge of any part of his
own sentence.

Where should you shove it?

Fish oil is mainly responsible for your placebo also.
## in misc.health.alternative##

After disassembling Bill Gates' 6800 Basic back in the 70s I knew he
was a dirty software scoundrel.

The government makes more on the taxes than the tax rate when this is
done.

Be blabest tofart.
## ???? in alt.comp.periphs.dcameras ##

Blood may be kept at a stable 7.4 pH but a piece of copper wire passes
electricity through it even though the number of electrons remains
constant.
## in misc.health.alternative ##

I have had amazing effects from some homeopathic remedies and others
did nothing.

These homeopathic know-it-alls drive me crazy with their 1880 knowledge.

Sorry, but testing has proven homeopathic remedies to be effective
remedies.

I have taken a few homeopathic remedies that taste like crap. Funny
how pure
water could do that.

Homeopathic remedies are very toxic substances and used because of
their toxic properties.

Standard homeopathic science.

Your ignorance of homeopathy does not mean it is useless.

Everybody always follows the screaming, left-wing, maniac, tooting we
are all going to die by doing another therapy.

I have had achilles tendonitus for the past 2-3 years now. I got rid
of it on one side by grinding out the bones spurs underneath with the
side of a screwdriver blade and lots of oil.

GET OFF THE WHEAT, CORN & OATS!!!

It doesn't matter how well it works if the doctor doesn't say so (with
his two years of college) then it just ain't so.

Heat pumps are 300% efficient when the weather is fine but the
compressor motors? hmmm about 60%.

You are obviously a moron and you keep repeating it here.
## referring to my corrections of his postings ##




mike


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJNeOvNAAoJEJXfKw5kUPt7o8gH/1n0Fa7FLoACjUhpMP3ox8Ko
355UKPbNnF5vkyojl6r+N/A9kniw60sp6t2Lo1AYVJ0vlLff7ZUJtsh5PlnUD1y2
/hegz94 m II LEARNS A LESSON - LYING ABOUT OTHERS N4pmg94mglzY
dmUEROzn3BcU48ZL9IlvLjqT2l6T89Z6+UHQGn37+wuIRFDXDSB/rQHJNBJvNQBn
zDPpru6m8lGnhahGG9Uud/gGE3A65Sry7Uk5qObpubObq+HR9VXIgVpmP4TtHFsK
gjfla8MKe90HbI3DmGB3pNJsTFHV0Gw13E6OFjgaM40wMCPOmw5G1b3KKf1PYK0=
=dYmZ
-----END PGP SIGNATURE-----
 
If the noise is in the "padding."

I just explained why you can't let that happen.....  You get temporal
overlap or "aliasing".  So, it *must* be avoided - not an option really
unless you want to create anomalous examples.

Unless you know exactly when the signal cycle starts and ends noise
for a short time just before and after the signal cycle time period is
unavoidable.  This can be reduced by increasing the "padding" but it
cannot be entirely eliminated.

The original sequence is easily determined to be:

Normalized to:
sample interval = 1 second; sample rate = 1Hz
time window = 256 seconds
frequency interval = 1/256 Hz.

and, of course, one can rescale time and frequency to suit.

The embedded signal is at 1/256 Hz with an amplitude of 2*9.2294/256 > >> 0.0721 and is advanced in time 62 seconds.  That is a cosine with phase
of 87.68 degrees .. even though the ends are chopped off.
I have not tried to determine any phase error due to the chopping off -
there may be some but I rather doubt it.
It has a DC component of 0.00873 which is due to the ends being chopped
off asymmetrically and 2nd and 3rd harmonics noticeable due to the same
sharp edges.

If the signal is correlated with a reference cosine by multiplying in
frequency, the result is a sinewave shaped output with a peak at 62
seocnds which corresponds to the delay and phase mentioned above.  The
amplitude of the peak is 9.2294 which, divided by 256 and multiplied by
2 is 0.0721 as above.

Did I get it close enough?

Even if you know the curves it would still be ambiguous as to what was
supposed to be the noise and what was supposed to be the signal.

The intended ref or signal was:

(6.28318-A15*2*PI()/220)*(3.14159-A15*2*PI()/220)*(A15*2*PI())/220^2

where A15 = 0, A16 = 1, A17 = 2 . . .

The intended noise was:

0.03*SIN(F15/15) + 0.03*SIN(F15/50)

where F1 = 0, F2 = 1 . . .

The correlation is so high, 0.93 so good filtering could not be
expected.

Bret Cahill

I did not realize that we were playing games with anomalous situations.
That was the worst case -- something Japanese engineers can be
expected to consider when rebuilding their nuclear power plants.

There is a real duality with conservative engineers spending so much
time considering the "worst possible scenario." It may prevent them
from trying more things that should be tried.

It can turn into something contrary to the "optimistic" component of
Warren Buffet's secret to success, if not the "open minded" part.

Basically engineers need to be able to do a lot of cost-benefit risk
analysis very quickly and intuition even judgement won't always help.

But if you know you are going to be hung in a fortnight anyway what
have you got to lose?

I could just as well give you a signal called "11" and ask what its
constituents are.
Then answer 1,2,3,5.

No "filter" is going to separate these things out:
It probably wouldn't appear on a histogram.

1) the first term in the "noise" is a sinusoid which is not
resolved by
the time frame used.  So, all it can do is spill into the adjacent bins..

2) the second term in the "noise" is a sinusoid which is chopped off at
1/2 period - so it splatters to the max.

3) the "noise" isn't random noise so matched filtering is not the
optimum filter.  So, why are we talking about it.  "Good filtering could
not be expected"  indeed!  We aren't even talking about what kind of
filter might be optimum for this anomalous case.

4) "noise" is generally meant to refer to random noise.  This "noise"
signal is more like what one would call "interference".

5) The "signal" contains what is nearly the lowest resolvable frequency
for the time window - plus some higher frequency terms.  So all it can
do is spill into adjacent bins, etc.

There's nothing to be learned from this
There may be a need to sample over more time, more cycles. Keep
comparing the new data with the old and see if it's going to converge
before everyone dies of old age.

You used a lot of cycles with a few samples/cycle. I used one cycle
with a lot of samples.

Taking more samples/cycle helps up to a certain limit. I just tried
8, 16 and 32. The frequencies/cell were halved then quartered to get
the same noise and same signal for each test.

But if the number of samples/cycles is limited by the system and you
have the time to sample more cycles, then more cycles is the way to
go. Then there will be little chance of significant correlation
between the noise and the signal.

If you know that the noise and signal are "well behaved" maybe some
kind of regression fit would provide more points for the FFT.

Is that a common tactic?


Bret Cahill
 
On 3/12/2011 10:09 AM, Bret Cahill wrote:

There may be a need to sample over more time, more cycles. Keep
comparing the new data with the old and see if it's going to converge
before everyone dies of old age.

You used a lot of cycles with a few samples/cycle. I used one cycle
with a lot of samples.

Taking more samples/cycle helps up to a certain limit. I just tried
8, 16 and 32. The frequencies/cell were halved then quartered to get
the same noise and same signal for each test.

But if the number of samples/cycles is limited by the system and you
have the time to sample more cycles, then more cycles is the way to
go. Then there will be little chance of significant correlation
between the noise and the signal.

If you know that the noise and signal are "well behaved" maybe some
kind of regression fit would provide more points for the FFT.

Is that a common tactic?


Bret Cahill
One needs to set both the sample rate and the temporal window according
to what's expected.
- the sample rate well above the Nyquist limit .. how much above depends
on the application. 10 samples per cycle is a lot really.
- the temporal window large enough to resolve the smallest frequency
and/or the smallest distance between frequency components that you must
resolve.
One can go beyond this in particular applications and one can apply
"tricks" which seems well beyond this discussion.
- and, to do circular convolution or "frequency domain filtering" one
has to zero pad the data sequences to avoid temporal overlap in the
result. I did that with your signal and interferences.

Some observations:
- If you line up a sequence which is "the signal" alongside a sequence
which is that same signal plus noise - however you define the noise -
such that the signal buried in the noise is lined up with the pure
signal, then that alignment represents the one position of the
signal/replica/reference that will generally correlate best with S+N.
- So that one alignment generates but one output point (multiply and
sum) in a convolution and it should result in the highest output.
- It's not so easy to do convolution in Excel in the time domain - so
your notion of doing the exact same thing in the frequency domain with
Excel is a good one.
- The matched filter impulse or unit sample response is the time
reversal of the signal. The method described above already does that
because the objective is to temporally align all the signal components.
They align when the last part of the signal just arrives in the filter
and the filter is filled with the signal with the first part of the
signal at the "end" of the filter.
Obviously, this makes little or no difference with a tone burst at a
single frequency unless there are very few cycles - as in the case of
your polynomial "signal".

To visualize that you might want to do this:
Draw a FIR filter as a transversal filter with delay blocks. Input on
the left, output on the right as usual.
Show the coefficient values along the length of the filter on the
diagram as vertical bars.
This "plot" of the coefficients goes from left to right and is the
time-reversal of the unit sample response of the filter.
So, the filter structure matches the signal structure and the unit
sample response is a time reversed version of the structure looking left
to right.

The output a matched filter with the signals and interferences you gave
does produce a maximum at t=0. (This done by padding signal and S+N
with 256 zeros before the FFTs).

However, the output of the matched filter doesn't necessarily
approximate the signal waveshape.
A tone burst will become a tone triangle .. and so forth.

If there are interfering sources with energy at the same frequencies as
the signal, then separation isn't generally possible.

If you know that the noise and signal are "well behaved" maybe some
kind of regression fit would provide more points for the FFT.

Is that a common tactic?
For periodic signal in random noise (a VERY common case) take a look at
"autocorrelation". I think that's what you're looking for IF that's a
reasonable model of the situation. But for a periodic signal in
periodic interference as you presented, how do you tell the difference?

Fred
 
There may be a need to sample over more time, more cycles.  Keep
comparing the new data with the old and see if it's going to converge
before everyone dies of old age.

You used a lot of cycles with a few samples/cycle.  I used one cycle
with a lot of samples.

Taking more samples/cycle helps up to a certain limit.  I just tried
8, 16 and 32.  The frequencies/cell were halved then quartered to get
the same noise and same signal for each test.

But if the number of samples/cycles is limited by the system and you
have the time to sample more cycles, then more cycles is the way to
go.  Then there will be little chance of significant correlation
between the noise and the signal.

If you know that the noise and signal are "well behaved" maybe some
kind of regression fit would provide more points for the FFT.

Is that a common tactic?

Bret Cahill

One needs to set both the sample rate and the temporal window according
to what's expected.
- the sample rate well above the Nyquist limit .. how much above depends
on the application.  10 samples per cycle is a lot really.
- the temporal window large enough to resolve the smallest frequency
and/or the smallest distance between frequency components that you must
resolve.
One can go beyond this in particular applications and one can apply
"tricks" which seems well beyond this discussion.
- and, to do circular convolution or "frequency domain filtering" one
has to zero pad the data sequences to avoid temporal overlap in the
result.  I did that with your signal and interferences.

Some observations:
- If you line up a sequence which is "the signal" alongside a sequence
which is that same signal plus noise - however you define the noise -
such that the signal buried in the noise is lined up with the pure
signal, then that alignment represents the one position of the
signal/replica/reference that will generally correlate best with S+N.
- So that one alignment generates but one output point (multiply and
sum) in a convolution and it should result in the highest output.
- It's not so easy to do convolution in Excel in the time domain - so
your notion of doing the exact same thing in the frequency domain with
Excel is a good one.
- The matched filter impulse or unit sample response is the time
reversal of the signal.  The method described above already does that
because the objective is to temporally align all the signal components.
They align when the last part of the signal just arrives in the filter
and the filter is filled with the signal with the first part of the
signal at the "end" of the filter.
Obviously, this makes little or no difference with a tone burst at a
single frequency unless there are very few cycles - as in the case of
your polynomial "signal".

To visualize that you might want to do this:
Draw a FIR filter as a transversal filter with delay blocks.  Input on
the left, output on the right as usual.
Show the coefficient values along the length of the filter on the
diagram as vertical bars.
This "plot" of the coefficients goes from left to right and is the
time-reversal of the unit sample response of the filter.
So, the filter structure matches the signal structure and the unit
sample response is a time reversed version of the structure looking left
to right.

The output a matched filter with the signals and interferences you gave
does produce a maximum at t=0.  (This done by padding signal and S+N
with 256 zeros before the FFTs).

However, the output of the matched filter doesn't necessarily
approximate the signal waveshape.
A tone burst will become a tone triangle .. and so forth.

If there are interfering sources with energy at the same frequencies as
the signal, then separation isn't generally possible.

 > If you know that the noise and signal are "well behaved" maybe some
 > kind of regression fit would provide more points for the FFT.
 
 > Is that a common tactic?

For periodic signal in random noise (a VERY common case) take a look at
"autocorrelation".  I think that's what you're looking for IF that's a
reasonable model of the situation.  But for a periodic signal in
periodic interference as you presented, how do you tell the difference?

Fred
I'll get back to this later.


Bret Cahill
 

Welcome to EDABoard.com

Sponsor

Back
Top