PLL Testbench

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

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

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.

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 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.

  • Use set_param(gcb,'InputAmplitude',value) to set Amplitude 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.

  • Use set_param(gcb,'ClkFreq',value) to set Frequency 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

This parameter edit box is only available when Lock time measurement is not selected in the Setup tab.

Programmatic Use

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

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

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

Dependencies

This parameter edit box is only available when Lock time measurement is not selected in the Setup tab.

Programmatic Use

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

  • Use set_param(gcb,'FreqErrorTol',value) to set Error tolerance 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.

Sample rate of the input signal, specified as a real positive scalar in Hz. Sampling frequency is used to configure the Spectrum Estimator inside the PLL DUT. To achieve the best performance metrics, specify a sample rate at least eight times the operating frequency of the PLL.

Dependencies

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

Programmatic Use

  • Use get_param(gcb,'SampleRate') to view the current value of Sampling frequency.

  • Use set_param(gcb,'SampleRate',value) to set Sampling frequency to a specific value.

Resolution bandwidth of the Spectrum Estimator inside the PLL DUT, specified as a real positive scalar. The Spectrum Estimator inside the PLL DUT uses the Resolution bandwidth to determine window length for spectral analysis using the Welch method.

In general, Resolution bandwidth should be less than or equal to the lowest offset frequency from the phase noise data.

Dependencies

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

Programmatic Use

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

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

Number of spectral averages, specified as a positive integer scalar. The Spectrum Estimator inside the PLL DUT computes the current power spectrum estimate by averaging over the number specified by No. of spectral averages.

Dependencies

This parameter is only available when Phase noise measurement is selected 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.

Dependencies

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

Programmatic Use

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

  • Use set_param(gcb,'HoldOffTime',value) to set Hold off time 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).

Dependencies

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

Programmatic Use

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

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

Select to open the spectrum analyzer during simulation to view the power spectrum. By default, this option is deselected.

Dependencies

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

Select to enable increased buffer size during simulation. This increases the buffer size of all the blocks in the PLL model that belong to the Mixed-Signal Blockset™/PLL/Building Blocks library. By default, this option is deselected.

Dependencies

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

Number of samples of the input buffering available during simulation, specified as a positive integer scalar. This sets the buffer size of all the blocks in the PLL model that belong to the Mixed-Signal Blockset/PLL/Building Blocks library.

Selecting different simulation solver or sampling strategies can change the number of input samples needed to produce an accurate output sample. Set the Buffer size to a large enough value so that the input buffer contains all the input samples required.

Dependencies

This parameter is only available when Phase noise measurement and Enable increased buffer size option is selected 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.

Target Metrics

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

Dependencies

This parameter edit box is only available when Lock time measurement is not selected 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

This parameter is only available when Lock time measurement is selected 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

This parameter is only available when Phase noise measurement is selected 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