Vladimir Vassilevsky wrote: ..> > accuracy ~ log(SNR) > >> This is when >> you are trying to estimate the frequency of 1 particular signal. > > Engineers don't use words like "many, little, mostly, very, much". > >I guess engineers "do it with a ~". People don't use those words as a substitute for numbers, but to indicate in general terms how important they think it might be to attend to those numbers or aspects; and, who knows, maybe even to get something a little more precise than a ~! Richard Dobson
Improving Frequency Resolution in Time Constrained Signals
Started by ●October 30, 2009
Reply by ●November 2, 20092009-11-02
Reply by ●November 2, 20092009-11-02
On Oct 30, 6:22=A0am, "tzoom84" <tszumow...@gmail.com> wrote:> For simplicity, suppose we are interested in detecting presence of either=a> 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the > signal is well oversampled, but is not sampled long enough in time to > provide clean frequency resolution. > > Question is: Are there particular techniques to improve frequency > resolution for oversampled, but time constrained, signals? > > (One random thought considered was to decimate at different points in > time, say take every tenth sample starting at sample #1, then every tenth > starting at sample #2, to create 10 independent signals of same length. > Then concatenate to artificially lengthen the same signal. But I wasn't > sure if that would increase resolution since it doesn't add any new > data....) > > Thanks!If you're just looking to differentiate between the 3 signals, make a file with 1 cycle of each signal (500Hz 1000Hz and 1500Hz), then do a correlation between the 3 "standard" 1-cycle files and the unknown input. Don't know if it will work, but I think it has a good chance. Maurice Givens
Reply by ●November 2, 20092009-11-02
On Oct 30, 7:57=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 30 Okt, 13:22, "tzoom84" <tszumow...@gmail.com> wrote: > > > For simplicity, suppose we are interested in detecting presence of eith=er a> > 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at > > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is > > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, th=e> > signal is well oversampled, but is not sampled long enough in time to > > provide clean frequency resolution. > > > Question is: Are there particular techniques to improve frequency > > resolution for oversampled, but time constrained, signals? > > No, there aren't. > > However, a far more interesting question is wheteher it is > possible to come up with a guesstimate about which of the > candidate sinusoidals is present, given data as stated. > > RuneIf the signals are guaranteed to be at 500 Hz, 1 kHz and 1.5 kHz *exactly* (or as near enough as makes no practical difference), the noise is small enough to not affect the results very much, and we have samples spanning 1 millisecond, then take a look at the first and 100th sample (actually 101st sample would be even better since it is exactly 1 millisecond after the 1st). If the input is 500 Hz, then the two samples (1st and 100th or 101st) will be negatives of each other. If the sample values are large in magnitude, the matter can be regarded as settled. If the sample values are close to 0, check the 50th sample: it should be large in magnitude. If the first and 100th (or 101st) sample are nearly the same and of large magnitude, then we don't have a 500 Hz wave; it is the 1 kHz wave that has gone through nearly one whole period (or exactly one period) in one millisecond. If the 1st and 100th sample values are small, check the 50th sample: it should also be small in magnitude. If one of the first and 100th sample is large and the other is small, we have the 1.5kHz wave. But I don't think this what the OP is looking for. --Dilip Sarwate the other is small, it
Reply by ●November 2, 20092009-11-02
> On Oct 30, 7:57=A0am, Rune Allnor <all...@tele.ntnu.no> wrote: > No, there aren't. > > However, a far more interesting question is wheteher it is > possible to come up with a guesstimate about which of the > candidate sinusoidals is present, given data as stated. >The following is a corrected version of the method suggested just a while ago. Suppose the signals are guaranteed to be at 500 Hz, 1 kHz and 1.5 kHz *exactly* (or as near enough as makes no practical difference), the noise is small enough to not affect the results very much, and we have 101 samples spaced 10 microseconds apart, and thus the first sample x[1] and the last sample x[101] are separated by exactly 1 millisecond. In one millisecond, a 1.5 kHz sinusoidal signal completes exactly 1.5 cycles. Thus, it must be that the following is true: x[1] =3D -x[101] Furthermore, x[34] is almost exactly equal to -x[1] and x[67] is almost exactly equal to x[1]. If all these conditions hold, then we have detected that it is the 1.5 kHz tone that is present. If the above conditions do not hold, but instead it is true that x[1] =3D x[101] =3D -x[51], then we have detected the presence of the 1 kHz tone which completes one cycle in 1 millisecond. Finally, if both sets of conditions do not hold, but it is true that x[1] =3D -x[101], we have detected the presence of the 500 Hz tone. --Dilip Sarwate
Reply by ●November 5, 20092009-11-05
On Oct 31, 3:42�am, "Ron N." <rhnlo...@yahoo.com> wrote:> On Oct 30, 5:22�am, "tzoom84" <tszumow...@gmail.com> wrote: > > > For simplicity, suppose we are interested in detecting presence of either a > > 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at > > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is > > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the > > signal is well oversampled, but is not sampled long enough in time to > > provide clean frequency resolution. > > > Question is: Are there particular techniques to improve frequency > > resolution for oversampled, but time constrained, signals? > > If it's an either-or question, you don't need resolution, you just > need > to reject the 2 less probable alternatives. �1 kHz is periodic in the > data aperture, so will show a clean peak in a DFT. �If the clear 1 kHz > peak isn't there, then you can try rejecting the 1.5 kHz choice if the > (maybe low passed) waveform doesn't show enough inflection points > and zero crossings spaced about the appropriate distances apart. > What's left if you don't see any of the above is 0.5 kHz. > > And if there's no noise, you can just randomly pick 3 points and > try to solve the equation for a sinusoid with 3 unknowns. �Repeat > if necessary.Better to use all of the points and solve the linear set of 100 equations for the magnitudes of sine and cosine given one of the 3 candidate frequencies. The classification is made to the candidate with the maximum squared amplitude A^2 + B^2 A*cos(2*pi*f*t) + B*sin(2*pi*f*t) = m(t) Alternatively, you can solve for all 6 coefficients simultaneously. Piece of cake? Greg
Reply by ●November 5, 20092009-11-05
Greg Heath wrote:> On Oct 31, 3:42 am, "Ron N." <rhnlo...@yahoo.com> wrote: >> On Oct 30, 5:22 am, "tzoom84" <tszumow...@gmail.com> wrote: >> >>> For simplicity, suppose we are interested in detecting presence of either a >>> 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at >>> 100kHz. But lets say we only have 100 samples, or 1ms of data. This is >>> anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the >>> signal is well oversampled, but is not sampled long enough in time to >>> provide clean frequency resolution. >>> Question is: Are there particular techniques to improve frequency >>> resolution for oversampled, but time constrained, signals? >> If it's an either-or question, you don't need resolution, you just >> need >> to reject the 2 less probable alternatives. 1 kHz is periodic in the >> data aperture, so will show a clean peak in a DFT. If the clear 1 kHz >> peak isn't there, then you can try rejecting the 1.5 kHz choice if the >> (maybe low passed) waveform doesn't show enough inflection points >> and zero crossings spaced about the appropriate distances apart. >> What's left if you don't see any of the above is 0.5 kHz. >> >> And if there's no noise, you can just randomly pick 3 points and >> try to solve the equation for a sinusoid with 3 unknowns. Repeat >> if necessary. > > Better to use all of the points and solve the linear set > of 100 equations for the magnitudes of sine and cosine > given one of the 3 candidate frequencies. The > classification is made to the candidate with the > maximum squared amplitude A^2 + B^2 > > A*cos(2*pi*f*t) + B*sin(2*pi*f*t) = m(t) > > Alternatively, you can solve for all 6 coefficients > simultaneously. > > Piece of cake?Sure. You must realize that you propose calculating three DFT bins and ignoring the rest. How much quicker is than than calculating 100 bins with FFT? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 5, 20092009-11-05
Greg Heath <heath@alumni.brown.edu> writes:> On Oct 31, 3:42 am, "Ron N." <rhnlo...@yahoo.com> wrote: >> On Oct 30, 5:22 am, "tzoom84" <tszumow...@gmail.com> wrote: >> >> > For simplicity, suppose we are interested in detecting presence of either a >> > 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at >> > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is >> > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the >> > signal is well oversampled, but is not sampled long enough in time to >> > provide clean frequency resolution. >> >> > Question is: Are there particular techniques to improve frequency >> > resolution for oversampled, but time constrained, signals? >> >> If it's an either-or question, you don't need resolution, you just >> need >> to reject the 2 less probable alternatives. 1 kHz is periodic in the >> data aperture, so will show a clean peak in a DFT. If the clear 1 kHz >> peak isn't there, then you can try rejecting the 1.5 kHz choice if the >> (maybe low passed) waveform doesn't show enough inflection points >> and zero crossings spaced about the appropriate distances apart. >> What's left if you don't see any of the above is 0.5 kHz. >> >> And if there's no noise, you can just randomly pick 3 points and >> try to solve the equation for a sinusoid with 3 unknowns. Repeat >> if necessary. > > Better to use all of the points and solve the linear set > of 100 equations for the magnitudes of sine and cosine > given one of the 3 candidate frequencies. The > classification is made to the candidate with the > maximum squared amplitude A^2 + B^2I agree with your approach except in this final step. Instead I would form the mean-square error of the estimate, ms(y_k-x), where y_k is the reconstructed estimated signal for frequency k (k = 1, 2, 3) and x is the input signal, for each of the three candidate frequencies and choose the minimum, k = argmin_k(ms(y_k - x)). -- Randy Yates % "She has an IQ of 1001, she has a jumpsuit Digital Signal Labs % on, and she's also a telephone." mailto://yates@ieee.org % http://www.digitalsignallabs.com % 'Yours Truly, 2095', *Time*, ELO
Reply by ●November 5, 20092009-11-05
On Nov 5, 6:44�pm, Greg Heath <he...@alumni.brown.edu> wrote:> On Oct 31, 3:42�am, "Ron N." <rhnlo...@yahoo.com> wrote: > > > > > > > On Oct 30, 5:22�am, "tzoom84" <tszumow...@gmail.com> wrote: > > > > For simplicity, suppose we are interested in detecting presence of either a > > > 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at > > > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is > > > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the > > > signal is well oversampled, but is not sampled long enough in time to > > > provide clean frequency resolution. > > > > Question is: Are there particular techniques to improve frequency > > > resolution for oversampled, but time constrained, signals? > > > If it's an either-or question, you don't need resolution, you just > > need > > to reject the 2 less probable alternatives. �1 kHz is periodic in the > > data aperture, so will show a clean peak in a DFT. �If the clear 1 kHz > > peak isn't there, then you can try rejecting the 1.5 kHz choice if the > > (maybe low passed) waveform doesn't show enough inflection points > > and zero crossings spaced about the appropriate distances apart. > > What's left if you don't see any of the above is 0.5 kHz. > > > And if there's no noise, you can just randomly pick 3 points and > > try to solve the equation for a sinusoid with 3 unknowns. �Repeat > > if necessary. > > Better to use all of the points and solve the linear set > of 100 equations for the magnitudes of sine and cosine > given one of the 3 candidate frequencies. The > classification is made to the candidate with the > maximum squared amplitude A^2 + B^2 > > A*cos(2*pi*f*t) + B*sin(2*pi*f*t) = m(t) > > Alternatively, you can solve for all 6 coefficients > simultaneously. > > Piece of cake?Yeah For SNR = 0.5 I was able to obtain a correct classification rate exceeding 99% for 10,000 trials at each frequency. Signal phase was uniform random and the noise was normal random. The resulting count confusion matrix is confus = 9922 78 0 68 9902 30 0 26 9974 elapsedtime = 10.0160 Note that the 1kHz wave was misclassified as a 500Hz wave more than twice (68/30) as many times as it was misclassified as a 1.5kHz wave. Also, the 500Hz wave was missclassified as a 1kHz wave three times as much as the 1.5kHz wave was classified as 1kHz. I don't think that simultaneous solutions for the 6 [A B] amplitudes would significantly degrade performance. ... Jerry would like a time comparison if A and B are obtained by an FFT. Will do. Hope this helps. Greg
Reply by ●November 6, 20092009-11-06
"contact" <contact@invalid.com> wrote in message news:cuWGm.66569$R52.45806@newsfe24.ams2...> "tzoom84" <tszumowski@gmail.com> wrote in message > news:OaOdnfUdh9nrR3fXnZ2dnUVZ_uqdnZ2d@giganews.com... >> For simplicity, suppose we are interested in detecting presence of either >> a >> 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at >> 100kHz. But lets say we only have 100 samples, or 1ms of data. This is >> anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the >> signal is well oversampled, but is not sampled long enough in time to >> provide clean frequency resolution. >> >> Question is: Are there particular techniques to improve frequency >> resolution for oversampled, but time constrained, signals? >> >> (One random thought considered was to decimate at different points in >> time, say take every tenth sample starting at sample #1, then every tenth >> starting at sample #2, to create 10 independent signals of same length. >> Then concatenate to artificially lengthen the same signal. But I wasn't >> sure if that would increase resolution since it doesn't add any new >> data....) >> Thanks! > > Can you store a history of samples in memory, like a buffer of 2048 > samples perhaps?I think you guys might have been trolled a little bit, the OP doesn't state that time accuracy was important. Does he mean he can't store sample history?
Reply by ●November 6, 20092009-11-06
On Oct 30, 7:22�am, "tzoom84" <tszumow...@gmail.com> wrote:> For simplicity, suppose we are interested in detecting presence of either a > 500Hz, 1kHz, and a 1.5kHz sinusoid in a signal that is being sampled at > 100kHz. But lets say we only have 100 samples, or 1ms of data. This is > anywhere between 0.5 to 2 'cycles' of the sinusoids. So essentially, the > signal is well oversampled, but is not sampled long enough in time to > provide clean frequency resolution. > > Question is: Are there particular techniques to improve frequency > resolution for oversampled, but time constrained, signals? > > (One random thought considered was to decimate at different points in > time, say take every tenth sample starting at sample #1, then every tenth > starting at sample #2, to create 10 independent signals of same length. > Then concatenate to artificially lengthen the same signal. But I wasn't > sure if that would increase resolution since it doesn't add any new > data....) > > Thanks!Have you considered parametric approaches to spectral estimation such as MUSIC ?? It might not be a bad idea especially if you SNR is high enough.






