I am using an MSP430 microcontroller and I want to find a way to get the amplitude of an input sine wave signal based on the smallest possible number of samples from the ADC. The sampling and conversion frequency of the ADC is about 148 KHz and the frequency of the input signal is 125 KHz. Does anyone have an idea?
Thanks for your help
Assuming the input signal is a single sine wave (no noise or other frequency components), you generally need 3 samples to estimate the parameters, since you have 3 parameters - amplitude, frequency, and phase. If in addition you know the frequency exactly (as implied in your question), then 2 samples are enough. Specifically, you know for each sample that:
where:
- sample;
- the sample index;
- amplitude;
- frequency;
- the sampling frequency;
- phase.
That is, you need to solve 3 equations in 3 unknowns.
Of course, if you are willing to compromise the restriction on the number of samples, you could get a more accurate estimation.