10-20-2023 07:59 AM
HOW TO BUILD A PROGRAM WITH TOTAL HARMONIC DISTORTION INFORMING THE VALUES?
10-20-2023 05:50 PM
I probably would use LabVIEW. What have you tried? Where does the data come from?
10-20-2023 08:09 PM
Do you understand what "total harmonic distortion" means? What does "a set of data/values" mean? Where did these "values" come from? Do you have any "engineering" experience, particularly do you know anything about "signals" and "signal analysis"?
If you already "have the data", and know something about signal analysis and what "total harmonic distortion" means, it should be simple for you to write down (pencil and paper) a formula/method for calculating THD (if you've forgotten the formula from your undergraduate days, the Web might help). Now all you have to do is (a) verify that your data is appropriate for analysis, and (b) do the calculation you need using whatever Programming Language (I'd use LabVIEW, myself) to do the calculation. Note that if the data are in a file, you may need to learn how to do File I/O in your chosen programming language ...
If your goal is to do this in LabVIEW, you need to learn a little LabVIEW. There are some suggestions for learning LabVIEW on the first page of this Forum, or you could pay attention if you are taking a course in LabVIEW.
Bob Schor
10-21-2023 05:42 AM - edited 10-21-2023 05:43 AM
there exists a promising subroutine in the signal processing palette
the palette or rather the toolkit is part of the LabView professional edition.
AFAIK there is no run-time licence needed, if you use those .vis in your .exe
but if you have Labview Basic or LabView Full, you have to download the toolkit here: https://www.ni.com/de/support/downloads/software-products/download.labview-advanced-signal-processin...
However, I don't know if you need to acquire a development licence for toolkit in labview full or labview basic..
10-21-2023 10:38 AM
You did not specify any details, so typically this is often used to characterize e.g. audio amplifiers and speakers, but there are many other fields. You also did not say if your primary problem is with the theory, the programming implementation, or any hardware setup.
Since you posted in the LabVIEW forum, lets assume you need help with programming. To implement the math, you really don't need anything special. All you need to have is a signal of sufficient length and knowledge of the fundamental frequency. Do you want to just measure one frequency or graph THD over a range of frequency from a set of experiments?
Are you looking for a simulation or are you trying to build a test setup generating sine waves and measure the response after the signal has passed through the system under test?
Now start reading here. Seems quite simple.