VCO Testbench
Validate voltage controlled oscillator (VCO) by measuring phase noise metrics or VCO characteristics
Libraries:
Mixed-Signal Blockset /
PLL /
Measurements & Testbenches
Description
The VCO Testbench block validates the VCO device under test (DUT) by measuring one of the two target metrics: phase noise, or voltage sensitivity and quiescent frequency. You can use the testbench to validate a VCO of your own implementation, or you can use the VCO block from the Mixed-Signal Blockset™.
The VCO Testbench block generates the stimulus (control voltage) 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.
To take the full advantage of the VCO testbench capabilities by using autofill parameters options, use only two blocks, the VCO DUT and the VCO Testbench in the Simulink® model.
Examples
This example shows how to validate the phase noise profile of a VCO device under test (DUT) using a VCO Testbench.
Open the model ringOscVCOPhaseNoise
. The model consists of a Ring Oscillator VCO block and a VCO Testbench.
model = 'ringOscVCOPhaseNoise';
open_system(model)
close_system(model)
The voltage sensitivity of the VCO is set to 1.25e6
Hz, and the free running frequency is 2e9
Hz. Check that Add phase noise parameter is enabled. Click the Estimate phase noise parameters button, then click Plot fit to see how the phase noise is fitted against the specification. In the attached model, the fit is good.
The testbencch is set to measure the Phase noise metric of the VCO in the Measurement option. The Control voltage
provided to the input of VCO is 4
V. So, the VCO operates at 2.5
GHz frequency. Click the Autofill setup parameters button to automatically calculate the Resolution bandwidth (Hz), and No. of spectral averages. Click the Autofill target metric button to automatically import the phase noise target profile to the VCO Testbench.
Run simulation for 8e-4
s, as recommended in the Block Parameters dialog box.
sim(model);
open_system([model '/VCO Testbench'])
Double click the VCO Testbench block to open the Block Parameters dialog box. Click on the Plot measurement button.
The operating frequency matches the predicted frequency 2.5
GHz. The measured phase noise profile also matches the target profile.
Ports
Input
Input signal, which flows from the output of the VCO DUT. This input signal is used to calculate either the phase noise metric, or the voltage sensitivity and free running frequency of the VCO, depending on the Measurement option chosen.
Data Types: double
Output
Output signal, which provides control voltage stimulus to the input of VCO DUT.
Data Types: double
Parameters
Determines which of the two given target metrics is being measured.
Select Phase noise
if you want the testbench to
measure and compare phase noise to a target phase noise profile.
Select Kvco and Fo
if you want the testbench to
compute voltage sensitivity (Kvco)
and quiescent frequency (Fo) using
a range of control voltages.
Programmatic Use
Use
get_param(gcb,'MeasureOptions')
to view the current Measurement option.Use
set_param(gcb,'MeasureOptions',value)
to set Measurement to a specific option.
Click to set the Recommended min. simulation stop time (s) reported by the VCO Testbench block as the model stop time.
Dependencies
This button is only available when you select Phase
noise
as the Measurement
option.
Plots the relevant VCO metrics based on the Measurement options.
Selecting Phase noise
in
Measurement plots phase noise profile of
VCO.
Selecting Kvco and Fo
in
Measurement plots the VCO characteristics and
Kvco.
Exports the relevant VCO metrics based on the Measurement options to an excel file.
Selecting Phase noise
in
Measurement exports the phase noise profile of
VCO.
Selecting Kvco and Fo
in
Measurement exports the VCO characteristics and
Kvco.
Stimulus
Control voltage provided by VCO Testbench, expressed as a scalar in V. The value specified in Control Voltage (V) flows through the to vco port that provides the input of VCO.
Dependencies
To enable this parameter, select Phase
noise
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'ControlVoltage')
to view current Control Voltage (V) value.Use
set_param(gcb,'ControlVoltage',value)
to set Control Voltage (V) to a specific value.
Data Types: double
Control voltage provided by VCO Testbench, expressed as a two-element row vector in V. This parameter specifies the minimum and maximum values of control voltage, which is used to generate ten control voltage value points, including the provided values. These ten values of control voltage are sent to VCO input to measure Kvco and Fo.
Dependencies
To enable this parameter, select Kvco and
Fo
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'ControlVoltageRange')
to view the current Range of control voltage (V) values.Use
set_param(gcb,'ControlVoltage',value)
to set Range of control voltage (V) to specific values.
Data Types: double
Setup
Click this button to automatically populate setup parameters ( Resolution bandwidth (Hz) and No. of spectral averages) for phase noise measurement.
If the DUT is a VCO from Mixed-Signal Blockset, the dsp.SpectrumEstimator
System object™ used by the VCO Testbench block for phase
noise measurement automatically calculates setup parameters based on the
VCO specifications.
Dependencies
This button only works if the VCO DUT is a VCO block from Mixed-Signal Blockset.
This button is only available when you select
Phase noise
as the Measurement option.
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.
If the DUT is a VCO block from the Mixed-Signal Blockset library, you can use the Autofill setup parameters button to automatically calculate Resolution bandwidth (Hz).
Dependencies
To enable this parameter, select Phase
noise
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'ResBandwidth')
to view current Resolution bandwidth (Hz) value.Use
set_param(gcb,'ResBandwidth',value)
to set Resolution bandwidth (Hz) to a specific value.
Data Types: double
Number of spectral averages, specified as a positive integer scalar.
The dsp.SpectrumEstimator
System object used by the Phase Noise Measurement subsystem inside the
VCO Testbench block computes the current power
spectrum or power density spectrum estimate by averaging over the number
specified by No. of spectral averages.
If the DUT is a VCO block from the Mixed-Signal Blockset library, you can use the Autofill setup parameters button to automatically calculate number of spectral averages.
Dependencies
To enable this parameter, select Phase
noise
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'SpectralAverages')
to view current No. of spectral averages value.Use
set_param(gcb,'SpectralAverages',value)
to set No. of spectral averages to a specific value.
Data Types: double
Hold-off period, specified as a nonnegative scalar in s. Hold-off time delays measurement analysis by the specified amount of time to avoid corrupting simulation results due to transients.
Programmatic Use
Use
get_param(gcb,'HoldOffTime')
to view the current Hold-off time (s) value.Use
set_param(gcb,'HoldOffTime',value)
to set Hold-off time (s) to a specific value.
Target Metric
Click this button to automatically populate the target phase noise metric from VCO specifications.
Dependencies
This button will only work if the VCO DUT is a VCO block from Mixed-Signal Blockset.
This button is only available when you select
Phase noise
as Measurement option.
The frequency offsets of phase noise from the carrier frequency, collected from the data sheet, specified as a real valued vector in Hz.
If the DUT is a VCO block from the Mixed-Signal Blockset library, you can use the Autofill target metric button to automatically transfer VCO phase noise frequency offset vector values to the VCO Testbench.
Dependencies
To enable this parameter, select Phase
noise
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'PhaseNoiseFreqOffset')
to view the current Phase noise frequency offset vector (Hz) value.Use
set_param(gcb,'PhaseNoiseFreqOffset',value)
to set Phase noise frequency offset vector (Hz) to a specific value.
Data Types: double
The phase noise power in a 1 Hz bandwidth centered at the specified frequency offsets relative to the carrier, collected from the data sheet, specified as a real valued vector in dBc/Hz. The elements of Phase noise vector (dBc/Hz) corresponds to relative elements in the Phase noise frequency offset vector (Hz).
If the DUT is a VCO block from the Mixed-Signal Blockset library, you can use the Autofill target metric button to automatically transfer VCO phase noise vector values to the testbench.
Dependencies
To enable this parameter, select Phase
noise
as the Measurement
option.
Programmatic Use
Use
get_param(gcb,'PhaseNoiseVector')
to view the current Phase noise vector (dBc/Hz) value.Use
set_param(gcb,'PhaseNoiseVector',value)
to set Phase noise vector (dBc/Hz) to a specific value.
More About
The VCO Testbench subsystem block consists of a Step block and a subsystem that contains two variants: a Phase-noise measurement subsystem and a Frequency detector subsystem. The variant subsystems are enabled based on the selection of the Measurement option in the block parameters dialog box.
Inside the Step block, the Step time is set to Hold-off time (s) value and delays the measurement analysis by the specified time.
The Phase-noise subsystem is activated when Phase noise
is selected as the Measurement option. The subsystem uses the
zero crossing points of a signal to measure the phase noise. From the zero crossing
points, the phase error (φ)is extracted both at the rising and falling edge of the
signal. The captured phase error is used to generate a periodic signal (sin(φ)). This periodic signal is interpolated using a fixed time step
proportional to the maximum phase noise frequency offset. The power density of the
modified phase noise signal, using the dsp.SpectrumEstimator
System object, directly provides the phase noise profile of the signal of
interest.
The Frequency detector subsystem is activated when Kvco and
Fo
is selected as the Measurement option. The
subsystem spreads the range of control voltage over 10 points using their minimum
and maximum values. A VCO characteristics curve is generated for each point. Voltage
sensitivity (Kvco) is calculated by taking
the average of slopes between each points. Quiescent frequency
(Fo) is extrapolated at control
voltage zero.
References
[1] Banerjee, Dean. PLL Performance, Simulation and Design. Indianapolis, IN: Dog Ear Publishing, 2006.
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)