Signal filtering method and apparatus, electronic device, and storage medium
By filtering the sensor ranging signal and determining a set frequency component as a reference signal, and combining the signal change gradient value and inertial filtering, the problem of camera signal fluctuation affecting vehicle control in the intelligent field is solved, and accurate signal acquisition and improved vehicle control performance are achieved in complex scenarios.
Patent Information
- Application Number
- CN202111655491.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Information such as vehicle distance collected by cameras in the field of intelligent systems has non-periodic low-frequency and high-frequency fluctuations due to sensor accuracy issues. Direct use or simple filtering will affect the effectiveness of adaptive cruise control.
By acquiring the sensor ranging signal, filtering is performed to determine the set frequency component as the first reference signal, and the filtered signal is determined based on the signal change gradient value and the reference signal. Inertial filtering is then combined to improve signal smoothness.
In complex scenarios with large signal fluctuations, accurately acquiring the filtered signal improves the filtering effect and enhances the performance of vehicle motion control.
Smart Images

Figure CN116412825B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of signal processing technology, and in particular to a signal filtering method, apparatus, electronic device, and storage medium. Background Technology
[0002] Information such as vehicle distance collected by cameras in the field of intelligent vehicles has non-periodic low-frequency and high-frequency fluctuation characteristics due to limitations such as sensor accuracy, with fluctuation amplitudes varying greatly. Directly using the collected signals or performing simple filtering would significantly affect vehicle control performance in applications such as adaptive cruise control. Therefore, improving the signal filtering effect is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] This disclosure aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, this disclosure proposes a signal filtering method, apparatus, electronic device, and storage medium to improve the reliability and accuracy of filtering.
[0005] One embodiment of this disclosure proposes a signal filtering method, including:
[0006] Acquire the detection signal obtained by the sensor ranging;
[0007] The detection signal is filtered to use a set frequency component in the detection signal as a first reference signal;
[0008] The filtered signal is determined based on the set signal change gradient value and the first reference signal.
[0009] Another embodiment of this disclosure provides a signal filtering device, comprising:
[0010] The acquisition module is used to acquire the detection signal obtained by the sensor ranging.
[0011] The processing module is used to filter the detection signal so as to use the set frequency component in the detection signal as the first reference signal.
[0012] The determination module is used to determine the filtered signal based on the set signal change gradient value and the first reference signal.
[0013] Another embodiment of this disclosure provides an electronic device, including:
[0014] At least one processor; and a memory communicatively connected to said at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the foregoing aspect.
[0016] Another aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method described in the foregoing aspect.
[0017] Another embodiment of this disclosure provides a computer program product including computer instructions that, when executed by a processor, implement the method described in the foregoing aspect.
[0018] The technical solutions provided in this disclosure have the following beneficial effects:
[0019] The detection signal obtained from the sensor ranging is acquired and filtered. A set frequency component in the detection signal is used as the first reference signal. The filtered signal is determined based on the set signal change gradient value and the first reference signal. By filtering the acquired detection signal, the first reference signal corresponding to the set frequency component that can indicate the trend of the detection signal change is obtained. The filtered signal is determined based on the first reference signal and the signal change gradient value that the system can allow. This enables accurate acquisition of the filtered signal even in complex scenarios with large signal fluctuations, thus improving the filtering effect.
[0020] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0021] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0022] Figure 1 This is a schematic flowchart of a signal filtering method provided in an embodiment of the present disclosure;
[0023] Figure 2 A schematic flowchart illustrating another signal filtering method provided in an embodiment of this disclosure;
[0024] Figure 3 A schematic diagram illustrating the switching of a filter state identifier according to an embodiment of this disclosure;
[0025] Figure 4 A schematic flowchart illustrating another signal filtering method provided in an embodiment of this disclosure;
[0026] Figure 5This is a schematic diagram of the structure of a signal filtering device provided in an embodiment of the present disclosure;
[0027] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0028] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0029] The signal filtering method, apparatus, electronic device, and storage medium of this disclosure are described below with reference to the accompanying drawings.
[0030] Figure 1 This is a schematic flowchart of a signal filtering method provided in an embodiment of the present disclosure.
[0031] The signal filtering method of this disclosure can be executed by the signal filtering device provided in this disclosure, which can be configured in an electronic device.
[0032] like Figure 1 As shown, the method includes the following steps:
[0033] Step 101: Obtain the detection signal obtained by the sensor ranging.
[0034] The sensor can be an image sensor, a lidar sensor, etc., and is not limited in this embodiment.
[0035] In this embodiment of the disclosure, the detection signal obtained by the sensor ranging is the original detection signal. Due to the sensor acquisition accuracy problem, the detection signal acquired by the sensor usually contains low-frequency fluctuations, or low-frequency and high-frequency fluctuations. The fluctuation amplitude of the signal value is large or small. When such a signal carrying interference fluctuations is applied to a real-world scenario, it will affect the subsequent control effect and bring danger. Therefore, it is necessary to filter the original detection signal to obtain a smooth signal that eliminates low-frequency and / or high-frequency fluctuations.
[0036] Step 102: Filter the detection signal to use the set frequency component in the detection signal as the first reference signal.
[0037] In this embodiment of the disclosure, the first reference signal is a filtered detection signal to eliminate low-frequency and high-frequency interference signals. A set frequency component in the detection signal is used as the first reference signal. The set frequency component is the frequency component obtained after eliminating high-frequency and low-frequency interference signals that are greater than a set frequency component threshold. Thus, the curve corresponding to the first reference signal is a relatively smooth curve that has eliminated the influence of interference signals to a certain extent and can reflect the changing trend of the detection signal. It can be used as a reference for subsequent further filtering to obtain the filtered signal.
[0038] Step 103: Determine the filtered signal based on the set signal change gradient value and the first reference signal.
[0039] In this embodiment of the disclosure, when it is necessary to filter the detection signal, the filter signal is processed based on the first reference signal and according to the acceptable bandwidth of the system for the final filtered signal, i.e., the acceptable set signal change gradient value, in order to eliminate the fluctuation of the filtered signal value, obtain a smooth signal value, and improve the signal filtering effect.
[0040] In one scenario, the filtered signal, after filtering, can be used as input information for vehicle motion control, which can significantly improve the performance of vehicle motion control.
[0041] In the signal filtering method of this disclosure embodiment, a detection signal obtained by sensor ranging is acquired, and the detection signal is filtered to use a set frequency component in the detection signal as a first reference signal. A filtered signal is determined based on a set signal change gradient value and the first reference signal. By filtering the acquired detection signal, a first reference signal corresponding to the set frequency component that can indicate the trend of the detection signal change is obtained. The filtered signal is determined based on the first reference signal and the signal change gradient value that the system can allow. This enables accurate acquisition of the filtered signal even in complex scenarios with large signal fluctuations, thus improving the filtering effect.
[0042] Based on the above embodiments, this disclosure provides another signal filtering method, specifically illustrating that when determining the first reference signal, it is determined according to the filtering state identifier. Figure 2 A flowchart illustrating another signal filtering method provided in this disclosure embodiment is shown below. Figure 2 As shown, the method includes the following steps:
[0043] Step 201: Obtain the detection signal obtained by the sensor ranging.
[0044] For details, please refer to the explanations and descriptions of the foregoing embodiments, as the principles are the same and will not be repeated in this embodiment.
[0045] Step 202: Obtain the first historical signal obtained by the sensor ranging at the moment before the detection signal, and the historical reference signal obtained by filtering the first historical signal.
[0046] In this embodiment, the first historical signal is the first historical signal obtained by the sensor ranging at the moment preceding the detection signal. To distinguish it from other subsequent historical signals, it is referred to here as the first historical signal. The historical reference signal obtained by filtering the first historical signal can be described in the above embodiment as follows: the principle is the same, and it will not be repeated in this embodiment.
[0047] Step 203: Determine the change in the first signal based on the historical reference signal and the detection signal.
[0048] In this embodiment of the disclosure, the historical reference signal and the detection signal are subtracted, and the absolute value of the signal obtained after the subtraction is taken as the first signal change.
[0049] The change in the first signal is represented as: |u(n-1)-x(n)|.
[0050] Step 204: Determine the change in the second signal based on the detected signal and the historical signal.
[0051] In this embodiment of the disclosure, the detection signal and the historical signal are subtracted, and the absolute value of the signal obtained after the subtraction is taken as the second signal change.
[0052] The change in the second signal is represented as: |x(n)-x(n-1)|.
[0053] Step 205: Determine the filter status indicator based on the change in the first signal and / or the change in the second signal.
[0054] The filter status indicator is used to indicate whether the detection signal needs to be filtered.
[0055] In one implementation of this disclosure, a filtering state identifier is determined based on a first signal change and a second signal change. Specifically, a historical filtering identifier from the previous moment is obtained, wherein the historical filtering identifier is either a first state identifier or a second state identifier.
[0056] In one scenario, if the historical filtering identifier from the previous moment is the first state identifier, and the first signal change satisfies a first preset condition, and the second signal change satisfies a second preset condition, then the filtering state identifier is determined to be the second state identifier. Here, the first signal change satisfying the first preset condition indicates a significant signal difference between the current detected signal and the historical reference signal; the greater the difference, the greater the degree of signal change, indicating a large degree of signal fluctuation, meaning the detected signal needs filtering. Simultaneously, the second signal change satisfying the second preset condition also indicates that the current detected signal has changed compared to the historical detected signal, requiring filtering. Therefore, the filtering state identifier is determined to be the second state identifier, meaning the filtering state identifier switches from the first state identifier to the second state identifier.
[0057] As an example, Figure 3 This is a schematic diagram illustrating a filter state identifier switching according to an embodiment of the present disclosure, such as... Figure 3 As shown, the historical filtering identifier of the previous moment is determined as the first state identifier, for example, 0. If the current detected signal is determined to need filtering, it enters the filtering start state and determines that the filtering state identifier is switched to the second state identifier, for example, 1.
[0058] In another scenario, if the historical filtering identifier of the previous moment is the second state identifier, and the change in the first signal does not meet the first set condition and / or the change in the second signal does not meet the second set condition, the filtering state identifier is determined to be the first state identifier. That is to say, the current detection signal has a small change and does not need to be filtered. In this case, the filtering state identifier is switched from the second state identifier to the first state identifier.
[0059] The first set condition is: |u(n-1)-x(n)|>first change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal.
[0060] The second setting condition is: the absolute value of the change in the second signal is greater than a set threshold.
[0061] In another implementation of this disclosure, a filtering state identifier is determined based on a first signal change. Specifically, a historical filtering identifier from the previous moment is obtained, wherein the historical filtering identifier is either a first state identifier or a second state identifier.
[0062] In one scenario, if the historical filtering identifier from the previous moment is the second state identifier, and the change in the first signal meets a third predetermined condition, the filtering state identifier is determined to be the first state identifier. Specifically, if the change in the first signal meets the third predetermined condition (meaning the change in the first signal is less than the second change threshold), then the signal to be detected has a relatively small change compared to the historical signal from the previous moment, and no filtering processing is required; therefore, the filtering state identifier is determined to be the first state identifier. For example... Figure 3 As shown, for example, if the historical filtering identifier of the previous moment is determined to be the second state identifier, for example, 1, and the current detection signal is determined not to require filtering, then the filtering state identifier is switched to the first state identifier, for example, 0.
[0063] In another scenario, if the historical filtering identifier from the previous moment is the second state identifier, and the change in the first signal does not meet the third preset condition, the filtering state identifier is determined to be the second state identifier. This indicates that the detected signal needs to be filtered, and the filtering state identifier remains the second state identifier.
[0064] The third condition is: |u(n-1)-x(n)|≤ the second change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal.
[0065] It should be noted that the first change threshold and the second change threshold can be set by those skilled in the art according to the requirements of the scenario, and the first change threshold and the second change threshold can be the same. The first change threshold can be determined based on the degree of change in the detected signal. As one implementation method, the first change threshold is determined based on the second reference signal at the previous moment. The first change threshold is: |x(n-1)-z(n-1)|*a, where z(n-1) is the second reference signal at the previous moment, x(n-1) is the first historical signal, and a is a set coefficient with a value range of (0-1). Those skilled in the art can flexibly set the value according to the requirements of the scenario.
[0066] The second reference signal from the previous moment can be determined in the following way:
[0067] In one implementation of this disclosure, a fifth setting condition is determined based on a set signal change gradient value, wherein the fifth setting condition is: |y(n-2)-u(n-1)|>g, where y(n-2) is the filtered signal of the previous moment corresponding to the filtered signal of the previous moment; and g is the set signal change gradient value.
[0068] It should be noted that the value of g is determined by those skilled in the art based on the scenario requirements and the acceptable range of signal gradient changes, and is not limited in this embodiment.
[0069] Furthermore, the sensor detects a second historical signal at the moment preceding the first historical signal. In one scenario, if the value of the first historical reference signal satisfies a fifth preset condition, or the absolute value of the difference between the first and second historical signals is greater than a preset threshold, the historical reference signal is used as the second reference signal at the previous moment. The second reference signal at the previous moment can be represented by the following formula:
[0070] z(n-1)=u(n-1).
[0071] It's important to understand that if the difference between the historical reference signals u(n-1) and y(n-2) is large at the previous moment, it indicates that the historical reference signal u(n-1) still has small jitters. To remove these jitters, it's necessary to determine the second reference signal z(n-1) corresponding to the previous moment and latch the historical reference signal u(n-1). The purpose is to remove the small jitters in the predicted signal, ensuring a consistent signal trend and avoiding excessive variations between signal values. Therefore, the second reference signal is used to determine the first reference signal corresponding to the current detection signal, reducing sharp fluctuations and transforming it into a smoother square wave signal, thus improving the effect of the subsequently obtained filtered signal. In another scenario, where the filtering state is identified as the first state identifier, if the first historical reference signal value does not meet the fifth set condition, and the absolute value of the difference between the first and second historical signals equals the set threshold, then the second reference signal value from the moment before the previous moment is used as the second reference signal for the previous moment, also known as the historical second reference signal, meaning the historical second reference signal remains unchanged. The second reference signal can be expressed by the formula: z(n-1) = z(n-2), where z(n-2) is the value of the second reference signal at the time preceding the time corresponding to the detection signal.
[0072] Step 206: Obtain the detection signal and filter status identifier.
[0073] As one implementation method, the filter status indicator can be indicated by a set value. For example, if the filter status indicator is 1, it indicates that the interference component in the signal is large and the quality of the detection signal does not meet the set requirements, so the detection signal needs to be filtered. If the filter status indicator is 0, it indicates that the interference signal in the detection signal is small and the quality of the detection signal meets the set requirements, so the detection signal does not need to be filtered.
[0074] Step 207: According to the filtering status indicator, the detection signal is filtered to use the set frequency component in the detection signal as the first reference signal.
[0075] In this embodiment of the disclosure, when the filtering state identifier is a first state identifier, the detection signal is used as the corresponding first reference signal. When the filtering state identifier is a second state identifier, the detection signal is filtered according to the first reference signal corresponding to the first historical signal to obtain the first reference signal corresponding to the detection signal.
[0076] Specifically, in one scenario, when the filtering state is identified as the first state, it indicates that the detected signal does not contain high-frequency and / or low-frequency interference signals and does not require filtering. In this case, the detected signal is used as the corresponding first reference signal, which can be expressed by the following formula:
[0077] u(n) = x(n). Where u(n) is the first reference signal and x(n) is the detection signal.
[0078] In another scenario, when the filtering state is identified as the second state, it indicates that the detected signal contains high-frequency and / or low-frequency interference signals, requiring filtering. In this case, the detected signal is filtered based on the historical reference signal corresponding to the first historical signal to obtain the first reference signal. The first reference signal can be represented by the following formula:
[0079] u(n) = u(n-1) + (x(n-1) - z(n-1)) * coefficient a. Where u(n-1) is the historical reference signal, x(n-1) is the first historical signal, z(n-1) is the second reference signal at the previous moment, and a is a set coefficient, the value of a is (0-1).
[0080] The explanation of the second reference signal at the previous moment can be found in the preceding steps, as the principle is the same and will not be repeated in this embodiment.
[0081] Step 208: Determine the filtered signal based on the set signal change gradient value and the first reference signal.
[0082] Step 208 can be explained in the previous embodiments, and the principle is the same, so it will not be repeated in this embodiment.
[0083] In the signal filtering method of this embodiment, the detection signal obtained by the sensor ranging is acquired, and the detection signal is filtered according to the determined filtering state identifier to take the set frequency component in the detection signal as the first reference signal. The filtered signal is determined according to the set signal change gradient value and the first reference signal. By filtering the acquired detection signal, the first reference signal corresponding to the set frequency component that can indicate the trend of the detection signal change is obtained. The filtered signal is determined based on the first reference signal and the signal change gradient value that the system can allow. This method can accurately acquire the filtered signal even in complex scenarios with large signal fluctuations, thus improving the filtering effect.
[0084] Based on the above embodiments, this disclosure provides another signal filtering method. Figure 4 A flowchart illustrating another signal filtering method provided in this disclosure embodiment is shown below. Figure 4 As shown, steps 103 and 208 include the following steps:
[0085] Step 401: Determine the fourth setting condition based on the set signal change gradient value.
[0086] The fourth condition is: |y(n-1)-u(n)|>g, where y(n-1) is the filtered signal at the previous moment; u(n) is the first reference signal of the detection signal; and g is the set gradient value of the signal change.
[0087] It should be noted that the filtered signal y(n-1) of the previous moment was determined based on the set signal change gradient value and the historical reference signal.
[0088] Step 402: If the first reference signal satisfies the fourth set condition, determine the gradient value of the first signal change based on the first reference signal at the previous moment, the filtered signal at the previous moment, and the set gradient change range.
[0089] In this embodiment of the present disclosure, when filtering is required, and the first reference signal satisfies the fourth set condition, the gradient value of the first signal change is determined based on the first reference signal at the previous moment of the detection signal, the filtered signal at the previous moment, and the set gradient change range.
[0090] The gradient value x of the first signal change is expressed by the following formula:
[0091] The limit of x = (u(n-1) - y(n-1)). Here, the limit of (u(n-1) - y(n-1)) falls within the acceptable signal bandwidth range. If the set gradient change range is [limit_min, limit_max], then the limit of (u(n-1) - z(n-1)) is: the larger of (u(n-1) - z(n-1)) and the limit_min, and the smaller of the limit_max. That is, Min(limit_max), Max(limit_min, (u(n-1) - z(n-1))), meaning the limit of (u(n-1) - y(n-1)) cannot exceed the set gradient change range. The set gradient change range can be set according to the needs of the scenario; that is, limit_min and limit_max can be set according to the needs of the scenario.
[0092] Step 403: Determine the filtered signal based on the gradient value of the first signal change and the filtered signal from the previous moment.
[0093] One implementation involves summing the gradient value of the first signal change with the filtered signal from the previous moment, and using the summed signal as the filtered signal.
[0094] The filtered signal y(n) is expressed by the following formula:
[0095] The limit of y(n)=y(n-1)+(u(n-1)-y(n-1)).
[0096] The above explains how to determine the filter signal when the filter state identifier is the second filter state identifier, i.e., 1. The following explains how to determine the filter signal when the filter state identifier is the first filter state identifier, i.e., 0.
[0097] In one scenario, if the first condition is not met (i.e., the third condition is met), it indicates that the quality of the detected signal is relatively high and smoothing is not required. Therefore, the detected signal is used as the filtered signal. The filtered signal can be expressed by the following formula:
[0098] y(n) = x(n).
[0099] In another scenario, if the first set condition is met, or if the first set condition is met but the fourth set condition is not met, the filtered signal from the previous moment is used as the filtered signal from the current moment.
[0100] The filtered signal can be represented by the following formula:
[0101] y(n) = y(n-1).
[0102] In the signal filtering method of this embodiment, a detection signal obtained by sensor ranging is acquired, and the detection signal is filtered to use a set frequency component in the detection signal as a first reference signal. A filtered signal is determined based on a set signal change gradient value and the first reference signal. By filtering the acquired detection signal, a first reference signal corresponding to the set frequency component that can indicate the trend of the detection signal change is obtained. The filtered signal is determined based on the first reference signal and the signal change gradient value that the system allows. This method can accurately acquire the filtered signal even in complex scenarios with large signal fluctuations, thus improving the filtering effect.
[0103] Optionally, in this embodiment of the present disclosure, in order to improve the accuracy of the obtained filtered signal, the filtered signal value can be processed by inertial filtering, for example, first-order inertial filtering, to obtain an updated filtered signal and thus obtain a smooth output signal after final filtering.
[0104] The filtered signal can be represented by the following formula:
[0105] y(n)=(1-filter_constant)*y(n-1)+filter_constant*y(n);
[0106] Note: filter_constant is the filter coefficient, which can be pre-calibrated and ranges from 0 to 1. A larger filter_constant value results in a faster filtering rate, and vice versa.
[0107] In this embodiment of the disclosure, in order to ensure the smoothness of the signal, the filtered output signal can be further subjected to first-order inertial filtering to obtain an updated filtered signal, thereby improving the accuracy of the filtered signal.
[0108] To achieve the above embodiments, this disclosure also proposes a signal filtering device.
[0109] Figure 5 This is a schematic diagram of a signal filtering device provided in an embodiment of the present disclosure.
[0110] like Figure 5 As shown, the device includes:
[0111] The acquisition module 51 is used to acquire the detection signal obtained by the sensor ranging.
[0112] The processing module 52 is used to filter the detection signal so as to use the set frequency component in the detection signal as the first reference signal.
[0113] The determination module 53 is used to determine the filtered signal based on the set signal change gradient value and the first reference signal.
[0114] Furthermore, as one implementation method, the processing module 52 includes:
[0115] An acquisition unit is configured to acquire the detection signal and a filtering status indicator; the filtering status indicator is used to indicate whether the detection signal needs to be filtered.
[0116] The processing unit is configured to perform filtering processing on the detection signal according to the filtering state indicator, so as to use the set frequency component in the detection signal as the first reference signal.
[0117] As one implementation, processing module 52 includes:
[0118] The acquisition unit is further configured to acquire a first historical signal obtained by the sensor ranging at the moment before the detection signal, and a historical reference signal obtained by filtering the first historical signal.
[0119] The first determining unit is configured to determine a first signal change amount based on the historical reference signal and the detection signal, and to determine a second signal change amount based on the detection signal and the first historical signal.
[0120] The second determining unit is used to determine the filtering state identifier based on the first signal change amount and / or the second signal change amount.
[0121] As one implementation method, the second determining unit is specifically used for:
[0122] Obtain the historical filter identifier from the previous moment; the historical filter identifier is either a first state identifier or a second state identifier.
[0123] If the historical filter identifier of the previous moment is the first state identifier, and the first signal change satisfies the first set condition and the second signal change satisfies the second set condition, then the filter state identifier is determined to be the second state identifier.
[0124] If the historical filter identifier of the previous moment is the second state identifier, then if the first signal change does not meet the first set condition and / or the second signal change does not meet the second set condition, the filter state identifier is determined to be the first state identifier.
[0125] Wherein, the first setting condition is: |u(n-1)-x(n)|>first change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal;
[0126] The second setting condition is: the absolute value of the change in the second signal is greater than a set threshold.
[0127] As one implementation method, the second determining unit is specifically used for
[0128] Obtain the historical filter identifier from the previous moment; the historical filter identifier is either a first state identifier or a second state identifier.
[0129] If the historical filter identifier of the previous moment is the second state identifier, and the first signal change satisfies the third set condition, the filter state identifier is determined to be the first state identifier.
[0130] If the historical filter identifier of the previous moment is the second state identifier, then if the first signal change does not meet the third set condition, the filter state identifier is determined to be the second state identifier.
[0131] The third setting condition is: |u(n-1)-x(n)|≤ the second change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal.
[0132] As an implementation method, the processing unit is specifically used for
[0133] When the filtering state identifier is the second state identifier, the detection signal is filtered according to the historical reference signal corresponding to the first historical signal to obtain the first reference signal corresponding to the detection signal;
[0134] When the filtering state identifier is the first state identifier, the detection signal is used as the corresponding first reference signal.
[0135] As one implementation method, module 53 is specifically used for:
[0136] The fourth setting condition is determined based on the set signal change gradient value;
[0137] When the first reference signal satisfies the fourth set condition, the gradient value of the first signal change is determined based on the first reference signal at the previous moment of the detection signal, the filtered signal at the previous moment, and the set gradient change range.
[0138] The filtered signal is determined based on the gradient value of the first signal change and the filtered signal at the previous moment;
[0139] The fourth setting condition is: |y(n-1)-u(n)|>g, where y(n-1) is the filtered signal at the previous moment; u(n) is the first reference signal of the detection signal; and g is the set signal change gradient value.
[0140] As one implementation method, module 53 is specifically used for:
[0141] The gradient value of the first signal change and the filtered signal from the previous moment are summed, and the summed signal is used as the filtered signal.
[0142] As one implementation, the determining module 53 is further configured to: determine a fifth set condition based on a set signal change gradient value; obtain a second historical signal detected by the sensor at the time preceding the time corresponding to the first historical signal; determine that the value of the first historical reference signal satisfies the fifth set condition, or that the difference between the first historical signal and the second historical signal is greater than a set threshold, and use the historical reference signal as the second reference signal at the previous time; and determine the first change threshold based on the second reference signal at the previous time.
[0143] The fifth setting condition is: |y(n-2)-u(n-1)|>g, where y(n-2) is the filtered signal of the time before the time corresponding to the filtered signal of the previous time; u(n-1) is the historical reference signal; and g is the set signal change gradient value.
[0144] As one implementation, the device also includes:
[0145] The update module is used to process the filtered signal through inertial filtering to obtain an updated filtered signal.
[0146] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.
[0147] In the signal filtering device of this embodiment, the detection signal obtained by the sensor ranging is acquired, and the detection signal is filtered to use a set frequency component in the detection signal as a first reference signal. The filtered signal is determined according to the set signal change gradient value and the first reference signal. By filtering the acquired detection signal, the first reference signal corresponding to the set frequency component that can indicate the trend of the detection signal change is obtained. The filtered signal is determined based on the first reference signal and the signal change gradient value that the system can allow. This enables accurate acquisition of the filtered signal even in complex scenarios with large signal fluctuations, thus improving the filtering effect.
[0148] To implement the above embodiments, this disclosure proposes an electronic device, including:
[0149] At least one processor; and a memory communicatively connected to said at least one processor; wherein,
[0150] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in the foregoing method embodiments.
[0151] To implement the above embodiments, this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the methods described in the foregoing method embodiments.
[0152] To implement the above embodiments, this disclosure provides a computer program product including computer instructions that, when executed by a processor, implement the method described in the foregoing method embodiments.
[0153] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0154] like Figure 6 As shown, the electronic device 10 includes a processor 11, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 12 or a program loaded from a memory 16 into a random access memory (RAM) 13. The RAM 13 also stores various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0155] The following components are connected to I / O interface 15: memory 16 including hard disks, etc.; and communication section 17 including network interface cards such as LAN (Local Area Network) cards, modems, etc., which performs communication processing via a network such as the Internet; and driver 18 is also connected to I / O interface 15 as needed.
[0156] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 17. When the computer program is executed by the processor 11, it performs the functions defined in the methods of this disclosure.
[0157] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory 16 including instructions, which can be executed by a processor 11 of an electronic device 10 to perform the above-described method. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0158] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0159] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0160] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0161] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0162] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0163] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0164] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0165] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A signal filtering method, characterized in that, include: Acquire the detection signal obtained by the sensor ranging; Acquire a first historical signal obtained by the sensor ranging at the moment before the detection signal, and a historical reference signal obtained by filtering the first historical signal; The change in the first signal is determined based on the historical reference signal and the detected signal; The change in the second signal is determined based on the detected signal and the first historical signal; The filter status identifier is determined based on the change in the first signal and / or the change in the second signal. The filtering status indicator is used to indicate whether the detection signal needs to be filtered. According to the filtering state indicator, the detection signal is filtered to use the set frequency component in the detection signal as the first reference signal. The filtered signal is determined based on the set signal change gradient value and the first reference signal.
2. The method as described in claim 1, characterized in that, Determining the filter state identifier based on the first signal change and / or the second signal change includes: Obtain the historical filter identifier from the previous moment; the historical filter identifier is either a first state identifier or a second state identifier. If the historical filter identifier of the previous moment is the first state identifier, and the first signal change satisfies the first set condition and the second signal change satisfies the second set condition, then the filter state identifier is determined to be the second state identifier. If the historical filter identifier of the previous moment is the second state identifier, then if the first signal change does not meet the first set condition and / or the second signal change does not meet the second set condition, the filter state identifier is determined to be the first state identifier. The first set condition is: First change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal; The second setting condition is: the absolute value of the change in the second signal is greater than a set threshold.
3. The method as described in claim 1, characterized in that, Determining the filter state identifier based on the first signal change and / or the second signal change includes: Obtain the historical filter identifier from the previous moment; the historical filter identifier is either a first state identifier or a second state identifier. If the historical filter identifier of the previous moment is the second state identifier, and the first signal change satisfies the third set condition, the filter state identifier is determined to be the first state identifier. If the historical filter identifier of the previous moment is the second state identifier, then if the first signal change does not meet the third set condition, the filter state identifier is determined to be the second state identifier. The third condition is as follows: The second change threshold; where u(n-1) is the first reference signal at the previous moment, and x(n) is the detection signal.
4. The method as described in claim 1, characterized in that, The step of filtering the detection signal according to the filtering state indicator, so as to use a set frequency component in the detection signal as a first reference signal, includes: When the filtering state identifier is the second state identifier, the detection signal is filtered according to the historical reference signal corresponding to the first historical signal to obtain the first reference signal corresponding to the detection signal; When the filtering state identifier is the first state identifier, the detection signal is used as the corresponding first reference signal.
5. The method as described in claim 1, characterized in that, The step of determining the filtered signal based on the set signal change gradient value and the first reference signal includes: The fourth setting condition is determined based on the set signal change gradient value; When the first reference signal satisfies the fourth set condition, the gradient value of the first signal change is determined based on the first reference signal at the previous moment of the detection signal, the filtered signal at the previous moment, and the set gradient change range. The filtered signal is determined based on the gradient value of the first signal change and the filtered signal at the previous moment; The fourth condition is: , where y(n-1) is the filtered signal at the previous moment; u(n) is the first reference signal of the detected signal; and g is the set signal change gradient value.
6. The method as described in claim 5, characterized in that, Determining the filtered signal based on the gradient value of the first signal change and the filtered signal from the previous moment includes: The gradient value of the first signal change and the filtered signal from the previous moment are summed, and the summed signal is used as the filtered signal.
7. The method as described in claim 2, characterized in that, The method further includes: The fifth setting condition is determined based on the set signal change gradient value; Obtain the second historical signal detected by the sensor at the moment preceding the moment corresponding to the first historical signal; If the value of the historical reference signal satisfies the fifth preset condition, or if the difference between the first historical signal and the second historical signal is greater than a preset threshold, the historical reference signal is used as the second reference signal at the previous moment. The first change threshold is determined based on the second reference signal from the previous moment; The fifth condition is as follows: Where y(n-2) is the filtered signal of the previous time step corresponding to the filtered signal of the previous time step; u(n-1) is the historical reference signal; and g is the set signal change gradient value.
8. The method according to any one of claims 1-7, wherein after determining the filtered signal, the method further comprises: The filtered signal is then processed by inertial filtering to obtain an updated filtered signal.
9. A signal filtering device, characterized in that, include: The acquisition module is used to acquire the detection signal obtained by the sensor ranging. The processing module is used to filter the detection signal so as to use the set frequency component in the detection signal as the first reference signal. The determination module is used to determine the filtered signal based on the set signal change gradient value and the first reference signal; The processing module is specifically used for: Acquire a first historical signal obtained by the sensor ranging at the moment before the detection signal, and a historical reference signal obtained by filtering the first historical signal; The change in the first signal is determined based on the historical reference signal and the detected signal; The change in the second signal is determined based on the detected signal and the first historical signal; The filter status identifier is determined based on the change in the first signal and / or the change in the second signal. The filtering status indicator is used to indicate whether the detection signal needs to be filtered. The detection signal is filtered according to the filtering state indicator, so that the set frequency component in the detection signal is used as the first reference signal.
10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Signal filtering method and device, equipment and medium
CN111510109A