main content

phase noise at pll output -凯发k8网页登录

this example shows how to predict the phase noise at the output of a phase-locked loop (pll), simulate the pll using the pll testbench, and compare the simulation results to theoretical predictions.

this example demonstrates three phase noise effects, individually or combined, depending on the configuration you choose:

  1. reference modulation or phase noise

  2. vco phase noise

  3. vco phase noise subsampled by the feedback prescaler

open the model pllphasenoiseexample.slx.

open_system('pllphasenoiseexample.slx');

this example uses an from the mixed signal blockset™.

the pll testbench generates the reference input signal for the pll and measures the phase spectral density at the output of the pll.

the optional prbs6 reference phase modulation in this model is used to contrast the response to reference phase variation with the response to vco phase noise.

the low pass resamplers at the inputs to the spectrum estimators are anti-aliasing filters. these filters convert the variable step discrete signals to the fixed step discrete signals required by the spectrum estimators.

the spectra of the pll input and output signals are estimated and logged in the base workspace so that you can compare the simulation results to the results of the theoretical calculations.

the oscilloscope in the example model provides a progress indicator for the simulation.

to evaluate the behavior of the pll under a variety of conditions, use a separate workspace file for each different set of conditions. this example provides five such supporting .mat files. all of them produce the same loop transient response.

  1. baseline.mat - as close to ideal as possible. use to evaluate numerical noise introduced by the model and simulator.

  2. referencemodulation.mat - introduce reference phase modulation. use to evaluate the phase transfer function of the pll.

  3. vcophasenoise.mat - introduce vco phase noise and a prescaler ratio equal to one. use to evaluate the pll control loop's error function.

  4. inbandphasenoise.mat - introduce vco phase noise and a prescaler ratio greater than one. use to evaluate the effect of the prescaler ratio on the pll control loop's error function.

  5. totalphasenoise.mat - all phase noise sources are enabled, and the prescaler ratio is greater than one.

theoretical calculations

this section shows how to calculate the expected response of the pll.

the target loop bandwidth of the pll is 2 mhz with a 45 degree phase margin. the loop filter components are scaled to practical level and the charge pump output current is scaled by the same factor to maintain the same loop dynamics.

the function getpllloopresponse calculates the loop gain as a function of frequency and then calculates the expected response to signals from outside or inside the pll. define the input parameters such as charge pump output current, vco sensitivity, prescaler ratio and passive loop filter component values for the getpllloopresponse function to use.

pllkphi = 5e-3;     % charge pump output current
pllkvco = 100e6;    % vco sensitivity
plln    = 70;       % prescaler ratio
pllr2   = 1.33e3;   % loop filter resistance for second order response (ohms)
pllr3   = 1.7e4;    % loop filter resistance for third order response (ohms)
pllr4   = 0;        % loop filter resistance for fourth order response (ohms)
pllc1   = 1.31e-11; % loop filter direct capacitance (f)
pllc2   = 1.44e-10; % loop filter capacitance for second order response (f)
pllc3   = 9.41e-13; % loop filter capacitance for third order response (f)
pllc4   = 0;        % loop filter capacitance for fourth order response (f)

the script prepareexpectedspectra computes the spectral density of the reference phase modulation and the vco output phase noise. the script then also combines the result with the pll loop response to obtain the phase noise spectral density at the output of the pll. the reference phase modulation is a deterministic process for which the amplitude of the spectral components is expressed as a fraction of the carrier amplitude (dbc). in contrast, the vco phase noise is a stochastic process for which the spectral density is expressed in dbc/hz.

define the input parameters for the prepareexpectedspectra script such as reference input frequency, number of reference cycles per symbol of prbs6 phase modulation data pattern, amplitude of a single spectral component of the prbs6 reference phase modulation, resolution bandwidth to evaluate spectra with phase noise, frequency offset vector, and phase noise spectral densities at specified frequency offset.

plladdphasenoise = 'on'; % enable vco phase noise
pllfoffset    = [30e3 100e3 1e6 3e6 10e6]; % vco offset frequencies (hz)
pllphasenoise = [-92 -106 -132 -143 -152]; % vco output phase noise (dbc/hz)
cfgselectrefmod = '0';   % enable reference phase noise modulation
cfgref  = 30e6;          % reference frequency
cfgcyclespersymbol = 2;  % reference cycles per prbs6 modulation symbol
cfgmodlevel   = -110;    % reference phase modulation level (dbc/hz)
cfgresbandwidth = 100e3; % pll testbench resolution bandwidth
cfgtargetspectrum = [100e3 -145;1e6 -135;3e6 -140;10e6 -150];
                         % pll testbench target phase noise (dbc/hz)

if the variable workspacefile exists and points to a file that can be loaded, load that file into the workspace. to use a configuration supplied with this example, set the value of workspacefile to the name of the file for that configuration.

if exist('workspacefile','var') && exist(workspacefile,'file')
    load(workspacefile);
end

analyze the pll control loop using the getpllloopresponse function. the outputs of this function are:

  • loopfrequency - the frequency points at which the expected responses is calculated.

  • loopzofs - the transfer impedance of the loop filter as a function of the frequency.

  • loopgofs - the loop gain from the output of the prescaler to the input of the vco, including the vco voltage sensitivity. note that the prescaler ratio is not included in this output, but is included in the closed loop transfer functions.

  • loophofs - the closed loop phase transfer function fromt the pll reference input to the pll output.

  • loopeofs - the closed loop phase error transfer function with respect to the vco output.

[loopfrequency, loopzofs, loopgofs, loophofs, loopeofs, loopphstep] = ...
    getpllloopresponse([0,pllr2,pllr3,pllr4],[pllc1,pllc2,pllc3,pllc4], ...
                        pllkphi,pllkvco,plln);

