Main Content

Fractional N PLL with Accumulator

Frequency synthesizer with accumulator based fractional N PLL architecture

Since R2019a

  • Fractional N PLL with Accumulator block

Libraries:
Mixed-Signal Blockset / PLL / Architectures

Description

The Fractional N PLL with Accumulator reference architecture uses a Fractional Clock Divider with Accumulator block as the frequency divider in a PLL system. The frequency divider divides the frequency of the VCO output signal by a fractional 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 Fractional Clock Divider with Accumulator. 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 Fractional Clock Divider with Accumulator 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 ΔT=(Rise/fall time)26 · 0.22.

  • Select Advanced to calculate output step size from maximum frequency of interest. Output step size (ΔT) is given by ΔT=Rise/fall time6 · Maximum frequency of interest.

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

Data Types: double

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 ΔT=(Rise/fall time)26 · 0.22.

  • Select Advanced to calculate output step size from maximum frequency of interest. Output step size (ΔT) is given by ΔT=Rise/fall time6 · Maximum frequency of interest.

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

Block parameter: SpecifyUsing
Type: character vector
Values: Voltage sensitivity | Output frequency vs. control voltage
Default: Voltage sensitivity

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

Block parameter: Kvco
Type: character vector
Values: positive real scalar
Default: 100e6

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

Block parameter: Fo
Type: character vector
Values: positive real scalar
Default: 1.8e9

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

Block parameter: ControlVoltage
Type: character vector
Values: real valued vector
Default: [-5 0 5]

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

Block parameter: OutputFrequency
Type: character vector
Values: real valued vector
Default: [2e9 2.5e9 3e9]

Data Types: double

Maximum amplitude of the VCO output voltage, specified as a positive real scalar.

Programmatic Use

Block parameter: Amplitude
Type: character vector
Values: positive real scalar
Default: 1

Data Types: double

Impairment

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

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

Block parameter: Foffset
Type: character vector
Values: real valued vector
Default: [10e3 100e3 1e6 3e6 10e6]

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 and deselect Estimate phase noise parameters in the VCO tab.

Programmatic Use

Block parameter: PhaseNoise
Type: character vector
Values: real valued vector
Default: [-77 -108 -134 -145 -154]

Data Types: double

Select to automatically estimate the phase noise parameters. By default, this option is selected.

You can deselect this option to define custom period jitter and flicker corner frequency.

Dependencies

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

Data Types: double

Standard deviation of the period jitter, specified as a positive real scalar in seconds. Period jitter is the deviation in cycle time of a clock signal with respect to the ideal period.

Dependencies

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

Programmatic Use

Block parameter: PeriodJitter
Type: character vector
Values: positive real scalar
Default: 1.8969e-15

Data Types: double

Corner frequency of the flicker noise, specified as a scalar in hertz. Flicker corner frequency (Hz) is defined as the frequency at which the phase noise transitions from 1/f2 to 1/f3 due to flicker noise. At this frequency, the spectral densities of period jitter and flicker noise are equal.

Dependencies

To enable this parameter, select Add Phase-noise and deselect Estimate phase noise parameters in the VCO tab.

Programmatic Use

Block parameter: CornerFrequency
Type: character vector
Values: scalar
Default: 517103.8168

Data Types: double

Click to plot the specified phase noise density and realizable expected output phase noise density of the VCO.

Prescaler

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

Programmatic Use

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

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

Minimum value by which the clock divider can divide input frequency, specified as a positive real 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.

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.

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 (ohms).

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

Data Types: double

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

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 (ohms).

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

Data Types: double

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

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 (ohms).

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

Version History

Introduced in R2019a

expand all