Signal processing method and device, equipment and medium
By setting an acceleration change rate threshold and a threshold to correct the acceleration signal, and combining state-space equations and Kalman filtering, the low-frequency distortion problem when the accelerometer acquires velocity is solved, and cost-effective velocity signal processing is achieved.
Patent Information
- Application Number
- CN202511425094.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies that obtain velocity using accelerometers suffer from distortion in the low-frequency range, and adding more sensors increases costs.
The original acceleration signal is corrected by setting an acceleration change rate threshold and an acceleration threshold. The velocity signal is then acquired using a single accelerometer by combining state-space equations and Kalman filtering.
It effectively mitigates the integral drift phenomenon of accelerometers during motion and stillness, reduces costs, and preserves the authenticity of the low-frequency range, avoiding distortion of the velocity signal in the low-frequency range.
Smart Images

Figure CN121316481A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive suspension control technology, and in particular to a signal processing method, apparatus, device, and medium. Background Technology
[0002] In inertial navigation, vibration analysis, and motion biomechanics, velocity information is a key parameter for analyzing motion characteristics and achieving control or navigation. However, directly measuring velocity (e.g., using Doppler radar or encoders) is often costly or environmentally limited, while accelerometers (such as MEMS accelerometers) have become a common means of acquiring motion information due to their miniaturization, low cost, and ease of integration. However, current methods of obtaining velocity through accelerometers suffer from distortion in the low-frequency range, which is usually addressed by fusing information with other sensors, but adding additional sensors increases costs unnecessarily. Summary of the Invention
[0003] In view of the above problems, the present invention aims to provide a signal method, apparatus, device and medium to solve the distortion problem of speed signals in the low-frequency part while reducing costs.
[0004] According to a first aspect of the present invention, a signal processing method is provided, the method comprising: Acquire the raw acceleration signal, the preset acceleration rate of change threshold, and the preset acceleration threshold; The original acceleration signal is corrected based on the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal; Integrating the original acceleration signal yields a first velocity signal; The target acceleration signal is input into a preset state-space equation to obtain a second velocity signal; The target speed signal is obtained based on the first speed signal and the second speed signal.
[0005] Optionally, the step of correcting the original acceleration signal based on the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal includes: Differentiating the original acceleration signal yields the rate of change of acceleration; The rate of change of acceleration is compared with the rate of change of acceleration threshold. If the rate of change of acceleration is less than the rate of change of acceleration threshold, the historical target acceleration signal is used as the target acceleration signal; the historical target acceleration signal is the target acceleration signal at the previous moment. If the rate of change of acceleration is greater than or equal to the rate of change of acceleration threshold, the original acceleration signal is used as the target acceleration signal.
[0006] Optionally, selecting the target wireless channel from the at least one wireless channel includes: After using the historical target acceleration signal as the target acceleration signal when the rate of change of acceleration is less than the acceleration rate of change threshold, the method further includes: If the rate of change of acceleration is less than the rate of change of acceleration threshold, the acceleration threshold is obtained; Compare the target acceleration signal with the acceleration threshold; If the target acceleration signal is less than the acceleration threshold, the target acceleration signal is set to zero; If the target acceleration is greater than or equal to the acceleration threshold, the target acceleration signal is output.
[0007] Optionally, integrating the original acceleration signal to obtain the first velocity signal includes: Integrating the original acceleration signal yields the initial velocity signal; The initial velocity signal below the signal threshold is removed to obtain the reference velocity signal, which is used as the first velocity signal.
[0008] Optionally, the step of inputting the target acceleration signal into a preset state-space equation to obtain a second velocity signal includes: The second velocity signal is obtained through the following state-space equation:
[0009] in, This indicates the second speed signal. This indicates the second velocity signal from the previous moment. Indicates the target acceleration signal. This indicates the period of signal processing.
[0010] Optionally, obtaining the target speed signal based on the first speed signal and the second speed signal includes: The target velocity signal is obtained by fusing the first velocity signal and the second velocity signal through Kalman filtering.
[0011] Optionally, the step of fusing the first velocity signal and the second velocity signal through Kalman filtering to obtain the target velocity signal includes: The observation noise covariance matrix in the Kalman filter is determined based on the first velocity signal; Determine the process noise covariance matrix in the Kalman filter based on the target acceleration signal; The target velocity signal is obtained based on the observed noise covariance matrix, the process noise covariance matrix, and the second velocity signal.
[0012] According to a second aspect of the present invention, a signal processing apparatus is also provided, the apparatus comprising: The acquisition module is used to acquire the original acceleration signal, the preset acceleration change rate threshold, and the preset acceleration threshold. The target acceleration signal determination module is used to correct the original acceleration signal according to the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal; The first velocity signal determination module is used to integrate the original acceleration signal to obtain the first velocity signal; The second velocity signal determination module is used to input the target acceleration signal into a preset state space equation to obtain the second velocity signal; The target speed signal determination module is used to obtain the target speed signal based on the first speed signal and the second speed signal.
[0013] According to a third aspect of the present invention, an electronic device is also provided, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the signal processing method as described above.
[0014] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the signal processing method described above.
[0015] The signal processing method provided in this invention involves acquiring an original acceleration signal, a preset acceleration rate of change threshold, and a preset acceleration threshold; correcting the original acceleration signal based on the acceleration rate of change threshold and the acceleration threshold to obtain a target acceleration signal; integrating the original acceleration signal to obtain a first velocity signal; inputting the target acceleration signal into a preset state-space equation to obtain a second velocity signal; and obtaining the target velocity signal based on the first and second velocity signals. This invention is applicable to a single accelerometer, eliminating the need for additional sensors, thus reducing costs. Furthermore, by setting the acceleration rate of change threshold and the acceleration threshold to correct the original acceleration signal, it effectively mitigates the integral drift phenomenon of the accelerometer during motion and the integral drift phenomenon when stationary. In addition, combining the second velocity signal obtained from the processed acceleration signal and the first velocity signal obtained from the original acceleration signal to obtain the target velocity signal preserves low-frequency authenticity and avoids distortion of the velocity signal in the low-frequency range.
[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of the steps of a signal processing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a signal processing device provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of the invention. However, the technical solutions claimed in the present invention can be implemented even without these technical details and with various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0019] Currently, velocity is mainly obtained through accelerometers using the following methods: 1. Directly integrate the acceleration signal obtained from the accelerometer to calculate the velocity, and then perform high-pass filtering on the calculated velocity.
[0020] 2. In addition to using an accelerometer, other sensors are also used, such as a height sensor in the suspension field. By integrating and differentiating the accelerometer and height sensors respectively, the speed is calculated separately, and then a more accurate speed value is obtained through data fusion.
[0021] 3. Method for state estimation by constructing state space equations using multiple accelerometers: Use multiple accelerometers, such as deploying 3 accelerometers on the vehicle body, and then construct the state space equations of the vehicle body motion and perform Kalman filtering to calculate the vehicle body speed.
[0022] The above method has the following problems: 1. For the method of directly integrating acceleration: Although this method is the simplest to calculate, due to sensor accuracy issues, direct integration will produce integration drift, meaning the calculated velocity will gradually shift towards positive or negative infinity. To solve this integration drift, most current solutions use high-pass filtering to filter the integrated velocity. However, high-pass filtering introduces another problem: it filters out low-frequency velocity signals and causes phase lead in the velocity signal. The lower the frequency of the velocity signal, the more severe the phase lead, resulting in distortion of the velocity in the low-frequency range.
[0023] 2. For methods that use other sensor information fusion: such as using a height sensor and an acceleration sensor to jointly calculate the speed, although this method can well compensate for the distortion of direct integration of acceleration in the low-frequency part, it adds an extra sensor, increasing unnecessary costs.
[0024] 3. Methods for constructing state-space equations using multiple accelerometers: For example, using three accelerometers deployed at different locations to construct state-space equations and using kinematic equations to constrain motion avoids the problem of infinity caused by acceleration integral drift. However, this method has a limited scope of application. It must assume that the object to which the three sensors are deployed is a rigid body. If the accelerometers are deployed under a spring, this method cannot be used. Furthermore, there may be situations where some parameters are difficult to obtain when constructing state-space equations. Complex state-space equations also place higher demands on chip computing power. Therefore, implementing this scheme will not only increase costs but also present difficulties.
[0025] This application processes the original acceleration signal by setting an acceleration change rate threshold and an acceleration threshold, reducing integral drift at the source and replacing the traditional simple high-pass filtering; by combining the velocity signal obtained from the processed acceleration signal and the velocity signal obtained from the original acceleration signal, the target velocity signal is obtained, which can preserve the authenticity of low frequency and avoid distortion of the velocity signal in the low frequency part. This application uses only one acceleration sensor throughout the process, eliminating the need for a height sensor / multiple acceleration sensors.
[0026] Reference Figure 1 The diagram illustrates a flowchart of a signal processing method according to an embodiment of the present invention, which may specifically include the following steps: Step 101: Obtain the original acceleration signal, the preset acceleration change rate threshold, and the preset acceleration threshold.
[0027] Raw acceleration signals are acquired through accelerometers. Accelerometer signals describe the change in an object's acceleration over time and are typically collected by accelerometers. Accelerometer signals have wide applications in many fields, such as motion analysis, inertial navigation, vibration monitoring, and robot control.
[0028] Characteristics of acceleration signals include noise: acceleration signals typically contain high-frequency noise and low-frequency drift; bias error: the sensor may output a non-zero acceleration value when stationary, which is caused by the sensor's zero bias error; nonlinearity: under extreme acceleration conditions, the sensor may exhibit nonlinear characteristics, etc.
[0029] The rate of change of acceleration refers to the rate of change of the acceleration signal over time. The acceleration rate of change threshold, denoted as 'a', is used to detect whether the acceleration signal is in a steady state or a state without change. By using the acceleration rate of change threshold 'a', moments with small acceleration rate changes can be ignored, avoiding integral drift caused by noise or small fluctuations in the accelerometer during motion.
[0030] The acceleration change rate threshold 'a' can be determined by comparing readings from multiple acceleration sensors and using an optimization algorithm to identify the acceleration sensor with the highest accuracy.
[0031] Specifically, acceleration signals are acquired from multiple accelerometers. For each accelerometer, its rate of change of acceleration is calculated (e.g., by differentiating the acceleration signal). Then, the standard deviation of the rate of change of acceleration for each sensor is calculated (this can be used to evaluate the stability of each sensor). The smaller the standard deviation, the more stable the rate of change of acceleration of the sensor and the higher its accuracy. Therefore, the accelerometer with the smallest standard deviation is selected as the most accurate accelerometer. The acceleration rate of change threshold 'a' is determined based on the rate of change of acceleration of the most accurate accelerometer. This threshold 'a' can be determined through statistical analysis or empirical values. For example, 'a = mean rate of change of acceleration + k * standard deviation of rate of change of acceleration'. Here, 'k' is a constant used to adjust the sensitivity of the threshold.
[0032] When stationary, the output of an accelerometer is typically not zero, but rather has a bias value. Furthermore, the output of an accelerometer is also affected by noise. The acceleration threshold, denoted as b, can be set based on the noise and bias characteristics of the accelerometer.
[0033] Specifically, the acceleration data is collected under static conditions: the sensor is fixed in a static state, and acceleration signals are collected over a period of time; the mean and standard deviation of the acceleration are recorded. Calculate bias and noise: Bias: the mean of acceleration at rest; Noise standard deviation: the standard deviation of acceleration at rest.
[0034] Set the acceleration threshold b: Set the threshold b as a combination of bias and noise, typically as follows: b = absolute value of bias + k * standard deviation of noise. Where k is a coefficient (usually 2-3, depending on the tolerance for noise).
[0035] For example, if the bias is 0.05 m / s², the standard deviation of the voice is 0.01 m / s², and k=3, then b=0.05+3*0.01=0.08 m / s².
[0036] By setting an acceleration threshold b, the difference between a stationary state and a slow-moving state can be further distinguished.
[0037] Step 102: Correct the original acceleration signal according to the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal.
[0038] The acceleration change rate threshold 'a' is used to detect whether the acceleration signal is in a "steady state" or a "no change state". When the acceleration change rate is less than 'a', the acceleration signal is considered to have not changed significantly. In this case, the following situations may exist: At rest: The object is completely at rest, and its acceleration should theoretically be zero.
[0039] Slow motion state: The object moves very slowly and the acceleration changes very little.
[0040] Noise or bias: Due to sensor noise or bias, the acceleration signal may not be zero, but the rate of change may be very small.
[0041] By differentiating the original acceleration signal, the rate of change of acceleration is obtained. When the rate of change of acceleration is less than the threshold value 'a', the acceleration is considered to be unchanged and invalid. The valid acceleration signal obtained from the accelerometer at the previous moment (i.e., the acceleration signal at a moment before the current moment when the rate of change of acceleration was greater than or equal to the threshold value 'a') is output as the target acceleration signal. Based on this, minute changes in the acceleration signal can be ignored, avoiding integral drift caused by noise or slow motion, and effectively mitigating the integral drift phenomenon of the accelerometer during motion.
[0042] The acceleration rate of change threshold 'a' is used to distinguish between "no change state" and "change state," but it cannot distinguish between "stationary state" and "slow motion state." By setting an acceleration threshold 'b', the "stationary state" and "slow motion state" can be further distinguished within the "no change state." When the acceleration rate of change is less than the acceleration rate of change threshold 'a', the following two situations may exist: At rest: The acceleration should theoretically be zero, but due to sensor bias or noise, the actual acceleration may not be zero.
[0043] Slow motion state: Although the object moves slowly, its acceleration is not zero.
[0044] If the rate of change of acceleration is less than 'a', the target acceleration signal is compared with the acceleration threshold 'b'. If the target acceleration signal is less than the acceleration threshold 'b', the target acceleration signal is considered invalid, and the output acceleration value is 0. If the target acceleration signal is greater than or equal to the acceleration threshold 'b', the target acceleration signal is output normally. Based on this, in a stationary state, the acceleration signal can be forcibly set to zero to eliminate the influence of acceleration sensor bias or noise, while in a slow-moving state, the acceleration signal can be retained to avoid misjudging a stationary state.
[0045] By combining the acceleration rate of change threshold a and acceleration threshold b to process the original acceleration signal, integration error can be reduced from the source of the acceleration signal, rather than relying solely on subsequent filtering.
[0046] In an optional embodiment of the present invention, step 102 further includes the following steps: S1021, Differentiate the original acceleration signal to obtain the rate of change of acceleration.
[0047] S1022, compare the rate of change of acceleration with the rate of change of acceleration threshold; S1023, if the rate of change of acceleration is less than the rate of change of acceleration threshold, the historical target acceleration signal is used as the target acceleration signal; the historical target acceleration signal is the target acceleration signal at the previous moment.
[0048] S1024, if the rate of change of acceleration is greater than or equal to the rate of change of acceleration threshold, the original acceleration signal is used as the target acceleration signal.
[0049] Assume the original acceleration signal is Differentiating it yields the rate of change of acceleration. .
[0050] In the continuous time domain, the formula for the rate of change of acceleration is:
[0051] in, Indicates the rate of change of acceleration. This represents the original acceleration signal.
[0052] In practical applications, acceleration signals are typically discrete (e.g., obtained through sampling). Assume the sampling time interval is... Then the discrete form of the rate of change of acceleration is:
[0053] in, This represents the current original acceleration signal. This represents the original acceleration signal at the previous moment. It is the sampling time interval.
[0054] After obtaining the rate of change of acceleration, it is compared with an acceleration rate of change threshold 'a'. If the rate of change of acceleration is less than the threshold 'a', the acceleration is considered to be unchanged and invalid. The valid acceleration signal acquired from the accelerometer at the previous moment (i.e., the historical target acceleration signal, which is the acceleration signal at a moment before the current time when the rate of change of acceleration was greater than or equal to the threshold 'a') is output as the target acceleration signal. If the rate of change of acceleration is greater than or equal to the threshold 'a', the current raw acceleration signal acquired from the accelerometer is used as the target acceleration signal.
[0055] Based on this, minute changes in the acceleration signal can be ignored, and integral drift caused by noise or slow motion can be avoided, effectively mitigating the integral drift phenomenon of the accelerometer during motion.
[0056] In an optional embodiment of the present invention, the following steps are included after S1023: S1023-1, when the rate of change of acceleration is less than the rate of change of acceleration threshold, obtain the acceleration threshold; S1023-2, compare the target acceleration signal with the acceleration threshold; S1023-3, if the target acceleration signal is less than the acceleration threshold, set the target acceleration signal to zero; S1023-4, if the target acceleration is greater than or equal to the acceleration threshold, output the target acceleration signal.
[0057] Steps S1023-1 to S1023-4 can be referred to the content described in step 102 above, and will not be repeated here.
[0058] Step 103: Integrate the original acceleration signal to obtain the first velocity signal.
[0059] Integrating the original acceleration signal yields the velocity signal, using the following integration formula:
[0060] in, It is the velocity at time t (i.e., the velocity signal). This is the initial velocity (usually set to 0). It is the acceleration signal at time t (i.e., the original acceleration signal).
[0061] The integrated velocity signal contains low-frequency components (such as bias and drift), which can cause inaccuracies. To eliminate these low-frequency components, a high-pass filter can be applied to the integrated velocity signal to obtain a reference velocity signal, denoted as the first velocity signal. High-pass filtering is a signal processing technique used to remove low-frequency components from a signal while retaining high-frequency components. In acceleration signal processing, high-pass filtering can be used to filter out slowly changing low-frequency noise or trends, thereby extracting rapidly changing dynamic signals.
[0062] The velocity signal is obtained by integrating the original acceleration signal. High-pass filtering can be used to filter out the low-frequency drift components in the velocity signal, resulting in a more accurate reference velocity signal and improving the accuracy of the velocity signal.
[0063] In an optional embodiment of the present invention, step 103 further includes the following sub-steps: S1031, Integrate the original acceleration signal to obtain the initial velocity signal; This step can be referred to in detail in step 103 above, and will not be repeated here.
[0064] It should be noted that in practical applications, numerical integration methods are typically used to calculate integrals. Common numerical integration methods include the trapezoidal rule and the rectangular rule.
[0065] S1032, remove the initial velocity signal below the signal threshold to obtain the reference velocity signal, which is used as the first velocity signal.
[0066] Specifically, the initial velocity signal below the signal threshold is the low-frequency component (such as bias and drift). The low-frequency component in the initial velocity signal can be removed by high-pass filtering to obtain the reference velocity signal, i.e., the first velocity signal.
[0067] Step 104: Input the target acceleration signal into a preset state-space equation to obtain a second velocity signal.
[0068] The state-space equations are constructed as follows:
[0069] in, This indicates the second speed signal. This indicates the second velocity signal from the previous moment. Indicates the target acceleration signal. This indicates the signal processing cycle (i.e., the time required to obtain the target velocity signal by performing one signal processing operation; if the original acceleration signal is processed once every 1 second to obtain the target velocity signal, then the signal processing cycle is 1 second).
[0070] The second velocity signal is obtained by inputting the target acceleration signal into the constructed state-space equation.
[0071] In an optional embodiment of the present invention, step 104 may further include the following sub-steps: S1041, the second velocity signal is obtained through the following state-space equation:
[0072] in, This indicates the second speed signal. This indicates the second velocity signal from the previous moment. Indicates the target acceleration signal. This indicates the period of signal processing.
[0073] This step can be referred to in detail in step 104 above, and will not be repeated here.
[0074] In this application, a relatively accurate velocity signal can be obtained through only one accelerometer throughout the entire process. The constructed state-space equation is simple, and there is no need to list state-space equations containing signals from three accelerometers. The calculation is simpler and more efficient, reducing computing resources.
[0075] Step 105: Obtain the target speed signal based on the first speed signal and the second speed signal.
[0076] By fusing the first and second velocity signals using Kalman filtering, the low-frequency phase lead of traditional high-pass filtering is avoided. Kalman filtering is a recursive algorithm used to optimally estimate the state of a dynamic system. By combining the system's dynamic model with sensor observation data, it can provide accurate estimates of the system state even in noisy environments. Kalman filtering is widely used in navigation, control, and signal processing.
[0077] The performance of a Kalman filter depends on the calibration of the process noise covariance matrix Q and the observation noise covariance matrix R. Q represents the noise in the state equations (i.e., the state-space equations), which is typically related to the dynamic characteristics of the system. R represents the noise in the observation equations (where the first velocity signal equals the reference velocity (the reference velocity obtained by high-pass filtering after integrating the original acceleration)), which is typically related to sensor noise. The value of Q can be set according to the noise level of the acceleration signal, and the value of R can be set according to the noise level of the reference velocity.
[0078] In this embodiment of the invention, the original acceleration signal, a preset acceleration rate of change threshold, and a preset acceleration threshold are acquired; the original acceleration signal is corrected according to the acceleration rate of change threshold and the acceleration threshold to obtain a target acceleration signal; the original acceleration signal is integrated to obtain a first velocity signal; the target acceleration signal is input into a preset state-space equation to obtain a second velocity signal; and the target velocity signal is obtained based on the first velocity signal and the second velocity signal. This embodiment of the invention is applicable to a single acceleration sensor, eliminating the need for additional sensors, thus reducing costs. Furthermore, by setting the acceleration rate of change threshold and the acceleration threshold to correct the original acceleration signal, the integral drift phenomenon of the acceleration sensor during motion and during rest can be effectively mitigated. In addition, combining the second velocity signal obtained from the processed acceleration signal and the first velocity signal obtained from the original acceleration signal to obtain the target velocity signal preserves low-frequency authenticity and avoids distortion of the velocity signal in the low-frequency range.
[0079] In an optional embodiment of the present invention, step 105 further includes the following sub-steps: S1051, the first velocity signal and the second velocity signal are fused by Kalman filtering to obtain the target velocity signal.
[0080] In addition to constructing the spatial state equation, observation equations are also constructed:
[0081] in, It is the velocity signal (state variable) at the current moment, i.e., the first velocity signal. This is the reference velocity signal (observation) obtained by integrating the original acceleration signal and applying a high-pass filter. The observation equation represents the velocity signal at the current moment, observed using the reference velocity obtained through acceleration integration and high-pass filtering. In Kalman filtering, the observation equation is used to compare the observation with the state variables, thereby estimating the state error and updating the state.
[0082] By dynamically fusing the first and second velocity signals using Kalman filtering, the accuracy of the target velocity signal is improved while preserving the authenticity of the velocity signal in the low-frequency range.
[0083] In an optional embodiment of the present invention, S1051 may further include the following steps: S1051-1, Determine the observation noise covariance matrix in the Kalman filter based on the first velocity signal; S1051-2, Determine the process noise covariance matrix in the Kalman filter based on the target acceleration signal; S1051-3, the target velocity signal is obtained based on the observed noise covariance matrix, the process noise covariance matrix, and the second velocity signal.
[0084] When dynamically fusing the first and second velocity signals using Kalman filtering, the final target velocity signal is obtained by calibrating appropriate Kalman filter parameters (Q and R values).
[0085] The performance of a Kalman filter depends on the calibration of the process noise covariance matrix Q and the observation noise covariance matrix R. Q represents the noise in the state equation (i.e., the state-space equation), which is typically related to the system's dynamic characteristics. R represents the noise in the observation equation (the first velocity signal equals the reference velocity (the reference velocity obtained by high-pass filtering after integrating the original acceleration)), which is typically related to sensor noise. If Q is too large, the filter will rely too much on the observed value (reference velocity); if Q is too small, the filter will rely too much on the model prediction (second velocity signal). Similarly, if R is too large, the filter will rely too much on the model prediction; if R is too small, the filter will rely too much on the observed value. Therefore, it is necessary to calibrate appropriate Q and R values. The Q value can be set according to the noise level of the acceleration signal, and the R value can be set according to the noise level of the reference velocity.
[0086] For example, the Q value can be set according to the noise level of the target acceleration signal. By sampling multiple raw acceleration signals and correcting them using acceleration change rate threshold 'a' and acceleration threshold 'b', multiple corrected target acceleration signals are obtained. Then, the covariance of these multiple target accelerations is calculated, and the calculated covariance is used as the Q value of the Kalman filter. This method can reflect the noise level of the target acceleration signal, thereby improving the estimation accuracy of the Kalman filter.
[0087] The R value can be set according to the noise level of the reference velocity. This is achieved by sampling multiple raw acceleration signals, integrating and high-pass filtering them to obtain multiple reference velocities, calculating the covariance of these reference velocities, and using this covariance as the R value for the Kalman filter. This method reflects the noise level of the reference velocity, thereby improving the estimation accuracy of the Kalman filter.
[0088] After calibrating appropriate Q and R values, the first and second velocity signals are dynamically fused using Kalman filtering.
[0089] Specifically, the implementation of Kalman filtering mainly includes a prediction step and an update step. The prediction step is divided into state prediction and covariance prediction. State prediction obtains the second velocity signal through the state-space equation; covariance prediction is as follows:
[0090] in, It is the state covariance matrix predicted at time t (the current time) based on the information at time t-1, which represents the uncertainty of state estimation in the prediction step; It is the state transition matrix, which describes the linear dynamic change of the state from time t-1 to time t. It is usually determined based on the dynamic model. It is the state covariance matrix obtained at time t-1 based on the information at time t-1, which represents the uncertainty of the state estimation in the update step of the previous time step; represents the transpose of the state transition matrix; Q is the process noise covariance matrix.
[0091] The update steps include: The Kalman gain is calculated using the following formula:
[0092] in, It is the Kalman gain, used to balance the weights of the state prediction (second velocity signal) and the observation (first velocity signal).
[0093] Status update, details as follows:
[0094] in, For the target speed signal, It is Kalman gain. It is the second speed signal. The observed value (reference velocity, also known as the first velocity signal).
[0095] Covariance update, as detailed below:
[0096] in, It is the state covariance matrix updated at time t based on the information at time t.
[0097] For each time t, using the calibrated Q and R values, prediction and update steps are performed to obtain the final velocity. This refers to the target velocity signal after Kalman filtering and fusion.
[0098] By properly calibrating the Q and R values, and by correcting the original acceleration signal and using Kalman filtering, the first and second velocity signals can be fused to obtain a more accurate velocity signal, thus solving the problem of phase lead and distortion in low-frequency velocity signals.
[0099] In summary, this application only requires a single accelerometer to calculate a relatively accurate target velocity, eliminating the need for additional sensors and reducing costs. Although it also constructs a state-space equation and uses Kalman filtering, the state equation is simpler, eliminating the need to formulate a state-space equation containing signals from three accelerometers, making the calculation simpler and more efficient, and reducing computational resources. Furthermore, this scheme does not require the assumption that the measured object is a rigid body, making it more widely applicable and suitable for almost any scenario requiring velocity calculation using an accelerometer.
[0100] The above method involves acquiring the original acceleration signal, a preset acceleration rate of change threshold, and a preset acceleration threshold; correcting the original acceleration signal based on the acceleration rate of change threshold and the acceleration threshold to obtain the target acceleration signal; integrating the original acceleration signal to obtain a first velocity signal; inputting the target acceleration signal into a preset state-space equation to obtain a second velocity signal; and obtaining the target velocity signal based on the first and second velocity signals. This embodiment of the invention is applicable to a single acceleration sensor, eliminating the need for additional sensors, thus reducing costs. Furthermore, by setting the acceleration rate of change threshold and the acceleration threshold to correct the original acceleration signal, the integration drift phenomenon of the acceleration sensor during motion and during rest can be effectively mitigated. In addition, combining the second velocity signal obtained from the processed acceleration signal with the first velocity signal obtained from the original acceleration signal to obtain the target velocity signal preserves low-frequency authenticity and avoids distortion in the low-frequency portion of the velocity signal.
[0101] Reference Figure 2 The diagram shows a schematic representation of a signal processing apparatus according to an embodiment of the present invention, the apparatus comprising: The acquisition module 201 is used to acquire the original acceleration signal, the preset acceleration change rate threshold, and the preset acceleration threshold. The target acceleration signal determination module 202 is used to correct the original acceleration signal according to the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal; The first velocity signal determination module 203 is used to integrate the original acceleration signal to obtain a first velocity signal; The second velocity signal determination module 204 is used to input the target acceleration signal into a preset state space equation to obtain the second velocity signal; The target speed signal determination module 205 is used to obtain the target speed signal based on the first speed signal and the second speed signal.
[0102] In an optional embodiment of the present invention, the target acceleration signal determination module 202 includes: An acceleration rate of change determination module is used to differentiate the original acceleration signal to obtain the acceleration rate of change. The first comparison module is used to compare the rate of change of acceleration with the rate of change of acceleration threshold. The first judgment module is used to use the historical target acceleration signal as the target acceleration signal when the acceleration change rate is less than the acceleration change rate threshold; the historical target acceleration signal is the target acceleration signal at the previous moment. The second judgment module is used to take the original acceleration signal as the target acceleration signal when the acceleration change rate is greater than or equal to the acceleration change rate threshold.
[0103] In an optional embodiment of the present invention, after the first determining module, the following is further included: An acceleration threshold acquisition module is used to acquire the acceleration threshold when the rate of change of acceleration is less than the rate of change of acceleration threshold. The second comparison module is used to compare the target acceleration signal with the acceleration threshold. The third judgment module is used to set the target acceleration signal to zero when the target acceleration signal is less than the acceleration threshold. The fourth judgment module is used to output the target acceleration signal when the target acceleration is greater than or equal to the acceleration threshold.
[0104] In an optional embodiment of the present invention, the first speed signal determination module 203 includes: An integration module is used to integrate the original acceleration signal to obtain an initial velocity signal; The filtering module is used to remove the initial velocity signal below the signal threshold and obtain the reference velocity signal as the first velocity signal.
[0105] In an optional embodiment of the present invention, the second speed signal determination module 204 includes: The second velocity signal is obtained through the following state-space equation:
[0106] in, This indicates the second speed signal. This indicates the second velocity signal from the previous moment. Indicates the target acceleration signal. This indicates the period of signal processing.
[0107] In an optional embodiment of the present invention, the target velocity signal determination module 205 includes: The fusion module is used to fuse the first velocity signal and the second velocity signal through Kalman filtering to obtain the target velocity signal.
[0108] In an optional embodiment of the present invention, the fusion module includes: The first determining module is used to determine the observation noise covariance matrix in the Kalman filter based on the first velocity signal; The second determining module is used to determine the process noise covariance matrix in the Kalman filter based on the target acceleration signal; The third determining module is used to obtain the target velocity signal based on the observation noise covariance matrix, the process noise covariance matrix, and the second velocity signal.
[0109] In this embodiment of the invention, the original acceleration signal, a preset acceleration rate of change threshold, and a preset acceleration threshold are acquired; the original acceleration signal is corrected according to the acceleration rate of change threshold and the acceleration threshold to obtain a target acceleration signal; the original acceleration signal is integrated to obtain a first velocity signal; the target acceleration signal is input into a preset state-space equation to obtain a second velocity signal; and the target velocity signal is obtained based on the first velocity signal and the second velocity signal. This embodiment of the invention is applicable to a single acceleration sensor, eliminating the need for additional sensors, thus reducing costs. Furthermore, by setting the acceleration rate of change threshold and the acceleration threshold to correct the original acceleration signal, the integral drift phenomenon of the acceleration sensor during motion and during rest can be effectively mitigated. In addition, combining the second velocity signal obtained from the processed acceleration signal and the first velocity signal obtained from the original acceleration signal to obtain the target velocity signal preserves low-frequency authenticity and avoids distortion of the velocity signal in the low-frequency range.
[0110] An embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the signal processing method described above.
[0111] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0112] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0113] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the signal processing method described above.
[0114] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.
[0115] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0116] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0117] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0118] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A signal processing method, characterized in that, The method includes: Acquire the raw acceleration signal, the preset acceleration rate of change threshold, and the preset acceleration threshold; The original acceleration signal is corrected based on the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal; Integrating the original acceleration signal yields a first velocity signal; The target acceleration signal is input into a preset state-space equation to obtain a second velocity signal; The target speed signal is obtained based on the first speed signal and the second speed signal.
2. The method according to claim 1, characterized in that, The step of correcting the original acceleration signal based on the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal includes: Differentiating the original acceleration signal yields the rate of change of acceleration; The rate of change of acceleration is compared with the rate of change of acceleration threshold. If the rate of change of acceleration is less than the rate of change of acceleration threshold, the historical target acceleration signal is used as the target acceleration signal; the historical target acceleration signal is the target acceleration signal at the previous moment. If the rate of change of acceleration is greater than or equal to the rate of change of acceleration threshold, the original acceleration signal is used as the target acceleration signal.
3. The method according to claim 2, characterized in that, After using the historical target acceleration signal as the target acceleration signal when the rate of change of acceleration is less than the acceleration rate of change threshold, the method further includes: If the rate of change of acceleration is less than the rate of change of acceleration threshold, the acceleration threshold is obtained; Compare the target acceleration signal with the acceleration threshold; If the target acceleration signal is less than the acceleration threshold, the target acceleration signal is set to zero; If the target acceleration is greater than or equal to the acceleration threshold, the target acceleration signal is output.
4. The method according to claim 1, characterized in that, The step of integrating the original acceleration signal to obtain the first velocity signal includes: Integrating the original acceleration signal yields the initial velocity signal; The initial velocity signal below the signal threshold is removed to obtain the reference velocity signal, which is used as the first velocity signal.
5. The method according to claim 1, characterized in that, The step of inputting the target acceleration signal into a preset state-space equation to obtain a second velocity signal includes: The second velocity signal is obtained through the following state-space equation: in, This indicates the second speed signal. This indicates the second velocity signal from the previous moment. Indicates the target acceleration signal. This indicates the period of signal processing.
6. The method according to claim 1, characterized in that, The step of obtaining the target speed signal based on the first speed signal and the second speed signal includes: The target velocity signal is obtained by fusing the first velocity signal and the second velocity signal through Kalman filtering.
7. The method according to claim 6, characterized in that, The step of fusing the first velocity signal and the second velocity signal through Kalman filtering to obtain the target velocity signal includes: The observation noise covariance matrix in the Kalman filter is determined based on the first velocity signal; Determine the process noise covariance matrix in the Kalman filter based on the target acceleration signal; The target velocity signal is obtained based on the observed noise covariance matrix, the process noise covariance matrix, and the second velocity signal.
8. A signal processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the original acceleration signal, the preset acceleration change rate threshold, and the preset acceleration threshold. The target acceleration signal determination module is used to correct the original acceleration signal according to the acceleration change rate threshold and the acceleration threshold to obtain the target acceleration signal; The first velocity signal determination module is used to integrate the original acceleration signal to obtain the first velocity signal; The second velocity signal determination module is used to input the target acceleration signal into a preset state space equation to obtain the second velocity signal; The target speed signal determination module is used to obtain the target speed signal based on the first speed signal and the second speed signal.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the signal processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the signal processing method as described in any one of claims 1 to 7.