From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Power Electronics Development Center

Showing results for 
Search instead for 
Did you mean: 

Single Phase PLL


Would you be able to save and upload the files again as 2012 version?



0 Kudos
Message 11 of 17

Hi have a similar problem, I have to use Pll to synchronize motor speed  with a external frequenz. I don't really unterstand how to use this PLL VI to solve this problem, because I have square wave signal instead of sine wave and I have to come out with a PWM duty cycle (1kh. frequenz) to drive the Motor. Is there any explanation about how to do that


0 Kudos
Message 12 of 17

A PLL is typically only used to synchronize with sinusoidal signals.

Can you tell us more about your application? Here are a few questions:

Motor: What type of motor are you controlling? Is it single phase or three phase? Is there a position feedback sensor such as a Hall Effect sensor or optical quadrature encoder? Is that what you want to synchronize with?

Synchronization: What is the external frequency source you are trying to synchronize with? Are you reading the signal using an analog input or a digital input?


The GPIC Reference Design Code includes voltage-over-frequency (aka voltage-over-Hertz) control for a three-phase induction motor, which can be synchronized with velocity calculation from an quadrature optical encoder, or with a 3-phase PLL from sinusoidal 3-phase power. The code and related training course material is here:

NI Power Electronics Control Design V Training Course

0 Kudos
Message 13 of 17

Hi Bmac,

thank you so much for your quick response, Actually I have to drive 2 3-phase DC Motors , a faster motor and a slower motor. So I decide to control the faster Motor with the external Signal (333Hz) and then divide his frequency to control the second motor. To drive the one Motor (faster) I use Motor controller device ( , which provides me Encoder signal (A, B , X )  and which also provides 3 PWM to phase of the motor. However  I  need to provide to this controller a PWM signal to change the velocity of the motor. So I don't have  analog Signal in my system.
So I need to calculate phase difference between the Motor's frequency  though the X signal encoder  with the external signal and then decide to accelerate or decelerate the motor to reach the same frequency and same phase  but i am faced the problem how to use the 3 phase PLL Vi to solve this problem. So I try to design something from scratch based on papers I read but I still persuade that it could be more simple by using this VI.
If somebody  really have  a good idea  about how to design it in a proper way, that could be so helpful for me
thx all

Message 14 of 17

Hi. You may want to take a look at the NI SoftMotion Toolkit ( It has IP cores for interfacing to and controlling 3 phase motors (BLDC, PMSM) with PWM, and for coordinating the trajectories of multiple motors.

There are also free quadrature encoder interface cores and 3 phase induction motor control example code included with the GPIC Reference Design. See the Power Electronics Design V course for a link to the code. You could also use the multichannel PID control algorithm to control the current/velocity/position of the two motors.

If you want the position/velocity of one motor to always be related to the other motor by some ratio, then that's called electronic gearing. If so, you might want to google it to learn more. It's pretty easy to implement using multichannel PID or the like.

Hope that helps. Please take a look at the NI SoftMotion examples and help and feel free to reply with more questions.

0 Kudos
Message 15 of 17

Hi BMac,


 I'm trying to download the LabVIEW project, but I'm unable to do that. It seems it is no longer present on the ftp server.

Is there a way to download it?




0 Kudos
Message 16 of 17

You can find the Single Phase PLL core along with a large set of other open source IP code for LabVIEW FPGA in this master library repository.


I recommend using an actual FTP client to download (such as WinSCP), rather than Windows File Explorer, as a number of people have reported problems with Windows File Explorer and the large size of the repository ZIP.


Note that due to long path lengths (associated with Xilinx Coregen IP), you must unzip in a very short path such as C:\LV rather than desktop or downloads folder. Otherwise, files will be broken due to long paths. Also, I recommend using an actual ZIP utility such as 7-Zip rather than the default Windows ZIP utility. 


For a summary of some of the most popular power electronics control and analysis functions in the repository above, see this guide.


Note that the repository also contains a number of algorithms for power electronics control and analysis that are not described in the guide above, so be sure to do some browsing if you are looking for something not mentioned in the guide.


Wishing you all the very best and productive research work!


Best Regards,

Brian MacCleery

Message 17 of 17