An FPGA-based method and system for anti-jitter automatic gain control

By implementing power estimation, interval determination, and attenuation adjustment in the FPGA hardware logic, and combining sliding window and hysteresis loop, the problem of slow response speed and easy lockout of traditional gain control schemes in high dynamic scenarios is solved. Microsecond-level gain control and multi-channel adaptive adjustment are achieved, improving the real-time performance and flexibility of the system.

CN123122479APending Publication Date: 2026-11-17NANJING DIGITGATE COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing wireless communication systems, traditional automatic gain control schemes are difficult to meet real-time requirements in high-dynamic scenarios, with slow response speed, low accuracy, and easy loss of lock-on in complex electromagnetic environments, and cannot effectively cope with sudden strong signal interference.

Method used

An FPGA-based anti-jitter automatic gain control method is adopted. By implementing power estimation, interval determination and attenuation adjustment in hardware logic, combined with sliding window, hysteresis loop and anti-jitter state machine, microsecond-level gain control is achieved, supporting multi-channel parallel processing.

Benefits of technology

It achieves microsecond-level gain control response speed, strong anti-oscillation performance, high gain adjustment accuracy, supports adaptive adjustment of multi-band and multi-antenna patterns, and reduces system power consumption and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122479A_ABST
    Figure CN123122479A_ABST
Patent Text Reader

Abstract

This invention discloses an FPGA-based automatic gain control method and system for jitter reduction, belonging to the field of wireless communication digital signal processing. Addressing the problems of poor real-time performance, fixed gain levels, and susceptibility to oscillation in existing solutions, this invention decentralizes power estimation, interval determination, and attenuation adjustment to FPGA hardware logic. The method includes: a power calculation step, summing the squares of the I and Q digital signals and averaging them over a sliding window; an interval determination step, comparing the average power with multi-level configurable threshold hysteresis and outputting a power type code; a jitter reduction adjustment step, adjusting the attenuation control code in steps after confirmation by a wait counter; a mapping output step, mapping the control code to two-stage attenuator drive signals; and a parameter configuration step, dynamically updating parameters through an external interface and supporting both manual and automatic modes. This invention achieves microsecond-level response and oscillation-free gain control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication digital signal processing technology, and specifically to an FPGA-based anti-jitter automatic gain control method and system. Background Technology

[0002] Automatic gain control (AGC) is a core module of the wireless receiver link. Its function is to dynamically adjust the gain based on the input signal power to maintain the output signal amplitude within a suitable range. In applications such as UAV communication, radar detection, and electronic warfare, the received signal strength may fluctuate by more than 60 decibels in a very short time due to factors such as distance, multipath propagation, and interference. This places extremely high demands on the response speed, accuracy, and stability of gain control. Especially during the high-speed movement of UAVs, the received signal power may fluctuate drastically on the order of microseconds due to frequent changes in flight altitude and distance. Traditional software-implemented gain control schemes are difficult to meet the real-time requirements of such high-dynamic scenarios due to factors such as operating system scheduling delays and uncertain interrupt responses. Furthermore, in complex electromagnetic environments, the presence of transient strong signals such as adjacent channel interference and pulse interference further exacerbates the difficulty of gain control, easily leading to receiver link saturation or loss of lock.

[0003] Existing solutions are mainly divided into two categories: analog and digital. Analog solutions rely on variable gain amplifiers and analog feedback loops, which suffer from large temperature drift and poor flexibility. Digital solutions are implemented in the baseband digital domain, but generally have the following drawbacks:

[0004] Firstly, the response speed is slow. Large window averaging or infinite impulse response filtering introduces uncontrollable group delay, resulting in a response delay of hundreds of microseconds to sudden strong signals, making it impossible to track the rapid fading of drones.

[0005] Secondly, the gear positions are fixed, and the step and hysteresis are hard-coded. Different frequency bands and different antenna patterns require re-integration and rewiring.

