From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This collection of VIs demonstrates multiple ways to implement a Phase Lock Loop (PLL) in LabVIEW.
Description
The examples demonstrate three different options of PLL regulation and control.The simplest form of the PLL examples (PLL_Simple Phase Only.vi) uses the Y-values of two signals and regulates the phase of one signal as long as both are in phase. The 2nd example (PLL_Simple Phase and Frequency.vi) is implemented with waveform datatypes, where the frequency and the phase are regulated. The 3rd example (PLL_Phase and Frequency_PID.vi) uses a PI(D) controller for both frequency and phase.
Description of each VI is included on Block diagram.
For more information, visit the following site: http://en.wikipedia.org/wiki/PLL
Requirements:
LabVIEW 2012 (or compatible)
LabVIEW Control and Simulation Toolkit 2012
Steps to Implement or Execute Code:
Additional Information or References:
Snippet of PLL_Simple Phase.vi
Snippet of PLL_PID.vi
Snippet of PLL_Simple Phase and Frequency.vi
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
PID toolkit required?
My LabVIEW searching for PID.vi and PID(DBL).vi when I try to open to PLL_PID.vi. I'm assuming this example requires the PID toolkit to run PLL_PID.VI. True?
PID Toolkit
That's true. But I am only using the P and I, so it shouldn't that hard to replace the PID.vi with your own algorithm. Another option would be to use LabVIEW Simulation.
Works great!
Thanks! Works like a charm now, especially the "cheated" equation :)
Many thanks!
Hello,
I came across this example and I think its a really good one. I am trying to closely emulate a 60Hz signal (Electrical Line voltage), but as we know it is not always exactly 60Hz. I want to follow that signal and generate a sine wave of that frequency. Any suggestions?
I was planning to use the PLL_Simple_WithTime.vi for this and modify it.
Thanks in advance.