Wireless reception gain control apparatus and method, wireless communication device

By coordinating the analog and digital gain control modules through the main control module and dynamically adjusting the gain calculation window length and effective time in conjunction with the wireless frame reception status, the problem of asynchronous HRF receiver gain control is solved, and the accuracy and stability of gain adjustment are achieved.

CN120750358BActive Publication Date: 2026-01-13BEIJING SMARTCHIP SEMICON TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511222582.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-01-13
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing HRF receiver gain control methods suffer from a lack of synchronization between analog and digital gain control, resulting in inaccurate data amplitude adjustment, severe gain adjustment oscillations, and slow convergence.

Method used

The main control module coordinates the analog gain control module and the digital gain control module, and dynamically adjusts the analog gain calculation window length and the digital gain effective time based on the wireless frame reception status, thereby achieving synchronous control of analog gain and digital gain.

Benefits of technology

This reduces gain error, avoids severe oscillations and slow convergence in gain adjustment, and improves the accuracy and stability of data amplitude adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120750358B_ABST
    Figure CN120750358B_ABST
Patent Text Reader

Abstract

The application provides a wireless receiving gain control device and method and wireless communication equipment, and belongs to the technical field of wireless communication.The device comprises a master control module, an analog gain control module, a digital gain control module and a synchronization module; the master control module provides control information; the synchronization module provides synchronization parameters; the analog gain control module calculates preset gain required to be configured according to the control information and the current analog gain state parameter, updates the current analog gain state parameter according to the synchronization parameters, adjusts the window length of analog gain calculation according to the synchronization parameters and the current analog gain state; the digital gain control module adjusts the digital gain according to the control information and the updated analog gain state parameter, and adjusts the digital gain effective time according to the synchronization parameters.The application adjusts the window length of analog gain calculation and the digital gain effective time, and solves the problem that analog gain processing and digital gain processing are not synchronized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of wireless communication, in particular to a wireless receiving gain control device and method, and a wireless communication equipment. BACKGROUND

[0002] The high-speed power line carrier dual-mode HPLC-HRF takes power lines and space as transmission media, and forms an advantage complement between wired and wireless, so as to cope with problems of poor wired communication quality or communication interruption caused by impedance changes, attenuation or circuit breaking in the power grid environment, and problems of large spatial attenuation and weak penetration of wireless communication. The HRF (High-Frequency Radio Frequency) receiving gain control can guarantee normal processing of the wireless communication link, and is one of the most critical operations of the wireless communication performance.

[0003] The HRF wireless frame structure includes: STF (Short Training Filed, short training field, used to carry a short synchronization sequence), LTF (Long Training Filed, long training field), SIG (PHR Control Signal, physical frame header control word), PHR (Physical Header, physical frame header), and PSDU (Physical Layer Service Data Unit, physical layer service data unit).

[0004] The HRF receiving gain control mainly adopts an analog automatic gain control (AAGC for short) processing, including a radio frequency front-end self-control and an AAGC mode based on a digital baseband algorithm. The radio frequency front-end self-control mode is to perform RSSI estimation and amplitude adjustment on the analog signal inside the radio frequency front end. The AAGC mode based on the digital baseband control is to perform RSSI calculation on the ADC output data through a digital front-end gain control module, estimate the gain to be adjusted, and feed back to the radio frequency front end for data amplitude adjustment. Further, in order to guarantee the demodulation performance, a digital automatic gain control (DAGC for short) processing is added on the digital processing link, to perform RSSI calculation on the data processed by the filter, trap filter and other digital modules, estimate the amplitude ratio of the digital domain data to be adjusted, and adjust the data in the digital domain. In order to ensure that the channel response estimated by the LTF and the pilot is consistent with the amplitude of the SIG, PHR and PSDU carrier data to be equalized, the gain control processing is stopped when the STF or LTF reception is completed, that is, the gain at the time of completion of the STF or LTF reception is used as the adjustment gain of the SIG, PHR and PSDU data.

[0005] Existing HRF receiver gain control methods have several drawbacks. In HRF front-end self-control AAGC (Automatic Amplification and Gain Control) methods, the front-end calculates and adjusts the gain based on the received signal strength, while the digital processing front-end enables or disables gain control. Because the RF processing front-end is unaware of the received state of the radio frame, it can easily lead to the effective signal being incorrectly amplified or attenuated. In AAGC methods based on digital baseband algorithms, although the digital domain AAGC module can obtain the received state of the data frame, the unreasonable consideration of the gain activation time means that the data used in the next gain calculation includes data from before the configured gain took effect. This can easily lead to inaccurate gain calculations in the next iteration, causing problems such as severe oscillations in data amplitude adjustment, slow convergence, and even incorrect data adjustment direction (signals that should be amplified are attenuated, or vice versa).

[0006] Due to the limited range of analog gain, there is a risk that the data amplitude after RF front-end analog gain adjustment may not reach the target, or the data amplitude may be reduced after processing by functions such as downsampling filtering and notch filtering after the ADC. Therefore, digital automatic gain control (DAGC) needs to be added after the ADC or digital filtering for compensation. Between AAGC and DAGC, there are delays in processing by other digital functional modules, link transmission delays, and the time delay for analog gain to take effect. Furthermore, AAGC and DAGC processing are not correlated, and their gain adjustments cannot be synchronized. This can lead to the data being incorrectly amplified or reduced after DAGC processing based on the analog gain adjustment, and in severe cases, can cause problems such as violent oscillations in the adjusted data amplitude and slow convergence. Summary of the Invention

[0007] To address one of the aforementioned technical deficiencies, this invention provides a wireless receiver gain control device and method, and a wireless communication device.

[0008] The first aspect of the present invention provides a wireless receiver gain control device, comprising: a main control module, an analog gain control module, a digital gain control module, and a synchronization module;

[0009] The main control module is used to send control information to the analog gain control module and the digital gain control module;

[0010] The synchronization module is used to synchronously send synchronization parameters, which characterize the detection and reception status of wireless frames, to the analog gain control module and the digital gain control module.

[0011] The analog gain control module is used to calculate the preset gain that needs to be configured based on the received control information and the current analog gain status parameters, update the current analog gain status parameters based on the received synchronization parameters, and pass the updated analog gain status parameters to the digital gain control module; and adjust the window length of the analog gain calculation and the effective data activation time based on the received synchronization parameters and the current analog gain status, so that the current analog gain control processing is synchronized with the RF front-end processing.

[0012] The digital gain control module is used to adjust the digital gain according to the received control information and the updated analog gain status parameters, and to adjust the digital gain effective time according to the received synchronization parameters and the effective data effective time of the adjusted analog gain calculation, so that the current digital gain control processing is synchronized with the analog gain control processing.

[0013] In this embodiment of the invention, the analog gain control module includes: an analog gain state control parameter acquisition unit, a digital pre-compensation unit, a compensation gain calculation unit, and a compensation gain update and state switching unit;

[0014] The analog gain state control parameter acquisition unit is used to extract the data point threshold for analog gain adjustment and the length of the average power calculation window in the current state based on the updated analog gain state parameters and control information from the main control module.

[0015] The digital pre-compensation unit is used to perform pre-compensation processing on the data output from the front end;

[0016] The compensation gain calculation unit is used to calculate the compensation gain based on the data after compensation processing by the digital pre-compensation unit, according to the threshold of the number of data points for analog gain adjustment under the current state and the length of the average power calculation window.

[0017] The compensation gain update and state switching unit is used to calculate the preset gain and gain value of the state switching point that need to be configured at the current time based on the synchronization parameters from the synchronization module and the current analog gain state parameters, and to update the analog gain state parameters.

[0018] In this embodiment of the invention, the digital pre-compensation unit reads the compensation coefficient of the current data from the digital pre-compensation coefficient list according to the current data validity flag;

[0019] The digital pre-compensation coefficient list contains two elements. One element stores the digital pre-compensation coefficient value corresponding to the previous round of analog gain, which is used to perform digital pre-compensation on the current data when the current configuration gain is not in effect. The other element stores the digital pre-compensation coefficient value corresponding to the current analog gain, which is used to perform digital pre-compensation on the current data when the current configuration gain is in effect.

