A digital phase-locked loop circuit based on FPGA

By designing an FPGA-based digital phase-locked loop circuit, the problems of inflexible loop parameter configuration, long locking time, low phase detection accuracy, and insufficient harmonic resistance in the existing technology are solved. It achieves fast locking, accurate phase detection, and observable status, thereby improving product consistency and reducing system cost.

CN123122532APending Publication Date: 2026-11-17CHENGDU JINNUOXIN HIGH-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611554714.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing FPGA-based digital phase-locked loops suffer from problems such as inflexible loop parameter configuration, difficulty in balancing locking bandwidth and tracking accuracy, long locking time, limited phase detection accuracy, insufficient anti-harmonic locking capability, and lack of effective locking detection and status indication mechanisms.

Method used

A digital phase-locked loop circuit based on FPGA was designed. It adopts a digital frequency and phase detector, a digital loop filter, a digitally controlled oscillator and a feedback frequency divider, combined with a parameter configuration interface, a lock detection unit and a harmonic lock suppression unit, to achieve online configuration of loop parameters, fast locking, high phase detection accuracy, strong anti-harmonic capability and observable status.

Benefits of technology

It enables online configuration of loop parameters, fast locking speed, high phase detection accuracy, strong anti-harmonic capability, and observable status, significantly improving product consistency and reliability while reducing the number of components and system cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122532A_ABST
    Figure CN123122532A_ABST
Patent Text Reader

Abstract

This invention discloses a digital phase-locked loop (PLL) circuit based on an FPGA, relating to the field of communication technology. It includes: a reference clock input unit for inputting and shaping a reference signal; a digital frequency and phase detector for detecting the frequency difference and phase difference between the reference signal and the feedback signal, and outputting a phase error signal; a digital loop filter for filtering the phase error signal and outputting a frequency control word; a digitally controlled oscillator for generating an output clock signal based on the frequency control word; a feedback divider for dividing the output clock signal, generating a feedback signal, and feeding it back to the digital frequency and phase detector; a parameter configuration interface for online configuration of loop parameters, including loop bandwidth and damping coefficient; and a lock-in detection unit for detecting the loop lock-in state and outputting a lock-in indication. This application eliminates the problems of temperature drift, aging, and discreteness in analog devices, resulting in high frequency stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically to a digital phase-locked loop circuit based on FPGA. Background Technology

[0002] A phase-locked loop (PLL) is a closed-loop feedback circuit that can automatically track the frequency and phase of an input signal. It is widely used in communications, radar, navigation, and time and frequency applications. A traditional PLL typically consists of three parts: a phase detector (PD), a loop filter (LPF), and a voltage-controlled oscillator (VCO), and is classified as an analog PLL.

[0003] However, analog phase-locked loops (PLLs) suffer from the following technical drawbacks: temperature drift and aging issues, difficulty in parameter tuning, poor consistency, and low integration. With the development of FPGA technology, digital phase-locked loops (DPLLs) have emerged. DPLLs use digital phase detectors, digital loop filters, and digitally controlled oscillators to replace the corresponding analog devices, offering advantages such as programmable parameters, no temperature drift, and good consistency. However, existing FPGA-based DPLLs still have the following shortcomings:

[0004] The loop parameter configuration is inflexible, making it difficult to balance locking bandwidth and tracking accuracy, resulting in long locking time; the phase detection accuracy is limited, and the output phase noise and spurious performance are not ideal; the anti-harmonic locking capability is insufficient, and it is easy to mistakenly lock onto harmonics when there are harmonics or interference in the reference signal; there is a lack of effective locking detection and status indication mechanisms, and the loop status is unobservable and uncontrollable.

[0005] Therefore, how to design an FPGA-based digital phase-locked loop circuit with online configurable loop parameters, fast locking speed, high phase detection accuracy, strong harmonic resistance, and observable state is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a digital phase-locked loop circuit based on FPGA.

[0007] The objective of this invention is achieved through the following technical solution:

[0008] This application discloses a digital phase-locked loop circuit based on FPGA, including:

[0009] Reference clock input unit, used to input and shape reference signals;

[0010] A digital frequency and phase detector, connected to the reference clock input unit, is used to detect the frequency difference and phase difference between the reference signal and the feedback signal, and output a phase error signal.