[0006] Third, the model is singular, and a single linear mapping is prone to over-adjustment under strong disturbances;

[0007] Fourth, it has poor robustness, lacks anti-oscillation mechanisms, and is prone to lockout; fifth, the parameters are fixed, modifications require recompilation, and the multi-channel control capability is insufficient.

[0008] Among existing solutions, the first type uses square-law detection and infinite impulse response filtering to estimate power and lookup table control of gain. The filter group delay makes the response uncontrollable, and the lookup table is fixed. The second type dynamically adjusts the integral time constant based on the signal-to-noise ratio, improving steady-state accuracy but still being a single linear mapping. It is prone to over-adjustment under strong interference and does not solve the multi-channel problem. The third type is used for software-defined radio, supporting multiple modes, but the state machine only contains three actions: increase, decrease, and hold, with fixed steps, making it prone to oscillation near the critical point. In addition, some solutions attempt to use analog controllable gain amplifiers with digital feedback, but analog devices suffer from large temperature drift and poor linearity, making it difficult to meet the requirements of broadband, high-precision applications.

[0009] In summary, existing solutions have shortcomings in key dimensions such as power range granularity, hysteresis design, step configurability, anti-oscillation mechanism, and parameter flexibility. Summary of the Invention

[0010] The purpose of this invention is to provide an FPGA-based automatic gain control method and system for jitter reduction, so as to solve the above-mentioned technical problems existing in the prior art.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: an FPGA-based anti-jitter automatic gain control method. The core of this method lies in decentralizing power estimation, interval determination, and attenuation adjustment to hardware logic, and utilizing a sliding window, hysteresis loop, and anti-jitter state machine to achieve microsecond-level, oscillation-free gain control. The method includes the following steps:

[0012] The power calculation step involves squaring and summing the input I-channel and Q-channel digital signals to obtain an instantaneous power estimate, and then performing a sliding window cumulative average on the instantaneous power estimate to obtain the window average power.

[0013] The interval determination step involves comparing the average power of the window with a multi-level configurable power threshold with hysteresis, and outputting a power type code, which includes a direction bit and a step size bit.

[0014] The anti-shake adjustment step, based on the power type code, after anti-shake confirmation by the configurable wait counter, adjusts the attenuator control code according to the configurable step value and performs saturation protection. When the power limit is detected to be exceeded, the wait counter is started. The adjustment action is only performed after the duration of the limit exceed the preset count threshold. If the limit exceeds the limit and disappears during the wait period, the adjustment is canceled and the system returns to the idle state.

[0015] The mapping output step maps the adjusted attenuator control code to external two-stage attenuator drive signals and outputs them. The first-stage attenuator is responsible for coarse adjustment and the second-stage attenuator is responsible for fine adjustment. The mapping process converts the internal control code into two unsigned external control codes and performs overflow protection on the sign bit.

[0016] The parameter configuration steps dynamically update the power threshold, wait count, step value, and window length parameters through an external configuration interface to achieve adaptive gain control under different channel conditions. It supports both manual and automatic working modes. In automatic mode, the above steps form a closed-loop control, while in manual mode, the attenuator control value is directly given externally for link calibration.

[0017] Furthermore, in the power calculation step, the sliding window averaging adopts a circular buffer structure. Each clock cycle, new samples are shifted in and the oldest samples are shifted out. The accumulator is updated in such a way that the current window sum equals the previous cycle window sum plus the new sample and then subtracts the old sample that was shifted out, so that the window averaging operation has a constant time complexity. The window length is controlled by configuration parameters and is an integer power of 2 to achieve a balance between response speed and smoothness.