[0020] In this embodiment of the invention, the compensation gain calculation unit determines the current data validity flag based on the length of the average power calculation window, the threshold of the number of data points for analog gain adjustment, the target value of analog gain, and the digital pre-compensation unit, and performs compensation gain calculation; when the current data validity flag is valid, the data after compensation processing by the digital pre-compensation unit is stored in the average power calculation buffer; when the current data validity flag is invalid, the data after compensation processing by the digital pre-compensation unit is discarded.

[0021] In this embodiment of the invention, the compensation gain update and state switching unit calculates the preset gain and gain value of the state switching point that needs to be configured based on the synchronization parameters provided by the synchronization module, the gain control mode parameters corresponding to each analog gain state provided by the main control module, and the current analog gain state parameters, and updates the analog gain state parameters and transmits the updated analog gain state parameters to the digital gain control module.

[0022] In this embodiment of the invention, the compensation gain update and state switching unit employs multiple parallel processing branches to process compensation gain updates and state switching corresponding to multiple different analog gain states.

[0023] In this embodiment of the invention, the analog gain control module further includes: a configuration gain calculation unit;

[0024] The configuration gain calculation unit determines whether RF analog gain configuration and digital pre-compensation gain calculation are needed at the current moment based on the preset gain calculated by the compensation gain update and state switching unit, the previous round of gain configuration value, and the maximum gain that the RF can actually support.

[0025] If the previous gain configuration value is the same as the current preset gain, no gain configuration calculation will be performed in the current round.

[0026] If the gain configuration value in the previous round is different from the current preset gain, calculate the RF configuration gain and digital pre-compensation gain, and perform the gain adjustment in the next round to update the current total configuration gain to the preset gain.

[0027] If the preset gain is greater than the maximum gain that the RF can actually support, calculate the RF front-end configuration gain and the digital pre-compensated gain, and update the digital compensation gain list.

[0028] In this embodiment of the invention, the digital gain control module includes: a digital gain state control parameter acquisition unit, a compensation coefficient calculation unit, a compensation coefficient refinement and state switching unit, and a digital compensation unit;

[0029] The digital gain state control parameter acquisition unit is used to extract the length of the average power calculation window under the current state based on the digital gain state parameters and the control parameters provided by the main control module.

[0030] The compensation coefficient calculation unit is used to calculate the average power and the current compensation coefficient based on the received data from the previous stage;

[0031] The finer compensation coefficient and state switching unit is used to calculate the current point adjustment coefficient and perform state switching based on the synchronization parameters provided by the synchronization module, the gain control mode corresponding to each analog gain state provided by the main control module, the current analog gain state, the current digital gain state, and the effective delay of each digital gain state.

[0032] The digital compensation unit is used to multiply and compensate the current data based on the current point adjustment coefficient.

[0033] In this embodiment of the invention, the compensation coefficient finer and state switching unit adopts multiple parallel processing branches to process the point adjustment coefficients and state switching corresponding to multiple different analog gain states and digital gain states.

[0034] In this embodiment of the invention, the wireless receiving gain control device further includes: a first digital processing module and a second digital processing module;

[0035] The first digital processing module is used to perform digital link functional processing on the data after pre-compensation processing by the analog gain control module.

[0036] The second digital processing module is used to perform digital link functional processing on the data after digital gain adjustment output by the digital gain control module.

[0037] In this embodiment of the invention, the wireless receiver gain control device further includes: a radio frequency front-end processing module, used to adjust the sampled data with analog gain according to the preset gain that needs to be configured at present calculated by the analog gain control module, and send the data after analog gain adjustment to the analog gain control module.

[0038] A second aspect of the present invention provides a wireless receiver gain control method, the method comprising:

[0039] The main control module sends control information to the analog gain control module and the digital gain control module.

[0040] The synchronization module synchronously sends synchronization parameters, which characterize the detection and reception status of wireless frames, to the analog gain control module and the digital gain control module.

[0041] The analog gain control module calculates the preset gain to be configured based on the received control information and the current analog gain status parameters, updates the current analog gain status parameters based on the received synchronization parameters, and transmits the updated analog gain status parameters to the digital gain control module; and adjusts the window length of the analog gain calculation and the effective data activation time based on the received synchronization parameters and the current analog gain status, so that the current analog gain control processing is synchronized with the RF front-end processing.

[0042] The digital gain control module adjusts the digital gain based on the received control information and the updated analog gain status parameters, and adjusts the digital gain effective time based on the received synchronization parameters and the effective data effective time of the adjusted analog gain calculation, so that the current digital gain control processing is synchronized with the analog gain control processing.

[0043] In this embodiment of the invention, adjusting the window length for analog gain calculation and the effective data activation time based on the received synchronization parameters includes:

[0044] Based on the updated analog gain status parameters and control information from the main control module, extract the data point threshold for analog gain adjustment and the length of the average power calculation window in the current state.

[0045] The compensation gain is calculated based on the threshold of the number of data points for analog gain adjustment under the current state and the length of the average power calculation window;

[0046] Based on the synchronization parameters from the synchronization module and the current analog gain status parameters, calculate the preset gain and gain value of the state switching point that need to be configured, and update the analog gain status parameters.

[0047] In this embodiment of the invention, compensation gain calculation is performed based on the data point threshold for analog gain adjustment under the current state and the length of the average power calculation window, including:

[0048] The current data validity flag is determined based on the length of the average power calculation window, the data point threshold for analog gain adjustment, the target value of analog gain, and the digital pre-compensation unit, and then the compensation gain is calculated.

[0049] When the current data validity flag is valid, the data after compensation processing by the digital pre-compensation unit is stored in the average power calculation buffer.

[0050] If the current data validity flag is invalid, the data processed by the digital pre-compensation unit will be discarded.

[0051] In this embodiment of the invention, the digital gain adjustment is performed by the digital gain control module based on the received control information and the updated analog gain state parameters, including:

[0052] Based on the digital gain status parameters and the control parameters provided by the main control module, extract the length of the average power calculation window under the current state;

[0053] Calculate the average power and current compensation coefficient based on the received front-end data;

[0054] Based on the synchronization parameters provided by the synchronization module, the gain control mode corresponding to each analog gain state provided by the main control module, the current analog gain state, the current digital gain state, and the effective delay of each digital gain state, calculate the current point adjustment coefficient and switch states.

[0055] The current data is multiplied and compensated based on the current point adjustment coefficient to achieve digital gain adjustment.

[0056] In this embodiment of the invention, the digital gain adjustment is performed by the digital gain control module based on the received control information and the updated analog gain state parameters, and further includes:

[0057] Multiple parallel processing branches are used to handle the point adjustment coefficients and state switching corresponding to multiple different analog gain states and digital gain states.

[0058] A third aspect of the present invention provides a wireless communication device, which includes the wireless receiving gain control device described above.

[0059] The above technical solution dynamically adjusts the length of the analog gain calculation window by combining the wireless frame reception status. It adopts AAGC based on digital baseband algorithm and adjusts the window length of analog gain calculation in each stage according to the reception status. This reduces the risk of large gain errors caused by unreasonable data, resulting in violent gain adjustment oscillations and slow gain convergence. By adjusting the gain effective time of each state of DAGC, it avoids the problems of data being incorrectly amplified or reduced, violent data amplitude oscillations after adjustment, and slow gain convergence caused by the asynchronous processing of AAGC and DAGC.

[0060] Other features and advantages of the technical solution of the present invention will be described in detail in the following detailed embodiments section. Attached Figure Description

[0061] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0062] Figure 1 This is a block diagram of the wireless receiver gain control device provided in an embodiment of the present invention;

[0063] Figure 2This is a block diagram of the overall structure of the AAGC module of the wireless receiver gain control device provided in this embodiment of the invention;

[0064] Figure 3 This is a flowchart of the overall processing flow of the AAGC module of the wireless receiver gain control device provided in this embodiment of the invention.

[0065] Figure 4 This is a flowchart of the compensation gain update and state switching unit of the AAGC module provided in this embodiment of the invention;

[0066] Figure 5 This is a flowchart of the configuration gain calculation unit of the AAGC module provided in this embodiment of the invention;

[0067] Figure 6 This is a block diagram of the overall structure of the DAGC module of the wireless receiver gain control device provided in this embodiment of the invention;

[0068] Figure 7 This is a flowchart of the overall processing flow of the DAGC module of the wireless receiver gain control device provided in this embodiment of the invention.