[0011] A digital loop filter, connected to the digital frequency and phase detector, is used to filter the phase error signal and output a frequency control word.

[0012] A numerically controlled oscillator, connected to the digital loop filter, is used to generate an output clock signal according to the frequency control word;

[0013] The feedback divider is connected to the numerically controlled oscillator and the digital frequency and phase detector respectively, and is used to divide the output clock signal to generate a feedback signal and feed it back to the digital frequency and phase detector.

[0014] A parameter configuration interface, connected to the digital loop filter, is used for online configuration of loop parameters, including loop bandwidth and damping coefficient.

[0015] The lock detection unit is connected to the reference clock input unit and the feedback divider, respectively, and is used to detect the loop lock status and output a lock indication.

[0016] Furthermore, the digital frequency and phase detector includes a frequency detector and a phase detector. The digital frequency and phase detector operates in frequency discrimination mode when the frequency is out of lock, pulling the loop into the capture band; after the frequency is locked, it switches to phase discrimination mode to perform phase tracking.

[0017] Furthermore, the digital loop filter adopts a second-order proportional-integral structure, including a proportional branch and an integral branch; the proportional branch is used to reflect the instantaneous magnitude of the phase error and provide an immediate phase correction; the integral branch is used to reflect the historical cumulative amount of the phase error and to eliminate steady-state phase error.

[0018] Furthermore, the parameter configuration interface adopts an SPI interface or a parallel register interface; a wide loop bandwidth is used during the acquisition phase to speed up locking, and after locking, it automatically switches to a narrow loop bandwidth to reduce phase noise.

[0019] Furthermore, the numerically controlled oscillator employs a phase accumulator in conjunction with a sine lookup table. The phase accumulator consists of an N-bit adder and an N-bit phase register. At the arrival of each FPGA clock cycle, the N-bit adder adds the frequency control word to the current value of the N-bit phase register. The bit width of the frequency control word is not less than 32 bits, and the result is written back to the N-bit phase register. Then, the high-order output bit of the N-bit phase register is used as the address of the sine lookup table. The N-bit phase register automatically wraps around when the accumulation overflows, realizing modulo 2 to the power of N operations.

[0020] Furthermore, it also includes a harmonic lockout suppression unit, used to preset and sweep the frequency control word before loop locking, and to prevent the loop from locking to the harmonics of the reference signal based on the frequency difference detection results between the reference signal and the feedback signal; specifically including:

[0021] Within a fixed time window T, the rising edges of the reference signal ref and the feedback signal fb are counted respectively to obtain the reference signal count value N_ref and the feedback signal N_fb. The frequency difference Δf is calculated using the formula Δf=(N_fb−N_ref) / T.

[0022] If the frequency difference Δf satisfies the formula Δf≈(k−1)×f_ref, where k is an integer greater than or equal to 2 and f_ref is the frequency of the reference signal, then it is determined that there is a risk of harmonic lock-in. The initial frequency control word FCW_init of the numerically controlled oscillator is preset to near the base frequency, i.e., FCW_init=f_ref×N×2^32 / f_clk, where N represents the feedback division ratio and f_clk represents the FPGA operating clock frequency. Then, a linear frequency sweep is performed from low to high starting from the base frequency. During the frequency sweep, the frequency difference Δf is continuously monitored. When |Δf| is less than the preset capture threshold, it is determined that the loop has captured the base frequency, the frequency sweep is stopped, and normal closed-loop lock-in is entered.

[0023] Furthermore, the locking detection unit is used to determine loop locking when the phase error signal is less than a set threshold for N consecutive cycles, and outputs a locking indication signal; and writes the locking status into a status register for external reading.

[0024] Furthermore, it also includes a multi-channel multiplexing unit, which enables a single digital loop filter and a single numerically controlled oscillator to be shared among multiple channels via time-division multiplexing;

[0025] The multi-channel multiplexing unit allocates an independent channel status register for each channel and sets a channel polling counter. It sequentially selects the channel that needs to be served according to a fixed time slice. Within the time slice of the current channel, it multiplexes the digital loop filter and the numerically controlled oscillator to perform a phase detection result input, loop filtering and numerically controlled oscillator phase update operation on the channel, and writes the operation result back to the status register group corresponding to the channel.

[0026] The beneficial effects of this invention are:

[0027] 1) This application relies on full digitalization, which eliminates the problems of temperature drift, aging and dispersion of analog devices, resulting in high frequency stability and significantly improved consistency and reliability of batch products;

[0028] 2) In this application, parameters such as loop bandwidth and damping coefficient can be configured online through registers, and automatic switching between "wide loop bandwidth fast acquisition - narrow loop bandwidth precise tracking" is supported, taking into account both locking speed and low phase noise, and can be flexibly adapted to various application scenarios without changing hardware;

[0029] 3) This application adopts a high-resolution numerically controlled oscillator and a harmonic lock-in suppression and lock-in detection mechanism, which has high phase detection accuracy, strong anti-harmonic interference capability, reliable lock-in, and the loop status is observable and controllable;

[0030] 4) This application is based on FPGA, which has high integration and strong reconfigurability. It can be integrated with other digital logic such as baseband processing on the same chip and supports multi-channel time-division multiplexing, which significantly reduces the number of devices, circuit board area and system cost. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of a digital phase-locked loop circuit based on FPGA according to an embodiment of the present invention. Detailed Implementation

[0032] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] See Figure 1 This application discloses a digital phase-locked loop circuit based on FPGA, comprising:

[0034] Reference clock input unit, used to input and shape reference signals;

[0035] A digital frequency and phase detector, connected to the reference clock input unit, is used to detect the frequency difference and phase difference between the reference signal and the feedback signal, and output a phase error signal.

[0036] A digital loop filter, connected to the digital frequency and phase detector, is used to filter the phase error signal and output a frequency control word.

[0037] A numerically controlled oscillator, connected to the digital loop filter, is used to generate an output clock signal according to the frequency control word;

[0038] The feedback divider is connected to the numerically controlled oscillator and the digital frequency and phase detector respectively, and is used to divide the output clock signal to generate a feedback signal and feed it back to the digital frequency and phase detector.

[0039] A parameter configuration interface, connected to the digital loop filter, is used for online configuration of loop parameters, including loop bandwidth and damping coefficient.

[0040] The lock detection unit is connected to the reference clock input unit and the feedback divider, respectively, and is used to detect the loop lock status and output a lock indication.

[0041] For example, the digital frequency and phase detector includes a frequency detector and a phase detector. The digital frequency and phase detector operates in frequency detection mode (frequency detector) when the frequency is out of lock, pulling the loop into the capture band; after the frequency is locked, it switches to phase detection mode (phase detector) to perform phase tracking.