organize the computation of expected spectral density to place spectral components directly into the frequency bins.

the workspace variables for the expected spectral density are:

  • expinputfrequency - a vector of frequencies for which the expected input spectrum is calculated (hz).

  • expinputspectrum - a vector of expected spectrum values at the reference input to the pll (dbm into a one ohm load at a resolution bandwidth of cfgresbandwidth).

  • expoutputfrequency - a vector of frequencies for which the expected output spectrum is calculated (hz).

  • expoutputspectrum - a vector of expected spectrum values at the pll output (dbm into a one ohm load at a resolution bandwidth of cfgresbandwidth).

prepareexpectedspectra;

examine expected results

in this section, examine the expected pll behavior.

start by looking at the closed loop response of the pll. consider three fundamental responses: transient response, transfer function, and error function.

transient response

in most pll applications, the loop transient response is most important when the loop is initially acquiring phase lock. for very small initial frequency offsets or for relatively high closed loop bandwidth, the transient response predicts the loop acquisition time reasonably accurately. however, in many cases, the loop transient response only represents the response during phase acquisition, after frequency acquisition has already occurred. this example only addresses the phase acquisition time.

plot the loop transient response of the pll.

figure(1);
plot(loopphstep.time,loopphstep.data);
title({'pll loop transient response';'to unit input phase step'});
xlabel('seconds');
ylabel('output phase');

transfer function

the transfer function from the reference input to the pll output can be important either when the pll is expected to track a modulated input very accurately or when it is expected to filter out noise from a noisy input.

create a log-log plot of the pll transfer function.

figure(2);
semilogx(loopfrequency,20*log10(abs(loophofs)));
title('pll transfer function');
xlabel('hz');
ylabel('db');

error function

the pll control loop is expected to reject phase noise generated inside the pll itself, such as vco phase noise. the transfer function between the vco phase noise and the pll output is sometimes called the loop error function. examining this transfer function helps compensate the loop error before it is applied to another noise source.

create a log-log plot of the pll loop error function.

figure(3);
semilogx(loopfrequency,20*log10(abs(loopeofs)));
title('pll loop error function');
xlabel('hz');
ylabel('db');

plot the total expected phase noise at the pll output.

figure(4);
plot(expoutputfrequency,expoutputspectrum);
title('pll output spectrum');
xlabel('hz');
ylabel('dbm into 1 ohm');
xlim([plln*cfgref-2*pllfoffset(end), plln*cfgref 2*pllfoffset(end)]);

the phasenoisemeasure function is a callback function used by the pll testbench. it displays the target output phase noise spectral density along with the simulated or expected phase noise spectral density.

to compare the expected output phase noise to a specific design target, define the workspace variable cfgtargetspectrum. cfgtargetspectrum consists of two column arrays that specify the target phase noise at the output of the pll. the first column specifies the frequency offsets in hz and the second column specifies the corresponding phase noise spectral density if dbc/hz. the pll testbench uses the callback function phasenoisemeasure to display the expected and simulated phase noise spectral density.

view the expected pll output phase noise in units of dbc/hz.

[~] = phasenoisemeasure(expoutputfrequency,expoutputspectrum,...
    cfgresbandwidth, cfgtargetspectrum(:,1).','on','5', ...
    cfgtargetspectrum(:,2).');

if the loop response is not satisfactory, you might look at more detailed results such as the loop filter transimpedance (loopzofs) to get additional insights that could help you improve the pll design.

run the simulation

while the configuration process is straightforward, there are many parameters to be configured. use the configureexamplepll script to configure the pll simulink® model, then execute the model.

configureexamplepll;
simout = sim('pllphasenoiseexample');

to make the plotting easier, transform the results into the following four workspace variables:

  • siminputfrequency - a vector of frequencies for which the input spectrum of the simulation is stored (hz).

  • siminputspectrum - a vector of spectrum values at the reference input to the pll (dbm into a one ohm load at a resolution bandwidth of cfgresbandwidth).

  • simoutputfrequency - a vector of frequencies for which the output spectrum of the simulation is calculated (hz).

  • simoutputspectrum - a vector of simulated spectrum values at the pll output (dbm into a one ohm load at a resolution bandwidth of cfgresbandwidth).

make the results easier to plot from the workspace.

siminputfrequency = reshape(simout.inputfrequency.data(:,end),1,[]);
siminputspectrum = reshape(simout.inputspectrum.data(:,end),1,[]);
simoutputfrequency = reshape(simout.outputfrequency.data(:,end),1,[]);
simoutputspectrum = reshape(simout.outputspectrum.data(:,end),1,[]);

compare expected and simulated results

compare expected and simulated phase noise at the pll output.

figure(4);
plot(expoutputfrequency,expoutputspectrum);
title('pll output spectrum');
xlabel('hz');
ylabel('dbm into 1 ohm');
xlim([plln*cfgref-2*pllfoffset(end), plln*cfgref 2*pllfoffset(end)]);
hold on;
plot(simoutputfrequency,simoutputspectrum);
hold off;

view the expected pll output phase noise in units of dbc/hz.

[~] = phasenoisemeasure(simoutputfrequency,simoutputspectrum,...
    simoutputfrequency(2)-simoutputfrequency(1),...
    cfgtargetspectrum(:,1).','on','5',cfgtargetspectrum(:,2).');

save the configuration and results

save the entire workspace, including the system configuration in its current state and the results, to a file. if the workspacefile variable already exists, you can resave the current state to that file. to save to a new file, change the value of workspacefile.

if exist('workspacefile','var')
    save(workspacefile);
end

see also

| |

related topics

    网站地图