Extracting a fourier series of pure tones from a signal

Click For Summary

Discussion Overview

The discussion revolves around the extraction of Fourier series of pure tones from a signal, focusing on error minimization techniques and the challenges associated with deriving amplitude and phase angle from a set of data points. Participants explore methods for reducing noise and artifacts in signal processing, particularly in the context of image processing and FFT (Fast Fourier Transform).

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes minimizing the error function involving the input signal and a cosine function to extract pure tones, highlighting the challenge of differentiating a discrete dataset.
  • Another participant clarifies that minimization should be with respect to amplitude and phase angle, suggesting the use of non-linear least squares for this purpose.
  • A participant expresses interest in using non-linear least squares to reduce artifacts in image processing by isolating pure tones from noise.
  • One participant questions whether dividing each data point by the cosine function could yield the amplitude with minimal error, suggesting a potential method for amplitude determination.
  • Concerns are raised about the computational feasibility of testing numerous frequencies and phase angles, especially in two-dimensional applications, indicating potential storage issues.
  • A later reply warns that incorrect frequency estimates could lead to consistent least-squares errors, suggesting that alternative methods may be more effective.

Areas of Agreement / Disagreement

Participants express varying opinions on the effectiveness of non-linear least squares and alternative methods for frequency estimation. There is no consensus on the best approach to extract pure tones or on the computational challenges involved.

Contextual Notes

Participants note limitations related to the assumptions of frequency estimates and the complexity of handling multiple pure tones at the same frequency with different phase angles. The discussion highlights unresolved mathematical steps and the dependence on the accuracy of frequency estimation.

Who May Find This Useful

This discussion may be useful for those interested in signal processing, particularly in applications involving noise reduction, image processing, and Fourier analysis.

tanus5
Messages
52
Reaction score
0
I believe this is an error minimization problem so I am trying to solve the following equation

Min((∑ ( (S(t) - A cos(b t + C)))^2 )

Where S(t) is the input signal, t is time and I will sum over t, A is the amplitude, b is radians per second (frequency), and C is the phase angle. I need to solve for A and C so I can subtract the pure tone from the signal, and repeat the function for the next higher frequency.

It is my understanding that to find the minimum I need to find the derivative of (∑((S(t) - A cos(b t + C)))^2 and that presents a problem since the input signal is a set of data and not an actual function so I don't know how to find its derivative. Without the derivative of S(t) I don't believe I can find the derivative of the entire function (∑((S(t) - A cos(b t + C)))^2.

Is this possible to solve, and if so, how?

note: After the fact I realized that I could extract phase angle to a certain degree of error by using a partial derivative holding A=1 and performing these calculations for each possible angle. So for +/- ∏/360 radians (+/- 0.5 degrees) I would need to calculate for all angles 0 <= C < 2∏ and take the minimum from that. I can't do the same for the amplitude since it's domain is infinite. If this can be solved for a known phase angle C, that would also be helpful.
 
Last edited:
Physics news on Phys.org
tanus5 said:
It is my understanding that to find the minimum I need to find the derivative of (∑((S(t) - A cos(b t + C)))^2 and that presents a problem since the input signal is a set of data and not an actual function so I don't know how to find its derivative. Without the derivative of S(t) I don't believe I can find the derivative of the entire function (∑((S(t) - A cos(b t + C)))^2.
You are not minimizing with respect to t, but with respect to A and C, for which S(t) is constant. Look up non-linear least squares.
 
  • Like
Likes   Reactions: 1 person
DrClaude said:
You are not minimizing with respect to t, but with respect to A and C, for which S(t) is constant. Look up non-linear least squares.

Thanks. I've never heard of non-linear least squares before but it does look like what I'm looking for. I've been doing image processing and noise reduction and am trying to reduce the artifacts that come into play when eliminating high frequencies from an FFT. I suspect a large part of the artifacts are coming from the complex tones so I want to see if I only reduce or eliminate the pure tones if that will provide better noise reduction with less artifacts. The noise I'm dealing with is very regular so I expect it is made up of pure tones so if I can remove only the noise by finding their pure tones I can clean the image. The FFT itself is expensive processing wise, and I expect this is going to be more expensive, but I'm more interested in capability than performance at this point.
 
What if I divide each point by the selected frequency with the calculated phase angle and take the average? Will that produce the amplitude with the least error? The way I see it that would basically be re-scaling the space by a cosine and the results at each point would then be an amplitude correct?

Z = A cos(b t + c)
Z/ cos(b t + c) = A

If that is the case than I should be able to use the non-linear least square to more accurately determine the phase angle and with that I can determine the amplitude. Either way I think I'm facing another problem, a signal can contain more than one pure tone at the same frequency and a different phase angle so it seems I will need to repeat this process for each frequency until an amplitude is below a certain cutoff.

Anyhow, I think I see where this is going. If I'm testing 40,000 frequencies and 360 phase angles I end up with 40,000 X 360 items in my Fourier series, or actually 40,000 X 40,000 X 360 considering I'm working in two dimensions. Dropping the high frequencies is trivial since I never need to calculate them in the first place so I should be able to reconstruct the image simply from the pure tones that I'm interested in. This may be worth trying but it isn't computationally sane since a small image could use hundreds of gigabytes simply to store the results.
 
Last edited:
DrClaude said:

In practice, this is unlikely to work very well. The reason is that if your estimate of the frequency is wrong by a "large" amount, your estimated sine wave will go in an out of phase with the measured data several times along the length of the data sample. If you sketch a graph of what this looks like, it is fairly clear that the least-squares error will be almost constant, independent of the error in the frequency estimate.

There are better ways. Here are some places to start exploring:
http://en.wikipedia.org/wiki/Linear_predictive_coding
http://en.wikipedia.org/wiki/Pitch_estimation
http://en.wikipedia.org/wiki/Frequency_estimation
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K