Uwb module data smoothing method, electronic equipment and storage medium

The UWB module data is processed through the adaptive exponential smoothing and weighted angle averaging algorithm, which solves the problem of accuracy reduction and stability caused by data jump, and realizes more accurate and reliable signal processing, suitable for high-precision positioning and long-distance communication. .

CN119324899APending Publication Date: 2025-01-17SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411458689.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

UWB modules often experience jumps when outputting data, resulting in reduced accuracy, accumulated errors and deterioration in stability, especially in high-precision positioning and long-distance communication applications.

Method used

The UWB module output data is filtered by a secondary filtering through the sliding window and dynamic weighting allocation, and the smoothing factor is adjusted to suppress noise and improve data stability.

Benefits of technology

Significantly improves the robustness and flexibility of signal processing, reduces noise impact, enhances data smoothness and responsiveness, and ensures data processing accuracy and reliability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324899A_ABST
    Figure CN119324899A_ABST
Patent Text Reader

Abstract

The invention discloses a uwb module data smoothing processing method, electronic equipment and a storage medium, and the method comprises the steps: self-adaptive exponential smoothing algorithm calculation: calculating a variance according to updated uwb module data points, adjusting a smoothing factor according to the variance, and then carrying out the exponential smoothing calculation through employing the adjusted smoothing factor, so as to obtain a preliminary smoothing result; performing weighted angle average algorithm calculation: calculating an angle variation, performing weight calculation and accumulation based on the angle variation, and then performing weighted average angle calculation; the results of the self-adaptive exponential smoothing algorithm and the weighted angle average algorithm are integrated to form final output, and the latest result is stored to obtain final smooth data. According to the method, two algorithms of adaptive exponential smoothing (AEMA) and weighted angle averaging (WAA) are combined, the robustness and flexibility of signal processing are improved, and the system can process data and make decisions more accurately and reliably in a complex dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communication and signal processing, and in particular to a method for smoothing UWB module data, an electronic device and a storage medium. Background Art

[0002] Ultra Wide Band (UWB) technology is a wireless carrier communication technology that does not use a sinusoidal carrier but uses nanosecond non-sinusoidal narrow pulses to transmit data, so it occupies a wide spectrum range. UWB modules can achieve very high data rates and are suitable for applications that require high-precision positioning or long-distance communication. In some UWB modules, there may be an angle output function that can measure the angle or direction between two UWB tags. However, in actual applications, UWB modules often experience data jumps when outputting data, resulting in reduced accuracy, error accumulation, and poor stability.

[0003] The drawback of this type of technology is that the data output jumps, which then causes increased instability in the measurement results, thereby compromising accuracy and reliability. Since this technology relies on accurate and stable data output to ensure the overall performance and reliability of the system, these problems are particularly evident in high-precision positioning and long-distance communication applications. Summary of the invention

[0004] The purpose of the present invention is to provide a UWB module data smoothing processing method, an electronic device and a storage medium, which adopts signal processing technologies such as an adaptive exponential smoothing algorithm and a dynamic weight allocation to perform secondary filtering on the UWB module output data, so as to solve the problems of reduced accuracy, error accumulation, poor stability and the like caused by large data output jumps in the prior art.

[0005] The present invention solves the above problems through the following technical solutions:

[0006] A method for smoothing UWB module data, comprising:

[0007] S1. Initialization and data preparation: Create a sliding window to store the most recent data points and set initialization parameters;

[0008] S2, data input and window update: input new data points into the uwb module and update the sliding window according to the new data points;

[0009] S3, adaptive exponential smoothing algorithm calculation: calculate the variance according to the updated uwb module data points, adjust the smoothing factor according to the variance, and then use the adjusted smoothing factor to perform exponential smoothing calculation to obtain a preliminary smoothing result;

[0010] S4, weighted angle average algorithm calculation: calculate the angle change, perform weight calculation and accumulation based on the angle change, and then perform weighted average angle calculation;

[0011] S5. Integrate smoothing results and output: Integrate the results of the adaptive exponential smoothing algorithm and the weighted angle averaging algorithm to form the final output, and store the latest results to obtain the final smoothed data.

