Integer N PLL with Single Modulus Prescaler

Frequency synthesizer with single modulus prescaler based integer N PLL architecture

  • Library:
  • Mixed-Signal Blockset / PLL / Architectures

Description

The Integer N PLL with Single Modulus Prescaler reference architecture uses a Single Modulus Prescaler block as the frequency divider in a PLL system. The frequency divider divides the frequency of the VCO output signal by an integer value to make it comparable to a PFD reference signal frequency.

Ports

Input

expand all

Input clock signal, specified as a scalar. The signal at the clk in port is used as the reference signal for the PFD block in a PLL system.

Data Types: double

Output

expand all

Output clock signal, specified as a scalar. The signal at the clk out port is the output of the VCO block in a PLL system.

Data Types: double

Parameters

expand all

Select to enable increased buffer size during the simulation. This increases the buffer size of all the building blocks in the PLL model that belong to the Mixed-Signal Blockset™/PLL/Building Blocks Simulink® library. The building blocks are PFD, Charge Pump, Loop Filter, VCO, and Single Modulus Prescaler. By default, this option is deselected.

Buffer size for the loop filter, specified as a positive integer scalar. This sets the number of extra buffer samples available during the simulation to the Convert Sample Time subsystem inside the loop filter.

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 for loop filter to a large enough value so that the input buffer contains all the input samples required.

Dependencies

This parameter is only available when the Enable increased buffer size option is selected.

Programmatic Use

  • Use get_param(gcb,'NBufferFilter') to view the current value of Buffer size for loop filter.

  • Use set_param(gcb,'NBufferFilter',value) to set Buffer size for loop filter to a specific value.

Buffer size for the PFD, charge pump, VCO, and prescaler, specified as a positive integer scalar. This sets the buffer size of the PFD, Charge Pump, VCO, and Single Modulus Prescaler blocks inside the PLL model.

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 for PFD, charge pump, VCO, prescaler to a large enough value so that the input buffer contains all the input samples required.

Dependencies

This parameter is only available when the Enable increased buffer size option is selected.

Programmatic Use

  • Use get_param(gcb,'NBuffer') to view the current value of Buffer size for PFD, charge pump, VCO, prescaler.

  • Use set_param(gcb,'NBuffer',value) to set Buffer size for PFD, charge pump, VCO, prescaler to a specific value.

PFD

Configuration

Delay added for active output near zero phase offset, specified as a positive real scalar in seconds. Deadband is the phase offset band near zero phase offset for which the PFD output is negligible.

Programmatic Use

  • Use get_param(gcb,'DeadbandCompensation') to view the current value of Deadband compensation (s).

  • Use set_param(gcb,'DeadbandCompensation',value) to set Deadband compensation (s) to a specific value.

Data Types: double

Impairments

Select to add circuit impairments such as rise/fall time and propagation delay to simulation. By default, this option is deselected.

Determine how output step size is calculated:

  • Select Default to calculate output step size from rise/fall time. Output step size (ΔT) is given by .

  • Select Advanced to calculate output step size from maximum frequency of interest. Output step size (ΔT) is given by .

Dependencies

To enable this parameter, select Enable Impairments in the PFD tab.

Maximum frequency of interest at the output, specified as a positive real scalar in Hz.

Dependencies

To enable this parameter, select Enable Impairments in the PFD tab and choose Advanced for Output step size calculation.

Programmatic Use

  • Use get_param(gcb,'MaxFreqInterest') to view the current value of Maximum frequency of interest (Hz).

  • Use set_param(gcb,'MaxFreqInterest',value) to set Maximum frequency of interest (Hz) to a specific value.

Data Types: double

20% – 80% rise/fall time for the up output port of the PFD, specified as a real positive scalar in seconds.

Dependencies

To enable this parameter, select Enable Impairments in the PFD tab.

Programmatic Use

  • Use get_param(gcb,'RiseFallTime') to view the current value of Rise/fall time (s).

  • Use set_param(gcb,'RiseFallTime',value) to set Rise/fall time (s) to a specific value.

Delay from the input port to output port of the PFD, specified as a positive real scalar in seconds.

Dependencies

To enable this parameter, select Enable Impairments in the PFD tab.

Programmatic Use

  • Use get_param(gcb,'PropDelay') to view the current value of Propagation Delay (s).

  • Use set_param(gcb,'PropDelay',value) to set Propagation Delay (s) to a specific value.

