PLL Testbench
Validate PLL system by measuring operating frequency, lock time, and phase noise
Since R2019a
Libraries:
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.
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
from pll — Input clock signal
scalar
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
to pll — Output clock signal
scalar
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
Set stop time — Set recommended minimum simulation stop time as model stop time
button
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.
Plot phase noise profile — Plot phase noise profile of the PLL DUT
button
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.
Export measurement results — Export measurement results after simulation
button
Click to export measurement results to an excel spreadsheet (XLS) or as comma-separated values (CSV) after the simulation is complete.
Stimulus
Signal type — Shape of clock signal going to PLL DUT
Square
(default) | Sine
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.
Amplitude (V) — Maximum value of stimulus signal at PLL input
1
(default) | real positive scalar
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 (Hz) — Frequency of stimulus signal at PLL input
30e6
(default) | real positive scalar
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
Frequency of operation — Measure operating frequency of PLL DUT
on (default) | off
Select to measure the operating frequency of the PLL DUT. By default, this option is selected.
Lock time — Measure locking time of PLL DUT
off (default) | on
Select to measure the locking time of the PLL DUT with user-specified error tolerance. By default, this option is deselected.
Target frequency of operation (Hz) — Target operating frequency of PLL DUT to calculate lock time
2.1e9
(default) | real positive scalar
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 (Hz) — Error tolerance for lock time measurement
1e6
(default) | real positive scalar
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.
Phase noise — Measure phase noise level of PLL DUT
off (default) | on
Select to measure the phase noise level of the PLL DUT at user defined frequency offset points. By default, this option is deselected.
Resolution bandwidth (Hz) — Smallest positive frequency that can be resolved
200e3
(default) | real positive scalar
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 Welch's Method of Averaged Modified Periodograms.
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.
No. of spectral averages — Number of spectral averages
4
(default) | positive integer scalar
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.
Hold off time (s) — Delays measurement analysis to avoid transients
0
(default) | real nonnegative scalar
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 offset vector (Hz) — Frequency points relative to fundamental frequency where phase noise is calculated
[300e3 1e6 3e6 10e6]
(default) | real valued vector
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
Frequency of operation — Target operating frequency at which PLL needs to lock
2.1e9
(default) | real positive scalar
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.
Lock time (s) — Maximum time in which PLL DUT needs to get locked
3e-6
(default) | real nonnegative scalar
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.
Phase noise (dBc/Hz) — Target noise power corresponding to frequency offset vector
[-85,-125,-150,-180]
(default) | real valued vector
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.
Version History
Introduced in R2019a
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)