A method of adjusting gain, integrated circuit, sensor, terminal device
By eliminating zero pulses in the UWB system to determine the RSSI value and performing smoothing in a locked state, the problem of inaccurate gain adjustment was solved, achieving a more accurate and stable gain adjustment effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CALTERAH SEMICON TECH (SHANGHAI) CO LTD
- Filing Date
- 2025-10-30
- Publication Date
- 2026-06-02
AI Technical Summary
The gain adjustment effect in the signal processing of existing UWB systems still needs improvement, especially since the RSSI value is inaccurate due to the influence of zero pulses, resulting in inaccurate gain adjustment.
In the unlocked state, the RSSI value is determined by eliminating zero pulses, and in the locked state, smoothing is performed to improve the accuracy of the RSSI value, thereby achieving more accurate gain adjustment.
By determining the RSSI value more accurately, the accuracy of gain adjustment in the signal processing process is improved, erroneous gain adjustment is reduced, and the stability and efficiency of the system are enhanced.
Smart Images

Figure CN122137359A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of control technology, and in particular to a method for adjusting gain, an integrated circuit, a sensor, and a terminal device. Background Technology
[0002] Ultra-wideband (UWB) technology utilizes nanosecond-level non-sinusoidal narrow pulses instead of sinusoidal carriers, thus occupying a wide spectral range (narrow time domain). It offers advantages such as low system complexity, low transmitted signal power spectral density, insensitivity to channel fading, low interception risk, and high positioning accuracy. It is particularly suitable for high-speed wireless access in dense multipath environments such as indoors for communication, ranging, and positioning. To ensure the received signal remains stable despite amplitude variations caused by multipath effects or changes in transmitter distance, thereby reducing jitter and preventing interference with subsequent circuits, automatic gain control (AGC) is typically introduced during signal processing in UWB systems. This allows the gain to automatically adjust according to signal strength.
[0003] However, in order to meet users' higher requirements for UWB performance, the gain adjustment effect in the signal processing process still needs to be improved. Summary of the Invention
[0004] This application provides a method for adjusting gain, an integrated circuit, a sensor, and a terminal device, which at least helps to improve the accuracy of gain adjustment during signal processing.
[0005] According to some embodiments of this application, a first aspect of this application provides a method for adjusting gain, comprising: determining the RSSI value of the received signal in the unlocked state based on non-zero pulses in the received signal in the unlocked state; and adjusting the gain based on the RSSI value of the received signal in the unlocked state.
[0006] According to some embodiments of this application, a second aspect of this application also provides a method for adjusting gain, comprising: determining the current RSSI value of the received signal in the locked state based on the received signal in the locked state; smoothing the current RSSI value of the received signal in the locked state; detecting whether the unlocked state has been entered based on the smoothed RSSI value, and adjusting the gain after entering the unlocked state.
[0007] According to some embodiments of this application, a third aspect of this application also provides an integrated circuit, including a radio frequency (RF) module, an analog signal processing module, and a digital signal processing module connected in sequence; wherein, the RF module is used to generate an RF transmit signal and / or receive an RF receive signal; the analog signal processing module is used to down-convert the RF receive signal to obtain an intermediate frequency (IF) signal; the digital signal processing module is used to perform analog-to-digital conversion on the IF signal to obtain a digital signal, and when the AGC module in the digital signal processing module is in an unlocked state, implements the gain adjustment method as described in any one of the first aspects based on the digital signal, or, when the AGC module in the digital signal processing module is in a locked state, implements the gain adjustment method as described in any one of the second aspects based on the digital signal.
[0008] According to some embodiments of this application, a fourth aspect of this application also provides an electromagnetic wave sensor, including: a carrier; an integrated circuit as described in the third aspect, disposed on the carrier; an antenna, disposed on the carrier, or the antenna and the integrated circuit are integrated into a single device disposed on the carrier; wherein the integrated circuit is connected to the antenna and is used to transmit radio frequency transmission signals and / or receive radio frequency reception signals.
[0009] According to some embodiments of this application, a fifth aspect of this application also provides a terminal device, including: a device body; and an electromagnetic wave sensor as described in the fourth aspect disposed on the device body; wherein the electromagnetic wave sensor is used for target detection and / or communication to provide reference information to the operation of the device body.
[0010] The technical solution provided in this application has at least the following advantages: Since the RSSI value of the received signal in the unlocked state is determined based on the non-zero pulses in the received signal in the unlocked state, the RSSI value of the received signal in the unlocked state will not be affected or interfered with by the zero pulses in the received signal. The RSSI value of the received signal in the unlocked state will be more accurate. Therefore, the gain adjustment made by the more accurate RSSI value of the received signal in the unlocked state will also be more accurate, thereby improving the accuracy of gain adjustment in the signal processing process. Attached Figure Description
[0011] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0012] Figure 1 This is the flowchart of the gain adjustment method provided in the embodiments of this application. Figure 1 ; Figure 2 This is the flowchart of the gain adjustment method provided in the embodiments of this application. Figure 2 ; Figure 3 This is the flowchart of the gain adjustment method provided in the embodiments of this application. Figure 3 ; Figure 4 This is a simulation waveform diagram of the output of AGC in the unlocked state when the gain adjustment method is applied to different scenarios, with the desired gain being 0.01. Figure 5 This is a simulation waveform diagram of the output of AGC in the unlocked state when the gain adjustment method is applied to different scenarios, with the desired gain being 0.1. Figure 6 This is another method of adjusting the gain, applied in different scenarios, and the simulation waveform diagram of the AGC output in the unlocked state; Figure 7 These are simulation waveforms of the AGC output in the unlocked state when the gain adjustment method provided in this application is applied in different scenarios. Figure 8 This is a simulation waveform diagram of the AGC output in the locked state when another method of adjusting the gain is applied. Figure 9 This is a simulation waveform diagram of the AGC output in the locked state when the gain adjustment method provided in the embodiments of this application is applied. Detailed Implementation
[0013] As can be seen from the background technology, the gain adjustment effect in the signal processing process still needs to be improved.
[0014] Analysis revealed that the potential for improvement in gain adjustment during signal processing lies at least in removing the influence of non-zero pulses. Specifically: 1. In ultra-wideband systems, the Received Signal Strength Indicator (RSSI) value is primarily determined through the SYNC section for gain adjustment. According to protocols such as IEEE 802.15.4 and IEEE 802.15.4z, the SYNC section has a very low pulse duty cycle, with a certain number of zeros within each pulse, and the polarity of a single pulse is {-1, 0, +1}. This inevitably results in some zero pulses in the signal, and the position and number of these zero pulses in the SYNC section are not fixed. When determining the RSSI value, an averaging method is typically used. However, the presence of zero pulses can cause a significant drop in the RSSI value, potentially triggering incorrect gain adjustment. Therefore, eliminating the influence of zero pulses when determining the RSSI value can improve its accuracy, allowing for more accurate gain determination and ultimately improving the accuracy of gain adjustment.
[0015] 2. Because the first symbol of the Start Frame Delimiter (SFD) after SYNC may be 0 (lasting up to 1984 chips, approximately 4 microseconds), and due to processing delays in the baseband synchronization module, a synchronization success signal may not be immediately given after the SYNC section ends. This results in the AGC receiving very long periods of zero data during normal operation, potentially triggering erroneous lockout. Smoothing the RSSI can significantly mitigate this situation.
[0016] Based on this, embodiments of this application provide a method, integrated circuit, sensor, and terminal device for adjusting gain. By removing zero pulses from the signal used to determine the RSSI value in the unlocked state, i.e., determining the RSSI value based on non-zero pulses, the accuracy of the RSSI value is improved, achieving more accurate gain adjustment. Alternatively, by smoothing the current RSSI value of the received signal in the locked state, and using the smoothed RSSI value, it is possible to more accurately detect whether the unlocked state has been entered, thereby enabling accurate state switching control and achieving more precise gain adjustment.
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of this application to enable readers to better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments.
[0018] The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0019] The first aspect of this application provides a method for gain adjustment, applied in scenarios where gain adjustment is performed using RSSI values, such as UWB systems, etc., which will not be elaborated upon here. The following will combine... Figures 1 to 9 An explanation is provided. Among them, Figures 1-3 Different implementation processes for adjusting gain, Figures 4-9 Simulation waveforms of existing gain adjustment schemes and the gain adjustment scheme provided in the embodiments of this application are shown.
[0020] In some embodiments, such as Figure 1 As shown, the gain adjustment method includes the following steps: Step 100: Determine the RSSI value of the received signal in the unlocked state based on the non-zero pulses in the received signal in the unlocked state.
[0021] Step 200: Adjust the gain based on the RSSI value of the received signal in the unlocked state.
[0022] In this way, since the RSSI value of the received signal in the unlocked state is determined based on the non-zero pulses in the received signal in the unlocked state, the RSSI value of the received signal in the unlocked state will not be affected or interfered with by the zero pulses in the received signal. The RSSI value of the received signal in the unlocked state will be more accurate, and thus the gain adjustment made by the more accurate RSSI value of the received signal in the unlocked state will also be more accurate, thereby improving the accuracy of gain adjustment in the signal processing process.
[0023] To facilitate a better understanding of the above embodiments by those skilled in the art, they will be explained and described below.
[0024] In step 100, the unlocked state is relative to the locked state, while the locked state refers to gain locking, meaning the gain remains unchanged. In application, the system will continuously switch between the unlocked and locked states. Specifically, in the locked state, if a sudden termination or signal change occurs, the system will change from the locked state to the unlocked state. In the unlocked state, the gain will be re-determined. Once a stable and suitable output signal can be maintained after the determined appropriate gain is applied, the system will change from the unlocked state to the locked state, using the currently determined gain to process the signal. This process is repeated continuously until the current communication, ranging, and positioning task is completed.
[0025] It should be noted that in step 100, the gain adjustment effect can be optimized by determining the RSSI value using non-zero pulses (excluding zero pulses). The specific method for determining the RSSI value based on the non-zero pulses is not limited. For example, in some embodiments, the average RSSI value of the non-zero pulses is taken as the RSSI value of the received signal in the unlocked state. In other embodiments, the maximum RSSI value of the non-zero pulses is taken as the RSSI value of the received signal in the unlocked state; and in still other embodiments, the average RSSI value of at least i consecutively distributed non-zero pulses is taken as the RSSI value of the received signal in the unlocked state, etc. These will not be listed exhaustively here.
[0026] In some embodiments, such as Figure 2 As shown, the RSSI value of the received signal in the unlocked state can be determined based on the non-zero pulses in the received signal, which can be achieved through the following steps: Step 101: Determine the location of the pulse peak based on several sampled data of the received signal in the unlocked state.
[0027] Step 102: Determine the RSSI value of the received signal in the unlocked state based on the power value of the sampled data corresponding to the location of the pulse peak.
[0028] The above method can be applied to UWB-related scenarios. In this case, determining the RSSI value of the received signal in the unlocked state based on the non-zero pulses in the received signal can be achieved through the following steps: Receive the UWB signal; if the received UWB signal is a SYNC field signal and the current state is unlocked, acquire the non-zero pulses in the SYNC field signal and determine the RSSI value of the SYNC field signal based on the acquired non-zero pulses. And / or, perform gain adjustment based on the RSSI value of the received signal in the unlocked state, which can be achieved through the following steps: generate a control signal based on the RSSI value of the SYNC field signal and send the control signal to the AGC module of the UWB receiver to control the gain of the AGC module. Of course, the above is just an example, and it can also be applied to other scenarios with similar requirements, which will not be listed here.
[0029] It is easy to see from the above method that the method of adjusting the gain uses the pulse peak value to represent the non-zero pulse, which is used to determine the RSSI value. In this way, the gain determined by the RSSI value can ensure that the pulse peak value will not exceed the threshold after adjustment. That is, all received signals will not exceed the threshold, and there will be no saturation that would result in the loss of information that is more conducive to characterizing the target. This is more conducive to target detection and range measurement, positioning, etc.
[0030] It should be noted that the above embodiments are mainly for ease of understanding, and the example of taking the maximum value of the RSSI value of the non-zero pulse as the RSSI value of the received signal in the unlocked state is used to illustrate step 100. However, this does not mean that the corresponding steps can only be implemented in this way. For example, it can also be replaced by the average value method, that is, determining the position of the peak of each pulse, and determining the RSSI value of the received signal in the unlocked state according to the average power value of the sampled data corresponding to the position of the peak, etc. These will not be described in detail here and thereafter.
[0031] Furthermore, as mentioned earlier, the RSSI value of the received signal in the unlocked state can be determined in various specific ways, and the sampled data is discrete data. Therefore, in Figure 2 Based on the illustrated embodiment, there are various ways to determine the RSSI value of the received signal in the unlocked state according to the power value of the sampled data corresponding to the location of the pulse peak. For example, in some embodiments, determining the RSSI value of the received signal in the unlocked state based on the power value of the sampled data corresponding to the location of the pulse peak can be achieved as follows: the statistical value of the power value of the sampled data corresponding to the location of the pulse peak is determined as the RSSI value of the received signal in the unlocked state, wherein the statistical value includes the average or the maximum value. Of course, the above is only an example. In some embodiments, the statistical value also includes the median, etc., or the maximum value can be found by interpolation based on the power value of the sampled data corresponding to the location of the pulse peak as the RSSI value of the received signal in the unlocked state, etc., which will not be elaborated here.
[0032] It is also understandable that, since the signal being processed is a digital signal, represented in discrete form, there are multiple ways to determine the pulse peak value. For example, one could select sampled data from existing sampled data as the representation of the pulse peak value; another could find the true maximum value based on existing sampled data through interpolation, etc. These implementation methods will not be listed here. Taking the selection of sampled data from existing sampled data as the representation of the pulse peak value as an example, assuming the received signal in the unlocked state is a UWB signal, and the target matrix is an m×n dimensional matrix, where m=δ L ×K, δ LHere, K is the preset spreading factor value, K is the oversampling factor when sampling the received signal, and n is a preset value. In some examples, determining the location of the pulse peak based on several sampled data points of the received signal in the unlocked state can be achieved as follows: Based on several sampled data points of the received signal in the unlocked state, determine the power value corresponding to each sampled data point and generate a target matrix; determine the position of the row element with the largest sum of elements in the target matrix as the row position of the pulse peak in the target matrix. And / or, determining the RSSI value of the received signal in the unlocked state based on the power value of the sampled data corresponding to the position of the pulse peak can be achieved as follows: Determine the RSSI value of the received signal in the unlocked state based on the row element with the largest sum of elements in the target matrix. In other words, finding the row containing the pulse peak as the position of the pulse peak is simple, easy to implement, efficient, and, due to the continuity of the signal, can also ensure high accuracy.
[0033] It is also understandable that, as mentioned earlier, the continuity, number, and specific location of zero pulses in the signal can vary. In other words, when multiple sampled data points are used to characterize the non-zero pulses used to determine the RSSI value of the received signal in the unlocked state, these sampled data points may also contain zero pulse data. In this case, further filtering and removal of zero pulse data can be performed to further improve the accuracy of the RSSI value of the received signal in the unlocked state.
[0034] For example, in some embodiments, determining the RSSI value of the received signal in the unlocked state based on the row element with the largest sum of elements in the target matrix can be achieved as follows: elements in the row element with the largest sum of elements in the target matrix are filtered according to a preset first threshold; the RSSI value of the received signal in the unlocked state is determined based on the elements retained after filtering. This further improves the accuracy of the RSSI value by removing the influence of zero values in the rows, thereby further improving the accuracy of the gain and enhancing the gain adjustment effect.
[0035] In this embodiment, the method of determining the first threshold is not limited. It can be understood that, in the above example, the application of the first threshold is to filter suitable data for determining the RSSI value. Therefore, it can be set according to different application environments or different needs. For example, in two scenarios with different noise energies, the first threshold can be set to a larger value in the scenario with relatively large noise, and a smaller value in the scenario with relatively small noise. When more accurate gain adjustment is required, the first threshold can be set to a larger value to remove as much noise as possible. These will not be elaborated further here.
[0036] For example, in some embodiments, the first threshold is determined by the following expression: Thr1 = max(α × first parameter, β × second parameter); Where Thr1 is the first threshold, α and β are preset parameters, α≥0, 0≤β<1, α≠β, the first parameter is the average value of the row with the largest sum of elements in the target matrix, and the second parameter is the maximum value of the row with the largest sum of elements in the target matrix.
[0037] Of course, the above is merely an example illustrating how the first threshold is determined. In some embodiments, the first threshold can also be determined solely based on the first parameter or the second parameter. Similar to the example above, the core is to associate the first threshold with the currently acquired data, making the first threshold adaptable to the current scenario. Therefore, the first threshold will be more accurate, and the data filtered through the first threshold will be more accurate and reliable. In some embodiments, the first threshold can also be a preset fixed value. Therefore, it will not change with the current data, and it is not necessary to determine the first threshold every time. Instead, a pre-configured value can be read or called, resulting in higher processing efficiency and better real-time performance.
[0038] Of course, the above example is only an illustrative example of taking a line of data as the peak pulse. In some embodiments, several sampled data near the peak can be taken instead of taking a line of data. Here, we will not list the different ways of determining the peak pulse one by one.
[0039] Based on the above embodiments, it is also understood that not every acquired signal is a valid signal. For example, there may be noise-induced signals, or insufficient data reliability. Therefore, in some embodiments, after filtering elements in the row with the largest sum of elements in the target matrix according to a preset first threshold, the method further includes: detecting whether the number of elements retained after filtering is greater than a preset second threshold. Correspondingly, determining the RSSI value of the received signal in the unlocked state based on the retained elements can be achieved as follows: if the number of retained elements is detected to be greater than the second threshold, the RSSI value of the received signal in the unlocked state is determined based on the retained elements. That is, the RSSI value is determined only after a sufficient number of non-zero parameters are obtained. This ensures that the determined RSSI value is more effective, making each gain adjustment more reliable and effective, and enabling faster entry into the locked state through continuous iterative feedback, maintaining a stable and appropriate output.
[0040] It should be noted that the embodiments of this application do not specifically limit the second threshold. It can be limited according to the application scenario, requirements, etc. For example, in scenarios with high reliability requirements, the second threshold can be set to a larger value; in cases where more sensitive processing is desired, the second threshold can be set to a smaller value; or the second threshold can be a variable, such as reducing the second threshold when it does not exceed the threshold for several consecutive times, etc., which will not be elaborated here.
[0041] In some embodiments, after detecting whether the number of elements retained after filtering is greater than a preset second threshold, if the number of elements retained after filtering is not greater than the second threshold, the current gain can be kept unchanged, that is, maintaining a certain stability in the unlocked state. In other words, if there are not enough non-zero parameters, the value is considered unreliable. Therefore, gain adjustment can be abandoned instead of adjusting the gain when the data is not reliable, avoiding wasting resources and enabling more timely entry into the next gain adjustment, resulting in high efficiency and good real-time performance.
[0042] Of course, the above is only an illustrative example. In some embodiments, different gain adjustment methods or different RSSI value determination methods may be selectively adopted based on different results of whether the number of elements retained after detection and screening is greater than a preset second threshold. These will not be elaborated on here.
[0043] In step 200, after determining the RSSI value of the received signal in the unlocked state, the gain adjustment based on the RSSI value is roughly the same as the existing gain adjustment steps after determining the RSSI value. The main difference is that the method of obtaining the RSSI value is different, which will not be described in detail here.
[0044] Thus, as gain adjustments are continuously made in the unlocked state, the output stabilizes to the desired state after gain adjustment. At this point, the gain remains essentially unchanged, and the locked state can be entered. However, whether the switch to the unlocked state can be made accurately and promptly in the locked state will affect the effectiveness of the gain adjustment. Therefore, in some embodiments, to more accurately determine the timing of entering the unlocked state, such as... Figure 3 As shown, the method for adjusting the gain includes the following steps: Step 300: Determine the current RSSI value of the received signal in the locked state based on the received signal in the locked state.
[0045] Step 400: Smooth the current RSSI value of the received signal in the locked state.
[0046] Step 500: Based on the smoothed RSSI value, detect whether the lockout state has been entered.
[0047] In this process, after entering the unlocked state, the gain will be continuously adjusted until no further gain adjustment is needed, thus entering the locked state. In this way, the AGC module in the UWB receiver switches between the unlocked and locked states, which improves the accuracy of the gain adjustment.
[0048] In this way, by combining the continuity of the target motion, smoothing is used to avoid unnecessary unlocking states triggered by occasional disturbances (such as sudden noise), making the timing of the unlocking state more accurate and reliable, maintaining the stability of the system, avoiding meaningless gain adjustment processes, and reducing resource waste.
[0049] It should be noted that, Figure 3 The embodiments shown are merely illustrative examples of the locked state, which can further improve the effect of gain adjustment. Of course, in some embodiments, after entering the locked state after step 200, the gain adjustment scheme of the existing locked state can also be adopted, or, in some embodiments, the unlocked state before step 300 adopts the gain adjustment scheme of the existing unlocked state, etc., which will not be elaborated here.
[0050] It should also be noted that, Figure 3 This is just one example. In some embodiments, steps 300 to 500 can be implemented independently of steps 100 to 200, which will not be described in detail here.
[0051] Furthermore, similar to the aforementioned embodiments, the above method can be applied to UWB-related scenarios. In this case, determining the current RSSI value of the received signal in the locked state based on the received signal in the locked state can be achieved through the following steps: receiving the UWB signal; if the received UWB signal is a SYNC field signal and the current state is locked, determining the RSSI value of the SYNC field signal based on the received SYNC field signal. And / or, detecting whether to enter the unlocked state based on the smoothed RSSI value can be achieved through the following steps: detecting whether to generate a control signal based on the smoothed RSSI value, wherein the control signal is used to control the AGC module of the UWB receiver to switch from the locked state to the unlocked state. Of course, the above is only an example, and it can also be applied to other scenarios with similar requirements, which will not be listed here.
[0052] To facilitate a better understanding of the above embodiments by those skilled in the art, they will be explained and described below.
[0053] In step 300, the method for determining the current RSSI value of the received signal in the locked state is not limited. For example, in some embodiments, a method similar to determining the RSSI value based on non-zero pulses in the unlocked state can be used, determining the value based on non-zero pulses in the received signal, thereby improving the accuracy of the handover time judgment by improving the accuracy of the RSSI. Alternatively, in some embodiments, existing RSSI value determination methods can be used, such as determining the RSSI value based on the entire received signal, etc., which will not be elaborated further here.
[0054] In step 400, the smoothing method is not limited; any data smoothing algorithm can be used, such as additive smoothing, low-pass filters, etc., which will not be listed here. The data used for smoothing may include one or more historically acquired RSSI values. For example, smoothing can be performed by combining a preset number of recently acquired RSSI values with the currently acquired RSSI value; or it can be performed by combining RSSI values acquired within a preset time period with the currently acquired RSSI value, etc., which will not be listed here again.
[0055] Taking additive smoothing as an example, in some embodiments, the current RSSI value of the received signal in the locked state is smoothed using the following expression: P' = (1-s) × P last '+s×P, Where P' is the smoothed RSSI value, s is a preset parameter, and s∈(0,1), P last ' is the RSSI value after the last smoothing process, and P is the current RSSI value of the received signal in the locked state.
[0056] It is also understandable that for control adjustments, there are two scenarios: a significant power increase and a significant power decrease, and the impact on gain adjustment is not entirely the same in these two scenarios. Based on this, in some embodiments, two types of parameters can be maintained for the smoothing process: one to characterize a significant power increase and the other to characterize a significant power decrease. This allows for a more accurate determination of whether the power increase or decrease is significant, enabling a more precise judgment and allowing entry into the unlocked state at a more appropriate time. Taking the aforementioned additive smoothing process as an example, in some embodiments, the smoothed RSSI value includes a first RSSI value and a second RSSI value; smoothing the current RSSI value of the received signal in the locked state is achieved through the following expression: P1' = (1-s1) × P1 last '+s1×P, P2' = (1-s2) × P2 last '+s2×P, Where P1' is the first RSSI value, P2' is the second RSSI value, s1 > s2, s1 and s2 are preset parameters, and s1 and s2 ∈ (0,1), P1 last ', P2 last ' represents the first RSSI value and the second RSSI value after the last smoothing process, respectively, and P represents the current RSSI value of the received signal in the locked state.
[0057] In other words, maintaining two RSSIs for judgment allows for a more robust and accurate determination of whether the signal has experienced a significant rise or fall, thus enabling more precise judgment and allowing the system to enter the unlocked state at a more appropriate time.
[0058] Of course, the above is only an exemplary description of the smoothing process. Other smoothing methods can also be implemented in other embodiments, which will not be elaborated here.
[0059] In step 500, the method of judgment is not limited. It can be judged by comparing with a preset threshold, which is efficient and can avoid missing the opportunity to adjust the state. It can also be judged by comparing with historically acquired parameters, which is more in line with the current real-time scenario and can more accurately determine the timing of state adjustment. These will not be elaborated on here.
[0060] In some embodiments, detecting whether a lock-out state has been entered based on the smoothed RSSI value can be achieved as follows: Detecting whether a lock-out state has been entered based on a reference RSSI value and the current smoothed RSSI value, wherein the reference RSSI value includes the RSSI value after the previous smoothing and / or the RSSI value before the current smoothing. It can be seen that the detection of whether a lock-out state has been entered uses the RSSI value after the previous smoothing or the RSSI value before the current smoothing as a reference to evaluate the current smoothed RSSI value and whether there is a mismatch between the gain adjustment and the signal. This is to accurately trigger a lock-out and continue gain adjustment until the gain adjustment matches the signal and the lock-out state is entered.
[0061] It should be noted that the embodiments of this application do not limit the specific judgment and detection methods. In some embodiments, detecting whether a state of unlocking has been entered based on a reference RSSI value and the current smoothed RSSI value can be achieved through the following steps: detecting the relationship between the current smoothed RSSI value and a threshold determined based on the previous smoothed RSSI value, and / or detecting based on the difference between the RSSI values before and after the current smoothing, to determine whether a state of unlocking has been entered. Of course, the above are just examples. In some embodiments, detection can also be performed based on the difference between the current smoothed RSSI value and the previous smoothed RSSI value, etc., which will not be listed here.
[0062] Taking the combination of historically acquired parameters as an example, the smoothed RSSI value includes a first RSSI value and a second RSSI value. Correspondingly, detecting the relationship between the current smoothed RSSI value and a threshold determined based on the previous smoothed RSSI value can be achieved as follows: detecting whether the current first RSSI value is greater than a third threshold determined based on historical first RSSI values; and / or, detecting whether the current second RSSI value is greater than a fourth threshold determined based on historical second RSSI values; and / or, detecting whether the current first RSSI value is less than a fifth threshold determined based on historical first RSSI values; and / or, detecting whether the current second RSSI value is less than a sixth threshold determined based on historical second RSSI values. In other words, maintaining the corresponding thresholds determines whether the loss of lock is caused by a significant increase or decrease in power.
[0063] It should be noted that the embodiments of this application do not limit the determination method of the relevant thresholds. Taking the determination method of the third threshold and the fourth threshold as an example, in some embodiments, the third threshold is determined by the following expression: t1 × historical first RSSI value. In some embodiments, the fourth threshold is determined by the following expression: t2 × historical second RSSI value, where t1 and t2 are preset parameters, t1 > 1, t2 > 0.
[0064] It should be noted that the embodiments of this application do not limit the selection method of the historical first RSSI value and the historical second RSSI value. It can be the previous RSSI value, or the maximum or minimum value among the RSSI values obtained in the past preset number (or preset time period), etc., which will not be elaborated here.
[0065] Of course, the above are just examples. In other embodiments, other methods can be used to achieve the same result, which will not be elaborated here.
[0066] To facilitate a better understanding by those skilled in the art, the foregoing embodiments will be illustrated below with examples.
[0067] In the unlocked state: The sampled data obtained from sampling the received signal is processed using a sliding window with a window length of N×δ. L The sampled data outputs of analog-to-digital converters (ADCs) in ×K UWB systems. Where N is a positive integer; according to the IEEE 802.15.4 / 4z protocol, δ L It can take values of 4, 16, 64, etc., where K is the oversampling factor of the ADC.
[0068] According to the power value P=(I 2 +Q 2 ), calculate the power values of all sampled data within each window and arrange them into an M×N target matrix. Where M=δ L ×K.
[0069] According to the IEEE 802.15.4 / 4z protocol, in the M rows of the target matrix, there is one row containing the position of the pulse power peak value. Okay, among them, The remaining positions are considered to be the locations of zero values, and subsequent processing is based solely on... The data.
[0070] For the location of the pulse peak Set the first threshold This is used to determine whether the polarity of the pulse peak is non-zero, where the first threshold... It is determined by the combined average and maximum values of the sampled data at the location of the pulse peak, that is: Thr1 = max(α × first parameter, β × second parameter); Where, the first parameter = The second parameter = The mean() function calculates the average, and the max() function calculates the maximum value.
[0071] turn up All If the conditions are met The number of n exceeds the preset second threshold If n does not exceed the second threshold in the next preset number of processing iterations, then proceed to the next step. Otherwise, move the window and process the sampled data in the next window as described above. If n does not exceed the second threshold in the next preset number of processing iterations, then decrease the threshold. .
[0072] Next, after satisfying The number of n exceeds the preset second threshold In the case of exceeding of The average value is calculated to obtain the RSSI value of the received signal. ),Right now: .
[0073] Finally, according to Adjust the AGC gain according to the preset desired power value.
[0074] In locked state: First, determine the RSSI value of the received signal according to the aforementioned processing method, denoted as . .
[0075] Then update the current values of the two alpha filters according to the following strategy: On the first update: ; ; otherwise: P1' = (1-s1) × P1 last '+s1×P, P2' = (1-s2) × P1 last '+s2×P,; Where P1' is the first RSSI value, P2' is the second RSSI value, s1 > s2, s1 and s2 are preset parameters, and s1 and s2 ∈ (0,1), P1 last ', P2 last ' represents the first RSSI value and the second RSSI value after the last smoothing process, respectively, and P represents the current RSSI value of the received signal in the locked state.
[0076] Next, based on the first RSSI value P1' and the second RSSI value P2' of the two alpha filters, and the preset third threshold... Fourth threshold Perform AGC lock loss detection: like If the received signal increases, it is considered an increase, triggering a loss of lock. In some cases, an increase in the received signal can further trigger a loss of lock while simultaneously lowering the gear.
[0077] like If the signal decreases, it is considered that the signal has decreased; and / or If the signal is too weak, it is considered that the lock is lost. In some cases, if the received signal decreases, the lock can be increased to a higher level at the same time as the lock is lost.
[0078] In some cases (such as when SFD has a long zero), then only when This means that if the signal is too weak, a loss of lock is triggered. In some cases, if the received signal decreases, the lock-up level can be increased simultaneously with the triggering of a loss of lock.
[0079] In this way, the gain is continuously adjusted in the unlocked state, and the system continuously checks whether to switch to the unlocked state in the locked state until the current task is completed.
[0080] Furthermore, based on the above example and existing technology-provided methods for adjusting gain, this paper further incorporates three common system scenarios: 1. Noise and interference are much smaller than the useful signal, with an experimental value of -40dBc; 2. Noise and interference are comparable to the useful signal, with an experimental value of 0dBc; 3. Noise and interference are much larger than the useful signal, with an experimental value of +40dBc. Additionally, based on the IEEE 802.15.4 specification, the signal used to configure AGC is 16 SYNC symbols, the code index of SYNC is 1 (i.e., symbol length |C_i|=31), and the spreading parameter is δ. L =64. The pulse shaping is set to a 4th-order Butterworth filter, the oversampling factor is set to K=2, and the full scale of the ADC is set to 1 for the output waveform.
[0081] In the unlocked state: When obtaining RSSI values using the existing method of averaging without removing zero pulses, with preset expected power values of 0.01 and 0.1, the simulation results are as follows: Figure 4 and Figure 5 As shown. Among them, Figure 4 This is a waveform output diagram of the AGC processing result when the preset expected power value is 0.01. Figure 4 The waveforms in the diagram, from top to bottom, correspond to the three scenarios mentioned above. Figure 5 This is a schematic diagram of the waveform output of the AGC processing result when the preset expected power value is 0.1. Figure 5 The waveforms in the diagram, from top to bottom, correspond to the three scenarios mentioned above.
[0082] When obtaining the RSSI value using the existing method of taking the maximum value without removing zero pulses, and setting the preset expected power value to 0.8, the waveform output diagram of the AGC processing result is as follows. Figure 6 As shown, where, Figure 6 The waveforms in the diagram correspond to the three scenarios mentioned above, from top to bottom.
[0083] When determining the RSSI value based on the scheme provided in the example above, a preset expected power value of 0.8 is taken, and at the same time... =0.9, =0.6, at this time, the waveform output diagram of the AGC processing result is as follows. Figure 7 As shown, where, Figure 7 The waveforms in the diagram correspond to the three scenarios mentioned above, from top to bottom.
[0084] in, Figures 4-7 The horizontal axis of each waveform graph represents time, and the vertical axis represents amplitude.
[0085] contrast Figure 4-6 and Figure 7It can be seen that, Figure 4 The simulation results of obtaining RSSI values using the existing method of averaging without removing zero pulses show unstable outputs in the second and third scenarios, and it is difficult to achieve the expected gain, especially in the third scenario, where the expected gain is far from being achieved. Figure 5 The simulation results shown, obtained by averaging without removing zero pulses, produce unstable outputs in the third scenario and fail to achieve the expected gain. Figure 6 The simulation results of the existing method of obtaining RSSI values by taking the maximum value without removing zero pulses, as shown, show that the output in the third scenario is unstable and generally fails to achieve the expected gain. In other words, the existing gain adjustment schemes are difficult to accommodate all three system scenarios, and the output is unstable and fails to meet expectations. However, the simulation results of the gain adjustment method provided in this application embodiment are as follows: Figure 7 As shown, in the first and second scenarios, the output is basically stable and can generally achieve the expected gain. Even in the third scenario, the expected gain is not always maintained, but the stability and gain achievement are significantly improved compared to the simulation results of the existing scheme. That is, the scheme provided by this application takes into account the performance of three system scenarios and effectively improves the gain adjustment accuracy of AGC.
[0086] In the locked state, the SFD sequence of the signal is further configured as [0 +1 0 -1 +1 0 0 -1]. Assuming the maximum signal power is 0.8 when gain is locked, the signal arrival time is t = 5000 ns, and the calculation window length for the signal RSSI is Δt = 500 ns, using the maximum value as the RSSI value, then according to the existing scheme, without smoothing, the change of the RSSI value over time in the SYNC and SFD components will be as follows: Figure 8 As shown, when calculating the RSSI of the SFD part, the calculation result shows a sudden change and is difficult to distinguish from the actual disturbance disappearance scenario, which can easily cause AGC to lose lock erroneously. However, after smoothing processing as described in the embodiment of this application and setting s1=0.8 and s2=0.1, the RSSI value changes over time in the SYNC and SFD parts as follows: Figure 9 As shown, it can be seen that the first RSSI value (corresponding to Figure 9 The larger result (in the upper middle waveform) ensures that the RSSI value rises rapidly when the signal arrives, guaranteeing the sensitivity of AGC to avoid loss of lock due to signal increase. The second RSSI value (corresponding to...) Figure 9The waveform diagram in the lower middle section shows that when SFD reaches 0, RSSI only decreases slowly, improving the robustness of AGC lockout. Simultaneously, when the signal disappears, RSSI also decreases below the threshold after a period of time, allowing the AGC to function normally even when the signal weakens and the lockout occurs. Figure 8 and Figure 9 The horizontal axis represents time, and the vertical axis represents the RSSI value.
[0087] In other words, the gain adjustment method provided in this application, in the unlocked state, improves upon the shortcomings of using the average and maximum values of RSSI. It utilizes the structural information of the SYNC segment signal in UWB, first identifying non-zero pulses in the signal, and then calculating the RSSI of the useful signal solely based on these non-zero pulses. This eliminates interference and noise at zero pulse positions, improving the gain adjustment accuracy of AGC. In the locked state, the average power of the signal is smoothed, effectively solving the problems of erroneous unlocking and incorrect gain adjustment in AGC, improving the unlocking robustness of AGC, and effectively resolving the problems of erroneous unlocking and incorrect gain adjustment.
[0088] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0089] This application also provides an integrated circuit, which may include a radio frequency (RF) module, an analog signal processing module, and a digital signal processing module connected in sequence. The RF module is used to generate RF transmission signals and receive echo signals. The analog signal processing module is used to down-convert the echo signals to obtain intermediate frequency (IF) signals. The digital processing module is used to perform analog-to-digital conversion on the IF signals to obtain digital signals. The digital signals are processed based on the gain adjustment method provided in this application. Specifically, when the AGC module in the digital signal processing module is in an unlocked state, the gain adjustment method described in steps 100-200 is implemented based on the digital signals; or, when the AGC module in the digital signal processing module is in a locked state, the gain adjustment method described in steps 300-500 is implemented based on the digital signals.
[0090] In some alternative embodiments, the integrated circuit may be a UWB radar chip (or die).
[0091] In some alternative embodiments, the integrated circuit may be an AiP (Antenna-In-Package) chip structure, an AoP (Antenna-On-Package) chip structure, or an AoC (Antenna-On-Chip) chip structure.
[0092] According to some other embodiments of this application, an electromagnetic wave sensor is also proposed. This electromagnetic wave sensor may include an antenna and an integrated circuit as described above. The integrated circuit is electrically connected to the antenna and is used to transmit and receive electromagnetic wave signals. For example, the electromagnetic wave sensor may include: a carrier, an integrated circuit as described in any of the above embodiments, and an antenna, etc. The integrated circuit may be disposed on the carrier; the antenna may be disposed on the carrier, or integrated with the integrated circuit as a single device disposed on the carrier (i.e., the antenna may be an antenna disposed in an AiP, AoP, or AoC structure); wherein the integrated circuit is connected to the antenna (i.e., the sensing chip or integrated circuit does not integrate an antenna, such as a conventional SoC), and is used to transmit and receive electromagnetic wave signals. The carrier may be a printed circuit board (PCB), and the corresponding transmission line may be a PCB trace.
[0093] This application provides a terminal device, which may include: a device body; and an electromagnetic wave sensor as described above disposed on the device body; wherein the electromagnetic wave sensor is used for target detection and / or communication to provide reference information for the operation of the device body.
[0094] The terminal device can be represented in the form of a general computing device. Components of the terminal device may include, but are not limited to: at least one processing unit, at least one storage unit, a bus connecting different system components (including the storage unit and the processing unit), a display unit, etc. The storage unit stores program code, which can be executed by the processing unit to cause the processing unit to perform the methods described in this specification according to the various exemplary embodiments of this application. The storage unit may include a readable medium in the form of volatile storage units, such as random access memory (RAM) and / or cache memory units, and may further include read-only memory units (ROM).
[0095] The storage unit may also include a program / utility having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0096] A bus can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus that uses any of the various bus structures.
[0097] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter can communicate with other modules of the electronic device via a bus. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0098] For example, the electronic device in this application embodiment may further include: a device body; and an electromagnetic wave sensor disposed on the device body as described in any of the above embodiments; wherein the electromagnetic wave sensor can be used to realize functions such as target detection and / or wireless communication.
[0099] Specifically, based on the above embodiments, in one optional embodiment of this application, the electromagnetic wave sensor can be disposed outside the device body or inside the device body. In other optional embodiments of this application, the electromagnetic wave sensor can be partially disposed inside the device body and partially disposed outside the device body. This application does not limit the specific implementation; it can be determined according to the circumstances.
[0100] In an optional embodiment, the aforementioned device body can be a component or product applied in fields such as smart cities, smart homes, transportation, smart homes, consumer electronics, security monitoring, industrial automation, in-cabin detection (such as smart cockpits), medical devices, and healthcare. For example, the device body can be intelligent transportation equipment (such as automobiles, bicycles, motorcycles, ships, subways, trains, etc.), security equipment (such as cameras), liquid level / flow rate detection equipment, smart wearable devices (such as wristbands, glasses, etc.), smart home devices (such as robot vacuum cleaners, door locks, televisions, air conditioners, smart lights, etc.), various communication devices (such as mobile phones, tablets, etc.), as well as devices such as barriers, intelligent traffic lights, intelligent signs, traffic cameras, and various industrial robotic arms (or robots). It can also be various instruments for detecting vital signs parameters and various devices equipped with such instruments, such as in-cabin vital sign detection in automobiles, indoor personnel monitoring, smart medical devices, and consumer electronic devices.
[0101] This application also provides a non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by a processor, cause the processor to perform the feeder unequal length compensation method described above.
[0102] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. The technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the methods described above according to the embodiments of this application.
[0103] Software products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0104] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0105] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0106] The aforementioned computer-readable medium carries one or more programs, which, when executed by a device, cause the computer-readable medium to perform the aforementioned functions.
[0107] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified to be uniquely different from one or more devices in this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0108] According to embodiments of this application, a computer program is proposed, including computer programs or instructions, which, when executed by a processor, can perform the methods described above. In an optional embodiment, the integrated circuit described above can be a UWB radar chip. The types of digital functional modules in the integrated circuit can be determined according to actual needs.
[0109] It should be noted that wireless devices can transmit and receive radio signals to achieve functions such as target detection and / or communication, thereby providing the device body with target detection information and / or communication information, and thus assisting or even controlling the operation of the device body.
[0110] For example, when the aforementioned device is applied to an advanced driver assistance system (ADAS), wireless devices (such as UWB radar) used as vehicle sensors can assist the ADAS system in realizing application scenarios such as digital keys, adaptive cruise control, automatic braking assist (AEB), blind spot detection warning (BSD), lane change assist warning (LCA), rear cross traffic alert (RCTA), parking assist, rear vehicle warning, collision avoidance, pedestrian detection, and cabin liveness detection (CPD).
[0111] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above-described embodiments merely illustrate preferred embodiments of the present invention and the technical principles employed. While the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. Those skilled in the art can make various obvious changes, readjustments, and substitutions without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the inventive concept, and the scope of protection of this patent is determined by the appended claims.
Claims
1. A method for adjusting gain, characterized in that, include: The RSSI value of the received signal in the unlocked state is determined based on the non-zero pulses in the received signal in the unlocked state. Gain adjustment is performed based on the RSSI value of the received signal in the unlocked state.
2. The method for adjusting gain according to claim 1, characterized in that, Determining the RSSI value of the received signal in the unlocked state based on the non-zero pulses in the received signal in the unlocked state includes: Based on several sampled data of the received signal in the unlocked state, the location of the pulse peak is determined; The RSSI value of the received signal in the unlocked state is determined based on the power value of the sampled data corresponding to the location of the pulse peak.
3. The method for adjusting gain according to claim 2, characterized in that, Determining the RSSI value of the received signal in the unlocked state based on the power value of the sampled data corresponding to the location of the pulse peak includes: The statistical value of the power value of the sampled data corresponding to the location of the pulse peak is determined as the RSSI value of the received signal in the unlocked state, wherein the statistical value includes the average value or the maximum value.
4. The method for adjusting gain according to claim 2, characterized in that, Determining the location of the pulse peak based on several sampled data of the received signal in the unlocked state includes: Based on several sampled data of the received signal in the unlocked state, determine the power value corresponding to each sampled data and generate a target matrix; The position of the row element with the largest sum in the target matrix is determined as the row position of the pulse peak in the target matrix; and / or, Determining the RSSI value of the received signal in the unlocked state based on the power value of the sampled data corresponding to the location of the pulse peak includes: The RSSI value of the received signal in the unlocked state is determined based on the row element with the largest sum of elements in the target matrix.
5. The method for adjusting gain according to claim 4, characterized in that, Determining the RSSI value of the received signal in the unlocked state based on the row element with the largest sum of elements in the target matrix includes: Based on a preset first threshold, elements in the row with the largest sum of elements in the target matrix are filtered. Based on the elements that are retained after filtering, the RSSI value of the received signal in the unlocked state is determined.
6. The method for adjusting gain according to claim 5, characterized in that, After filtering the elements in the row with the largest sum of elements in the target matrix according to a preset first threshold, the method further includes: Detect whether the number of elements retained after the filtering is greater than a preset second threshold; The step of determining the RSSI value of the received signal in the unlocked state based on the elements retained after filtering includes: If the number of elements retained by the filtering is greater than the second threshold, the RSSI value of the received signal in the unlocked state is determined based on the elements retained by the filtering.
7. The method for adjusting gain according to claim 6, characterized in that, After detecting whether the number of elements retained after filtering is greater than a preset second threshold, the method further includes: If the number of elements retained by the filtering is not greater than the second threshold, the current gain remains unchanged.
8. The method for adjusting gain according to any one of claims 5 to 7, characterized in that, The first threshold is determined by the following expression: Thr1 = max(α × first parameter, β × second parameter); Where Thr1 is the first threshold, α and β are preset parameters, α≥0, 0≤β<1, α≠β, the first parameter is the average value of the row with the largest sum of elements in the target matrix, and the second parameter is the maximum value of the row with the largest sum of elements in the target matrix.
9. The method for adjusting gain according to any one of claims 4 to 7, characterized in that, The received signal in the unlocked state is a UWB signal, and the target matrix is an m×n dimensional matrix, where m=δ L ×K, δ L K is the preset spreading factor value, K is the oversampling factor when sampling the received signal, and n is a preset value.
10. The method for adjusting gain according to any one of claims 1 to 7, characterized in that, The gain adjustment based on the RSSI value of the received signal in the unlocked state includes: Gain adjustment is performed based on the RSSI value of the received signal in the unlocked state and the preset desired RSSI value.
11. The method for adjusting gain according to any one of claims 1 to 7, characterized in that, Determining the RSSI value of the received signal in the unlocked state based on the non-zero pulses in the received signal in the unlocked state includes: Receive UWB signals; If the received UWB signal is a SYNC field signal and the current state is unlocked, acquire the non-zero pulses in the SYNC field signal, and determine the RSSI value of the SYNC field signal based on the acquired non-zero pulses; and / or, The gain adjustment based on the RSSI value of the received signal in the unlocked state includes: Based on the RSSI value of the SYNC field signal, a control signal is generated and sent to the AGC module of the UWB receiver to control the gain of the AGC module.
12. A method for adjusting gain, characterized in that, include: Based on the received signal in the locked state, determine the current RSSI value of the received signal in the locked state; The current RSSI value of the received signal in the locked state is smoothed. Based on the smoothed RSSI value, it is detected whether the system has entered a lost-lock state, and if it does, the gain is adjusted.
13. The method for adjusting gain according to claim 12, characterized in that, The smoothing of the current RSSI value of the received signal in the locked state is achieved by the following expression: P'=(1-s)×P last '+s×P, Where P' is the smoothed RSSI value, s is a preset parameter, and s∈(0,1), P last ' is the RSSI value after the last smoothing process, and P is the current RSSI value of the received signal in the locked state.
14. The method for adjusting gain according to claim 13, characterized in that, The smoothed RSSI value includes a first RSSI value and a second RSSI value; The smoothing of the current RSSI value of the received signal in the locked state is achieved by the following expression: P1'=(1-s1)×P1 last '+s1×P, P2* = (1 - s2)×P2 last '+s2×P, Where P1' is the first RSSI value, P2' is the second RSSI value, s1 > s2, s1 and s2 are preset parameters, and s1 and s2 ∈ (0,1), P1 last ', P2 last ' represents the first RSSI value and the second RSSI value after the previous smoothing process, respectively, and P represents the current RSSI value of the received signal in the locked state.
15. The method for adjusting gain according to claim 12, characterized in that, The step of detecting whether the unlocked state has been entered based on the smoothed RSSI value includes: Based on the reference RSSI value and the current smoothed RSSI value, it is determined whether the unlocked state has been entered, wherein the reference RSSI value includes the RSSI value after the previous smoothing process and / or the RSSI value before the current smoothing process.
16. The method for adjusting gain according to claim 15, characterized in that, The step of detecting whether the unlocked state has been entered based on the reference RSSI value and the current smoothed RSSI value includes: The relationship between the current smoothed RSSI value and the threshold determined based on the RSSI value after the previous smoothing, and / or the difference between the RSSI values before and after the current smoothing, is detected to determine whether the unlocked state has been entered.
17. The method for adjusting gain according to claim 16, characterized in that, The smoothed RSSI value includes a first RSSI value and a second RSSI value; The detection of the relationship between the current smoothed RSSI value and the threshold determined based on the previous smoothed RSSI value includes: Detect whether the current first RSSI value is greater than a third threshold determined based on historical first RSSI values; And / or, Detect whether the current second RSSI value is greater than a fourth threshold determined based on historical second RSSI values; And / or, Detect whether the current first RSSI value is less than a fifth threshold determined based on historical first RSSI values; And / or, Detect whether the current second RSSI value is less than the sixth threshold determined based on historical second RSSI values.
18. The method for adjusting gain according to claim 17, characterized in that, The third threshold is determined by the following expression: t1 × the historical first RSSI value, and the fourth threshold is determined by the following expression: t2 × the historical second RSSI value, where t1 and t2 are preset parameters, t1 > 1, t2 > 0.
19. The method for adjusting gain according to any one of claims 12 to 18, characterized in that, Determining the current RSSI value of the received signal in the locked state based on the received signal in the locked state includes: Receive UWB signals; If the received UWB signal is a SYNC field signal and the current state is locked, determine the RSSI value of the SYNC field signal based on the received SYNC field signal; and / or, The step of detecting whether the lock-out state has been entered based on the smoothed RSSI value includes: Based on the smoothed RSSI value, it is detected whether a control signal is generated, wherein the control signal is used to control the AGC module of the UWB receiver to switch from a locked state to an unlocked state.
20. An integrated circuit, characterized in that, It includes a radio frequency module, an analog signal processing module, and a digital signal processing module connected in sequence; The radio frequency module is used to generate radio frequency transmission signals and / or receive radio frequency reception signals; The analog signal processing module is used to down-frequency the received radio frequency signal to obtain an intermediate frequency signal. The digital signal processing module is used to perform analog-to-digital conversion on the intermediate frequency signal to obtain a digital signal, and when the AGC module in the digital signal processing module is in an unlocked state, to implement the gain adjustment method as described in any one of claims 1 to 11 based on the digital signal, or when the AGC module in the digital signal processing module is in a locked state, to implement the gain adjustment method as described in any one of claims 12 to 19 based on the digital signal.
21. An electromagnetic wave sensor, characterized in that, include: Carrier; The integrated circuit as described in claim 20 is disposed on the carrier. An antenna is disposed on the carrier, or the antenna and the integrated circuit are integrated into a single device and disposed on the carrier. The integrated circuit is connected to the antenna and is used to transmit radio frequency signals and / or receive radio frequency signals.
22. A terminal device, characterized in that, include: Equipment body; And the electromagnetic wave sensor as described in claim 21, which is disposed on the main body of the device; The electromagnetic wave sensor is used for target detection and / or communication to provide reference information for the operation of the device body.