[0012] As a further improvement of the present invention, in said S1, the data points include azimuth, elevation and distance information;

[0013] The initialized parameters include the smoothing factor α, the window size window_size, the variance threshold, and the variable b for accumulating weights.

[0014] As a further improvement of the present invention, in S2, new data points of the uwb module are input, and the new data points are inserted into the front end of the sliding window to determine whether the sliding window exceeds the window size window_size set by initialization. If so, the data points corresponding to the window size window_size set by initialization are removed.

[0015] As a further improvement of the present invention, in S3, the variance is calculated based on the updated uwb module data points, which is implemented by an adaptive smoothing filter algorithm; and the exponential smoothing calculation is performed using the adjusted smoothing factor, which is implemented by an exponential moving average algorithm.

[0016] As a further improvement of the present invention, in S3, the specific method includes:

[0017] S3.1, calculate the variance of the azimuth and elevation angles of the data points in the sliding window to evaluate the angular velocity change;

[0018] For a set of n sample data x1, x2, ..., x n , whose sample variance is s 2 The calculation formula is:

[0019]

[0020] Where: x i is the ith data point, x avg is the mean of all data points, that is n is the total number of data points;

[0021] S3.2. Adjust the smoothing factor α according to the variance result;

[0022] S3.3. Use the adjusted smoothing factor α' to perform exponential smoothing on the current data point to obtain a preliminary smoothing result.

[0023] As a further improvement of the present invention, in S3, if the variance is low, the smoothing factor α is reduced; if the variance is high, the smoothing factor α is increased.

[0024] As a further improvement of the present invention, in S3, the current data point is exponentially smoothed using the adjusted smoothing factor α' to obtain a preliminary smoothing result;

[0025] The data is smoothed by taking a weighted average of the latest data point and the exponential moving average of the previous time point; the formula is as follows:

[0026] EMA(t)=α'·data(t)+(1-α')·EMA(t-1) (Formula 2);

[0027] Among them, data(t) is the data point at the current time t; EMA(t-1) is the smoothed value at time t-1.

[0028] As a further improvement of the present invention, in S4, the specific method includes:

[0029] S4.1. By traversing the sliding window, the angle change between each consecutive data point is calculated, and for adjacent data points in the sliding window, the changes dx and dy of the azimuth and elevation angles are calculated;

[0030] S4.2. Calculate the weight based on the angle change. The weight calculation formula is:

[0031]

[0032] S4.3, and multiply the data point angle by the weight and add it to the set variable b to accumulate all the weights in the window for subsequent normalization, and then divide it by the sum of the weights for weighted average calculation to obtain the weighted average value.

[0033] In addition, the present invention also solves the above-mentioned problem through the following technical solutions:

[0034] An electronic device comprises a processor and a memory, wherein the memory stores a program for executing the above-mentioned UWB module data smoothing processing method, and the processor can execute the program stored in the memory.

[0035] A computer-readable storage medium stores program code, which can be called by a processor to execute the above-mentioned UWB module data smoothing processing method.

[0036] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0037] The present invention combines the adaptive exponential smoothing (AEMA) and weighted angle averaging (WAA) algorithms to improve the robustness and flexibility of signal processing, and brings significant technical improvements in suppressing noise, enhancing smoothness, reducing delays, and improving responsiveness. This enables the system to process data and make decisions more accurately and reliably in complex dynamic environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The present invention is a flow chart of a method for smoothing UWB module data. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below in conjunction with the drawings in the preferred embodiments of the present application. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0040] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0041] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, or it can be an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0042] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or display that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed but may include other steps or elements not explicitly listed or inherent to such process, method, product, or display.

[0043] The following will be combined Figure 1 , a UWB module data smoothing processing method, electronic device and storage medium involved in the embodiments of the present application are described in detail. It is worth noting that the following embodiments are only used to explain the present application and do not constitute a limitation on the present application.

[0044] Embodiment 1:

[0045] Combined with Figure 1 As shown, a method for smoothing UWB module data includes the following specific steps:

[0046] S1. Initialization and data preparation:

[0047] Create a sliding window to store the most recent data points and set initialization parameters;

[0048] In this embodiment S1, a sliding window is first created and initial parameters are set; the specific method includes:

