Main Content

PLL Testbench

Validate PLL system by measuring operating frequency, lock time, and phase noise

  • Library:
  • Mixed-Signal Blockset / PLL / Measurements & Testbenches

  • PLL Testbench block

Description

The PLL Testbench block provides input stimulus in the form of a clock signal to a phase-locked loop (PLL) system. The testbench also validates the performance of the PLL system by comparing the operating frequency, lock time, and phase noise against the target metrics.

The PLL Testbench block generates the stimulus to drive the device under test (DUT) from the Stimulus tab. The setup parameters for validating the DUT are defined in the Setup tab and the target validation metrics are defined in the Target Metric tab.

Ports

Input

expand all

Input clock signal to the PLL Testbench, specified as a scalar. The from pll port is connected to the output of a PLL system.

Data Types: double

Output

expand all

Output clock signal, returned as a sine or square wave as specified in the Signal type parameter. The signal at the to pll port provides the stimulus to a PLL system.

Data Types: double

Parameters

expand all

Click to set the Recommended min. simulation stop time (s) reported by the PLL Testbench block as the model stop time.

Dependencies

This button is only available when Phase noise measurement option is selected in the Setup tab.

Click to plot the phase noise profile of the PLL device (DUT) and to compare it with the user-defined phase noise profile after simulation is complete.

Dependencies

This button is only available when Phase noise measurement option is selected in the Setup tab.

Click to export measurement results to an excel spreadsheet (XLS) or as comma-separated values (CSV) after the simulation is complete.

Stimulus

Shape of the clock signal going to the input of the PLL device under test (DUT). Choose between a Sine or a Square wave.

Programmatic Use

  • Use get_param(gcb,'SignalType') to view the current value of Signal type.

  • Use set_param(gcb,'SignalType',value) to set Signal type to a specific value.

Maximum value of the stimulus signal at PLL input, specified as a real positive scalar.

Programmatic Use

  • Use get_param(gcb,'InputAmplitude') to view the current value of Amplitude (V).

  • Use set_param(gcb,'InputAmplitude',value) to set Amplitude (V) to a specific value.

Frequency of the stimulus signal at PLL input, specified as a real positive scalar.

Programmatic Use

  • Use get_param(gcb,'ClkFreq') to view the current value of Frequency (Hz).

  • Use set_param(gcb,'ClkFreq',value) to set Frequency (Hz) to a specific value.

Setup

Select to measure the operating frequency of the PLL DUT. By default, this option is selected.

Select to measure the locking time of the PLL DUT with user-specified error tolerance. By default, this option is deselected.

Target operating frequency of the PLL DUT to calculate the lock time of the PLL, specified as a real positive scalar in Hz.

Dependencies

To enable this parameter, select the Lock time measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'ExpectedFreq') to view the current value of Target frequency of operation(Hz).

  • Use set_param(gcb,'ExpectedFreq',value) to set Target frequency of operation (Hz) to a specific value.

Error tolerance for lock time measurement, specified as a real positive scalar in Hz.

Dependencies

To enable this parameter, select the Lock time measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'FreqErrorTol') to view the current value of Error tolerance (Hz).

  • Use set_param(gcb,'FreqErrorTol',value) to set Error tolerance (Hz) to a specific value.

Select to measure the phase noise level of the PLL DUT at user defined frequency offset points. By default, this option is deselected.

Smallest positive frequency that can be resolved, specified as a real positive scalar. The Resolution bandwidth (Hz) is used to determine window length for spectral analysis using the Welch method. For more information, see Spectrum Estimation — Welch's Method.

In general, Resolution bandwidth (Hz) should be less than or equal to the lowest offset frequency value.

Dependencies

To enable this parameter, select the Phase noise measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'ResBandwidth') to view the current value of Resolution bandwidth (Hz).

  • Use set_param(gcb,'ResBandwidth',value) to set Resolution bandwidth (Hz) to a specific value.

Number of spectral averages, specified as a positive integer scalar. The dsp.SpectrumEstimator System object™ used by the Phase Noise Measurement subsystem inside the PLL Testbench block computes the current power spectrum or power density spectrum estimate by averaging over the number specified by No. of spectral averages.

Dependencies

To enable this parameter, select the Phase noise measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'SpectralAverages') to view the current value of No. of spectral averages.

  • Use set_param(gcb,'SpectralAverages',value) to set No. of spectral averages to a specific value.

Delays measurement analysis by the specified amount of time to avoid corruption by transients, specified as a real nonnegative scalar in s.

To enable this parameter, select the Phase noise measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'HoldOffTime') to view the current value of Hold off time (s).

  • Use set_param(gcb,'HoldOffTime',value) to set Hold off time (s) to a specific value.

Frequency points relative to fundamental frequency where phase noise is calculated, specified as a real valued vector in Hz. This values are also reported in the Target Metrics tab as Phase noise frequency offset (Hz).

To enable this parameter, select the Phase noise measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'PhaseNoiseFreqOffset') to view the current value of Frequency offset vector (Hz).

  • Use set_param(gcb,'PhaseNoiseFreqOffset',value) to set Frequency offset vector (Hz) to a specific value.

Target Metrics

Target operating frequency at which PLL DUT needs to lock, specified as a real positive scalar in Hz.

If you select the Lock time as a measurement option, the Frequency of operation is reported from the Target frequency of operation (Hz) parameter.

Dependencies

To enable this parameter, select the Frequency of operation measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'TargetFreq') to view the current value of Frequency of operation.

  • Use set_param(gcb,'TargetFreq',value) to set Frequency of operation to a specific value.

Maximum time in which PLL DUT needs to get locked, specified as a real nonnegative scalar in s.

Dependencies

To enable this parameter, select the Lock time measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'TargetLockTime') to view the current value of Lock time.

  • Use set_param(gcb,'TargetLockTime',value) to set Lock time to a specific value.

Target noise power level relative to the carrier in a 1 Hz frequency bandwidth centered at the frequencies specified in the Frequency offset vector (Hz) parameter, specified as a real valued vector in dBc/Hz.

Dependencies

To enable this parameter, select the Phase noise measurement option in the Setup tab.

Programmatic Use

  • Use get_param(gcb,'TargetPhaseNoiseVector') to view the current value of Phase noise.

  • Use set_param(gcb,'TargetPhaseNoiseVector',value) to set Phase noise to a specific value.

Introduced in R2019a