Example Code

“Ideal" Harmonic Generator

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Generation of a simulated signal with enough harmonics to verify THD measurement accuracy.

 

Description

In the case of simulation, the output of sine wave generator is very pure (total harmonic distortion is approximately zero). Sometimes, we need a standard harmonic generator, used to verify the THD measurement accuracy. A common practice is to use multiple sinusoidal signals of different frequencies to synthetic harmonic signal. However, this can be troublesome for higher harmonic number.


A simpler way to accomplish this is using a pure triangle wave to replace the harmonic generator. Fourier analysis tells us that the triangular wave contains many harmonics, and its THD is a constant. Now we complete the simulation of harmonic signal.

 

Requirements

LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code:
1. Run the VI
2. Change frequency and amplitude
3. Finish execution with the stop button

 

Additional Information or References

Capture2.PNG

Capture.PNG

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.