Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 202581

Fit a detected sine wave to a formula.

$
0
0

Hi all.

 

I'm trying to play a sound as a sine wave down a pipe and detect the wave at the opposite end using a microphone, and then see how the two waves match up. I can get the frequency and amplitude using the 'tone measurement' vi's. The issue arises when trying to find a 'goodness of fit' between the generated and detected sine waves. I took inspiration from here:

 

http://forums.ni.com/t5/LabVIEW/Lev-Mar-non-linear-fit-problem/td-p/1187883

 

to generate the attached vi. The subvi simply generates a sin wave and its XY pairs are extracted. They then feed into the curve fit to theoretically give a perfect fit- but I get a 'wrong model' error. I've changed the model to incorperate a 2pi term too but to no avail. If anyone can suggest reasons why/ solutions it would be appreciated.

 

Thanks.


Viewing all articles
Browse latest Browse all 202581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>