[0069] Figure 8 This is a flowchart of the compensation coefficient update and state switching unit of the DAGC module provided in this embodiment of the invention. Detailed Implementation

[0070] To make the technical solutions and advantages of the embodiments of the present invention clearer, the exemplary embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0071] As described in the background section, existing technologies compensate for this by adding Digital Automatic Gain Control (DAGC) after the ADC or digital filtering. However, between AAGC and DAGC, there are delays in processing by other digital functional modules, link transmission delays, and the time delay for analog gain to take effect. Furthermore, AAGC and DAGC are not correlated, and their gain adjustments cannot be synchronized. This results in data being incorrectly amplified or reduced after DAGC processing, based on analog gain adjustments. In severe cases, this can cause problems such as violent oscillations in the adjusted data amplitude and slow convergence.

[0072] To address the aforementioned problems, this invention provides a wireless receiver gain control device, comprising: a main control module, an analog gain control module (AAGC), a digital gain control module (DAGC), and a synchronization module. The main control module sends control information to the AAGC and DAGC and configures parameters. The synchronization module synchronously sends synchronization parameters characterizing the wireless frame detection and reception status to the AAGC and DAGC. The AAGC calculates the preset gain to be configured based on the received control information and the current analog gain status parameters, updates the current analog gain status parameters based on the received synchronization parameters, and sends the updated analog gain status parameters to the DAGC; it also adjusts the window length for analog gain calculation based on the received synchronization parameters and the current analog gain status, ensuring synchronization between the current analog gain control processing and the RF front-end processing. The Digital Gain Control (DAGC) module is used to adjust the digital gain based on the received control information and the updated analog gain status parameters, and to adjust the digital gain effective time based on the received synchronization parameters and the effective data effective time of the adjusted analog gain calculation, so that the current digital gain control processing is synchronized with the analog gain control processing.

[0073] The analog-digital combined receiver gain control method provided in this invention dynamically adjusts the length of the analog gain calculation window based on the HRF wireless frame reception status. It employs AAGC based on a digital baseband algorithm and adjusts the window length of the analog gain calculation at each stage according to the reception status. This reduces the risk of large gain errors caused by unreasonable data, resulting in severe gain adjustment oscillations and slow gain convergence. By adjusting the gain activation time of each DAGC state, it avoids the problems of data being incorrectly amplified or reduced, severe data amplitude oscillations after adjustment, and slow gain convergence caused by asynchronous processing between AAGC and DAGC.

[0074] Figure 1 This is a block diagram of a wireless receiver gain control device provided in an embodiment of the present invention. Figure 1 As shown, this embodiment provides a combined analog and digital wireless receiver gain control device, including: a main control module, an AAGC (analog gain control) module, a DAGC (digital gain control) module, a synchronization module and other core modules, as well as: a radio frequency front-end processing module, a first digital processing module, a second digital processing module and other key modules.

[0075] The main control module performs parameter configuration processing for the AAGC and DAGC modules.

[0076] The RF front-end processing module provides ADC sampling data for the digital link and also supports analog gain adjustment.

[0077] The first digital processing module performs digital link processing on the data from AAGC to DAGC, including DC compensation, IQ compensation, digital filtering, sampling, notch filtering, etc.

[0078] The second digital processing module performs digital link functional processing on the data after DAGC, including channel estimation and equalization.

[0079] The synchronization module performs synchronization detection of HRF radio frames and controls the reception status based on the data after DAGC, and provides the AAGC module and DAGC processing module with synchronization parameters (syncStatus) to characterize the radio frame detection and reception status, i.e., reception status indication.

[0080] The AAGC module performs digital pre-compensation on the data output by the RF front-end processing module based on configuration parameters and the digital pre-compensation coefficients calculated in the previous round, and calculates the adjustment gain and digital pre-compensation coefficients for the next round. The AAGC outputs the compensation data from this round to the next-level digital processing module for further processing, feeds back the calculated adjustment gain to the RF front-end processing module for the next round of analog gain adjustment, and stores the calculated digital pre-compensation coefficients locally for digital pre-compensation of the data after the next round of analog gain adjustment. During analog gain control processing, the AAGC module updates the analog gain status parameter currAagcStatus based on the wireless frame detection and reception status (synchronization parameter syncStatus), and simultaneously determines the gain configuration for subsequent processing. The updated analog gain status parameter currAagcStatus is synchronously transmitted to the DAGC module.

[0081] The DAGC module calculates and performs digital compensation coefficients on the data processed by the analog gain adjustment, AAGC digital pre-compensation, and DAGC front-end digital module according to the configuration parameters. This completes the digital gain adjustment, and the digitally compensated data is output to the next processing module for further processing. During digital gain control, the DAGC module updates the digital gain status parameter currDagcStatus based on the wireless frame detection and reception status (synchronization parameter syncStatus) and the analog gain status parameter currAagcStatus, simultaneously determining the gain configuration for subsequent processing.

[0082] The wireless receiver gain control device provided in this embodiment realizes HRF combined analog and digital receiver gain control by associating parameters such as wireless frame detection and receiver status (synchronization parameter) syncStatus, analog gain status parameter currAagcStatus, digital gain status parameter currDagcStatus, and the effective delay of each state switching of digital gain control.

[0083] The HRF wireless frame structure includes: STF (Short Training Field), LTF (Long Training Field), SIG (PHR Control Signal), PHR (Physical Header), and PSDU (Physical Layer Service Data Unit).

[0084] In this embodiment, the receiving states involved in the receive gain control process include: wireless frame detection and reception state, analog gain control state, and digital gain control state. The synchronization detection and reception state reflects the synchronization detection and STF, LTF, and SIG reception states; the analog gain control state reflects the analog gain control state during synchronization detection, STF, LTF, and SIG reception; and the digital gain control state reflects the digital gain control state during synchronization detection, STF, LTF, and SIG reception. Specific parameter definitions are shown in the table below:

[0085]

[0086] Before the HRF receiver is turned on, the main control module configures the parameters of the AAGC module. The configuration parameters are shown in the table below:

[0087]

[0088] The parameter `aagc_enable` controls whether the HRF supports AAGC processing, facilitating later debugging. The parameter `dgcCompEnable` controls whether AAGC supports digital gain pre-compensation, also facilitating later debugging. If the adjusted gain calculated in the digital domain exceeds the dynamic range of the RF front-end's analog gain, digital pre-compensation processing is required in AAGC to ensure that the average power of the data after analog gain adjustment reaches the target value.

[0089] `measMaxGain` represents the maximum gain without gain offset during RF front-end gain adjustment. `measMaxGain` needs to be obtained through actual measurement of the RF front-end gain. If the adjusted gain is too large during RF front-end gain adjustment, gain offset may occur, generating DC current and affecting reception performance. To prevent DC current generation due to gain offset, the maximum adjustable gain of the analog front-end needs to be measured. The measured value of `measMaxGain` will not exceed the maximum value supported by the design, `maxGain`.

[0090] aagc_difGainThr represents the gain adjustment threshold. Gain adjustment is only performed when the difference between the gains of the previous and next rounds is greater than this threshold, thus preventing the RF front end from frequently adjusting the gain.

[0091] aagc_rise_limit represents the gain fluctuation limit, which is the maximum allowable fluctuation between two consecutive gain adjustments. When the fluctuation exceeds this value, aagc_rise_fac limits the gain fluctuation to prevent drastic data amplitude oscillations caused by analog gain adjustments.

[0092] `aagc_gain_active_delay` represents the analog gain activation delay. After the AAGC configures and adjusts the gain to the RF front end, `aagc_gain_active_delay` ensures that when the AAGC calculates the next round of gain, the ADC output data used has already undergone the current gain adjustment, and that the data and compensation coefficient correspond correctly during digital pre-compensation. This parameter is determined by the RF design specifications.

[0093] aagc_adjSampNum_list represents a list of data points for analog gain adjustment, and the value of each element must be greater than the gain response time.

[0094] aagc_avgPwrWinSizeList represents the long list of average power monitoring windows. The larger the value, the more stable the calculated average power.