Data Types: double

Charge pump

Configuration

Full scale magnitude of design output current, specified as a positive real scalar in amperes. This parameter is also reported as Charge pump current in the Loop Filter tab and is used to automatically calculate the filter component values of the loop filter.

Programmatic Use

  • Use get_param(gcb,'OutputCurrent') to view the current value of Output current (A).

  • Use set_param(gcb,'OutputCurrent',value) to set Output current (A) to a specific value.

Data Types: double

Logic switching threshold at input ports, specified as a real scalar in volts.

Programmatic Use

  • Use get_param(gcb,'InputThreshold') to view the current value of Input threshold (V).

  • Use set_param(gcb,'InputThreshold',value) to set Input threshold (V) to a specific value.

Data Types: double

Impairments

Select to add current impairments such as current imbalance and leakage current to simulation. By default, this option is deselected.

Difference between full scale positive and negative current, specified as a positive real scalar in amperes.

Dependencies

To enable this parameter, select Enable current impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'CurrentImbalance') to view the current value of Current imbalance (A).

  • Use set_param(gcb,'CurrentImbalance',value) to set Current imbalance (A) to a specific value.

Data Types: double

Output current when both inputs are at logic zero, specified as a nonnegative real scalar in amperes.

Dependencies

To enable this parameter, select Enable current impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'LeakageCurrent') to view the current value of Leakage current (A).

  • Use set_param(gcb,'LeakageCurrent',value) to set Leakage current (A) to a specific value.

Data Types: double

Select to add timing impairments such as rise/fall time and propagation delay to simulation. By default, this option is deselected.

Determine how output step size is calculated:

  • Select Default to calculate output step size from rise/fall time. Output step size (ΔT) is given by .

  • Select Advanced to calculate output step size from maximum frequency of interest. Output step size (ΔT) is given by .

Dependencies

To enable this parameter, select Enable timing impairments in the Charge Pump tab.

Maximum frequency of interest at the output, specified as a positive real scalar in Hz.

Dependencies

To enable this parameter, select Enable timing impairments in the Charge Pump tab and choose Advanced for Output step size calculation.

Programmatic Use

  • Use get_param(gcb,'MaxFreqInterestCp') to view the current value of Maximum frequency of interest (Hz).

  • Use set_param(gcb,'MaxFreqInterestCp',value) to set Maximum frequency of interest (Hz) to a specific value.

Data Types: double

Up

20% – 80% rise/fall time for the up input port of the charge pump, specified as a positive real scalar in seconds.

Dependencies

To enable this parameter, select Enable timing impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'RiseFallUp') to view the current value of Up Rise/fall time (s).

  • Use set_param(gcb,'RiseFallUp',value) to set Up Rise/fall time (s) to a specific value.

Data Types: double

Total propagation delay from the up input port to output port of the charge pump, specified as a positive real scalar in seconds.

Dependencies

To enable this parameter, select Enable timing impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'PropDelayUp') to view the current value of Up Propagation delay (s).

  • Use set_param(gcb,'PropDelayUp',value) to set Up Propagation delay (s) to a specific value.

Data Types: double

Down

20% – 80% rise/fall time for down input port of charge pump.

Dependencies

To enable this parameter, select Enable timing impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'RiseFallDown') to view the current value of Down Rise/fall time (s).

  • Use set_param(gcb,'RiseFallDown',value) to set Down Rise/fall time (s) to a specific value.

Data Types: double

Total propagation delay from the up input port to output port of the charge pump, specified as a positive real scalar in seconds.

Dependencies

To enable this parameter, select Enable timing impairments in the Charge pump tab.

Programmatic Use

  • Use get_param(gcb,'PropDelayUp') to view the current value of Down Propagation delay (s).

  • Use set_param(gcb,'PropDelayUp',value) to set Down Propagation delay (s) to a specific value.

Data Types: double

VCO

Define how VCO output frequency is specified:

  • Select Voltage sensitivity to specify output frequency from Voltage sensitivity (Hz/V) and Free running frequency (Hz).

  • Select Output frequency vs. control voltage to interpolate output frequency from Control voltage (V) vector versus Output frequency (Hz) vector.