[0018] Furthermore, in the interval determination step, there are six multi-level configurable power thresholds, arranged from high to low as: extremely high threshold, relatively high threshold, high threshold, low threshold, relatively low threshold, and extremely low threshold. Each of the six thresholds can be configured independently, and their magnitudes are strictly monotonically decreasing, dividing the power range into five effective operating intervals and two extreme intervals. The difference between any two adjacent thresholds constitutes a hysteresis bandwidth, which is independently configurable. When the power increases from low to high and crosses the high threshold, it triggers an increase in attenuation. When the power decreases, it needs to drop below the low threshold to trigger a decrease in attenuation. The difference between the high threshold and the low threshold is the hysteresis bandwidth, used to prevent critical point oscillation.

[0019] Furthermore, in the anti-shake adjustment step, the anti-shake mechanism of the waiting counter specifically includes: setting independent high-power waiting count thresholds and low-power waiting count thresholds; starting high-power waiting count when the power exceeding the limit is in the high-power direction, and starting low-power waiting count when it is in the low-power direction; if the exceeding direction reverses or the power returns to the valid range during the counting process, the counter is cleared and returns to the idle state; only after the count accumulates to the corresponding threshold will it enter the attenuation adjustment state to perform an increment or decrement operation.

[0020] Furthermore, in the anti-shake adjustment step, the step value includes three configurable step sizes: fast step, medium step, and slow step, which are adaptively selected according to the degree of power deviation from the target range. When the power is far from the target range, a large step is used to speed up the response, and a small step is used when the power is close to the target range to improve accuracy. All three step values ​​are configurable through an external register interface.

[0021] Furthermore, the anti-jitter adjustment step also includes saturation clamping protection: if the adjusted control code will exceed the configurable maximum value in the direction of increasing attenuation, it will be clamped to the maximum value; if the adjusted control code will be lower than zero in the direction of decreasing attenuation, it will be clamped to zero; the maximum value can be configured according to the specifications of the attenuator used to adapt to external devices with different bit widths and attenuation steps.

[0022] The present invention also provides a jitter-reducing automatic gain control system for implementing the above method, the system comprising:

[0023] FPGA chips integrate programmable logic.

[0024] Low-noise amplifier chips are used to amplify radio frequency signals without introducing noise.

[0025] A two-stage CNC stepper attenuator chip is connected to the FPGA chip and communicates through a parallel or serial interface;

[0026] The radio frequency front-end chip is used to output I-channel and Q-channel digital signals to the FPGA chip;

[0027] The FPGA chip is configured as the system's real-time execution and hardware acceleration engine. It includes a power calculation engine, a range determination engine, a stabilization state machine, a step control module, and a mapping module. It receives I-channel and Q-channel data and performs power estimation, range determination, stabilization adjustment, and attenuator configuration in hardware parallel mode, thereby achieving microsecond-level, uninterrupted automatic gain control.

[0028] Furthermore, the FPGA chip is internally divided into:

[0029] The interface layer is configured to perform parameter configuration steps, receiving and updating power threshold, step value and count parameters through an external configuration interface;

[0030] The processing layer is configured to perform power calculation and interval determination steps, and generate power type codes containing direction and step size.

[0031] The driver layer is configured to execute the anti-jitter adjustment steps and the mapping output steps, and manage state machine transitions, saturation clamping, and external attenuator drive signal generation.

[0032] The three layers are connected by well-defined internal signals and operate as a whole under a single data clock domain.

[0033] Preferably, within the FPGA chip, the driver layer and the processing layer work together to form a complete hardware acceleration pipeline, specifically including:

[0034] The power calculation engine utilizes cascaded hard-core multipliers to achieve fusion calculation of I-way squares and Q-way squares, as well as sliding window updates.

[0035] The interval determination engine is signal-connected to the power calculation engine and is used to compare the average power with multi-level thresholds and output a power type code.

[0036] The anti-shake state machine is connected to the interval determination engine signal and is used to monitor the flag bit, perform wait count confirmation and saturation clamp protection;

[0037] The step control module is connected to the anti-shake state machine signal and is used to select the gear and adjust the internal attenuation code according to the encoding.

[0038] The mapping module is signal-connected to the step control module and is used to convert the internal attenuation code into two external attenuator control codes.