[0095] `aagc_adjSampNum_idx_list` represents an index list corresponding to the number of data points for simulated gain adjustment. The four elements correspond to the indices of the simulated gain adjustment data points for each of the `syncStatus` values ​​(0-3). Using these indices, the number of simulated gain adjustment data points for the corresponding state is retrieved from `aagc_adjSampNum_list`. Selecting an appropriate number of points reduces the proportion of data from before the gain adjustment takes effect during the next gain calculation, thus mitigating the risk of gain oscillation.

[0096] `aagc_avgPwrWinSize_idx_list` represents the average power monitoring window length index list. The four elements correspond to the indices of the average power calculation window length for `syncStatus` 0-3. Using these indices, the length of the average power calculation window is dynamically adjusted for the corresponding state from `aagc_avgPwrWinSizeList`. Selecting an appropriate window length ensures the accuracy of the average power calculation while reducing the ratio of data before the gain takes effect during the next gain calculation, thus mitigating the risk of gain oscillation.

[0097] By setting the values ​​of aagc_status0_mode, aagc_status1_mode, aagc_status2_mode, and aagc_status3_mode, the control mode of the analog gain at each state switching point can be determined. The optimal combination can be obtained through actual measurement to improve the receiving performance.

[0098] Before the HRF receiver is turned on, the main control module configures the parameters of the DAGC module. The configuration parameters are shown in the table below:

[0099]

[0100] The AAGC enable flag is configured for the DAGC processing module via the parameter aagc_enable, used for DAGC state switching control. The parameter dagc_enable controls whether HRF supports DAGC processing, facilitating later debugging.

[0101] `dagc_rise_limit` represents the digital gain fluctuation limit, which is the maximum allowable fluctuation in gain adjustment. When the fluctuation exceeds this value, `dagc_rise_fac` limits the gain fluctuation to prevent drastic oscillations in data amplitude caused by digital gain adjustment.

[0102] The parameters dagc_status1_delay, dagc_status2_delay, and dagc_status3_delay are used to avoid severe oscillations in data amplitude after digital gain compensation at the state switching point. dagc_status1_delay is the number of samples that need to be delayed relative to currAagcStatus 1 and currDagcStatus 1 to take effect. dagc_status2_delay is the number of samples that need to be delayed relative to currAagcStatus 2 and currDagcStatus 2 to take effect. dagc_status3_delay is the number of samples that need to be delayed relative to currAagcStatus 3 and currDagcStatus 3 to take effect. The parameter values ​​of dagc_status1_delay, dagc_status2_delay, and dagc_status3_delay are greater than or equal to the sum of the delay caused by the analog gain taking effect, the processing delay of the digital processing module before AAGC to DAGC, and the data transmission delay. The latency of analog gain activation, the processing latency of the digital processing module from AAGC to DAGC, and the data transmission latency are determined by the design and can be obtained through actual testing.

[0103] `dagc_avgPwrWinSizeList` represents the list of average power monitoring window lengths for the digital gain module. A larger value results in a more stable calculated average power. `dagc_avgPwrWinSize_idx_list` represents the index list of average power monitoring window lengths, with four elements corresponding to the index of the average power calculation window length for each of the `syncStatus` values ​​0-3. The length of the average power calculation window is dynamically adjusted based on the index obtained from `dagc_avgPwrWinSizeList` for the corresponding state. Selecting an appropriate window length ensures the accuracy of the average power calculation and reduces the risk of gain oscillation.

[0104] By setting the values ​​of dagc_status0_mode, dagc_status1_mode, dagc_status2_mode, and dagc_status3_mode, the digital gain control mode for each state switching point can be determined. The optimal combination can be obtained through actual testing to improve reception performance.

[0105] like Figure 2As shown, the AAGC module includes: an AAGC status control parameter acquisition unit, a digital pre-compensation unit, a compensation gain calculation unit, a compensation gain update and status switching unit, and a configuration gain calculation unit. The AAGC module performs digital pre-compensation on the ADC output data based on the configuration parameters and the digital pre-compensation coefficients calculated in the previous round, and calculates the adjustment gain and digital pre-compensation coefficients for the next round. It outputs the current round of compensation data to the next-level digital processing module for further processing, feeds back the calculated adjustment gain to the RF front-end for the next round of analog gain adjustment, and stores the calculated digital pre-compensation coefficients locally for digital pre-compensation of the data after the next round of analog gain adjustment. During AAGC processing, the AAGC status currAagcStatus is updated according to the synchronization detection and reception status syncStatus indication, and the updated currAagcStatus is passed to the DAGC module to determine the gain configuration for subsequent processing.

[0106] If the configuration parameter aagc_enable indicates that AAGC is disabled, that is, no analog gain control processing is performed, the AAGC input data InSamp will be passed through to the next level processing module as output data; otherwise, AAGC processing will be performed.

[0107] The overall processing flow of the AAGC module is as follows: Figure 3 As shown, the AAGC status control parameter acquisition unit extracts the analog gain adjustment data point threshold adjSampNumThr and the average power calculation window length agvPwrWinSize in the current state based on the processing status indicator currAagcStatus and the control parameters provided by the main control module. The control parameters provided by the main control module include: aagc_adjSampNum_list, aagc_avgPwrWinSizeList, aagc_adjSampNum_idx_list, and aagc_avgPwrWinSize_idx_list.

[0108] Each time the AAGC module receives data from an ADC output, the gain adjustment counter `adjSampCnt` and the analog gain activation counter `aagcDelayCnt` increment by 1. When a new analog gain value is configured for the RF front-end, the counters need to be initialized to 0. Under different `currAagcStatus` states, the speed of gain calculation and adjustment corresponding to different states is controlled by setting different `adjSampNumThr` values. The stability of the average power calculation value is ensured by setting different `agvPwrWinSize` values. The smaller the configured values ​​of `adjSampNumThr` and `agvPwrWinSize`, the faster the calculation and adjustment speed. After the status control parameters are acquired, they are distributed to the digital pre-compensation unit and the compensation gain calculation unit.

[0109] The digital pre-compensation unit performs pre-compensation on the received ADC output data and outputs the results to the subsequent functional processing module.

[0110] If the analog gain activation counter aagc_delay_cnt ≥ aagc_gain_active_delay, the data validity flag validFlag is set to 1, indicating that the RF processing front end has adjusted the gain of the current input data according to the latest configured gain; otherwise, validFlag is set to 0.

[0111] When the digital precompensation switch dgcCompEnable is set to 1, it indicates that the digital precompensation function is enabled. The compensation coefficient dgcFac for the current data needs to be read from the digital precompensation coefficient list dgcLinearScale based on the valid flag validFlag. dgcLinearScale contains two elements: dgcLinearScale[0] stores the digital precompensation coefficient corresponding to the previous round of analog gain. When the configured gain is not effective, this value is used to perform digital precompensation on the current data; dgcLinearScale[1] stores the digital precompensation coefficient corresponding to the current analog gain. When the current configured gain is effective, this value is used to perform digital precompensation on the current data. When the digital precompensation switch dgcCompEnable is set to 0, no digital precompensation is performed. dgcFac is set to 1. After the precompensation dgcFac is successfully obtained, it is multiplied by the input data to complete the digital precompensation process.

[0112] The compensation gain calculation unit performs compensation gain calculations based on the configured average power calculation window length, the threshold for the number of analog gain adjustment data points, the target value of the analog gain, the data OutSamp processed by the digital pre-compensation unit, and the validFlag of the current data determined by the digital pre-compensation unit. When validFlag=1, OutSamp is stored in the AAGC average power calculation buffer. Otherwise, it is discarded to prevent data from the previous round of gain not being effective from being used in the average power calculation, which would lead to inaccurate average power calculation, causing gain adjustment fluctuations and slow gain adjustment convergence. When adjSampCnt≥adjSampNumThr, that is, the number of gain adjustment points is greater than the set threshold, it means that the data stored in the AAGC buffer at the current moment can be used for average power calculation; otherwise, valid data needs to continue to be stored, and the analog gain remains unchanged, that is, the RF front end uses the gain configured in the previous round.

[0113] Average power is calculated using avgPwrWinSize data points from historical data to the current point (inclusive):

[0114] (1)

[0115] in, (i) represents the data stored in the buffer.

[0116] The dB value corresponding to the average power is calculated as follows:

[0117] (2)

[0118] The target gain difference is calculated as follows:

[0119] (3)

[0120] If the absolute value of the current target gain difference is greater than or equal to the limit value aagc_rise_limit, fluctuation is limited by aagc_rise_fac to reduce violent gain oscillations. The calculation is as follows:

[0121] difGain=difGain*aagc_rise_fac (4)

[0122] Among them, aagc_rise_fac is an adjustment factor, which typically takes values ​​of 1, 1 / 2, 1 / 4, etc.

[0123] If the current target gain difference is less than the limit value aagc_rise_limit, no fluctuation limit is applied.

[0124] Based on the previous gain value totalSetGain (including rfGain configured for rf and digital pre-compensation gain), the current gain value currentAagcGain is calculated as follows:

[0125] currentAagcGain=lastGain+difGain(5)

[0126] Where lastGain is the configuration value of the previous round of analog gain totalSetGain, and the value of currentAagcGain needs to be limited to the dynamic range of analog gain [minGain, maxGain].

[0127] If the absolute value of difGain after fluctuation limiting is greater than the adjustment threshold, i.e., absDifGain>difGainThr, it indicates that gain adjustment is needed and the current gain value currentAagcGain is calculated; otherwise, the analog gain remains unchanged and currentAagcGain=lastGain.

[0128] Reference Figure 3 The compensation gain update and state switching unit calculates the preset gain tempSetGain and the gain value at the state switching point based on the synchronization status syncStatus provided by the synchronization module, the gain control modes aagc_status0_mod, aagc_status1_mode, aagc_status2_mode, and aagc_status3_mode corresponding to each analog gain status provided by the main control module, and the current AAGC gain status currAagcStaus. It then updates the AAGC status currAagcStatus. The updated currAagcStatus is then passed to the DAGC module for DAGC state switching. The preset gain value tempSetGain needs to be processed by the configuration gain calculation unit to obtain the actual configured analog gain rfGain, which is then configured to the RF front end.

[0129] The compensation gain update and state switching unit uses multiple parallel processing branches to handle the compensation gain update and state switching for multiple different analog gain states.

[0130] In a specific embodiment, the processing flow of the compensation gain update and state switching unit is as follows: Figure 4As shown, it includes four parallel processing branches: the branch where currAagcStaus is 0, the branch where currAagcStaus is 1, the branch where currAagcStaus is 2, and the branch where currAagcStaus is 3. Each branch corresponds to a different simulated gain state acquired synchronously.

[0131] For the branch where currAagcStaus is 0, i.e., the initial startup phase, during the analog gain control phase in idle state, if the gain mode aagc_status0_mode is configured as 0, then the currently calculated currentAgacGain is used as the preset gain tempSetGain value; otherwise, the system-configured gain is used. When the synchronization status syncStatus ≥ 1 is satisfied, it indicates that a possible STF has occurred. Based on the control parameter aagc_status1_mode, the gain value used at the currAagcStaus switching point is determined, i.e., the gain value stfAgcGain used at the STF receiver switching point. `aagc_status1_mode==0` means the gain value `stfAgcGain=0` used at the STF receive switching point, simply indicating that `stfAgcGain` is assigned an initial value. `aagc_status1_mode==1` means the gain value `stfAgcGain=tempSetGain` is used at the STF receive switching point, i.e., the current point's preset gain is used. `aagc_status1_mode==2` means the gain value `stfAgcGain=currAagcGain` is used at the STF receive switching point, i.e., the gain value calculated at the current point is used. `aagc_status1_mode==3` means the gain value `stfAgcGain=cpuCfgGain` is used at the STF receive switching point, i.e., the system-configured gain value is used. After the switching point gain is updated, the AAGC status `currAagcStaus` is updated from 0 to 1, i.e., entering the analog gain control phase of the STF detection and reception stage. When the synchronization status `syncStatus≥1` is not satisfied, it indicates that a possible STF has not yet occurred, and no action is taken.

[0132] For branches where currAagcStaus is 1, the system enters the STF detection and reception phase. If the gain control mode aagc_status1_mode is configured as 0, the currently calculated currentAgacGain is used as the preset gain tempSetGain value; if aagc_status1_mode is configured as 1, the last gain adjustment value lastGain is used as the preset gain tempSetGain value; if aagc_status1_mode is configured as 2, the gain value at the STF switching point is used as the preset gain tempSetGain value; otherwise, the system-configured gain value cpuCfgGain is used as the preset gain tempSetGain value. When the synchronization status syncStatus≥2 is satisfied, it indicates that the STF detection and reception is complete, and the system enters LTF reception. The gain value used at the currAagcStaus switching point is determined according to the control parameter of aagc_status2_mode, which is the gain value ltfAgcGain used at the LTF reception switching point. `aagc_status2_mode==0` means the gain value `ltfAgcGain=0` used at the LTF receive switching point, simply indicating that `ltfAgcGain` is assigned an initial value. `aagc_status2_mode==1` means the gain value `ltfAgcGain=tempSetGain` is used at the LTF receive switching point, i.e., the current point's preset gain is used. `aagc_status2_mode==2` means the gain value `ltfAgcGain=currAagcGain` is used at the LTF receive switching point, i.e., the gain value calculated at the current point is used. `aagc_status2_mode==3` means the gain value `ltfAgcGain=cpuCfgGain` is used at the LTF receive switching point, i.e., the system-configured gain value is used. After the switching point gain is updated, the AAGC status `currAagcStaus` is updated from 1 to 2, i.e., entering the analog gain control phase of LTF reception. When the synchronization status `syncStatus≥2` is not satisfied, it indicates that STF detection reception has not yet been completed, and no processing is performed.

[0133] For branches where currAagcStaus is 2, the LTF reception phase begins. If the gain control mode aagc_status2_mode is configured as 0, the currently calculated currentAgacGain is used as the preset gain tempSetGain value; if aagc_status2_mode is configured as 1, the last gain adjustment value lastGain is used as the preset gain tempSetGain value; if aagc_status2_mode is configured as 2, the gain value at the LTF switching point is used as the preset gain tempSetGain value; otherwise, the system-configured gain value cpuCfgGain is used as the preset gain tempSetGain value. When the synchronization status syncStatus ≥ 3 is satisfied, it indicates that the synchronization frame has been determined, STF detection reception is complete, and LTF reception begins. The gain value used at the currAagcStaus switching point is determined according to the control parameter of aagc_status3_mode, which is the gain value sigAgcGain used at the SIG reception switching point. `aagc_status3_mode == 0` means the gain value `sigAgcGain=0` used at the SIG receive switching point, simply indicating that `sigAgcGain` is assigned an initial value. `aagc_status3_mode == 1` means the gain value `sigAgcGain=tempSetGain` used at the LTF receive switching point, i.e., the current point's preset gain is used. `aagc_status3_mode == 2` means the gain value `sigAgcGain=currAagcGain` used at the LTF receive switching point, i.e., the gain value calculated at the current point is used. `aagc_status3_mode == 3` means the gain value `sigAgcGain=cpuCfgGain` used at the SIG receive switching point, i.e., the system-configured gain value is used. After the switching point gain is updated, the AAGC status `currAagcStaus` is updated from 2 to 3, i.e., analog gain control begins in the SIG and subsequent PHR / PSDU receive stages. When the synchronization status `syncStatus≥3` is not satisfied, it indicates that LTF reception is not yet complete.

[0134] For the branch where currAagcStaus is 3, it enters the SIG and subsequent PHR / PSDU reception stages. If the gain control mode aagc_status2_mode is configured as 0, the currently calculated currentAgacGain is used as the preset gain tempSetGain value; if the gain control mode aagc_status3_mode is configured as 1, the last gain adjustment value lastGain is used as the preset gain tempSetGain value; if the gain control mode aagc_status3_mode is configured as 2, the gain value at the SIG switching point is used as the preset gain tempSetGain value; otherwise, the system-configured gain value cpuCfgGain is used as the preset gain tempSetGain value. Since the OFDM symbol structure of SIG, PHR, and PSDU is the same, consisting of a pilot carrier and a data carrier, there are no other analog gain control states after currAagcStaus=3.

[0135] During the above processing, since aagc_status0_mode, aagc_status1_mode, and aagc_status2_mode are set to 0, the simulation gains of STF, LTF, and SIG / PHR / PSDU in each round are updated according to the latest result at the current point. The state switching point gains stfAgcGain, ltfAgcGain, and sigAgcGain are set to 0, which only indicates an assignment operation and has no other meaning. The updated currAagcStatus is synchronously transmitted to the DAGC processing module for DAGC state switching effect control.