Programmatic Use

  • Use set_param(gcb,'SpecifyUsing','Voltage sensitivity') to set Specify using to Voltage sensitivity.

  • Use set_param(gcb,'SpecifyUsing', 'Output frequency vs. control voltage') to set Specify using to Output frequency vs. control voltage.

Measure of change in output frequency for input voltage change, specified as a positive real scalar with units in Hz/V. This parameter is also reported as VCO voltage sensitivity in the Loop Filter tab and is used to automatically calculate the filter component values of the loop filter.

Dependencies

To enable this parameter, select Voltage sensitivity in Specify using in the VCO tab.

Programmatic Use

  • Use get_param(gcb,'Kvco') to view the current Voltage sensitivity (Hz/V) value.

  • Use set_param(gcb,'Kvco',value) to set Voltage sensitivity (Hz/V) to a specific value.

Data Types: double

Frequency of the VCO without any control voltage input (0 V), or the quiescent frequency, specified as a positive real scalar in Hz.

Dependencies

To enable this parameter, select Voltage sensitivity in Specify using in the VCO tab.

Programmatic Use

  • Use get_param(gcb,'Fo') to view current Free running frequency (Hz) value.

  • Use set_param(gcb,'Fo',value) to set Free running frequency (Hz) to a specific value.

Data Types: double

Control voltage values of the VCO, specified as a real valued vector in volts.

Dependencies

To enable this parameter, select Output frequency vs. control voltage in Specify using in the VCO tab.

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

Output frequency of the values of the VCO, corresponding to the Control voltage (V) vector, specified in Hz.

Dependencies

To enable this parameter, select Output frequency vs. control voltage in Specify using in the VCO tab.

Programmatic Use

  • Use get_param(gcb,'OutputFrequency') to view current Output frequency (Hz) value.

  • Use set_param(gcb,'OutputFrequency',value) to set Output frequency (Hz) to a specific value.

Data Types: double

Ratio of VCO output voltage to input voltage, specified as a positive real scalar. The input voltage has a nontunable value of 1 V.

Programmatic Use

  • Use get_param(gcb,'Amplitude') to view current Output amplitude gain value.

  • Use set_param(gcb,'Amplitude',value) to set Output amplitude gain to a specific value.

Data Types: double

Impairment

Select to introduce phase noise as a function of frequency to the VCO. By default, this option is selected.

Frequency offsets of the phase noise from the carrier frequency, specified as a real valued vector in Hz.

Dependencies

To enable this parameter, select Add Phase-noise in the VCO tab.

Programmatic Use

  • Use get_param(gcb,'Foffset') to view the current Phase noise frequency offset (Hz) metric.

  • Use set_param(gcb,'Foffset',value) to set Phase noise frequency offset (Hz) to a specific metric.

Data Types: double

Real valued vector specifying the phase noise power in a 1 Hz bandwidth centered at the specified frequency offsets relative to the carrier. The value is specified in dBc/Hz.

Dependencies

To enable this parameter, select Add Phase-noise in the VCO tab.

Programmatic Use

  • Use get_param(gcb,'PhaseNoise') to view the current Phase noise level (dBc/Hz) metric.

  • Use set_param(gcb,'PhaseNoise',value) to set Phase noise level (dBc/Hz) to a specific metric.

Data Types: double

Prescaler

Value by which the clock divider divides the input frequency, specified as a real positive scalar.

Programmatic Use

  • Use get_param(gcb,'N') to view the current value of Clock divider value.

  • Use set_param(gcb,'N',value) to set Clock divider value to a specific value.

Data Types: double

Minimum value by which the clock divider can divide input frequency, specified as a real positive scalar. This parameter is also reported in the Loop Filter tab and is used to automatically calculate the filter component values of the loop filter.

Programmatic Use

  • Use get_param(gcb,'Nmin') to view the current value of Min clock divider value.

  • Use set_param(gcb,'Nmin',value) to set Min clock divider value to a specific value.

Data Types: double

Loop Filter

Select how filter components for the loop filter are computed:

  • Select Automatic to automatically compute filter components from system specifications. Resistance and capacitance edit boxes in the Loop Filter tab are not editable if this option is selected. Rather, the filter component values are calculated from Loop bandwidth (Hz), Phase margin (degrees), VCO voltage sensitivity, Charge pump current, and Min clock divider value. By default, this option is selected.

  • Select Manual to manually enter the resistance and capacitance values to design a customized loop filter.