[0049] S1.1. Create a sliding window LAST_POINTS_WINDOW: used to store the most recent data points, including azimuth, elevation, and distance information;

[0050] S1.2. Set initialization parameters: set the initial smoothing factor α, window size window_size, variance threshold and variable b for accumulating weights.

[0051] S2. Data input and window update:

[0052] Input new data points into the uwb module and update the sliding window according to the new data points;

[0053] In this embodiment S2, data input and window update; the specific method includes:

[0054] S2.1: Input new data points point_to_sma: Input new data points of the uwb module and update several data points, including azimuth, elevation and distance.

[0055] S2.2: Update the sliding window according to the new data point: insert the new data point to the front of the sliding window. If the window size exceeds the initial window size window_size, remove the earliest data point.

[0056] S3, Adaptive Exponential Smoothing Algorithm (AEMA) calculation:

[0057] Calculate the variance based on the updated uwb module data points, adjust the smoothing factor based on the variance, and then use the adjusted smoothing factor to perform exponential smoothing calculation to obtain a preliminary smoothing result;

[0058] In the data processing of the UWB module, a signal is obtained, and the angular velocity of the signal differs between two consecutive frames. In order to optimize data processing in real time, we dynamically update the parameter α based on this angular velocity difference. In the classic exponential moving average algorithm, the value of α is recalculated according to the changing window size.

[0059] The formula is derived from the calculation of the classic exponential moving average, which is used to determine the weight of each new data point in the smoothing. The calculation of the classic exponential moving average is specifically expressed as:

[0060] Adjusting the smoothing factor α according to the variance result is implemented according to the formula idea. In this embodiment S3, the specific method includes:

[0061] S3.1, calculate the variance of the azimuth and elevation angles of the data points in the sliding window to evaluate the angular velocity change;

[0062] For a set of n sample data x1, x2, ..., x n , whose sample variance is s 2 The calculation formula is:

[0063]

[0064] Where: x i is the ith data point, x avg is the mean of all data points, that is n is the total number of data points;

[0065] Preferably, the variance threshold is used for an adaptive exponential smoothing algorithm (AEMA), and if the data point exceeds the established threshold, the data point is discarded to ensure the accuracy of the data.

[0066] S3.2. Adjust the smoothing factor α according to the variance result. If the variance is low, reduce α; if the variance is high, increase α.

[0067] S3.3. Use the adjusted smoothing factor α' to perform exponential smoothing on the current data point to obtain a preliminary smoothing result.

[0068] The data is passed into the adaptive smoothing filter algorithm, where the exponential moving average algorithm in the adaptive smoothing filter algorithm is used to smooth the data by taking a weighted average of the latest data point and the exponential moving average of the previous time point; the formula is as follows:

[0069] EMA(t)=α'·data(t)+(1-α')·EMA(t-1) (Formula 2);

[0070] Among them, α' is the smoothing factor dynamically updated according to the angular velocity difference. As an attenuation factor, it determines the relative weight of new data points and historical data points. The larger α' is, the greater the weight of the latest data point is, and the smoothed curve is more sensitive to new data changes. data(t) is the data point at the current time t; EMA(t-1) is the smoothing value at time t-1.

[0071] S4. Weighted Angle Average Algorithm (WAA) calculation: The output of the adaptive exponential smoothing algorithm (AEMA) is used as the input of the weighted angle average algorithm (WAA), the angle change is calculated, the weight calculation and accumulation are performed based on the angle change, and then the weighted average angle calculation is performed;

[0072] In this embodiment S3, the specific method includes the following steps:

[0073] S4.1, by traversing the sliding window, calculating the angle change between each consecutive data point, and calculating the weight based on the change;

[0074] For example: for adjacent data points in the sliding window, calculate the changes dx and dy of azimuth and elevation;

[0075] S4.2. Calculate the weight based on the angle change. A smaller change corresponds to a larger weight, and a larger change corresponds to a smaller weight. The weight calculation formula is:

[0076]

[0077] S4.3, multiply the angles of all data points in the window by their corresponding weights and add them to the variables set in S1.2 for subsequent normalization, and then divide them by the sum of the weights for weighted average calculation to obtain the weighted average value, i.e., the weighted average angle.

