04-04-2011 01:47 PM - edited 04-04-2011 01:50 PM
Attepmt 2
Unflitlered resultes
04-04-2011 01:48 PM
Attepmt 2
04-05-2011 05:37 PM
I think I agree with the suggestion of separating the data into two sets, one for forwards and one for backwords, and then doing the fitting that way.
Jon S
04-14-2011 04:52 PM - edited 04-14-2011 04:57 PM
Hi NI Support Engineer,
I have a similar requirement. In my situation I know the original analog signals frequency, and the sample frequency of the A2D converter and have discrete samples (3 samples per cycle) of a known frequency sine wave. The goal is to determine the peak-peak value of the original analog signal, or RMS value of the original signal from the discrete samples. What is the best Lab view function to accomplish this?
Restating:
We have several cycles of an analog sine wave signal, at a known frequency (Fa). We then discretely sample this analog signal at a known sampling frequency, approx 3.125 x faster (Fs = 3.125xFa ). So for each cycle I have at least 3 samples of the original analog signal. We may have a range of cycles available from 1 cycle to dozens of cycles of the original analog signal that was sampled.
Goal:-> efficiently find the RMS or Peak value of the original analog signal.
What's the easiest way to accomplish this task in lab view?
thanks in advance.
04-14-2011 07:58 PM
I think that you will find that curve fitting will likely be the best way to determine the amplitude from a very small sample set. Since you know the frequency you only need to fit the phase and the amplitude.
Is your signal clean? By that I mean high signal to noise ratio and any interfering signals have much smaller amplitude. If you have a noisy signal or interference, I think your probability of getting good results will be low.
Lynn
04-15-2011 03:16 PM
Hi Lynn,
thanks for the quick reply. Yes S/N is good and no interference. What secific functions ??? Can you put the specific function name in quotes and suggest some code snippets to look at or VI ?
thanks,
04-15-2011 03:32 PM
The Lev-Mar curve fitting VIs in Mathematics >> Fitting are the place to start. These are not always easy to use, so read the help files carefully and plan to run some tests with known data to see what works.
Curve fitting routines tend to work poorly if the frequency does not match because they use derivatives to determine how to change parameters. However you know the frequency so this should not be an issue.
I have never tried to fit so few points, so I do not have any idea of how well this will work. You have very little information so large errors may be expected. If you have any other information such as maximum or minimum amplitudes or approximate phase, that might be quite helpful.
Is there a reason why you cannot sample faster or longer to get more points?
Lynn