LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the Labview THD measurement higher than our Matlab THD measurement?

 
0 Kudos
Message 1 of 7
(5,454 Views)
Hi Solitude,

could you show the code you used (including LV version) and some data you have.

Have you looked at the help for the functions both MATLAB and LV?
Have you tested with 'real' signals or generated signals?
If you have tested with real signals could you post (a bit) of them here?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 7
(5,442 Views)
Hi Ton,

The waveform is a sweep frequency.  We are using a standard formula to compute the total harmonic distortion in our Matlab application.  We have some flexibility in the extracting the bins (energy) for computing the THD,  whereas in the Labview application we depend on its formulas.  The THD is approximately 0.3 percent in Matlab, and 5.4 percent in Labview for the same sweep frequency.  Does the Labview require additional VIs to overcome the errors in computing a THD for a sweep frequency?  Is the THD computation in Labview strictly designed for a single frequency waveform?

Solitude
0 Kudos
Message 3 of 7
(5,420 Views)
It's been a while that I used that VI, but I believe you open it to see what code is executed. And I believe it is targeted at a single frequency!
Have you tried using Mathscript in LV (8 and up)?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 7
(5,398 Views)
Hi Ton,

We have had some discussion on the THD.  Our application is built from Labview 6, and we have looked into the VIs, but some of those VIs are password protected.  I believe the THD does require a single tone frequency and we are trying to implement it using a sweep frequency.  The Matlab is our own formulas and so we can work with the math and produce better THD results.  I have attached a document from long ago that describes the THD in Labview if the frequency varies.

Wayne


0 Kudos
Message 5 of 7
(5,366 Views)
Wayne,

Post the formulas you are using in Matlab. Someone can probably suggest a way to implement them in LV. If the same formulas are used both places the results should be the same.

Lynn
0 Kudos
Message 6 of 7
(5,362 Views)

Lynn,

Thanks for your reply.

Another engineer has taken a look at the formulas for both the Labview implementation and the Matlab.  There is an understanding that the THD is difficult to measure for a frequency sweep.  It turns out that in the Matlab formula is a bit more custom and so produces different results than the Labview.

Wayne

 

0 Kudos
Message 7 of 7
(5,300 Views)