[0039] With the above architecture, hardware parallel processing replaces software serial computing, achieving full-process acceleration from power detection to chip configuration.

[0040] Furthermore, the system supports a multi-channel parallel processing architecture, specifically including:

[0041] Multi-channel independent initialization: During the power-on startup phase, the system performs synchronous initialization on all receiving channels. Each channel independently sets its gain control unit to a preset intermediate attenuation state to avoid saturation of the subsequent analog-to-digital converter or signal processing unit due to the maximum path gain at the moment of power-on.

[0042] Parallel power calculation and determination: Each channel runs its own power calculation engine and interval determination engine. The power calculation engine of each channel estimates the power of the received I and Q digital signals respectively. The interval determination engine compares the estimated power value with the hysteresis threshold configured independently for that channel and outputs the power type code independently for that channel. The power calculation status and determination threshold parameters are not shared between channels.

[0043] Independent anti-shake and gain adjustment: Each channel independently executes the anti-shake adjustment process according to its own output power type code, independently determines the adjustment direction, and independently performs step adjustment and saturation clamping protection on the attenuator control code connected to the channel after meeting the preset anti-shake conditions.

[0044] Multi-channel mapping output: Each channel maps the adjusted internal digital control code to the corresponding external physical attenuator drive signal and outputs it independently, so as to realize independent control of the gain of the multi-channel RF front end.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. By offloading power estimation, range determination, and attenuation adjustment to FPGA hardware logic, and replacing serial software calculations with hardware processing, the response time of power estimation and gain adjustment is improved from milliseconds to microseconds, meeting the stringent real-time requirements of high-dynamic wireless communication scenarios such as UAV communication, radar detection, and electronic warfare.

[0047] 2. By combining the hysteresis loop and the anti-jitter mechanism of the wait counter, false limit exceedances caused by transient interference are effectively filtered out, achieving anti-oscillation and seamless transition of gain adjustment, avoiding receiver link interruption and amplitude jitter, and overcoming the shortcomings of existing solutions that lack anti-oscillation mechanism and are prone to lockout.

[0048] 3. By adopting an adaptive adjustment strategy that combines six independent configurable power thresholds with three-speed stepping, a large stepping is used to speed up the response when the target range is far away, and a small stepping is used to improve accuracy when the target range is close. This significantly improves the gain control accuracy and steady-state smoothness across the entire temperature and frequency range, overcoming the shortcomings of existing solutions with fixed gears and single linear mapping that are prone to over-adjustment under strong interference.

[0049] 4. By integrating power calculation, control and drive into a single FPGA chip, the functions of traditional multi-chip architecture are implemented with pure logic, which reduces system power consumption, cost and size, and simplifies system design and hardware complexity.

[0050] 5. Through the external configuration interface, it supports dynamic updates of all parameters such as threshold, step value, wait count and window length during operation, enabling the same hardware to adapt to channel conditions under different frequency bands, different antenna patterns and different flight attitudes. The hardware logic can flexibly adapt to various attenuator chips with different numbers of channels and different interface protocols, and supports multi-channel independent parallel expansion, enhancing the system's flexibility and scalability. Attached Figure Description

[0051] Figure 1 This is a block diagram of the overall structure of the fast-response anti-jitter automatic gain control system provided in this embodiment.

[0052] Figure 2 This is a schematic diagram illustrating the implementation steps of the fast-response anti-jitter automatic gain control method provided in this embodiment. Detailed Implementation

[0053] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0054] Example 1

[0055] See Figure 1This embodiment provides an FPGA-based anti-jitter automatic gain control system. For example... Figure 1 As shown, the system includes an FPGA chip, a low-noise amplifier chip, a two-stage numerically controlled step attenuator chip, and an RF front-end chip.

[0056] The FPGA chip integrates programmable logic and is configured as the system's real-time execution and hardware acceleration engine. The FPGA chip has a three-layer architecture: an interface layer, a processing layer, and a driver layer.