[0078] S5. Comprehensive smoothing results and output:

[0079] The results of the adaptive exponential smoothing algorithm and the weighted angle averaging algorithm are integrated to form the final output, and the latest results are stored to obtain the final smoothed data.

[0080] The weighted average result is assigned as the smoothed data point and returned to update the current smoothing result. The data filtering process is completed to obtain the final smoothed data.

[0081] In an optional embodiment, the expected value judgment can also be performed on the result of the adaptive exponential smoothing algorithm (AEMA). If the expected value is reached, the data is directly output. If not, the output of the adaptive exponential smoothing algorithm (AEMA) is used as the input of the weighted angle averaging algorithm (WAA) to recalculate the result to integrate the results of the two algorithms and output the data.

[0082] In a specific embodiment, a method for smoothing UWB module data is implemented, and the specific steps include:

[0083] A. Initialization and data preparation: First, create a sliding window LAST_POINTS_WINDOW to store the most recent data points. These data points will be used for subsequent smoothing. Then set the initial smoothing factor α, the window size to window_size, the variance threshold for determining the angular velocity change, and the variable for accumulating weights.

[0084] B. Data input and window update: Whenever a new data point point_to_sma (including angle information such as azimuth, elevation, and distance) is input, it is inserted at the front of the sliding window. Then the size of the sliding window is checked. If it exceeds the preset initial window size window_size, the earliest data point is removed from the end of the sliding window. This ensures that the sliding window only contains the latest window size data point.

[0085] C. Adaptive Exponential Smoothing Algorithm (AEMA) calculation: First, the variance of the azimuth and elevation of the data points in the sliding window is calculated to evaluate the degree of change of the current angular velocity. Then, according to the variance result, the smoothing factor α is adaptively adjusted: if the variance is low, it means that the angular velocity changes slowly, and α is reduced to enhance smoothness. If the variance is high, it means that the angular velocity changes drastically, and α is increased to improve the responsiveness to the change. Then, the updated smoothing factor α is used to perform exponential smoothing calculation on the current data point to obtain a preliminary smoothing result.

[0086] D. Weighted Angle Average Algorithm (WAA) calculation: For each pair of adjacent data points in the sliding window, calculate the changes dx and dy of their azimuth (azi) and elevation (ele), and then calculate the weights based on the angle changes: smaller changes correspond to larger weights, and larger changes correspond to smaller weights. Then multiply the angles of all data points by their corresponding weights and add them to variables such as sum_azi and sum_ele. After the accumulation is completed, divide it by the sum of the weights to get the weighted average angle.

[0087] E. Comprehensive smoothing results: Integrate the results of the adaptive exponential smoothing algorithm (AEMA) and the weighted angle averaging algorithm (WAA) to form the final smoothing angle output. Then store the latest smoothing results so that they can be used as historical data points for reference during the next smoothing.

[0088] F. Output and iteration: The smoothed data point is used as the final output at the current moment for subsequent system processing or decision-making. Wait for the input of the next new data point and repeat the above steps to achieve continuous smoothing.

[0089] When the present invention outputs data for the uwb module, it not only applies the adaptive exponential smoothing algorithm, but also combines the weighted angle averaging algorithm, which greatly reduces the probability of jumps in the uwb data output and completes the data smoothing process. The problem that a large part of the uwb data depends on the antenna, if there is an obstruction between the transmitting end and the receiving end, or the module itself outputs data jumps, is solved. After the uwb data is preliminarily filtered by the adaptive exponential smoothing algorithm, the frame change amount and the total variable weight are obtained, thereby calculating the final data. The introduction of weights makes the algorithm more sensitive to points with smaller angle changes, thereby effectively reducing the noise impact caused by drastic changes and realizing smooth estimation of angle data.

[0090] Embodiment 2:

[0091] This embodiment provides an electronic device that can execute the above-mentioned UWB module data smoothing processing method. The electronic device can be a smart phone, a tablet computer, a computer, a portable computer or other devices.

[0092] The electronic device comprises a processor and a memory, wherein the memory stores a program capable of executing the content of the UWB module data smoothing processing method in the first embodiment, and the processor can execute the program stored in the memory.