[0042] For example, the digital loop filter adopts a second-order proportional-integral (PI) structure, including a proportional branch and an integral branch. The proportional branch reflects the instantaneous magnitude of the phase error, providing an immediate phase correction (determining the loop's transient response speed and damping characteristics). The integral branch reflects the historical cumulative amount of the phase error, used to eliminate steady-state phase errors. The proportional branch is responsible for quickly pulling the loop into the locking range, while the integral branch is responsible for eliminating the residual phase difference after locking, together determining the loop's damping coefficient.

[0043] For example, the parameter configuration interface adopts an SPI interface or a parallel register interface; a wide loop bandwidth is used during the acquisition phase to speed up locking, and after locking, it automatically switches to a narrow loop bandwidth to reduce phase noise.

[0044] For example, the numerically controlled oscillator uses a phase accumulator in conjunction with a sine lookup table, wherein the bit width of the frequency control word is not less than 32 bits (to obtain sufficiently high frequency resolution).

[0045] Specifically, the phase accumulator consists of an N-bit adder and an N-bit phase register. When each FPGA clock cycle arrives, the N-bit adder adds the frequency control word (FCW) to the current value of the N-bit phase register and writes the result back to the N-bit phase register. The output of the N-bit phase register is the phase value at the current moment. Therefore, the high-order bits of the output of the N-bit phase register are used as the address of the sine lookup table.

[0046] Specifically, the sine lookup table pre-stores the sine wave sample value of a complete cycle. The table is looked up according to the high-order address output by the N-bit phase register to output the corresponding sine amplitude quantization value. When the phase register overflows, it automatically wraps back (modulo 2 to the power of N), thereby realizing continuous and non-jumping phase output and ensuring the phase continuity of the output signal.

[0047] Specifically, the frequency control word (FCW) and the output frequency f_out satisfy f_out = FCW × f_clk / 2^N. The output frequency can be precisely adjusted by changing the frequency control word (FCW) (f_clk represents the FPGA operating clock frequency).

[0048] For example, it also includes a harmonic lockout suppression unit, which is used to preset and sweep the frequency control word before loop locking, and avoid the loop from locking to the harmonics of the reference signal based on the frequency difference detection results of the reference signal and the feedback signal.

[0049] Specifically, when the loop starts, the frequency discriminator first detects the frequency difference between the reference signal and the feedback signal. Within a fixed time window T, the frequency discriminator counts the rising edges of the reference signal ref and the feedback signal fb respectively to obtain the reference signal count value N_ref and the feedback signal N_fb. The frequency difference Δf is calculated using the formula Δf=(N_fb−N_ref) / T.

[0050] If the frequency difference Δf satisfies the formula Δf≈(k−1)×f_ref, where k is an integer greater than or equal to 2 and f_ref is the frequency of the reference signal, then a harmonic lock-in risk is identified (the frequency difference Δf is close to an integer multiple of the reference signal frequency f_ref). The initial frequency control word FCW_init of the numerically controlled oscillator is preset to near the base frequency, i.e., FCW_init=f_ref×N×2^32 / f_clk, where N represents the feedback division ratio and f_clk represents the FPGA operating clock frequency. Subsequently, a linear frequency sweep is performed from low to high starting from the base frequency, continuously monitoring the frequency difference Δf during the sweep. When |Δf| is less than the preset capture threshold, it is determined that the loop has captured the base frequency, the frequency sweep stops, and normal closed-loop locking is initiated. If the frequency sweep reaches the upper limit but still fails to capture, the frequency sweep restarts from the base frequency. This process of frequency difference detection—harmonic determination—base frequency preset—frequency sweep locking effectively avoids the loop from mistakenly locking onto the harmonics of the reference signal.

[0051] For example, the locking detection unit is used to determine loop locking when the phase error signal is less than a set threshold for N consecutive cycles, and outputs a locking indication signal; and writes the locking status into a status register for external reading.

[0052] For example, it also includes a multi-channel multiplexing unit, used to enable a single digital loop filter and a single numerically controlled oscillator to be shared among multiple channels via time-division multiplexing, thereby reducing FPGA resource consumption; the specific implementation steps of the multi-channel multiplexing unit include:

[0053] Step 1: The multi-channel multiplexing unit allocates an independent channel status register for each channel to store the phase error value, loop filter intermediate state (integral accumulation value), frequency control word, digitally controlled oscillator phase accumulation value, feedback frequency divider counter value, and lock status of the channel, ensuring that the operation state of each channel is completely independent.

[0054] Step 2: Set up a channel polling counter. Select the channel that needs to be served sequentially according to a fixed time slice (e.g., every N FPGA clock cycles). The channel number increments from 0 to the total number of channels minus 1 and then loops back. In the time slice of the current channel, read the phase error, loop filter status and numerically controlled oscillator phase accumulation value saved in the previous moment from the status register group corresponding to the channel.

[0055] Step 3: Within the current channel's time slice, the digital loop filter and numerically controlled oscillator are reused to perform a phase detection result input, loop filtering, and numerically controlled oscillator phase update operation on the channel. The operation results (new frequency control word, numerically controlled oscillator phase accumulation value, frequency division count value, etc.) are written back to the corresponding status register group of the channel for use the next time the channel is scheduled.

[0056] Step 4: Increment the channel polling counter by 1, switch to the next channel, repeat steps 2 and 3, poll all channels once, then return to channel 0 and continue the loop.

[0057] Specifically, through the time-division multiplexing mechanism, each channel uses the same set of loop filters and numerically controlled oscillators hardware in a time-discretionary manner, while the state is saved completely independently. This significantly reduces the FPGA logic resource consumption in multi-channel application scenarios while ensuring no crosstalk between channels.

[0058] For example, in this application, the reference signal is shaped by the reference clock input unit and then input to the digital frequency and phase detector; the feedback divider divides the output clock to obtain the feedback signal; the digital frequency and phase detector detects the frequency difference and phase difference between the reference signal and the feedback signal and outputs the phase error; the digital loop filter filters the phase error and outputs the frequency control word; the digitally controlled oscillator generates the output clock according to the frequency control word to form a closed loop.

[0059] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. An FPGA-based digital phase-locked loop circuit, characterized by, include: Reference clock input unit, used to input and shape reference signals; A digital frequency and phase detector, connected to the reference clock input unit, is used to detect the frequency difference and phase difference between the reference signal and the feedback signal, and output a phase error signal. A digital loop filter, connected to the digital frequency and phase detector, is used to filter the phase error signal and output a frequency control word. A numerically controlled oscillator, connected to the digital loop filter, is used to generate an output clock signal according to the frequency control word; The feedback divider is connected to the numerically controlled oscillator and the digital frequency and phase detector respectively, and is used to divide the output clock signal to generate a feedback signal and feed it back to the digital frequency and phase detector. A parameter configuration interface, connected to the digital loop filter, is used for online configuration of loop parameters, including loop bandwidth and damping coefficient. The lock detection unit is connected to the reference clock input unit and the feedback divider, respectively, and is used to detect the loop lock status and output a lock indication.

2. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: The digital frequency and phase detector includes a frequency detector and a phase detector. When the frequency is unlocked, the digital frequency and phase detector operates in frequency detection mode to pull the loop into the capture band; after the frequency is locked, it switches to phase detection mode to perform phase tracking.

3. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: The digital loop filter adopts a second-order proportional-integral structure, including a proportional branch and an integral branch. The proportional branch is used to reflect the instantaneous magnitude of the phase error and provide an immediate phase correction. The integral branch is used to reflect the historical cumulative amount of the phase error and is used to eliminate steady-state phase error.

4. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: The parameter configuration interface uses an SPI interface or a parallel register interface; a wide loop bandwidth is used during the acquisition phase to speed up locking, and after locking, it automatically switches to a narrow loop bandwidth to reduce phase noise.

5. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: The numerically controlled oscillator employs a phase accumulator in conjunction with a sine lookup table. The phase accumulator consists of an N-bit adder and an N-bit phase register. At the arrival of each FPGA clock cycle, the N-bit adder adds the frequency control word to the current value of the N-bit phase register. The frequency control word has a bit width of not less than 32 bits. The result is then written back to the N-bit phase register. Subsequently, the high-order output of the N-bit phase register is used as the address of the sine lookup table. The N-bit phase register automatically wraps around when the accumulation overflows, realizing modulo 2 to the power of N operations.

6. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: It also includes a harmonic lockout suppression unit, used to preset and sweep the frequency control word before loop locking, and to prevent the loop from locking to the harmonics of the reference signal based on the frequency difference detection results between the reference signal and the feedback signal; specifically including: Within a fixed time window T, the rising edges of the reference signal ref and the feedback signal fb are counted respectively to obtain the reference signal count value N_ref and the feedback signal N_fb. The frequency difference Δf is calculated using the formula Δf=(N_fb−N_ref) / T. If the frequency difference Δf satisfies the formula Δf≈(k−1)×f_ref, where k is an integer greater than or equal to 2 and f_ref is the frequency of the reference signal, then it is determined that there is a risk of harmonic lock-in. The initial frequency control word FCW_init of the numerically controlled oscillator is preset to near the base frequency, i.e., FCW_init=f_ref×N×2^32 / f_clk, where N represents the feedback division ratio and f_clk represents the FPGA operating clock frequency. Then, a linear frequency sweep is performed from low to high starting from the base frequency. During the frequency sweep, the frequency difference Δf is continuously monitored. When |Δf| is less than the preset capture threshold, it is determined that the loop has captured the base frequency, the frequency sweep is stopped, and normal closed-loop lock-in is entered.

7. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: The locking detection unit is used to determine loop locking when the phase error signal is less than a set threshold for N consecutive cycles, and outputs a locking indication signal; and writes the locking status into the status register for external reading.

8. The FPGA-based digital phase-locked loop circuit of claim 1, wherein: It also includes a multi-channel multiplexing unit, which enables a single digital loop filter and a single numerically controlled oscillator to be shared among multiple channels via time-division multiplexing; The multi-channel multiplexing unit allocates an independent channel status register for each channel and sets a channel polling counter. It sequentially selects the channel that needs to be served according to a fixed time slice. Within the time slice of the current channel, it multiplexes the digital loop filter and the numerically controlled oscillator to perform a phase detection result input, loop filtering and numerically controlled oscillator phase update operation on the channel, and writes the operation result back to the status register group corresponding to the channel.