[0057] The interface layer receives and updates the power threshold, step value, and counting parameters through an external configuration interface;

[0058] The processing layer performs power calculation and interval determination steps to generate power type codes containing direction and step size;

[0059] The driver layer executes the anti-jitter adjustment steps and the mapping output steps, and manages state machine transitions, saturation clamping, and the generation of external attenuator drive signals. The three layers are connected through clearly defined internal signals, and the whole system operates under a single data clock domain.

[0060] The FPGA chip internally forms a complete hardware acceleration pipeline, which includes a power calculation engine, a range determination engine, a debouncing state machine, a stepping control module, and a mapping module. The processing clock is twice the data clock speed, i.e. Among them, the data clock .

[0061] The low-noise amplifier chip is connected in series in the radio frequency signal path to amplify the radio frequency signal with low noise without introducing additional noise, thereby improving the signal-to-noise ratio of the receiving link.

[0062] The two-stage CNC stepper attenuator chip is connected to the FPGA chip and communicates through a serial peripheral interface. The attenuation step of the two-stage CNC stepper attenuator chip is 0.5dB / LSB, and the total coverage of the two cascaded stages is 63dB. The first stage is responsible for coarse adjustment, and the second stage is responsible for fine adjustment.

[0063] The radio frequency front-end chip is used to down-convert radio frequency signals and perform analog-to-digital conversion, and output I-channel and Q-channel digital signals to the FPGA chip.

[0064] The connection relationship of the above chips is as follows: the radio frequency signal is amplified by the low noise amplifier chip and then sent to the radio frequency front-end chip. The I and Q digital signals output by the radio frequency front-end chip are sent to the FPGA chip. The FPGA chip dynamically generates attenuator control codes according to the real-time signal power. The codes are then driven by the serial peripheral interface to complete the physical adjustment of the analog gain of the two-stage numerically controlled step attenuator chip, thus forming a complete automatic gain control closed loop.

[0065] Example 2

[0066] See Figure 2 This embodiment provides an FPGA-based automatic gain control method for jitter reduction.

[0067] For ease of expression, the following symbols are defined: , For the first Orthogonal data from sampling points, bit width is ; Instantaneous power; For length The average power of the sliding window; This is the smoothed power estimate; A six-level power threshold from high to low; , , It offers three step speeds: slow, medium, and fast. , For high and low power directions, the waiting count thresholds are used; This is the internal attenuation control code. ; , This is the drive code for a two-stage attenuator. The power threshold is stored in digital power code form and converted to dBm values ​​using a calibration factor.

[0068] After the system is powered on, the external processor sends the parameter set via the configuration bus. Write to the configuration register group; the synchronization module in each data clock... The rising edge is synchronized using two levels of registers, which latches the value of the configuration register into the working register to ensure that parameter updates are aligned with the data stream and do not produce metastability.

[0069] After loading is complete The value is set to an initial value of 64, and the state machine enters an idle state, waiting for I and Q data streams. The method includes the following steps:

[0070] Step S1: Power calculation steps. I and Q data are... The rate of continuous input power calculation engine. , After sign expansion, the results are fed into two hard-core multipliers, and a single cycle yields... and By utilizing the cascaded path of the DSP, the partial product of the preceding stage is directly introduced into the addition chain without passing through a register, completing the fusion calculation of instantaneous power in a single cycle.

[0071]

[0072] Maintenance length The circular buffer and accumulator are updated with constant time.

[0073]

[0074] Move right The average power of the sliding window is obtained at this position:

[0075]

[0076] Under exponential smoothing mode, the smoothed power estimate is obtained by weighted summation using the following formula:

[0077]

[0078] in Pick The operation can be implemented using bit shifting and addition / subtraction, eliminating the need for multiplier resources. The total latency of the three-stage pipeline described above is 3 data clock cycles (approximately 49 ns), and a new power estimate can be output in each data cycle without waiting for the entire window to be refilled. Window length Controlled by configuration parameters, preferably integer powers of 2, to achieve a balance between response speed and smoothness.