[0093] Embodiment 3:

[0094] This embodiment provides a computer-readable storage medium, in which program codes are stored. The program codes can be called by a processor to execute a UWB module data smoothing processing method described in Embodiment 1.

[0095] Although the present invention is described herein with reference to the illustrative embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and embodiments, which will fall within the scope and spirit of the principles disclosed in this application.

Claims

1. A method for smoothing UWB module data, characterized in that: include: S1. Initialization and data preparation: Creating a sliding window Used to store the most recent data points. Set initialization parameters; S2, data input and window update: input new data points into the uwb module and update the sliding window according to the new data points; S3, adaptive exponential smoothing algorithm calculation: calculate the variance according to the updated uwb module data points, adjust the smoothing factor according to the variance, and then use the adjusted smoothing factor to perform exponential smoothing calculation to obtain a preliminary smoothing result; S4, weighted angle average algorithm calculation: calculate the angle change, perform weight calculation and accumulation based on the angle change, and then perform weighted average angle calculation; S5. Integrate smoothing results and output: Integrate the results of the adaptive exponential smoothing algorithm and the weighted angle averaging algorithm to form the final output, and store the latest results to obtain the final smoothed data.

2. The processing method according to claim 1, characterized in that: In S1, the data points include azimuth, elevation and distance information; The initialized parameters include the smoothing factor α, the window size window_size, the variance threshold, and the variable b for accumulating weights.

3. The processing method according to claim 2, characterized in that: In S2, new data points of the uwb module are input, and the new data points are inserted into the front end of the sliding window to determine whether the sliding window exceeds the window size window_size set by initialization. If so, the data points corresponding to the window size window_size set by initialization are removed.

4. The processing method according to claim 2, characterized in that: In S3, the variance is calculated according to the updated uwb module data points, which is implemented by using an adaptive smoothing filter algorithm; and the exponential smoothing calculation is performed using the adjusted smoothing factor, which is implemented by using an exponential moving average algorithm.

5. The processing method according to claim 4, characterized in that: In S3, the specific method includes: S3.1, calculate the variance of the azimuth and elevation angles of the data points in the sliding window to evaluate the angular velocity change; For a set of n sample data x1, x2, ..., x n , whose sample variance is s 2 The calculation formula is: Where: x i is the ith data point, x avg is the mean of all data points, that is n is the total number of data points; S3.

2. Adjust the smoothing factor α according to the variance result; S3.

3. Use the adjusted smoothing factor α' to perform exponential smoothing on the current data point to obtain a preliminary smoothing result.

6. The processing method according to claim 5, characterized in that: In S3, if the variance is low, the smoothing factor α is reduced; if the variance is high, the smoothing factor α is increased.

7. The processing method according to claim 5, characterized in that: In S3, the current data point is exponentially smoothed using the adjusted smoothing factor α' to obtain a preliminary smoothing result; The data is smoothed by taking a weighted average of the latest data point and the exponential moving average of the previous time point; the formula is as follows: EMA(t)=α'·data(t)+(1-α')·EMA(t-1) (Formula 2); Among them, data(t) is the data point at the current time t; EMA(t-1) is the smoothed value at time t-1.

8. The processing method according to claim 4, characterized in that: In said S4, the specific method includes: S4.

1. By traversing the sliding window, the angle change between each consecutive data point is calculated, and for adjacent data points in the sliding window, the changes dx and dy of the azimuth and elevation angles are calculated; S4.

2. Calculate the weight based on the angle change. The weight calculation formula is: S4.3, and multiply the data point angle by the weight and add it to the set variable b to accumulate all the weights in the window for subsequent normalization, and then divide it by the sum of the weights for weighted average calculation to obtain the weighted average value.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program for executing a UWB module data smoothing processing method as claimed in claim 1, and the processor can execute the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable medium stores program code, and the program code can be called by a processor to execute a UWB module data smoothing processing method as claimed in claim 1.

Citation Information

Cited By

  • Self-adaptive track smoothing method capable of resisting sudden change delay in motion direction

    CN122192333A

  • An adaptive track smoothing method against motion direction abrupt change delay

    CN122192333B