Escolar Documentos
Profissional Documentos
Cultura Documentos
SAMPLING
2
0,15 . * 14 . * 13 -0 1215. 14
>+3 .W 0l ~~~~~~~~~~~~~
l l ~ ~~~~e1
~piin(t(i)6)
where in(ti) is the analog input signal sampled at instant ti.
61 =61-1 +C T, (4) The PI filter output is computed as the sum of both terms:
poeriodsithethe samples
compte
a VCO signal, Pi,. and LDi is the lock detector output signal.
samplesofacompletesinewave the PLL is locked, this signal is composed by DC a
component and high frequency AC components. When it is
not locked, its DC value is zero. Hence, a low-pass filter
pi = table [6, >> SHIFT] (5) (LPF) is used to filter-out the AC components and keep
only the DC value.
The implemented LPF is a first order IIR (infinite impulse
where Pi is the VCO output al instant 4i, table[*] is a vector response) filter, whose mathematical expression is:
that holds the sine table, with a power of 2 number of
elements (e.g. 1024). The symbol >> indicates an arithmetic
right shift. For more details, refer to [7]. Yi = boxi + blxi- (11l)
3
PLL output signal is modulated in frequency and the LD Spartan3E FPGA
signal amplitude is modified. Hence, the LD signal level -------------------------------------
can be used as an indication ofhow well is the PLL locked. D
.DCM K r MicroBlaze
#1 ~32bit processor]
4. IMPLEMENTATION
50MHz ++ OPB bus
The implementation is based on a Xilinx board (Spartan3E
Starter Kit). This board has the following features, relevant
clock |+DCM r 1
to the presented implementation: D2 PLL UART
* Spartan3E FPGA with 500000 equivalent gates I
(XC3S5500E),
* 50MHz crystal oscillator,
* asynchronous serial port, with RS232 drivers,
* expansion connector with 100 1O pins, Fig. 4: Simplified block diagram of the system architecture.
* flash memory for bitstream storage,
* USB port for FPGA configuration and memory parameters and read the PLL signals by using these
progBporammi
prgamig registers.
protocol
The PC communicates with the MB using a
that allows the following actions:
For more details, refer to the board datasheet [10].
The XC3S500E has 20 embedded 18bit multipliers [11]
p otlhtlo the fLL actios:
* Configure the PLL parameters: PI constants,peR
which make it a powerful chip for performing DSP tasks. coefficients, initial frequency and random period
The advanced architecture and high gate count made generation.
possible the implementation of the high-speed PLL and an * Configure the interrupt frequency.
embedded microprocessor in a single chip. * Read the PLL outputs.
Fig. 3 shows a simplified block diagram of the * Read the PLL internal signals.
implemented system. The FPGA board is connected to a The MB receives periodic interrupt requests (IRQs) from
personal computer (PC) through a serial port. The PC the PLL, which are synchronized with the processing clock.
configures the PLL parameters and monitors the PLL state. The interrupt service reads the PLL output signals and
An ADC board is used to digitize the PLL input signal. stores them in a temporal buffer for a posterior transference
This board contains a high speed amplifier and an ADC to the PC.
from Texas Instruments (ADC8342), with on-chip sample Fig. 5 shows a simplified block diagram of the algorithms
and hold circuit. This ADC is a SAR (successive implemented in the FPGA. The ADC converter is triggered
approximation register) type, and is suitable for by Timerl at the random sampling times. When a
undersampling applications (i.e. the input bandwidth, conversion is available, it is latched and used as an input of
166MHz, is higher than the maximum sampling frequency, the PLL block, which is detailed in Fig. 6. Timerl is fed by
250ksps). the sampling period generator (TsGen), based on the ARS
The FPGA reads the ADC conversions through an 8bit bus, scheme, and shown in Fig. 7. A second timer (Timer2) is
controls the sampling instants with a trigger signal, and used to generate periodical interrupts, with programmable
synchronizes the ADC sequential logic with a clock signal. frequency. The MicroBlaze (MB) processor is used to set
The digital logic programmed in the FPGA is described in the PLL and TsGen parameters, and to read the PLL signals
Fig. 4. A MicroBlaze (MB) [12] embedded processor is (e.g. fUt and LD).
used to control the whole system. The on-chip peripheral
bus (OPB) is used to connect the MB to the on-chip PLL param.
peripherals, such as an UART [13]. The PLL is built as S erial
another MB peripheral, connected to the OPB using the ADC PLL LD MB
IPIF (intellectual property interface) [14]. ADC IADC Pl
The PLL constants and variables are available to the MB as F-F +
external registers. Thus, the MB can modify the PLL ADC P
|
PC 1. d ADC
signals
. npu| ADC_elk
.~~~~~~~~~~~~~~~~~~~~~~~Tclock~rigerTSMBcl
Timer_elk param.:
~~~~~~~CnrL Ext. DC2Tmr mt erio DC
4
Clock 5. EXPERIMENTAL RESULTS
Input
. . C Pi The experimental tests consist on applying different input
frequencies to the PLL and study its dynamic and stationary
vco response. The output variables used to monitor the PLL
y state are the output frequency (f11t) and the LD signal. The
X LD LD signal level is used as an indicator of the PLL
synchronization.
The PI constants determine the PLL characteristics. Higher
Fig. 6: PLL block diagram. constants set higher loop bandwidths and faster lock times.
A higher bandwidth deteriorates the PLL output signal
Clock quality and frequency stability, as is shown in the
.P--- genexperimental results.
PN gn +, M+r The first test consists on analyzing the PLL output signals
M g / at steady state, locked with a 1MHz input signal. Three
Ts par Const. different PI constants pairs are compared to show its effects
in the fout and LD signals. Fig. 8 shows the PLL output
Fig. 7: Block diagram of the ARS period generator. signals and Table 2 shows the statistical properties of these
Table 1 shows the most relevant data of the FPGA resource signals.
utilization. The dedicated multipliers utilization is high The second test shows the dynamic response of the PLL.
because of the signal processing required by the PLL. The The input signal frequency varies as a periodic square-
number of bits used in each arithmetic operation was wave. Fig. 9 shows the PLL output signals. Plots a) and b)
optimized to reduce the number of used multipliers, while show the response for a low loop bandwidth (K,=0. 1,
keeping high accuracy in the signal processing. Some _ _ _ _ _ _ _
multiplications do not require high resolution (e.g. PD) and s 1.05
were implemented using a single 18x18 multiplier. Other . is
products need higher resolution (e.g. IIR filter), and were °
implemented using more multipliers in order to reach a 0.95 LI
higher word size. x 1.05
The maximum operating frequency of the PLL signal I
processing block is 25MHz. An equivalent DSP 1
implementation would require a clock frequency of more ' 0.95 ___
than 600MHz, only for the PLL signal processing. x .05
The ADC limits the maximum processing speed of the I.
implemented prototype. The used ADC maximum
frequency is 250kHz, which limits the minimum value of 0.95 -_
the M constant in (2), and the maximum clock frequency is 0.5 _
5MHz (which limits the a value). Hence, the maximum 0
input frequency of the implemented PLL is 2.5Mhz with a 0.2
mean sampling frequency of 140kHz. _,_, _1
0.1 0.15 0.2 0.25
Table 1: FPGA resource utilization. Time [s]
AvailabiliTy Utilization
Availability [MB only MB+PLL
Fig. 8: Fixed input frequency test. Output frequency (a, b
Resource
Resource
and c) and LD signals for three different loop bandwidths.
Dedicated
multipliers 20 0 15 Table 2: Results of the fixed input frequency test.
RAM blocks 20 16 16 PT constants 1f0ut mean1 f0ut std.dev. [LD mean
[MHzI | t[kHz] [ n.u.I
Slices 4656 1153 2200 Kj=,K=. 1.00 19.1 0.382
DCM 4 1 2 FK,,0.5,Kr0.05 1.00 8.17 0.459
[ External inputs 232 | 4 15 | Kp=0.1, Kr0.01 1.00 1.49 0.492
5
KrO.O 1) and plots c) and d) for a higher loop bandwidth convenient than DSPs for RS-based signal processing
(Kp=0.5, KI0.05). because some RS specific tasks can be efficiently
The last figure shows the PLL response to an input signal implemented using programmable logic. Moreover, the
modulated in frequency with a sinusoidal. The first plot (a) signal processing required for the PLL is suitable for FPGA
of Fig. 10 shows the response with the low loop bandwidth, implementations because many of its operations can be
and the second plot (b) with the higher bandwidth. executed in parallel.
The three tests show that the PLL is able to operate The presented experimental results show that the prototype
correctly. The PI constants determine the PLL speed and is able to work with frequencies much higher than the
frequency stability. sampling frequency (more than ten times). This allows the
implementation of very high frequency systems with digital
6. CONCLUSIONS signal processing.
Potential applications of the proposed PLL are high
In this paper a phase locked loop that uses random precision instruments [4] and software-based radio-
sampling was proposed. The proposed PLL is implemented frequency systems [5], allowing the implementation of
in a low-cost FPGA. completely reconfigurable systems using FPGAs.
The presented implementation shows that FPGAs are more
7. REFERENCES
N
x0.85,
0.85\ .
y \ [1] A.V. Oppenheim and R.W. Schafer, Discrete-Time Signal
° 0.8 Processing, Prentice-Hall, pp. 447-448, 1989.
0.5 [2] R.G. Vaughan, N.L. Scott and D.R. White, "The Theory of
0.5 / l l / llBandpass Sampling," EEE Trans. Signal Processing, Vol.
0.25 39, No. 9, pp. 1973-1984, 1991.
o1 \,l \ Vl \l[3] Processing,
I. Bilinskis and A. Mikelsons, Randomized Signal
Prentice Hall International, USA, 1992.
0.85 [4] M.O. Sonnaillon, R. Urteaga and F. J. Bonetto, "Random
Sampling in High-Frequency Digital Lock-In Amplifiers",
, 0.8 Latin America Applied Research (LAAR), Vol. 36, Issue 3,
-7 0.5 pp. 181-186, Jul 2006.
025
v[5] J.J. Wojtiuk, Randomized Sampling for Radio Design, PhD
S 0.25 Thesis, Univ. of de South Australia, Australia, 2000.
0 [6] R.E. Best, Phase-Locked Loops - Design, Simulation, and
0 0.05 0.1 0.15 0.2 0.25 Applications, 4th Ed., McGraw-Hill, 1996.
Time [s]
[7] Analog Devices Inc. (1999) A technical tutorial on Direct
Fig. 9: Square wave input frequency test. Output frequency Digital Synthesis. http://www.analog.com
(a and c) and LD signal (b and d) for two different loop [8] A. Miller and M. Gulotta, "PN Generators Using the SRL
bandwidths. Macro," Xilinx Application Note, XAPP211 vi.2, Jun. 2004.
1.05 [9] G. Maria and P. Alfke, "Linear Feedback Shift Registers in
Virtex Devices," Xilinx Application Note, XAPP210 vl.2,
Jan 2001.
0.95
u 0.9k W W W q [10] Xilinx Inc., "Spartan3E Starter Kit Board User Guide,"
< 0.85 UG230 vl.0, Mar. 2006.
1.05 t VW kl [11] Xilinx Inc., "Spartan3E FPGA Family: Complete
Datasheet," DS312, May. 2006.
0.95% | > | 1 /} [12] Xilinx Inc., "MicroBlaze Processor Reference Guide,"
4 0.9g v UG081 v5.4, Feb. 2006.
0.85 [13] Xilinx Inc., "OPB UART Lite v1.OOb," DS422, Dec. 2005.
0.15 0.2 0.25 [14] Xilinx Inc., "OPB JIPIIF Architecture," DS414 v1.3, Jan.
Time [s] 2003.