Main Content

Phase Lock Loop Tuning

This example shows how to use Simulink® Design Optimization™ to tune an all-pass filter of a Phase Lock Loop. The filter includes a second-order low pass filter and a feedthrough gain. The feedthrough gain and the second order filter coefficients are tuned to apply a steady-state input to the Voltage Controlled Oscillator (VCO).

This example requires Mixed-Signal Blockset™ software.

Open the phaselock_demo model and run the simulation. The simulation produces an unoptimized input to the VCO and the initial data for optimization.

open_system('phaselock_demo')

To view the unoptimized input to the VCO, double-click the Scope block.

Double-click the Loop Optimizer block to view constraints on the input to the VCO. The constraints represent a step response with 0.1 second rise-time and 20 percent overshoot.

You can launch the Response Optimizer using the Apps menu in the Simulink toolstrip, or the sdotool command in MATLAB®. To launch a pre-configured optimization task in the Response Optimizer, open the model, and double-click the orange block at the bottom of the model. To simulate the model and check if the initial design satisfies the design requirements, in the Response Optimizer, click the Plot Model Response button.

To start the optimization, click the Optimize button from the Response Optimizer. The plots are updated to indicate that the design requirements are now satisfied.

The solid curve shows the final optimized input to the VCO.

Close the model.

bdclose('phaselock_demo')