[0079] Step S2: Interval Determination Step. The interval determination engine evaluates the power estimate in each data period. Perform six levels of parallel comparisons.

[0080] The six threshold levels, from highest to lowest, are: extremely high threshold. Higher threshold High threshold Low threshold Lower threshold and extremely low threshold Each of the six thresholds can be configured independently and their magnitudes decrease monotonically, dividing the power range into five effective operating intervals and two extreme intervals. The comparison result output includes a power type code containing the direction bit "dir" and the step bit "step".

[0081] Introducing configurable hysteresis bandwidth between adjacent thresholds: and For example, hysteresis bandwidth Power rise surpasses The slow increase in attenuation is triggered at certain times, and the power must fall back to its previous level when the power drops. The following triggers a slow reduction in decay. This refers to the hysteresis, used to suppress jitter near the critical point; the hysteresis bandwidths of other levels are also independently configurable. The determination result is output as a valid flag pulse at the end of the data cycle.

[0082] Step S3: Anti-shake adjustment step. The anti-shake state machine transitions sequentially through idle state, high-power waiting state, low-power waiting state, adjustment state, and latching state.

[0083] If the direction is maintained in the idle state, then it is maintained. If the current state remains unchanged, otherwise the system transitions to a high-power or low-power wait state depending on the direction; in the wait state, the counter is started. The high and low directions are respectively based on , This is a threshold; if the direction reverses or the power returns to the normal range during the counting period, then... Clear to zero and return to the idle state;

[0084] Only when The summation reaches the corresponding threshold before entering the adjustment state. In the adjustment state, the step size is incremented from... Select step value ,implement And perform saturation clamping: increase the clamping in the attenuation direction to The attenuation direction is reduced and clamped to zero; then the new control code is latched and returned to the idle state.

[0085] From the occurrence of the violation to the completion of the control code update, it can be as fast as... Completed within a data period, of which This mechanism filters out short-term pulse interference with minimal resource overhead.

[0086] Step S4: Mapping Output Step. The mapping module maps the internal attenuation control codes using a coarse-to-fine strategy. Convert to two-way unsigned external driving code. Record the upper limit of the single-level code value. ,but:

[0087]

[0088]

[0089] satisfy The total attenuation is:

[0090]

[0091] when hour The first level independently assumes the responsibility of regulation; when The first stage is fully charged, and the second stage is used for fine-tuning, which is ensured by saturation clamping. Exceeding In this case, no overflow occurs.

[0092] The two drive signals are ultimately sent to an external two-stage numerically controlled stepper attenuator chip via a universal serial peripheral interface to complete the physical adjustment of the analog gain.

[0093] Step S5: Parameter configuration steps.

[0094] The external processor transmits the parameter group via the configuration bus. The configuration register set is written, and two-level register synchronization is used to ensure that parameter updates do not produce metastability. When the mode enable signal is active, it is in closed-loop automatic mode, where the above five steps run continuously to form a closed loop; when the enable signal is inactive, it is in manual mode, and external processors can directly write to it. , Used for production line calibration and troubleshooting; latches the current state instantly during mode switching. The value is used as a manual initial value to achieve a shockless transition.

[0095] Example 3

[0096] The difference between this embodiment and Embodiment 1 is that the system described in this embodiment supports a multi-channel parallel processing architecture. Other basic hardware components are the same as in Embodiment 1 and will not be repeated here.

[0097] Multi-channel independent initialization: During the power-on startup phase, the system performs synchronous initialization on all receiving channels. Each channel independently sets its gain control unit to a preset intermediate attenuation state to avoid saturation of the subsequent analog-to-digital converter or signal processing unit due to the maximum path gain at the moment of power-on.