[0136] Reference Figure 3 The configuration gain calculation unit, based on the preset gain tempSetGain obtained by the compensation gain update and state switching unit, the previous round gain configuration value lastGain, and the maximum gain that the RF front-end can actually support, measMaxGain, determines whether RF analog gain configuration and digital pre-compensation gain calculation are needed at the current moment. If configuration is needed, the RF front-end configuration gain rfGain and digital pre-compensation gain are calculated.

[0137] The processing flow of the configuration gain calculation unit is as follows: Figure 5 As shown, if the configuration gain lastGain of the previous round is the same as the current preset gain, it means that there is no need to calculate the configuration gain now, and the configuration gain calculation unit process ends.

[0138] If the configuration gain lastGain from the previous round is different from the current preset gain, the current RF configuration gain rfGain and digital pre-compensation gain currDgcLinear need to be calculated, and a new round of gain adjustment needs to be performed. The gain adjustment counter adjSampCnt is initialized to 0, and the current total gain totalSetGain is updated to the preset gain tmpSetGain.

[0139] If the preset gain tmpSetGain is greater than the maximum gain that the RF can actually support, measMaxGain, it means that if the preset gain tmpSetGain is configured for the RF front-end, gain offset will occur. Therefore, it is necessary to reduce the gain adjustment value of the RF front-end and compensate for the insufficient gain of the RF front-end through digital pre-compensation. At this time, the linear values ​​corresponding to rfGain, the digital compensation gain compGain, and the digital pre-compensation gain compGain are calculated according to the following formula:

[0140] rfGain=measMaxGain(6)

[0141] compGain=tmpSetGain-measMaxGain(7)

[0142] currDgcLinearScal=10^(compGain / 20)(8)

[0143] If tmpSetGain is not greater than the maximum gain that the RF can actually support, measMaxGain, it means that if the preset gain tmpSetGain is configured for the RF front end, there will be no gain offset. Therefore, there is no need to reduce the gain adjustment value of the RF front end, nor is there any need to perform digital pre-compensation. Therefore, the linear values ​​corresponding to rfGain (digital compensation gain compGain) and digital pre-compensation gain compGain are calculated according to the following formula:

[0144] rfGain=tmpSetGain(9)

[0145] compGain=0 (10)

[0146] currDgcLinearScal=1(11)

[0147] After the configuration gain calculation is completed, the digital compensation gain list needs to be updated. That is, the linear value dgcLinearScal[1] corresponding to the digital pre-compensation gain in the previous round is replaced with dgcLinearScal[0], and dgcLinearScal[1] is replaced with the latest linear compensation value to facilitate the reading of the digital pre-compensation parameters in the next round. After the configuration gain calculation unit has finished processing, rfgain is configured to the RF front end for analog gain adjustment.

[0148] like Figure 6 As shown, the DAGC module includes: a DAGC status control parameter acquisition unit, a compensation coefficient calculation unit, a compensation coefficient refinement and status switching unit, and a digital compensation unit. Based on the configuration parameters, it calculates and compensates the digital compensation coefficients for the data after analog gain adjustment, AAGC digital pre-compensation, and DAGC front-end digital module processing, completing the digital gain adjustment. The digitally compensated data is then output to the next-level digital processing module for subsequent processing. During DAGC processing, based on the synchronization detection and reception status syncStatus and the AAGC gain control status currAagcStatus, it performs currDagcStatus status switching control on the DAGC status switching delays dagc_status1_delay, dagc_status2_delay, and dagc_status3_delay, achieving combined analog and digital gain control and simultaneously determining the gain configuration for subsequent processing.

[0149] like Figure 7 As shown, the overall processing of the DAGC module includes four processes: DAGC state control parameter acquisition, compensation coefficient calculation, compensation coefficient update and state switching, and digital compensation.

[0150] Reference Figure 6 and Figure 7 The DAGC status control parameter acquisition unit extracts the length of the average power calculation window, dagc_agvPwrWinSize, for the current state based on the processing status indicator currDagcStatus and the control parameters provided by the main control module. The control parameters provided by the main control module include dagc_avgPwrWinSizeList and dagc_avgPwrWinSize_idx_list. Different settings of dagc_agvPwrWinSize under different currDagcStatus states ensure the stability of the average power calculation value. A larger dagc_agvPwrWinSize configuration value results in a smoother average power calculation. After the status control parameters are acquired, they are forwarded to the pre-compensation coefficient calculation unit.

[0151] The compensation coefficient calculation unit calculates the average power and current compensation coefficient for the received preceding data. Based on the configured DAGC average power calculation window length and analog gain target value, the compensation coefficient calculation unit calculates the average power and current compensation coefficient for the received preceding data. The average power is calculated using dagc_avgPwrWinSize data points from the historical period to the current point (inclusive).

[0152] linear_ (12)

[0153] in, This represents the dagc data storage buffer.

[0154] The logarithmic power value is calculated based on the average power, as follows:

[0155] *lg( (13)

[0156] The target gain difference is calculated as follows:

[0157] dagc_ (14)

[0158] If the absolute value of the current target gain difference is greater than or equal to the limit value dagc_rise_limit, fluctuation is limited by dagc_rise_fac to reduce violent gain oscillations. The calculation is as follows:

[0159] dagc_difGain=difGain*aagc_rise_fac (15)

[0160] Where dagc_rise_fac is an adjustment factor, which is usually set to 1, 1 / 2, 1 / 4, etc. for simplification.

[0161] If the current target gain difference is less than the limit value dagc_rise_limit, no fluctuation limit is applied.

[0162] After the fluctuation limit processing is completed, the adjustment factor is calculated as follows:

[0163] If the absolute value of the target difference is greater than the threshold dagc_difGainThr, the adjustment preset coefficient currDagcScal for the current point needs to be calculated using dagc_difGain; otherwise, the adjustment coefficient last_dagc_linearScal of the previous point is directly used as the value of the adjustment preset coefficient currDagcScal for the current point.

[0164] currDagcScal=10^(dagc_difGain / 20) (16)

[0165] The completed currDagcScal transfer compensation coefficient update and state switching module performs state switching point adjustment coefficient calculation and state update.

[0166] The compensation coefficient update and state switching unit calculates the adjustment coefficient for the current point, the adjustment coefficient for the switching point, and switches states based on the synchronization status syncStatus provided by the synchronization module, the gain control modes dagc_status0_mode, dagc_status1_mode, dagc_status2_mode, and dagc_status3_mode corresponding to each analog gain status provided by the main control module, the current gain status currAagcStaus of AAGC, the current gain status currDagcStaus of DAGC, and the effective delays of each DAGC status dagc_status1_delay, dagc_status2_delay, and dagc_status3_delay.

[0167] The processing flow of the compensation coefficient update and state switching unit is as follows: Figure 8 As shown, it includes four parallel processing branches: the branch where currDagcStaus is 0, the branch where currDagcStaus is 1, the branch where currDagcStaus is 2, and the branch where currDagcStaus is 3. Each branch corresponds to a state acquired synchronously.

[0168] For the branch where currDagcStaus is 0, i.e., the initial startup phase, during the analog gain control phase in idle state, if the gain mode dagc_status0_mode is configured as 0, then the currently calculated currCalScal is used as the current value of dagc_linearScale; otherwise, the compensation coefficient configured by the system is used. When the synchronization status syncStatus ≥ 1, it indicates that a possible STF has occurred, the effectiveness counter dagcDelayCnt is incremented by 1, and the effectiveness judgment is: if dagcDelayCnt is greater than or equal to the effectiveness delay dagc_status1_delay, and the aagc_enable control switch is on, it means that the current currDagcStaus can be switched from 0 to 1; otherwise, no operation is performed. When aagc_enable is off, AAGC does not work, DAGC is out of sync with AAGC, and has no impact on data gain adjustment; therefore, DAGC does not need to consider delay effectiveness processing. When currDagcStaus can switch states, the adjustment factor used at the currDagcStaus switching point is determined according to the control parameter dagc_status1_mode, which is the gain value stfDagcScal used at the STF receive switching point. If dagc_status1_mode == 0, the adjustment factor stfDagcScal used at the STF receive switching point is 1, and no adjustment is made; if aagc_status1_mode == 1, the adjustment factor stfDagcScal used at the STF receive switching point is dagc_linearScal; if aagc_status1_mode == 2, the adjustment factor stfDagcScal used at the STF receive switching point is the currently preset adjustment factor currDagcScal; if aagc_status1_mode == 3, the gain value stfDgcGain used at the STF receive switching point is cpuCfgScal, which is the adjustment factor configured by the system. After the switching point gain is updated, the DAGC status currDagcStaus is updated from 0 to 1, indicating that digital gain control has entered the STF detection and reception phase, and the activation counter dagcDelayCnt is initialized to 0. If the synchronization status syncStatus≥1 is not satisfied, it means that the possible STF has not yet occurred, and no action is taken.

[0169] The processing flow for branches with ccurrDagcStaus = 1, currDagcStaus = 2, and currDagcStaus = 3 is similar to that of the branch with ccurrDagcStaus = 1, but the branch with ccurrDagcStaus = 3 has no other states.

[0170] The digital compensation unit performs compensation by multiplying the current data with the point adjustment coefficient dagc_linearScal to complete the compensation. At the same time, dagc_linearScal is stored in last_dagc_linearScal as the historical coefficient for the next compensation.

[0171] This invention also provides a wireless receiver gain control method, which includes the following steps:

[0172] The main control module sends control information to the analog gain control module and the digital gain control module.

[0173] The synchronization module synchronously sends synchronization parameters, which characterize the detection and reception status of wireless frames, to the analog gain control module and the digital gain control module.

[0174] The analog gain control module calculates the preset gain to be configured based on the received control information and the current analog gain status parameters, updates the current analog gain status parameters based on the received synchronization parameters, and transmits the updated analog gain status parameters to the digital gain control module; and adjusts the window length of the analog gain calculation based on the received synchronization parameters and the current analog gain status to synchronize the current analog gain control processing time with the RF front-end processing time.

[0175] The digital gain control module adjusts the digital gain based on the received control information and the updated analog gain status parameters, and adjusts the digital gain effective time based on the received synchronization parameters and the effective data effective time of the adjusted analog gain calculation, so that the current digital gain control processing time is synchronized with the analog gain control processing time.

[0176] In a specific embodiment, the window length for analog gain calculation and the effective data activation time are adjusted according to the received synchronization parameters. Specifically, based on the updated analog gain status parameters and control information from the main control module, the threshold for the number of data points for analog gain adjustment and the length of the average power calculation window in the current state are extracted; based on the threshold for the number of data points for analog gain adjustment and the length of the average power calculation window in the current state, compensation gain calculation is performed; based on the synchronization parameters from the synchronization module and the current analog gain status parameters, the preset gain and gain value of the state switching point that need to be configured are calculated, and the analog gain status parameters are updated.

[0177] Specifically, the compensation gain calculation is performed based on the data point threshold for analog gain adjustment under the current state and the length of the average power calculation window. This includes: calculating the compensation gain based on the length of the average power calculation window, the data point threshold for analog gain adjustment, the target value of analog gain, and the current data validity flag determined by the digital pre-compensation unit; when the current data validity flag is valid, storing the data processed by the digital pre-compensation unit into the average power calculation buffer; and discarding the data processed by the digital pre-compensation unit when the current data validity flag is invalid.

[0178] In a specific embodiment, the digital gain control module adjusts the digital gain based on the received control information and the updated analog gain state parameters. Specifically, it extracts the length of the average power calculation window in the current state based on the digital gain state parameters and the control parameters provided by the main control module; calculates the average power and the current compensation coefficient based on the received front-end data; calculates the current point adjustment coefficient based on the synchronization parameters provided by the synchronization module, the gain control mode corresponding to each analog gain state provided by the main control module, the current analog gain state, the current digital gain state, and the effective delay of each digital gain state, and switches the state accordingly; and performs multiplication compensation on the current data based on the current point adjustment coefficient to achieve digital gain adjustment.

[0179] During the process of adjusting the digital gain based on the control information and analog gain status parameters, the digital gain control module employs multiple parallel processing branches to handle the point adjustment coefficients and state switching corresponding to multiple different analog gain states and digital gain states.

[0180] For details of the wireless receiver gain control method provided in this embodiment, please refer to the detailed description of the wireless receiver gain control device described above, which will not be repeated here.

[0181] The wireless receiver gain control method and apparatus provided in this invention have the following advantages:

[0182] 1. By combining the HRF wireless frame synchronization detection and reception status syncStatus, AAGC control status currAagcStatus, DAGC control status currDagcStatus, and AAGC activation delay, as well as the module processing delay and transmission delay between AAGC and DAGC, and adjusting the activation time of each DAGC status gain (dagc_status1_delay, dagc_status2_delay, dagc_status2_delay), a method for joint control of AAGC and DAGC is achieved. This avoids problems such as data being incorrectly amplified or reduced, severe data amplitude oscillation after adjustment, and slow gain convergence caused by asynchronous processing between AAGC and DAGC.

[0183] 2. By using AAGC data pre-compensation, the data after the analog gain adjustment of the RF front-end is digitally compensated, thereby reducing the risk that the amplitude of the data after analog gain adjustment cannot reach the target when the actual dynamic gain range supported by the RF front-end is less than the nominal range.

[0184] 3. A method of digitally compensating the data after the analog gain adjustment of the RF front-end by using AAGC data pre-compensation avoids the problem of using a dynamic gain range exceeding the actual supported range when the actual supported dynamic gain range of the RF front-end is less than the nominal range, which would cause analog gain misalignment of the ADC output data and affect data quality.

[0185] 4. AAGC data pre-compensation uses analog gain activation delay control to ensure that the data in the AAGC average power calculation buffer has undergone the same analog gain and pre-compensation (i.e., before the analog gain takes effect, the previous round of digital pre-compensation coefficients are still used to compensate the current data, and after it takes effect, the latest round of digital pre-compensation coefficients are used). This reduces the risk of large average power calculation errors caused by unreasonable data used in the buffer, which can lead to severe gain adjustment oscillations and slow convergence.

[0186] 5. By combining the HRF wireless frame reception status with the dynamic adjustment of the analog gain calculation window, AAGC based on the digital baseband algorithm is adopted. The window length of the analog gain calculation at each stage and the effective data activation time are adjusted according to the reception status. This balances the adjustment speed and the average power calculation time, reducing the risk of large gain errors caused by unreasonable data, which can lead to severe gain adjustment oscillations and slow gain convergence.

[0187] 6. By implementing independent mode control for each receiving stage of AAGC and DAGC, and selecting a reasonable combination of gain control modes during tuning, signal detection performance is enhanced; by limiting the analog gain fluctuation value, the risk of severe data amplitude oscillation caused by analog gain adjustment is reduced; by limiting the digital gain fluctuation value, the risk of severe data amplitude oscillation caused by analog gain adjustment being transmitted to subsequent functional modules of DAGC is reduced.

[0188] This invention also provides a wireless communication device, which includes the wireless receiver gain control device described above, or uses the wireless receiver gain control method described above to achieve HRF (high frequency radio frequency) receiver gain control.

[0189] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0190] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0191] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0192] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0193] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.

Claims

1. A wireless receiver gain control device, characterized in that, include: Main control module, analog gain control module, digital gain control module, and synchronization module; The main control module is used to send control information to the analog gain control module and the digital gain control module; The synchronization module is used to synchronously send synchronization parameters, which characterize the detection and reception status of wireless frames, to the analog gain control module and the digital gain control module. The analog gain control module is used to calculate the preset gain that needs to be configured based on the received control information and the current analog gain status parameters, and to update the current analog gain status parameters based on the received synchronization parameters, and then transmit the updated analog gain status parameters to the digital gain control module. And adjust the window length for analog gain calculation based on the received synchronization parameters and the current analog gain state, so that the current analog gain control processing is synchronized with the RF front-end processing; The digital gain control module is used to adjust the digital gain according to the received control information and the updated analog gain status parameters, and to adjust the digital gain effective time according to the received synchronization parameters, so that the current digital gain control processing is synchronized with the analog gain control processing.