Frequency at which the magnitude of the open loop transfer function becomes 1, specified as a positive real scalar in Hz. Lower values of Loop bandwidth (Hz) result in reduced phase noise and reference spurs at the expense of longer lock time and less phase margin.

Dependencies

This parameter is only available when Automatic is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

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

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

Data Types: double

Phase of the open loop transfer function at the loop bandwidth subtracted from 180°, specified as a positive real scalar in degrees. For optimum lock time, select a phase margin between 40° and 55°.

Dependencies

This parameter is only available when Automatic is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'Phi') to view the current value of Phase margin (degrees).

  • Use set_param(gcb,'Phi',value) to set Phase margin (degrees) to a specific value.

Data Types: double

Order of the loop filter. Applies a second-, third-, or fourth-order passive RC loop filter in the PLL system.

Capacitor value C1, specified as a positive real scalar in farad.

Dependencies

This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'C1') to view the current value of C1 (F).

  • Use set_param(gcb,'C1',value) to set C1 (F) to a specific value.

Data Types: double

Capacitor value C2, specified as a positive real scalar in farad.

Dependencies

This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'C2') to view the current value of C2 (F).

  • Use set_param(gcb,'C2',value) to set C2 (F) to a specific value.

Data Types: double

Capacitor value C3, specified as a positive real scalar in farad.

Dependencies

  • To enable this parameter, select 3rd Order Passive or 4th Order Passive in Loop filter type.

  • This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'C3') to view the current value of C3 (F).

  • Use set_param(gcb,'C3',value) to set C3 (F) to a specific value.

Data Types: double

Capacitor value C4, specified as a positive real scalar in farad.

Dependencies

  • To enable this parameter, select 4th Order Passive in Loop filter type.

  • This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'C4') to view the current value of C4 (F).

  • Use set_param(gcb,'C4',value) to set C4 (F) to a specific value.

Data Types: double

Resistor value R2, specified as a positive real scalar in ohms.

Dependencies

This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'R2') to view the current value of R2 (Ω).

  • Use set_param(gcb,'R2',value) to set R2 (Ω) to a specific value.

Data Types: double

Resistor value R3, specified as a positive real scalar in Ω.

Dependencies

  • To enable this parameter, select 3rd Order Passive or 4th Order Passive in Loop filter type.

  • This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'R3') to view the current value of R3 (Ω).

  • Use set_param(gcb,'R3',value) to set R3 (Ω) to a specific value.

Data Types: double

Resistor value R4, specified as a positive real scalar in Ω.

Dependencies

  • To enable this parameter, select 4th Order Passive in Loop filter type.

  • This parameter is only editable when Manual is selected for the Filter Component values parameter in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'R4') to view the current value of R4 (Ω).

  • Use set_param(gcb,'R4',value) to set R4 (Ω) to a specific value.

Data Types: double

Select to add circuit impairments such as operating temperature to determine thermal noise to simulation. By default, this option is deselected.

Temperature of the resistor, specified as a real scalar in ℃. Operating temperature determines the level of thermal (Johnson) noise.

Dependencies

To enable this parameter, select Enable impairments in the Loop Filter tab.

Programmatic Use

  • Use get_param(gcb,'Temperature') to view the current value of Operating temperature.

  • Use set_param(gcb,'Temperature',value) to set Operating temperature to a specific value.

Data Types: double

Click to export loop filter component values to a spreadsheet (XLS file) or as comma-separated values (CSV file).

Probe

Select to probe the PFD output wires (pfd_up and pfd_down) to view the response of the PFD.

Select to probe the charge pump output wire (cp_out) to view the response of the Charge Pump.

Select to probe loop filter output wire (lf_out) to view the response of the Loop Filter. The loop filter output provides the control voltage to the VCO.

Select to probe the prescaler output wire (ps_out) to view the response of the Fractional Clock Divider with Accumulator.

Analysis

Select to plot the gain margin and phase margin of the PLL system before simulation. By default, this option is selected.

Select to plot the pole-zero map, loop bandwidth, step response, and impulse response of the PLL system before simulation. You must have a license to Control System Toolbox™ to plot the step response and impulse response of the PLL system. By default, this option is deselected.

Click to plot the presimulation loop dynamics of the PLL system.

Introduced in R2019a