CN111510109A - Signal filtering method, device, equipment and medium - Google Patents

Signal filtering method, device, equipment and medium Download PDF

Info

Publication number
CN111510109A
CN111510109A CN201910092907.8A CN201910092907A CN111510109A CN 111510109 A CN111510109 A CN 111510109A CN 201910092907 A CN201910092907 A CN 201910092907A CN 111510109 A CN111510109 A CN 111510109A
Authority
CN
China
Prior art keywords
value
signal
sampling
signal filtering
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910092907.8A
Other languages
Chinese (zh)
Other versions
CN111510109B (en
Inventor
李良
杨国新
李新星
谢荣升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vertiv Tech Co Ltd
Original Assignee
Vertiv Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vertiv Tech Co Ltd filed Critical Vertiv Tech Co Ltd
Priority to CN201910092907.8A priority Critical patent/CN111510109B/en
Publication of CN111510109A publication Critical patent/CN111510109A/en
Application granted granted Critical
Publication of CN111510109B publication Critical patent/CN111510109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0219Compensation of undesirable effects, e.g. quantisation noise, overflow
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0248Filters characterised by a particular frequency response or filtering method
    • H03H17/0261Non linear filters

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Nonlinear Science (AREA)
  • Measurement Of Current Or Voltage (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for signal filtering, which belong to the technical field of signal processing, wherein the method comprises the steps of obtaining a sampling value of a set sampling frequency of a designated signal; determining the signal variation amplitude according to the acquired sampling values; judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing; otherwise, performing trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the previous historical signal filtering value. Therefore, different signal filtering modes are executed according to the signal change amplitude and different analysis results of trend change analysis of each sampling value, accurate filtering of signals is achieved, and accuracy of signal filtering is improved.

Description

Signal filtering method, device, equipment and medium
Technical Field
The present application relates to the field of signal processing technologies, and in particular, to a method, an apparatus, a device, and a medium for signal filtering.
Background
In the signal sampling process, since there is usually a lot of noise interfering with the signal, the accuracy and stability of the obtained signal are poor, and therefore, the sampled signal needs to be filtered.
In the prior art, mean filtering and median filtering are generally adopted for signal filtering.
However, the mode of mean filtering and median filtering can only reduce the influence proportion of noise on signals to a certain extent, and for some signals with generally low signal strength (for example, temperature signals collected by the temperature sensor AD 592), the signal accuracy required by product specifications cannot be achieved.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for signal filtering, which are used for improving the accuracy of signal filtering when signal filtering is carried out.
In one aspect, a method of signal filtering is provided, including:
acquiring a sampling value of a set sampling frequency of a designated signal;
determining signal change amplitude according to each acquired sampling value, wherein the signal change amplitude represents the change range of the sampling value;
judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing;
otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
Preferably, the acquiring a sampling value of the set sampling number of the designated signal includes:
respectively determining a primary sampling value in the corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired in each set sampling duration;
wherein, the sample value is obtained according to a periodic sampling or random sampling mode.
Preferably, determining the signal variation amplitude according to each sampling value comprises:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
Preferably, determining the filtered value of the signal based on the sampled values comprises:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Preferably, the trend analysis is performed on each sampling value, and the trend analysis comprises:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet the preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
Preferably, the determining the filtered signal value according to the obtained analysis result and the previous historical target signal value includes:
if the analysis result represents the consistency of the change trend, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, determining a filtered value of the signal based on each sampled value or a previous historical target signal value according to the obtained analysis result includes:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and the sampling values are determined not to meet the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the determining that each sampling value meets the preset abnormal condition includes:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
In one aspect, an apparatus for filtering a signal is provided, including:
the acquisition unit is used for acquiring a sampling value of a set sampling frequency of a specified signal;
the determining unit is used for determining the signal change amplitude according to the acquired sampling values, and the signal change amplitude represents the change range of the sampling values;
the judging unit is used for judging whether the signal variation amplitude accords with a preset signal range or not, if so, a signal filtering value is determined according to each sampling value, and the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing; otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
Preferably, the obtaining unit is configured to:
respectively determining a primary sampling value in the corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired in each set sampling duration;
wherein, the sample value is obtained according to a periodic sampling or random sampling mode.
Preferably, the determination unit is configured to:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
Preferably, the judging unit is configured to:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Preferably, the judging unit is configured to:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet the preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
Preferably, the judging unit is configured to:
if the analysis result represents the consistency of the change trend, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the judging unit is configured to:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and the sampling values are determined not to meet the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the judging unit is configured to:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
In one aspect, there is provided a control apparatus comprising:
at least one memory for storing program instructions;
at least one processor for calling the program instructions stored in the memory and executing the steps of any of the above methods of signal filtering according to the obtained program instructions.
In one aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of any of the above-mentioned methods of signal filtering.
In the method, the device, the equipment and the medium for filtering the signal, a sampling value of a set sampling frequency of a specified signal is obtained; determining the signal variation amplitude according to the acquired sampling values; judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing; otherwise, performing trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the previous historical signal filtering value. Therefore, different signal filtering modes are executed according to the signal change amplitude and different analysis results of trend change analysis of each sampling value, accurate filtering of signals is achieved, and accuracy of signal filtering is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart of an implementation of a method for filtering a signal according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a detailed implementation of a signal filtering method according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a detailed implementation of a signal filtering method according to an embodiment of the present disclosure;
fig. 4 is a third flowchart illustrating a detailed implementation of a signal filtering method according to an embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a detailed implementation of a signal filtering method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a signal filtering apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a control device in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solution and beneficial effects of the present application more clear and more obvious, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
During the signal sampling process, there is usually a lot of noise interfering with the signal, so that the accuracy and stability of the obtained signal are poor.
For example, in a power supply system, since a plurality of high-frequency switching power supply modules having a large power and a plurality of user-side power devices are provided, a strong magnetic field is generated inside the power supply system, and thus strong power frequency noise and high-frequency noise are generated. Such noise can interfere with analog signals within the power system, and can particularly interfere significantly with signals acquired by the sensors that are of low signal strength. This reduces the accuracy and stability of the signal sampling, which has an impact on the quality of the power supply system and the user equipment management.
In the conventional technology, mean filtering and median filtering are usually adopted for signal filtering. However, the mean filtering and the median filtering can only reduce the influence of noise on the signal to a certain extent, and for some signals with small signal strength, the signal precision required by the product specification cannot be achieved.
In order to improve the accuracy of signal filtering, embodiments of the present application provide a method, an apparatus, a device, and a medium for signal filtering, where different signal filtering modes are executed according to different signal variation amplitudes of each sampling value and different analysis results of trend variation analysis, so as to improve the accuracy of signal filtering.
It should be noted that the scheme of signal filtering provided in the embodiment of the present application is mainly applied to a scene where a signal with a small signal intensity is filtered, and an execution main body may be a control device, where the control device may be a power supply system, a terminal device, a server, and the like, and the embodiment of the present application does not limit this.
Referring to fig. 1, a flowchart of an embodiment of a signal filtering method according to the present invention is shown. The specific implementation flow of the method is as follows:
step 100: sampling values of a set number of sampling times of a specified signal are acquired.
Specifically, a sampling value within a corresponding set sampling duration is determined according to a sample value of a set acquisition frequency of a specified signal within each set sampling duration. Wherein, the sample value is obtained according to a periodic sampling or random sampling mode. For example, the designation signal may be a temperature signal or a current signal, or the like.
For a sample value of a given signal, it can be determined in the following manner:
within a set sampling time length, sample values of set acquisition times are obtained according to a periodic sampling or random sampling mode, and the median value or the mean value of each sample value is determined as a sampling value. When the sampling value is determined according to a plurality of sample values, other methods may be adopted, which are not limited to this.
In one embodiment, the sample values are obtained according to a preset duration or a fixed frequency, and the mean value or the median of the sample values with the set collection times is determined as the sampling value.
Optionally, the preset time duration, the fixed frequency, the set acquisition frequency and the set sampling frequency may be set according to signal characteristics, noise characteristics and signal accuracy requirements in practical application, for example, the set acquisition frequency may be set to 16 times, which is not limited herein.
Optionally, during data acquisition, if hardware supports that a plurality of acquisition values can be acquired by starting sampling once, a random sampling mode within a set sampling duration may be adopted, and periodic sampling or random sampling may be performed on a signal in a software setting mode. The signal may be obtained through Analog-to-Digital (AD) conversion processing, or may be obtained through other acquisition methods, which is not limited to this.
Alternatively, the median value may be the middle value after sorting the numerical values or the average of several middle values.
Alternatively, other manners may also be used to determine the sampling value, which is not limited in this embodiment of the application.
For example, Analog-to-Digital (AD) conversion processing is performed on the acquired 5 Analog signals by a temperature sensor, and 5 temperature values are obtained.
Therefore, one sampling value is determined through the median value or the mean value of a plurality of sampling values, the interference of high-frequency noise to signals can be reduced, and the signals are subjected to preliminary filtering. Of course, if there is little or no high frequency noise, the sample value may be directly used as the sampling value.
Step 101: and determining the signal change amplitude according to each sampling value.
Specifically, the signal variation amplitude represents the variation range of the sampling value, and when step 101 is executed, the following manners may be adopted:
the first mode is as follows: and determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal change amplitude.
The second way is: and acquiring a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
Compared with the first mode, the signal filtering value obtained by the second mode can more smoothly follow the real value, but if the real value changes greatly, the real value needs to be slowly followed after the change rate of the real value is reduced, so that the following speed is slower.
Optionally, when determining the signal variation amplitude, the difference between the maximum value and the average value may be determined as the signal variation amplitude, or the difference between the minimum value and the average value may be determined as the signal variation amplitude, or may be determined in other manners, which is not limited herein.
In this way, the signal variation range of each sample value can be determined.
Step 102: and judging whether the signal variation amplitude accords with a preset signal range, if so, executing a step 103, otherwise, executing a step 104.
For example, if the preset signal range is not higher than 1 degree and the temperature variation range of the temperature is 2 degrees, the temperature variation range does not conform to the preset signal range.
Step 103: from each sample value, a filtered value of the signal is determined, and step 105 is performed.
Specifically, the signal filtering value represents a signal value obtained by filtering the signal, and the following method may be adopted when step 103 is executed:
the first mode is as follows: and determining the mean value or the median value of all sampling values as a signal filtering value.
The second way is: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Preferably, each history signal filtered value is the first k history signal filtered values, where k is the set number of overlaps.
For example, assuming that the weight value of each signal is 0.2, and the number of the superimposed signals is set to 4, the first 4 filtered values of the historical signal are obtained, and the average value or the median value of each sampling value and the sum of the products of the 4 filtered values of the historical signal and the corresponding weight value of 0.2 are respectively obtained.
By adopting the second mode, the smoothing processing can be carried out on the signal filtering values, so that the signal curves drawn through the signal filtering values are smoother.
Further, when determining the signal filtering value according to each sampling value, other manners may also be adopted, which is not limited to this.
Step 104: and analyzing the trend change of each sampling value, and determining a signal filtering value according to the obtained analysis result and the previous historical signal filtering value.
Specifically, the previous history signal filtering value is a signal filtering value obtained by the previous signal filtering process, and the following steps may be adopted when step 104 is executed:
s1041: and sequencing the sampling values from large to small or from small to large.
Specifically, every two adjacent sampling values in a sampling value sequence formed by the sampling values are compared in sequence, and if the comparison result of every two adjacent sampling values does not accord with the preset sequencing condition, the sequence of every two adjacent sampling values is exchanged.
Optionally, the preset ordering condition may be that a first sample value of the two adjacent sample values is greater than a second sample value, the first sample value is not greater than the second sample value, and the first sample value is smaller than the second sample value, or the first sample value is not smaller than the second sample value.
In one embodiment, a sampling value sequence consisting of sampling values is obtained, the sampling value sequence is traversed circularly, the sizes of two adjacent sampling values are compared sequentially from front to back in each traversal, and if the former sampling value is larger than the latter sampling value in the two adjacent sampling values, the positions of the two adjacent sampling values are exchanged, and the exchange times are updated. And stopping traversing until the sampling value sequence is determined to be an ordered sequence.
In one embodiment, a sampling value sequence consisting of sampling values is obtained, the sampling value sequence is traversed circularly, the sizes of two adjacent sampling values are compared sequentially from front to back in each traversal, and if the former sampling value is smaller than the latter sampling value in the two adjacent sampling values, the positions of the two adjacent sampling values are exchanged, and the exchange times are updated. And stopping traversing until the sampling value sequence is determined to be an ordered sequence.
S1042: counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process, and if the exchange times meet preset exchange conditions, obtaining an analysis result representing the consistency of the change trend; otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
Optionally, the preset exchange condition may be lower than the first preset exchange number, or higher than the second preset exchange number, and the preset exchange condition may be set according to actual application, which is not limited to this.
In one embodiment, if the exchange times are lower than a first preset exchange time, obtaining an analysis result representing the consistency of the change trend; otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
For example, assuming that the sampling values are 1, 2, 3, 4, 5, and 6 in sequence, when the sampling values are sorted from low to high, the statistical exchange frequency is 0 and is lower than the first preset exchange frequency 2, and an analysis result representing the consistency of the change trend is obtained.
In one embodiment, if the exchange times are higher than a second preset exchange times, obtaining an analysis result representing the consistency of the change trend; otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
For example, assuming that the sampling values are 1, 2, 3, 4, 5, and 6 in sequence, when the sampling values are sorted from high to low, the statistical exchange number is higher than a second preset exchange number 5, and an analysis result representing the consistency of the trend of change is obtained.
S1043: and determining a signal filtering value according to the obtained analysis result and the previous historical signal filtering value.
Specifically, when step S1043 is executed, the following manners may be adopted:
the first mode is as follows:
if the analysis result represents the consistency of the change trend, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
The second way is:
and if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as the signal filtering value.
Optionally, when the first method is used to determine the signal filtering value, the following method may also be used: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value, or determining the sum of the last historical signal filtering value and the preset signal variation as the signal filtering value.
If the analysis result represents the consistency of the change trend and the sampling values are determined not to meet the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
therefore, the phenomenon that the signal variation range is too large and exceeds the specification range requirement due to noise interference can be avoided. The preset signal variation can be set according to the signal speed and the specification precision requirement, and the preset signal variation is not limited. For example, the preset signal variation may be 0.5 degrees.
And if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
When determining that each sampling value meets the preset abnormal condition, the following steps can be adopted:
and if each sampling value is higher than the preset abnormal threshold value and the absolute value of the difference value of every two adjacent sampling values is higher than the preset difference threshold value, adding one to the abnormal times. And if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
The anomaly threshold, the preset difference threshold and the anomaly threshold can be set according to practical application, and are not limited to this.
For example, assume that the preset anomaly threshold is 50 degrees, the preset difference threshold is 2 degrees, the preset anomaly threshold is 0, and the initial anomaly is 0. Sampling the temperature to obtain sampling values of the temperatures as follows: and determining that each temperature sampling value is higher than a preset abnormal threshold value by 50 degrees at 51 degrees, 56 degrees and 60 degrees, determining that the absolute value of the difference value between every two adjacent temperature sampling values is higher than a preset difference threshold value by 2 degrees, counting the abnormal times to be 1 and the preset abnormal time threshold value 0, and judging that each temperature sampling value meets the preset abnormal condition.
In practical application, the preset abnormal condition may be set according to a practical application scenario, which is not limited in the embodiment of the present application.
Therefore, when the variation amplitude of the sampling value is large, the continuous consistent variation of the sampling value or the disordered variation caused by interference can be determined through the analysis result of the variation trend and the preset abnormal condition, and then the corresponding signal filtering strategy is executed, so that the accuracy of signal filtering is further improved. And directly filtering the sampling values which do not conform to the consistency change, and keeping the last filtered value of the historical signal.
Step 105: the present sampling is ended, and step 100 is executed.
The signal filtering process for one sampling of the designated signal in the above embodiments is further described in detail below using a plurality of specific application scenarios.
Referring to fig. 2, a first detailed implementation flowchart of a signal filtering method provided in the present application is shown. The specific implementation flow of the method is as follows:
step 201: and acquiring a sample value of the set acquisition times of the designated signal in the set sampling duration.
Step 202: and determining a sampling value for one time according to each acquired sample value, and adding one to the cycle sampling times.
Therefore, each sampling value is determined based on the median, the mean value or other modes of the plurality of sampling values, and by adopting the mode, when high-frequency noise exists, the high-frequency noise can be removed, the interference of the high-frequency noise to the signal is reduced, and the preliminary filtering of the signal is realized.
Step 203: and judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing step 204, otherwise, executing step 201.
Step 204: and determining the difference between the maximum value and the minimum value in each sampling value as the signal change amplitude.
By adopting the mode, the subsequently obtained signal filtering value can follow the real value quickly, and the follow-up speed is high.
Step 205: and (4) judging whether the signal variation amplitude accords with a preset signal range, if so, executing a step 206, otherwise, executing a step 207.
Therefore, if the signal variation amplitude exceeds the preset signal range, the signal may be abnormal, and further detailed analysis should be performed.
Step 206: and determining a signal filtering value according to each sampling value and/or each historical signal filtering value.
Specifically, when step 206 is executed, the following method may be adopted:
the first mode is as follows: and determining the mean value or the median value of all sampling values as a signal filtering value.
The second way is: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Compared with the first mode, the second mode is adopted, the smoothing processing can be carried out on the signal filtering values, and the signal curves drawn through the signal filtering values are smooth.
Step 207: and analyzing the trend change of each sampling value to obtain an analysis result.
Specifically, when step 207 is executed, the specific steps refer to step 104 described above.
Therefore, if the signal is abnormal, trend change analysis is carried out on each sampling value so as to further specifically analyze the signal.
Step 208: and judging whether the analysis result represents the consistency of the change trend and each sampling value meets the preset abnormal condition, if so, executing step 209, otherwise, executing step 210.
Thus, if the analysis result indicates that the trend of change is consistent, it indicates that each sampling value is a preset special case, and a situation such as a failure does not occur.
Step 209, determine the mean or median of each sampled value as the filtered value of the signal.
Step 210: and judging whether the analysis result represents the consistency of the change trend and each sampling value does not accord with the preset abnormal condition, if so, executing step 211, otherwise, executing step 212.
Step 211: and determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value.
Step 212: and determining the last historical signal filtering value as a signal filtering value.
Therefore, if the abnormal condition outside the setting is determined, the sampling values obtained this time are wrong data, and the signal filtering value is directly determined according to the previous historical signal filtering value, so that the influence of wrong data is avoided, and the accuracy of signal filtering is improved.
Referring to fig. 3, a flowchart illustrating a detailed implementation of a signal filtering method according to the present application is shown. The specific implementation flow of the method is as follows:
step 301: and acquiring a sample value of the set acquisition times of the designated signal in the set sampling duration.
Step 302: and determining a sampling value for one time according to each acquired sample value, and adding one to the cycle sampling times.
Therefore, each sampling value is determined based on the median, the mean value or other modes of the plurality of sampling values, and by adopting the mode, when high-frequency noise exists, the high-frequency noise can be removed, the interference of the high-frequency noise to the signal is reduced, and the preliminary filtering of the signal is realized.
Step 303: and judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing step 304, and otherwise, executing step 301.
Step 304: and determining the difference value between the average value or the median value of each sampling value and the filtering value of the previous historical signal as the signal variation amplitude.
By adopting the mode, the subsequently obtained signal filtering value can more smoothly follow up to the real value, and the follow-up speed is lower.
Step 305: and judging whether the signal variation amplitude accords with a preset signal range, if so, executing a step 306, and otherwise, executing a step 307.
Therefore, if the signal variation amplitude exceeds the preset signal range, the signal may be abnormal, and further detailed analysis should be performed.
Step 306: and determining a signal filtering value according to each sampling value and/or each historical signal filtering value.
Specifically, when step 306 is executed, the following method may be adopted:
the first mode is as follows: and determining the mean value or the median value of all sampling values as a signal filtering value.
The second way is: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Compared with the first mode, the second mode is adopted, the smoothing processing can be carried out on the signal filtering values, and the signal curves drawn through the signal filtering values are smooth.
Step 307: and analyzing the trend change of each sampling value to obtain an analysis result.
Specifically, when step 307 is executed, the specific steps refer to step 104 described above.
Therefore, if the signal is abnormal, trend change analysis is carried out on each sampling value so as to further specifically analyze the signal.
Step 308: and judging whether the analysis result represents the consistency of the change trend and each sampling value meets the preset abnormal condition, if so, executing step 309, otherwise, executing step 310.
Thus, if the analysis result indicates that the trend of change is consistent, it indicates that each sampling value is a preset special case, and a situation such as a failure does not occur.
Step 309, determining the mean value or the median value of each sampling value as a signal filtering value.
Step 310: and judging whether the analysis result represents the consistency of the change trend and each sampling value does not accord with the preset abnormal condition, if so, executing step 311, otherwise, executing step 312.
Step 311: and determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value.
Step 312: and determining the last historical signal filtering value as a signal filtering value.
Therefore, if the abnormal condition outside the setting is determined, the sampling values obtained this time are wrong data, and the signal filtering value is directly determined according to the previous historical signal filtering value, so that the influence of wrong data is avoided, and the accuracy of signal filtering is improved.
Referring to fig. 4, a third flowchart of a detailed implementation of a signal filtering method provided in the present application is shown. The specific implementation flow of the method is as follows:
step 401: the primary sample value of the prescribed signal is acquired as a sample value.
Therefore, the acquired sample value is directly used as the sampling value, the method is suitable for the environment with less high-frequency noise, and the signal filtering speed is high.
Step 402: the number of samples taken in a cycle is incremented by one.
Step 403: and judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing a step 404, and otherwise, executing a step 401.
Step 404: and determining the difference between the maximum value and the minimum value in each sampling value as the signal change amplitude.
By adopting the mode, the subsequently obtained signal filtering value can follow the real value quickly, and the follow-up speed is high.
Step 405: and judging whether the signal variation amplitude accords with a preset signal range, if so, executing step 406, and otherwise, executing step 407.
Therefore, if the signal variation amplitude exceeds the preset signal range, the signal may be abnormal, and further detailed analysis should be performed.
Step 406: and determining a signal filtering value according to each sampling value and/or each historical signal filtering value.
Specifically, when step 406 is executed, the following method may be adopted:
the first mode is as follows: and determining the mean value or the median value of all sampling values as a signal filtering value.
The second way is: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Compared with the first mode, the second mode is adopted, the smoothing processing can be carried out on the signal filtering values, and the signal curves drawn through the signal filtering values are smooth.
Step 407: and analyzing the trend change of each sampling value to obtain an analysis result.
Step 408: and judging whether the analysis result represents the consistency of the variation trend, if so, executing a step 409, otherwise, executing a step 410.
Thus, if the analysis result represents the consistency of the variation trend, the sampling values are the preset special conditions, otherwise, the sampling values obtained at this time are the wrong data.
Step 409: and determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value.
Step 410: and determining the last historical signal filtering value as a signal filtering value.
And removing the step of collecting a plurality of sample values at one time to carry out preliminary filtering on the occasion with little or no high-frequency interference. Furthermore, only whether the signal variation amplitude accords with a preset signal range or not and whether the analysis result represents the variation trend consistency or not are judged, so that the judgment logic is simplified, and the signal processing efficiency is improved. However, if the change in the true signal value is large, the follow-up speed of the signal target value is slow, and therefore, the method is suitable for an application scenario in which the change in the true signal value is small.
Referring to fig. 5, a flowchart illustrating a detailed implementation of a signal filtering method according to the present invention is shown.
Step 501: the primary sample value of the prescribed signal is acquired as a sample value.
Therefore, the acquired sample value is directly used as the sampling value, the method is suitable for the environment with less high-frequency noise, and the signal filtering speed is high.
Step 502: the number of samples taken in a cycle is incremented by one.
Step 503: and judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing step 504, and otherwise, executing step 501.
Step 504: and determining the difference value between the average value or the median value of each sampling value and the filtering value of the previous historical signal as the signal variation amplitude.
By adopting the mode, the subsequently obtained signal filtering value can more smoothly follow up to the real value, and the follow-up speed is lower.
Step 505: and (4) judging whether the signal variation amplitude accords with a preset signal range, if so, executing step 506, and otherwise, executing step 507.
Therefore, if the signal variation amplitude exceeds the preset signal range, the signal may be abnormal, and further detailed analysis should be performed.
Step 506: and determining a signal filtering value according to each sampling value and/or each historical signal filtering value.
Specifically, when step 506 is executed, the following method may be adopted:
the first mode is as follows: and determining the mean value or the median value of all sampling values as a signal filtering value.
The second way is: and acquiring historical signal filtering values with set superposition quantity, and weighting the mean value or median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Compared with the first mode, the second mode is adopted, the smoothing processing can be carried out on the signal filtering values, and the signal curves drawn through the signal filtering values are smooth.
Step 507: and analyzing the trend change of each sampling value to obtain an analysis result.
Step 508: and judging whether the analysis result represents the consistency of the variation trend, if so, executing a step 509, otherwise, executing a step 510.
Thus, if the analysis result represents the consistency of the variation trend, the sampling values are the preset special conditions, otherwise, the sampling values obtained at this time are the wrong data.
Step 509: and determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value.
Step 510: and determining the last historical signal filtering value as a signal filtering value.
And removing the step of collecting a plurality of sample values at one time to carry out preliminary filtering on the occasion with little or no high-frequency interference. Furthermore, only whether the signal variation amplitude accords with a preset signal range or not and whether the analysis result represents the variation trend consistency or not are judged, so that the judgment logic is simplified, and the signal processing efficiency is improved. However, if the change in the true signal value is large, the follow-up speed of the signal target value is slow, and therefore, the method is suitable for an application scenario in which the change in the true signal value is small.
Based on the same inventive concept, the embodiment of the present application further provides a signal filtering apparatus, and because the principle of the apparatus and the device for solving the problem is similar to that of a signal filtering method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 6, which is a schematic structural diagram of an apparatus for signal filtering according to an embodiment of the present application, including:
an acquisition unit 60 for acquiring a sampling value of a set sampling number of the designation signal;
the determining unit 61 is configured to determine a signal variation amplitude according to each acquired sampling value, where the signal variation amplitude represents a variation range of the sampling value;
the judging unit 62 is configured to judge whether the signal variation amplitude meets a preset signal range, and if so, determine a signal filtering value according to each sampling value, where the signal filtering value represents a signal value obtained by filtering the signal; otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
Preferably, the obtaining unit 60 is configured to:
respectively determining a primary sampling value in the corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired in each set sampling duration;
wherein, the sample value is obtained according to a periodic sampling or random sampling mode.
Preferably, the determining unit 61 is configured to:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
Preferably, the judging unit 62 is configured to:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Preferably, the judging unit 62 is configured to:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet the preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
Preferably, the judging unit 62 is configured to:
if the analysis result represents the consistency of the change trend, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the judging unit 62 is configured to:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and the sampling values are determined not to meet the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the judging unit 62 is configured to:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
In the method, the device, the equipment and the medium for filtering the signal, a sampling value of a set sampling frequency of a specified signal is obtained; determining the signal variation amplitude according to the acquired sampling values; judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing; otherwise, performing trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the previous historical signal filtering value. Therefore, different signal filtering modes are executed according to the signal change amplitude and different analysis results of trend change analysis of each sampling value, accurate filtering of signals is achieved, and accuracy of signal filtering is improved.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same one or more pieces of software or hardware when implementing the present application.
Based on the above embodiments, referring to fig. 7, in an embodiment of the present application, a structural schematic diagram of a control device is shown.
Embodiments of the present disclosure provide a control device, which may include a processor 710 (CPU), a memory 720, an input device 730, an output device 740, and the like, wherein the input device 730 may include a keyboard, a mouse, a touch screen, and the like, and the output device 740 may include a Display device, such as a liquid crystal Display (L liquid crystal Display, L CD), a Cathode Ray Tube (CRT), and the like.
Memory 720 may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides processor 710 with program instructions and data stored in memory 720. In the embodiment of the present application, the memory 720 may be used to store a program for signal filtering in the embodiment of the present application.
By calling the program instructions stored in the memory 720, the processor 710 is configured to perform the following steps according to the obtained program instructions:
acquiring a sampling value of a set sampling frequency of a designated signal;
determining signal change amplitude according to each acquired sampling value, wherein the signal change amplitude represents the change range of the sampling value;
judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after the signal is subjected to filtering processing;
otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
Preferably, the processor 710 is configured to:
respectively determining a primary sampling value in the corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired in each set sampling duration;
wherein, the sample value is obtained according to a periodic sampling or random sampling mode.
Preferably, the processor 710 is configured to:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
Preferably, the processor 710 is configured to:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
Preferably, the processor 710 is configured to:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet the preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
Preferably, the processor 710 is configured to:
if the analysis result represents the consistency of the change trend, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the processor 710 is configured to:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and the sampling values are determined not to meet the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the previous historical signal filtering value as a signal filtering value.
Preferably, the processor 710 is configured to:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
It should be noted that the control device in the embodiment of the present application may be a power supply system, or may also be a terminal device, a server, and the like, which is not limited in the embodiment of the present application.
In an embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the method for signal filtering in any of the above-mentioned method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (18)

1. A method of signal filtering, comprising:
acquiring a sampling value of a set sampling frequency of a designated signal;
determining signal variation amplitude according to each acquired sampling value, wherein the signal variation amplitude represents the variation range of the sampling value;
judging whether the signal variation amplitude accords with a preset signal range, if so, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value obtained after filtering a signal;
otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the last historical signal filtering value, wherein the last historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
2. The method of claim 1, wherein obtaining a sample value specifying a set number of samples of the signal comprises:
determining a sampling value within a corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired within each set sampling duration;
wherein the sample values are obtained in a periodic sampling or random sampling manner.
3. The method of claim 1, wherein determining a signal magnitude of change based on the sample values comprises:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
4. The method of claim 1, wherein determining a filtered value of the signal based on the sample values comprises:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
5. The method of any one of claims 1-4, wherein performing a trend analysis on each sample value comprises:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
6. The method of any of claims 1-4, wherein determining a signal filtered value based on the obtained analysis and a previous historical target signal value comprises:
if the analysis result represents the consistency of the change trend, determining a last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents that the variation trend is inconsistent, determining the last historical signal filtering value as a signal filtering value.
7. The method of any of claims 1-4, wherein determining a filtered value of the signal based on the sampled values or a previous historical target signal value based on the obtained analysis results comprises:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and each sampling value is determined not to be in accordance with the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents that the variation trend is inconsistent, determining the last historical signal filtering value as a signal filtering value.
8. The method of claim 7, wherein determining that each sample value meets a predetermined exception condition comprises:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
9. An apparatus for signal filtering, comprising:
the acquisition unit is used for acquiring a sampling value of a set sampling frequency of a specified signal;
the determining unit is used for determining signal change amplitude according to each acquired sampling value, and the signal change amplitude represents the change range of the sampling value;
the judging unit is used for judging whether the signal variation amplitude accords with a preset signal range or not, if so, a signal filtering value is determined according to each sampling value, and the signal filtering value represents a signal value obtained after filtering the signal; otherwise, trend change analysis is carried out on each sampling value, and a signal filtering value is determined according to the obtained analysis result and the last historical signal filtering value, wherein the last historical signal filtering value is the signal filtering value obtained by the last signal filtering processing.
10. The apparatus of claim 9, wherein the obtaining unit is to:
determining a sampling value within a corresponding set sampling duration according to the sample value of the set acquisition times of the designated signal acquired within each set sampling duration;
wherein the sample values are obtained in a periodic sampling or random sampling manner.
11. The apparatus of claim 9, wherein the determination unit is to:
determining the maximum value and the minimum value in each sampling value, and determining the difference value between the maximum value and the minimum value as the signal variation amplitude;
or, obtaining a previous historical signal filtering value, and determining the difference value between the average value or the median value of each sampling value and the previous historical signal filtering value as the signal variation amplitude.
12. The apparatus of claim 9, wherein the determining unit is to:
determining the mean value or the median value of each sampling value as a signal filtering value;
or, acquiring each historical signal filtering value with a set superposition number, and performing weighting processing on the mean value or the median value of each sampling value and each historical signal filtering value to obtain a signal filtering value.
13. The apparatus according to any of claims 9-12, wherein the determining unit is configured to:
sequencing the sampling values in a sequence from large to small or from small to large, and counting the exchange times of pairwise exchange of adjacent sampling values in the sequencing process;
if the exchange times meet preset exchange conditions, obtaining an analysis result representing the consistency of the change trend;
otherwise, obtaining the analysis result of the inconsistency of the characterization change trend.
14. The apparatus according to any of claims 9-12, wherein the determining unit is configured to:
if the analysis result represents the consistency of the change trend, determining a last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents that the variation trend is inconsistent, determining the last historical signal filtering value as a signal filtering value.
15. The apparatus according to any of claims 9-12, wherein the determining unit is configured to:
if the analysis result represents the consistency of the change trend and the sampling values are determined to meet the preset abnormal condition, determining the mean value or the median value of the sampling values as a signal filtering value;
if the analysis result represents the consistency of the change trend and each sampling value is determined not to be in accordance with the preset abnormal condition, determining the previous historical signal filtering value or the sum of the previous historical signal filtering value and the preset signal variation as a signal filtering value;
and if the analysis result represents that the variation trend is inconsistent, determining the last historical signal filtering value as a signal filtering value.
16. The apparatus of claim 15, wherein the determining unit is to:
if each sampling value is higher than a preset abnormal threshold value, and the absolute value of the difference value of every two adjacent sampling values is higher than a preset difference value threshold value, adding one to the acquired abnormal times;
and if the updated abnormal times are higher than a preset abnormal time threshold value, determining that each sampling value meets a preset abnormal condition.
17. A control apparatus, characterized by comprising:
at least one memory for storing program instructions;
at least one processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the preceding claims 1 to 8 in accordance with the program instructions obtained.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN201910092907.8A 2019-01-30 2019-01-30 Signal filtering method, device, equipment and medium Active CN111510109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910092907.8A CN111510109B (en) 2019-01-30 2019-01-30 Signal filtering method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910092907.8A CN111510109B (en) 2019-01-30 2019-01-30 Signal filtering method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111510109A true CN111510109A (en) 2020-08-07
CN111510109B CN111510109B (en) 2023-07-18

Family

ID=71875570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910092907.8A Active CN111510109B (en) 2019-01-30 2019-01-30 Signal filtering method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111510109B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112865753A (en) * 2020-12-28 2021-05-28 珠海格力电器股份有限公司 Filter coefficient adjusting method and device, storage medium and filter
CN115684076A (en) * 2022-11-11 2023-02-03 中船重工安谱(湖北)仪器有限公司 Data processing method of multi-channel infrared gas sensor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820299A (en) * 2010-02-09 2010-09-01 北京创毅视讯科技有限公司 Method and device for solving multipath interference and mobile multimedia broadcasting receiver
KR20110028909A (en) * 2009-09-14 2011-03-22 순환엔지니어링 주식회사 Detecting and filtering method of random noise signal
CN102355230A (en) * 2011-07-05 2012-02-15 中兴通讯股份有限公司 Digital filtering apparatus and method thereof
US20140195577A1 (en) * 2012-08-30 2014-07-10 Avatekh, Inc. Method and Apparatus for Signal Filtering and for Improving Properties of Electronic Devices
CN105743462A (en) * 2016-03-28 2016-07-06 浙江涵普电力科技有限公司 Electric power signal digital filtering method with adjustable measuring response time
WO2018010107A1 (en) * 2016-07-13 2018-01-18 悦享趋势科技(北京)有限责任公司 Method and device for determining whether pulse wave is valid

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110028909A (en) * 2009-09-14 2011-03-22 순환엔지니어링 주식회사 Detecting and filtering method of random noise signal
CN101820299A (en) * 2010-02-09 2010-09-01 北京创毅视讯科技有限公司 Method and device for solving multipath interference and mobile multimedia broadcasting receiver
CN102355230A (en) * 2011-07-05 2012-02-15 中兴通讯股份有限公司 Digital filtering apparatus and method thereof
US20140195577A1 (en) * 2012-08-30 2014-07-10 Avatekh, Inc. Method and Apparatus for Signal Filtering and for Improving Properties of Electronic Devices
CN105743462A (en) * 2016-03-28 2016-07-06 浙江涵普电力科技有限公司 Electric power signal digital filtering method with adjustable measuring response time
WO2018010107A1 (en) * 2016-07-13 2018-01-18 悦享趋势科技(北京)有限责任公司 Method and device for determining whether pulse wave is valid

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112865753A (en) * 2020-12-28 2021-05-28 珠海格力电器股份有限公司 Filter coefficient adjusting method and device, storage medium and filter
CN115684076A (en) * 2022-11-11 2023-02-03 中船重工安谱(湖北)仪器有限公司 Data processing method of multi-channel infrared gas sensor
CN115684076B (en) * 2022-11-11 2024-01-30 中船重工安谱(湖北)仪器有限公司 Multichannel infrared gas sensor data processing method

Also Published As

Publication number Publication date
CN111510109B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN111510109A (en) Signal filtering method, device, equipment and medium
CN110682159A (en) Cutter wear state identification method and device
CN108053095B (en) Power quality disturbance event feature extraction method and system
CN113609790B (en) Product virtual measuring method, system, device and medium
CN115800272B (en) Power grid fault analysis method, system, terminal and medium based on topology identification
CN110991495A (en) Method, system, medium, and apparatus for predicting product quality in manufacturing process
CN114330834A (en) Charging pile power consumption prediction method based on self-updating cubic exponential smoothing method
CN113269169A (en) Bearing fault detection method and device
CN112446389A (en) Fault judgment method and device
CN114065930A (en) Performance result optimization method and system for deep learning model training
CN108229586B (en) The detection method and system of a kind of exceptional data point in data
CN115599793B (en) Method, device and storage medium for updating data
CN109407630B (en) Parameter calculation method, device, terminal and readable storage medium
CN115510998A (en) Transaction abnormal value detection method and device
CN114996331B (en) Data mining control method and system
CN105425683B (en) A kind of analogue quantity acquiring method based on staged dynamic dead zone
CN115712834A (en) Alarm false alarm detection method, device, equipment and storage medium
CN114202110A (en) Service fault prediction method and device based on RF-XGBOOST
CN116671867B (en) Sleep quality evaluation method and system for underwater operators
CN112132135A (en) Power grid transmission line detection method based on image processing and storage medium
CN112116917A (en) Phase jump degree-based reactor body and fan sound signal separation method
CN111596357B (en) Method and device for analyzing working state of submarine acquisition node
CN112084907B (en) Time-frequency graph feature data point capturing and processing method, storage medium and equipment
CN110516659A (en) The recognition methods of ball-screw catagen phase, device, equipment and storage medium
CN110221202B (en) Current curve processing method and device for working current of circuit breaker

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant