top of page
Search

# How to use PLL Block in MATLAB | Function of PLL in MATLAB

How to use PLL Block in MATLAB | Function of PLL in MATLAB

Introduction:

We'll delve into the implementation of a Phase-Locked Loop (PLL) using MATLAB. PLL is a crucial component in electrical engineering, particularly in grid inverter control for synchronization. We'll explore the usage of the PLL block in MATLAB for both single-phase and three-phase systems.

MATLAB Simulation Setup: To begin, we utilize MATLAB's Simulink browser and navigate to Simscape > Power Systems > Control and Measurement. Here, we find the PLL block, with options available for both single-phase and three-phase systems. For this demonstration, a three-phase sine wave generator serves as the input source to the PLL block.

Single-Phase PLL Analysis: For single-phase PLL analysis, a D-Model is used. The output is observed, and the frequency and phase angle are displayed separately in a scope. Parameters such as minimum frequency, initial frequency, and regulator gains are set to default values for initial analysis.

Simulation Results: Simulation results showcase the frequency and phase angle variations over time. The output aligns with the input frequency of 50 Hz, and the phase angle varies from 0 to approximately 6.2 radians.

Three-Phase PLL Analysis: The process is repeated for a three-phase PLL analysis, utilizing two scopes to visualize frequency and phase angle separately. Adjustments to the input frequency and initial conditions allow for comprehensive analysis.

Adjusting Frequency: Frequency adjustments are demonstrated by changing the input frequency to 100 Hz. The simulation results reflect the expected frequency and phase angle variations in both single-phase and three-phase systems.

Conclusion: The Phase-Locked Loop (PLL) is a critical component for synchronization in power systems. MATLAB's PLL block facilitates the analysis of frequency and phase angle variations with respect to time. Adjustments to input parameters demonstrate the adaptability of PLL in different scenarios.