2. The wireless receiver gain control device according to claim 1, characterized in that, The analog gain control module includes: an analog gain state control parameter acquisition unit, a digital pre-compensation unit, a compensation gain calculation unit, and a compensation gain update and state switching unit. The analog gain state control parameter acquisition unit is used to extract the data point threshold for analog gain adjustment and the length of the average power calculation window in the current state based on the updated analog gain state parameters and control information from the main control module. The digital pre-compensation unit is used to perform pre-compensation processing on the data output from the front end; The compensation gain calculation unit is used to calculate the compensation gain based on the data after compensation processing by the digital pre-compensation unit, according to the threshold of the number of data points for analog gain adjustment under the current state and the length of the average power calculation window. The compensation gain update and state switching unit is used to calculate the preset gain and gain value of the state switching point that need to be configured at the current time based on the synchronization parameters from the synchronization module and the current analog gain state parameters, and to update the analog gain state parameters.

3. The wireless receiver gain control device according to claim 2, characterized in that, The digital pre-compensation unit reads the compensation coefficient of the current data from the digital pre-compensation coefficient list based on the current data validity flag; The digital pre-compensation coefficient list contains two elements. One element stores the digital pre-compensation coefficient value corresponding to the previous round of analog gain, which is used to perform digital pre-compensation on the current data when the current configuration gain is not in effect. The other element stores the digital pre-compensation coefficient value corresponding to the current analog gain, which is used to perform digital pre-compensation on the current data when the current configuration gain is in effect.

4. The wireless receiver gain control device according to claim 2, characterized in that, The compensation gain calculation unit determines the current data validity flag based on the length of the average power calculation window, the data point threshold for analog gain adjustment, the target value of analog gain, and the digital pre-compensation unit, and then performs compensation gain calculation. When the current data validity flag is valid, the data after compensation processing by the digital pre-compensation unit is stored in the average power calculation buffer. If the current data validity flag is invalid, the data processed by the digital pre-compensation unit will be discarded.

5. The wireless receiver gain control device according to claim 2, characterized in that, The compensation gain update and state switching unit calculates the preset gain and state switching point gain value that needs to be configured based on the synchronization parameters provided by the synchronization module, the gain control mode parameters corresponding to each analog gain state provided by the main control module, and the current analog gain state parameters, and updates the analog gain state parameters and transmits the updated analog gain state parameters to the digital gain control module.

6. The wireless receiver gain control device according to claim 5, characterized in that, The compensation gain update and state switching unit employs multiple parallel processing branches to handle compensation gain updates and state switching for multiple different analog gain states.

7. The wireless receiver gain control device according to claim 2, characterized in that, The analog gain control module further includes: a configuration gain calculation unit; The configuration gain calculation unit determines whether RF analog gain configuration and digital pre-compensation gain calculation are needed at the current moment based on the preset gain calculated by the compensation gain update and state switching unit, the previous round of gain configuration value, and the maximum gain that the RF can actually support. If the previous gain configuration value is the same as the current preset gain, no gain configuration calculation will be performed in the current round. If the gain configuration value in the previous round is different from the current preset gain, calculate the RF configuration gain and digital pre-compensation gain, and perform the gain adjustment in the next round to update the current total configuration gain to the preset gain. If the preset gain is greater than the maximum gain that the RF can actually support, calculate the RF front-end configuration gain and the digital pre-compensated gain, and update the digital compensation gain list.

8. The wireless receiver gain control device according to claim 1, characterized in that, The digital gain control module includes: a digital gain state control parameter acquisition unit, a compensation coefficient calculation unit, a compensation coefficient refinement and state switching unit, and a digital compensation unit; The digital gain state control parameter acquisition unit is used to extract the length of the average power calculation window under the current state based on the digital gain state parameters and the control parameters provided by the main control module. The compensation coefficient calculation unit is used to calculate the average power and the current compensation coefficient based on the received data from the previous stage; The finer compensation coefficient and state switching unit is used to calculate the current point adjustment coefficient and perform state switching based on the synchronization parameters provided by the synchronization module, the gain control mode corresponding to each analog gain state provided by the main control module, the current analog gain state, the current digital gain state, and the effective delay of each digital gain state. The digital compensation unit is used to multiply and compensate the current data based on the current point adjustment coefficient.

9. The wireless receiver gain control device according to claim 8, characterized in that, The compensation coefficient finer and state switching unit uses multiple parallel processing branches to process the point adjustment coefficients and state switching corresponding to multiple different analog gain states and digital gain states.

10. The wireless receiver gain control device according to claim 2, characterized in that, Also includes: First digital processing module; The first digital processing module is used to perform digital link functional processing on the data after pre-compensation processing by the analog gain control module.

11. The wireless receiver gain control device according to claim 10, characterized in that, Also includes: Second digital processing module; The second digital processing module is used to perform digital link functional processing on the data after digital gain adjustment output by the digital gain control module.

12. The wireless receiver gain control device according to claim 1, characterized in that, It also includes: radio frequency front-end processing module; The radio frequency front-end processing module is used to adjust the analog gain of the sampled data according to the preset gain that needs to be configured at present calculated by the analog gain control module, and then send the data after analog gain adjustment to the analog gain control module.

13. A wireless receiver gain control method, characterized in that, include: The main control module sends control information to the analog gain control module and the digital gain control module. The synchronization module synchronously sends synchronization parameters, which characterize the detection and reception status of wireless frames, to the analog gain control module and the digital gain control module. The analog gain control module calculates the preset gain that needs to be configured based on the received control information and the current analog gain status parameters, updates the current analog gain status parameters based on the received synchronization parameters, and transmits the updated analog gain status parameters to the digital gain control module. And adjust the window length for analog gain calculation based on the received synchronization parameters and the current analog gain state, so that the current analog gain control processing is synchronized with the RF front-end processing; The digital gain control module adjusts the digital gain based on the received control information and the updated analog gain status parameters, and adjusts the digital gain activation time based on the received synchronization parameters, so that the current digital gain control processing is synchronized with the analog gain control processing.

14. The wireless receiver gain control method according to claim 13, characterized in that, The adjustment of the window length for analog gain calculation and the effective data activation time based on the received synchronization parameters includes: Based on the updated analog gain status parameters and control information from the main control module, extract the data point threshold for analog gain adjustment and the length of the average power calculation window in the current state. The compensation gain is calculated based on the threshold of the number of data points for analog gain adjustment under the current state and the length of the average power calculation window; Based on the synchronization parameters from the synchronization module and the current analog gain status parameters, calculate the preset gain and gain value of the state switching point that need to be configured, and update the analog gain status parameters.

15. The wireless receiver gain control method according to claim 14, characterized in that, The step of calculating the compensation gain based on the data point threshold for analog gain adjustment under the current state and the length of the average power calculation window includes: The current data validity flag is determined based on the length of the average power calculation window, the data point threshold for analog gain adjustment, the target value of analog gain, and the digital pre-compensation unit, and then the compensation gain is calculated. When the current data validity flag is valid, the data after compensation processing by the digital pre-compensation unit is stored in the average power calculation buffer. If the current data validity flag is invalid, the data processed by the digital pre-compensation unit will be discarded.

16. The wireless receiver gain control method according to claim 13, characterized in that, The step of adjusting the digital gain through the digital gain control module based on the received control information and the updated analog gain state parameters includes: Based on the digital gain status parameters and the control parameters provided by the main control module, extract the length of the average power calculation window under the current state; Calculate the average power and current compensation coefficient based on the received front-end data; Based on the synchronization parameters provided by the synchronization module, the gain control mode corresponding to each analog gain state provided by the main control module, the current analog gain state, the current digital gain state, and the effective delay of each digital gain state, calculate the current point adjustment coefficient and switch states. The current data is multiplied and compensated based on the current point adjustment coefficient to achieve digital gain adjustment.

17. The wireless receiver gain control method according to claim 16, characterized in that, The step of adjusting the digital gain through the digital gain control module based on the received control information and the updated analog gain state parameters also includes: Multiple parallel processing branches are used to handle the point adjustment coefficients and state switching corresponding to multiple different analog gain states and digital gain states.

18. A wireless communication device, characterized in that, The wireless communication device includes the wireless receiver gain control device according to any one of claims 1-12.

Citation Information

Patent Citations

  • Wired carrier communication signal adaptive gain tracking and capturing method and device

    CN111245765A

  • Dual-mode wireless communication two-stage feedback type automatic gain control method and system

    CN120377850A