PLL¶
-
class
decida.PLL.
PLL
(parent=None, **kwargs)¶ Bases:
decida.ItclObjectx.ItclObjectx
,Tkinter.Frame
synopsis:
Phase-Locked Loop small-signal analysis graphical user interface.
PLL calculates the S-domain and Z-domain jitter transfer characteristics of a PLL. Both open-loop and closed-loop characteristics are calculated. The transfer function magnitude and phase are plotted and several characteristic PLL metrics are printed out, such as damping-factor, bandwidth and phase-margin.
PLL has two modes of use. The first is an interactive mode, with a graphical user-interface. In the interactive mode, the user changes an input PLL parameter value in the entry box and presses <Return> to cause a new set of calculations to be performed and displayed.
In the non-interactive mode, PLL can be embedded in a script involving one or more loops of calculations. In this mode, use the recalculate user method. After re-calculation, PLL metrics can be reported to a file.
The DeCiDa application pllss simply instantiates one PLL object.
constructor arguments:
parent (Tkinter handle, default=None)
handle of frame or other widget to pack PLL in. if this is not specified, top-level is created.**kwargs (dict)
keyword=value specifications: configuration-optionsconfiguration options:
verbose (bool, default=False)
Enable/disable verbose mode.gui (bool, default=True)
If gui is True, display interactive graphical-user interface. Otherwise, perform the calculations without any user interaction.plot_width (str, default=”5in”)
Width of plot window (Tk inch or pixel specification)plot_height (str, default=”5in”)
Height of plot window (Tk inch or pixel specification)plot_style (int, default=0)
The style of the plot:
- 0 : plot Hol(s) Hcl(s) Hcl(z)
- 1 : plot Hol(s) Hol(z)
- 2 : plot Hol(s) Hcl(s)
- 3 : plot Hol(z) Hcl(z)
- 4 : plot Htr(s) Htr(z) (dB and Phase)
- 5 : plot Htr(s) Htr(z) (dB only)
plot_orient (str, default=”horizontal”)
One of “horizontal” or “vertical”. If horizontol, parameter selection and plot panes are side-by-side. If vertical, parameter selection pane is over plot pane.plot_title (str, default=””)
Main plot titlenpts (int, default=1000)
Number of frequency points to sample (logarithmic sampliing).fmax (float, default=1e10)
The maximum frequency to sample.fmin (float, default=1e2)
The minimum frequency to sample.rf (float, default=10e3)
Loop filter resistor value [ohm]cf (float, default=500e_12)
Loop filter capacitor value [F]cd (float, default=5e_12)
Loop filter ripple-bypass capacitor value [F]mp (float, default=40.0)
Feed-back divider value.icp (float, default=100e_6)
Charge-pump current value. [A]kvco (float, default=700e6)
VCO total gain. [Hz/V]fv2i (float, default=100e9)
Voltage to current converter pole. [Hz]fref (float, default=350e6)
Reference frequency. [Hz]fb_delay (float, default=0.0)
Feedback divider delay. [s]ph_offset (float, default=0.0)
Excess phase-offset between reference and output of feedback divider. [s]example (from test_PLL):
from decida.PLL import PLL PLL()
public methods:
- public methods from ItclObjectx
-
get
(par)¶ get a PLL parameter or metric.
arguments:
par (str)
PLL configuration option or one of the following metrics:
- lpll : PLL inductance, mp/(Kvco*Icp)
- zo : PLL characteristic impedance, sqrt(lpll/cf)
- zeta : PLL damping coefficient
- Q : PLL quality factor
- wn : PLL natural frequency [rad/s]
- wb : PLL bandwidth [rad/s]
- wz : PLL zero frequency [rad/s]
- wp : PLL peak frequency [rad/s]
- wh : PLL high zeta frequency [rad/s]
- wv : PLL V to I converter frequency [rad/s]
- peak : PLL peak closed-loop jitter transfer value [dB]
- zeth : PLL high-frequency damping factor
- fn : PLL natural frequency [Hz]
- fb : PLL bandwidth [Hz]
- fz : PLL zero frequency [Hz]
- fp : PLL peak frequency [Hz]
- fh : PLL high frequency [Hz]
- beta : Z-domain parameter
- a0 : Z-domain parameter
- b0 : Z-domain parameter
- c0 : Z-domain parameter
- d0 : Z-domain parameter
- fbs : S-domain 3db bandwidth
- fxs : S-domain unity-gain bandwidth
- pm : S-domain phase-margin
- pos : S-domain number of cycles to match phase-response
- pk : S-domain peaking
- fk : frequency of S-domain peaking
- ihcl : integration of closed-loop S-domain jitter transfer function
- ihtr : integration of closed-loop S-domain tracking jitter transfer function
- fbz : Z-domain 3-dB bandwdth
- fxz : Z-domain unity-gain bandwidth
- pmz : Z-domain phase-margin
- pkz : Z-domain peaking
- fkz : frequency of Z-domain peaking
- rjz : rejection: loop-gain at fref/2
- ihclz : integration of closed-loop Z-domain jitter transfer function
- ihtrz : integration of closed-loop Z-domain tracking transfer function
-
plot
(new=False)¶
-
recalculate
()¶ recalculate transfer functions.
results:
- S-domain and Z-domain open-loop and closed loop jitter transfer functions are re-calculated. For non-gui applications, several metrics are also calculated, such as damping-factor, bandwidth and phase-margin.
-
report
(style=1)¶ return a formated PLL parameters report.
arguments:
style (int, default=1)
The style of the report to generate:
- verbose
- brief
results:
- Returns a formatted PLL report with various parameters and metrics.
-
write_data
(file=None)¶ write the calculated data to a file.
arguments:
file (str, default=None)
Specify the file to write. If not specified, use file dialog to specify the file.results:
- Writes space-separated value format file with the calculated transfer functions.
-
write_plot
(file=None)¶ write a PostScript plot to a file.
arguments:
file (str, default=None)
Specify the file to write. If not specified, use file dialog to specify the file.results:
- Writes a PostScript file with the current plot.
-
write_report
(file=None)¶ write PLL report to a file.
arguments:
file (str, default=None)
Specify the file to write. If not specified, use file dialog to specify the file.results:
- Writes a formatted PLL report to the file.
-
write_script
(file=None)¶ write an executable PLL script with the current parameter set.
arguments:
file (str, default=None)
Specify the file to write. If not specified, use file dialog to specify the file.results:
- Writes executable script, which when run displays the PLL transfer functions for the last set of PLL parameters.