[0098] Parallel power calculation and determination: Each channel operates its own power calculation engine and interval determination engine. The power calculation engine of each channel performs power estimation on the received I and Q digital signals respectively. The interval determination engine compares the estimated power value with the hysteresis threshold configured independently for that channel and outputs the power type code independently for that channel. The power calculation status and determination threshold parameters are not shared between channels.

[0099] Independent anti-shake and gain adjustment: Each channel independently executes the anti-shake adjustment process according to its own output power type code, independently determines the adjustment direction, and independently performs step adjustment and saturation clamping protection on the attenuator control code connected to the channel after meeting the preset anti-shake conditions.

[0100] Multi-channel mapping output: Each channel maps the adjusted internal digital control code to the corresponding external physical attenuator drive signal and outputs it independently to achieve independent control of the gain of the multi-channel RF front end.

[0101] Through the above implementation methods, the present invention successfully achieves rapid automatic adjustment of analog gain, providing key technical support for the stable and reliable operation of wireless communication equipment in harsh environments.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An FPGA-based anti-jitter automatic gain control method, characterized in that, Includes the following steps: Step 1, Power Calculation: Squaring and summing the input I-channel and Q-channel digital signals to obtain an instantaneous power estimate, and then averaging the instantaneous power estimate using a sliding window to obtain the window average power. Step 2, Interval Determination: The average power of the window is compared with the multi-level configurable power threshold by hysteresis, and the power type code is output. Step 3, Anti-shake adjustment: Based on the power type encoding, after anti-shake confirmation by the configurable wait counter, the attenuator control code is adjusted according to the configurable step value, and saturation protection is executed; when a power limit is detected, the wait counter is started, and the adjustment action is only executed after the limit exceeds the preset count threshold. If the limit disappears during the wait period, the adjustment is canceled and the system returns to the idle state. Step 4, Mapping Output: Map the adjusted attenuator control code to external two-stage attenuator drive signals and output them. The first-stage attenuator is responsible for coarse adjustment and the second-stage attenuator is responsible for fine adjustment. The mapping process converts the internal control code into two unsigned external control codes and performs overflow protection on the sign bit. Step 5, parameter configuration: Dynamically update the power threshold, wait count, step value and window length parameters through the external configuration interface to achieve adaptive gain control under different channel conditions.

2. The method according to claim 1, characterized in that, The sliding window averaging in step 1 uses a circular buffer structure. New samples are moved in and the oldest samples are moved out each clock cycle. The accumulator is updated in such a way that the current window sum equals the previous cycle window sum plus the new sample and then minus the moved-out old sample, so that the window averaging operation has a constant time complexity. The window length is controlled by configuration parameters and is an integer power of 2 to achieve a balance between response speed and smoothness.

3. The method according to claim 1, characterized in that, The multi-level configurable power thresholds mentioned in step 2 consist of six thresholds, each of which can be configured independently and their magnitudes are strictly monotonically decreasing, dividing the power range into five effective operating intervals and two extreme intervals; the difference between any two adjacent thresholds constitutes a hysteresis bandwidth, which is independently configurable. When the power increases from low to high and crosses the high threshold, it triggers an increase in attenuation. When the power drops back down, it needs to fall below the low threshold to trigger a decrease in attenuation. The difference between the high threshold and the low threshold is the hysteresis bandwidth. The power type encoding includes a direction bit and a step size bit.

4. The method according to claim 1, characterized in that, The wait counter debouncing mechanism described in step 3 specifically includes: setting independent high-power wait count thresholds and low-power wait count thresholds; When the power over-limit direction is high power, high power waiting count is started; when it is low power, low power waiting count is started. If the over-limit direction reverses or the power returns to the valid range during the counting process, the counter is cleared and returns to the idle state. Only after the count accumulates to the corresponding threshold will it enter the attenuation adjustment state to perform an increment or decrement operation. The step value mentioned in step 3 includes three configurable step sizes: fast step, medium step, and slow step. The step size is adaptively selected according to the degree of power deviation from the target range. When the power is far from the target range, a large step size is used to speed up the response, and a small step size is used when the power is close to the target range to improve accuracy. All three step sizes can be configured through the external register interface.

5. The method according to claim 1, characterized in that, Step 3 also includes saturation clamping protection: if the adjusted control code exceeds the configurable maximum value in the direction of increasing attenuation, it is clamped to the maximum value; if the adjusted control code is lower than zero in the direction of decreasing attenuation, it is clamped to zero. The maximum value is configured according to the specifications of the attenuator used to accommodate external devices with different bit widths and attenuation steps.

6. The method according to claim 1, characterized in that: It supports both manual and automatic working modes. In automatic mode, steps 1-5 form a closed-loop control, while in manual mode, the attenuator control value is directly given externally for link calibration.

7. A jitter-reducing automatic gain control system for implementing the method according to any one of claims 1 to 6, characterized in that, The system includes: FPGA chips integrate programmable logic. A two-stage CNC stepper attenuator chip is connected to the FPGA chip and communicates through a parallel or serial interface; The radio frequency front-end chip is used to output I-channel and Q-channel digital signals to the FPGA chip; The FPGA chip is configured to perform power calculation, interval determination, anti-jitter adjustment and mapping output, and dynamically generate attenuator control codes based on real-time signal power to drive external attenuators.

8. The anti-jitter automatic gain control system according to claim 7, characterized in that, The FPGA chip is internally divided into: The interface layer is configured to perform parameter configuration steps, receiving and updating power threshold, step value and count parameters through an external configuration interface; The processing layer is configured to perform power calculation and interval determination steps, and generate power type codes containing direction and step size. The driver layer is configured to execute the anti-jitter adjustment steps and the mapping output steps, and manage state machine transitions, saturation clamping, and external attenuator drive signal generation. The three layers are connected by well-defined internal signals and operate as a whole under a single data clock domain.

9. The anti-jitter automatic gain control system according to claim 8, characterized in that, Inside the FPGA chip, the driver layer and the processing layer work together to form a complete hardware acceleration pipeline, specifically including: The power calculation engine utilizes cascaded hard-core multipliers to achieve fusion calculation of I-way squares and Q-way squares, as well as sliding window updates. The interval determination engine is signal-connected to the power calculation engine and is used to compare the average power with multi-level thresholds and output a power type code. The anti-shake state machine is connected to the interval determination engine signal and is used to monitor the flag bit, perform wait count confirmation and saturation clamp protection; The step control module is connected to the anti-shake state machine signal and is used to select the gear and adjust the internal attenuation code according to the encoding. The mapping module, which is signal-connected to the step control module, is used to convert the internal attenuation code into two external attenuator control codes.

10. The anti-jitter automatic gain control system according to claim 7, characterized in that, The system supports a multi-channel parallel processing architecture, specifically including: Multi-channel independent initialization: During the power-on startup phase, the system performs synchronous initialization on all receiving channels. Each channel independently sets its gain control unit to a preset intermediate attenuation state to avoid saturation of the subsequent analog-to-digital converter or signal processing unit due to the maximum path gain at the moment of power-on. Parallel power calculation and determination: Each channel runs its own power calculation engine and interval determination engine. The power calculation engine of each channel performs power estimation on the received I and Q digital signals respectively. The interval determination engine compares the estimated power value with the hysteresis threshold configured independently for that channel and outputs the power type code independently for that channel. The power calculation status and determination threshold parameters are not shared between channels. Independent anti-shake and gain adjustment: Each channel independently executes the anti-shake adjustment process according to its own output power type code, independently determines the adjustment direction, and independently performs step adjustment and saturation clamping protection on the attenuator control code connected to the channel after meeting the preset anti-shake conditions. Multi-channel mapping output: Each channel maps the adjusted internal digital control code to the corresponding external physical attenuator drive signal and outputs it independently to achieve independent control of the gain of the multi-channel RF front end.