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

Signal filtering method, device, equipment and medium Download PDF

Info

Publication number
CN111510109B
CN111510109B CN201910092907.8A CN201910092907A CN111510109B CN 111510109 B CN111510109 B CN 111510109B CN 201910092907 A CN201910092907 A CN 201910092907A CN 111510109 B CN111510109 B CN 111510109B
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.)
Active
Application number
CN201910092907.8A
Other languages
Chinese (zh)
Other versions
CN111510109A (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

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)
  • Testing And Monitoring For Control Systems (AREA)
  • Measurement Of Current Or Voltage (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, and the method comprises the steps of obtaining sampling values of set sampling times 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 after the signal is subjected to filtering treatment; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the last historical signal filtering value. Thus, according to the variation amplitude of the signal and the difference of analysis results of trend variation analysis of each sampling value, different signal filtering modes are executed, so that accurate filtering of the signal is realized, and the accuracy of the signal filtering is improved.

Description

Signal filtering method, device, equipment and medium
Technical Field
The present disclosure 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, the accuracy and stability of the obtained signal are poor due to the noise of the large amount of interference signals, and thus the sampled signal needs to be filtered.
In the prior art, signal filtering is generally performed by means of mean filtering and median filtering.
However, the mean filtering and median filtering methods can only reduce the influence proportion of noise on the signals to a certain extent, and for some signals with usually smaller signal strength (such as the temperature signals collected by the temperature sensor AD 592), the signal accuracy required by the product specification 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 the signal filtering is carried out.
In one aspect, a method of signal filtering is provided, comprising:
acquiring sampling values of set sampling times of a designated signal;
according to each acquired sampling value, determining a signal variation amplitude, 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 after the signal is subjected to filtering treatment;
otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the previous signal filtering processing.
Preferably, obtaining a sampling value of a set sampling number of the specified 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 values are obtained in a periodically sampled or randomly sampled manner.
Preferably, determining the signal variation amplitude according to each sampling value includes:
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, the last historical signal filtering value is obtained, and the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value is determined as the signal variation amplitude.
Preferably, determining a signal filtering value according to each sampling value includes:
the average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
Preferably, the trend change analysis is performed on each sampling value, including:
Sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
Preferably, determining the signal filtering value according to the obtained analysis result and the last historical target signal value includes:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
Preferably, determining the signal filtering value based on each sampling value or the last historical target signal value according to the obtained analysis result includes:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with the preset abnormal condition, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
Preferably, determining that each sampling value meets a 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
In one aspect, an apparatus for filtering a signal is provided, comprising:
an acquisition unit for acquiring a sampling value of a set sampling number of a specified signal;
the determining unit is used for determining the signal variation amplitude according to the acquired sampling values, wherein the signal variation amplitude represents the variation range of the sampling values;
the judging unit is used for 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 after the signal is subjected to filtering treatment; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the previous signal filtering processing.
Preferably, the acquiring 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 values are obtained in a periodically sampled or randomly sampled manner.
Preferably, the determining 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, the last historical signal filtering value is obtained, and the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value is determined as the signal variation amplitude.
Preferably, the judging unit is configured to:
the average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
Preferably, the judging unit is configured to:
sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
Preferably, the judging unit is configured to:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
Preferably, the judging unit is configured to:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with the preset abnormal condition, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
In one aspect, there is provided a control apparatus including:
at least one memory for storing program instructions;
at least one processor for invoking program instructions stored in the memory and executing the steps of any of the above-described 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, when executed by a processor, implements the steps of a method of any of the above described signal filtering.
In the method, the device, the equipment and the medium for filtering the signals provided by the embodiment of the application, sampling values of set sampling times of the specified signals are 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 after the signal is subjected to filtering treatment; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the last historical signal filtering value. Thus, according to the variation amplitude of the signal and the difference of analysis results of trend variation analysis of each sampling value, different signal filtering modes are executed, so that accurate filtering of the signal is realized, and the accuracy of the 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 practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof 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 embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flowchart illustrating a method for filtering signals according to an embodiment of the present application;
FIG. 2 is a flowchart showing a method for filtering signals according to an embodiment of the present application;
FIG. 3 is a flowchart showing a method for filtering signals according to an embodiment of the present application;
FIG. 4 is a flowchart III of a detailed implementation of a method for filtering signals according to an embodiment of the present application;
FIG. 5 is a flowchart showing a method for filtering signals according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a device for filtering signals according to an embodiment of the present application;
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 objects, technical solutions and advantageous effects of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
During signal sampling, there is often a large amount of noise that interferes with the signal, making the obtained signal less accurate and stable.
For example, in a power supply system, since there are a plurality of high-frequency switching power supply modules with large power and a user-side power device, 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 cause interference with analog signals within the power supply system, and in particular, can cause greater interference with signals having lesser signal strengths collected by the sensor. This reduces the accuracy and stability of the signal sampling, which has an impact on the quality of the power supply system and user equipment management.
In the conventional technology, signal filtering is generally performed by adopting a mean filtering mode and a median filtering mode. However, the mean filtering and median filtering modes can only reduce the influence proportion of noise on signals to a certain extent, and for some signals with smaller signal strength, the signal precision required by the product specification cannot be achieved.
In order to improve the accuracy of signal filtering, the 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 the signal variation amplitude of each sampling value and the difference of analysis results of trend variation analysis, so as to improve the accuracy of signal filtering.
It should be noted that, the signal filtering scheme provided in the embodiment of the present application is mainly applied to a scenario of filtering a signal with smaller signal strength, and the execution body may be a control device, where the control device may be a power supply system, a terminal device, a server, etc., which is not limited in this embodiment of the present application.
Referring to fig. 1, a flowchart of an implementation of a method for filtering signals is provided. The specific implementation flow of the method is as follows:
step 100: and acquiring a sampling value of a set sampling frequency of the specified signal.
Specifically, a primary sampling value in the corresponding set sampling duration is determined according to the sample value of the set collection times of the designated signal obtained in each set sampling duration. Wherein the sample values are obtained in a periodically sampled or randomly sampled manner. For example, the designation signal may be a temperature signal or a current signal, or the like.
For one sample value of a given signal, the following can be used:
and in a set sampling time length, acquiring sample values of set acquisition times in a periodic sampling or random sampling mode, and determining the median value or the mean value of each sample value as a sampling value. However, when the sampling value is determined according to a plurality of sample values, other manners may be adopted, which is not limited thereto.
In one embodiment, according to a preset time length or a fixed frequency, a sample value is obtained, and a mean value or a median value of the sample values of the set collection times is determined as a sampling value.
Optionally, the preset duration, the fixed frequency, the set collection times and the set sampling times may be set correspondingly according to signal characteristics, noise characteristics and signal accuracy requirements in practical applications, for example, the set collection times may be set to 16 times, which is not limited.
Optionally, when data is acquired, if the hardware supports to start sampling once to acquire a plurality of acquired values, a random sampling mode in a set sampling duration can be adopted, and signals can be periodically sampled or randomly sampled in a software setting mode. The signal may be acquired by Analog-to-Digital (AD) conversion, or may be acquired by other acquisition methods, which is not limited thereto.
Alternatively, the median may be the median value or a median value after each numerical ranking.
Alternatively, the sampling value may be determined in other manners, which is not limited in the embodiment of the present application.
For example, the acquired 5 Analog signals are subjected to Analog-to-Digital (AD) conversion processing by a temperature sensor, and 5 temperature values are obtained.
Thus, by determining a sampling value through the median or average value of a plurality of sample values, the interference of high-frequency noise on the signal can be reduced, and the signal can be subjected to preliminary filtering. Of course, if high frequency noise is small or absent, the sample value may be directly used as the sampling value.
Step 101: and determining the signal variation amplitude according to each sampling value.
Specifically, the signal variation amplitude represents the variation range of the sampling value, and when step 101 is performed, the following several manners may be adopted:
the first way is: 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 variation amplitude.
The second mode is as follows: and acquiring a last historical signal filtering value, and determining the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value as the signal change amplitude.
The signal filtering value obtained by the second method can follow up the real value more gently than by the first method, but if the real value is changed greatly, it is necessary to follow up slowly to the real value after the change rate of the real value is reduced, and thus the follow-up speed is slow.
Alternatively, 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.
In this way, the signal variation range of each sampling value can be determined.
Step 102: judging whether the signal variation amplitude accords with a preset signal range, if so, executing step 103, otherwise, executing step 104.
For example, assuming that 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 signal filtered value is determined, step 105 is performed.
Specifically, the signal filtering value represents a signal value obtained by filtering the signal, and when step 103 is performed, the following manner may be adopted:
The first way is: and determining the mean value or the median value of each sampling value as a signal filtering value.
The second mode is as follows: and obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of each sampling value and each historical signal filtering value to obtain the signal filtering value.
Preferably, each of the historical signal filtering values is the first k historical signal filtering values, where k is a set superposition number.
For example, assuming that the weight value of each signal is 0.2 and the stacking number is set to be 4, the first 4 historical signal filtering values are obtained, and the average value or the median value of each sampling value and the products of the 4 historical signal filtering values and the corresponding weight value of 0.2 are respectively added to obtain the signal filtering value.
In the second mode, the signal filtering values can be subjected to smoothing processing, so that a signal curve drawn through each signal filtering value is smoother.
Further, when determining the signal filtering value according to each sampling value, other manners may be adopted, which is not limited thereto.
Step 104: and carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the last historical signal filtering value.
Specifically, the previous history signal filtering value is the signal filtering value obtained by the previous signal filtering process, and when executing step 104, the following steps may be adopted:
s1041: the sample values are ordered in order of from large to small or from small to large.
Specifically, each two adjacent sampling values in the sampling value sequence formed by the sampling values are sequentially compared, and if the comparison result of each two adjacent sampling values does not meet the preset ordering condition, the order of each two adjacent sampling values is exchanged.
Alternatively, the preset ordering condition may be that a first sampling value of two adjacent sampling values is larger than a second sampling value, the first sampling value is not larger than the second sampling value, the first sampling value is smaller than the second sampling value, or the first sampling value is not smaller than the second sampling value.
In one embodiment, a sequence of sample values is obtained, the sequence of sample values is traversed cyclically, the sizes of two adjacent sample values are compared sequentially from front to back on each traversal, if the previous sample value of the two adjacent sample values is larger than the next sample value, the positions of the two adjacent sample values are exchanged, and the exchange times are updated. Until the sequence of sample values is determined to be an ordered sequence, the traversal is stopped.
In one embodiment, a sequence of sample values is obtained, the sequence of sample values is traversed cyclically, the sizes of two adjacent sample values are compared sequentially from front to back on each traversal, if the previous sample value of the two adjacent sample values is smaller than the next sample value, the positions of the two adjacent sample values are exchanged, and the exchange times are updated. Until the sequence of sample values is determined to be an ordered sequence, the traversal is stopped.
S1042: counting the exchange times of every two adjacent sampling values in the sorting process, and if the exchange times meet preset exchange conditions, obtaining an analysis result representing the consistency of the variation trend; otherwise, obtaining an analysis result for representing the inconsistency of the variation trend.
Optionally, the preset exchange condition may be lower than the first preset exchange frequency or higher than the second preset exchange frequency, and the preset exchange condition may be set correspondingly according to the actual application, which is not limited.
In one embodiment, if the exchange times are lower than the first preset exchange times, obtaining an analysis result for representing the consistency of the change trend; otherwise, obtaining an analysis result for representing the inconsistency of the variation trend.
For example, if the sampling values are sequentially 1, 2, 3, 4, 5, and 6, when the sampling values are ordered in the order 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 variation trend is obtained.
In one embodiment, if the exchange times are higher than the second preset exchange times, obtaining an analysis result representing the consistency of the change trend; otherwise, obtaining an analysis result for representing the inconsistency of the variation trend.
For example, if the sampling values are sequentially 1, 2, 3, 4, 5, and 6, the statistical exchange number is higher than the second preset exchange number 5 when the sampling values are ordered from high to low, so as to obtain an analysis result representing the consistency of the variation trend.
S1043: and determining a signal filtering value according to the obtained analysis result and the last historical signal filtering value.
Specifically, when step S1043 is performed, the following several ways may be adopted:
the first way is:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
The second mode is as follows:
if the analysis result represents the consistency of the variation trend and the sampling values are determined to meet the preset abnormal condition, the average value or the median value of the sampling values is determined to be a signal filtering value.
Alternatively, when determining the signal filtering value in the first manner, the following manner may be adopted: and acquiring historical signal filtering values with set superposition quantity, and carrying out weighting treatment on the average 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 previous historical signal filtering value and the preset signal variation as the signal filtering value.
If the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with the preset abnormal condition, determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as the signal filtering value;
therefore, the condition that the signal change 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 accuracy requirement, and is not limited. For example, the preset signal variation amount may be 0.5 degrees.
If the analysis result represents the inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
When each sampling value is determined to meet the preset abnormal condition, the following steps can be adopted:
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 the preset difference threshold value, the abnormal times are increased by one. If the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
The abnormal threshold value, the preset difference threshold value and the abnormal times threshold value can be set according to practical application, and are not limited.
For example, assume that the preset anomaly threshold value is 50 degrees, the preset difference threshold value is 2 degrees, the preset anomaly number threshold value is 0, and the initial anomaly number is 0. Sampling the temperature to obtain the following temperature sampling values: 51 degrees, 56 degrees and 60 degrees, determining that each temperature sampling value is higher than a preset abnormal threshold value by 50 degrees, wherein the absolute value of the difference value between every two adjacent temperature sampling values is higher than the preset difference threshold value by 2 degrees, the statistical abnormal times are 1> the preset abnormal times threshold value 0, and judging that each temperature sampling value meets the preset abnormal conditions.
In practical application, the preset abnormal condition can be set correspondingly according to the practical application scene, and in the embodiment of the application, the preset abnormal condition is not limited.
Therefore, when the variation amplitude of the sampling value is large, the continuous consistency variation or disorder variation caused by interference in the sampling value can be determined through the analysis result of the variation trend and the preset abnormal condition, so that a corresponding signal filtering strategy is executed, and the accuracy of signal filtering is further improved. And directly filtering the sampling value which does not accord with the consistency change, and keeping the last historical signal filtering value.
Step 105: the sampling is ended and step 100 is executed.
The signal filtering process of the above embodiment for sampling the specified signal once is described in further detail below using a plurality of specific application scenarios.
Referring to fig. 2, a flowchart of a detailed implementation of a method for filtering signals provided in the present application is shown. The specific implementation flow of the method is as follows:
step 201: and obtaining a sample value of the set collection times of the specified signal in the set sampling time.
Step 202: and determining a sampling value according to each acquired sample value, and adding one to the cyclic sampling times.
In this way, each sampling value is determined based on the median value, the average value or other modes of a plurality of sample values, and in this way, when high-frequency noise exists, the high-frequency noise can be removed, the interference of the high-frequency noise on 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: the difference between the maximum value and the minimum value in each sampling value is determined as the signal variation amplitude.
By adopting the mode, the signal filtering value obtained later can follow up the true value faster, and the follow-up speed is faster.
Step 205: whether the signal variation amplitude accords with the preset signal range is judged, if yes, step 206 is executed, otherwise step 207 is executed.
Thus, if the signal variation amplitude exceeds the preset signal range, it is indicated that the signal may be abnormal, and further specific analysis should be performed.
Step 206: a signal filtering value is determined based on each sampling value and/or each historical signal filtering value.
Specifically, when step 206 is performed, the following manner may be adopted:
the first way is: and determining the mean value or the median value of each sampling value as a signal filtering value.
The second mode is as follows: and obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of each sampling value and each historical signal filtering value to obtain the signal filtering value.
Compared with the first mode, the second mode can be adopted to carry out smoothing processing on the signal filtering values, so that a signal curve drawn through each signal filtering value is smoother.
Step 207: and carrying out trend change analysis on each sampling value to obtain an analysis result.
Specifically, when step 207 is performed, specific steps are referred to above in step 104.
Thus, if the signal is abnormal, trend change analysis is performed on each sampling value so as to perform further specific analysis on the signal.
Step 208: judging whether the analysis result represents the consistency of the variation trend, and each sampling value accords with a preset abnormal condition, if so, executing step 209, otherwise, executing step 210.
In this way, if the analysis result indicates the consistency of the variation trend, it is indicated that each sampling value is a preset special case, and no fault or other condition occurs.
Step 209, determining the mean value or the median value of each sampling value as a signal filtering value.
Step 210: judging whether the analysis result represents the consistency of the variation trend, and each sampling value does not accord with the preset abnormal condition, if yes, 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 the 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 fact that each sampling value acquired at this time is erroneous data is indicated, the signal filtering value is directly determined according to the last historical signal filtering value, the influence of the erroneous data is avoided, and the accuracy of signal filtering is improved.
Referring to fig. 3, a flowchart of a detailed implementation of a method for filtering signals provided in the present application is shown. The specific implementation flow of the method is as follows:
step 301: and obtaining a sample value of the set collection times of the specified signal in the set sampling time.
Step 302: and determining a sampling value according to each acquired sample value, and adding one to the cyclic sampling times.
In this way, each sampling value is determined based on the median value, the average value or other modes of a plurality of sample values, and in this way, when high-frequency noise exists, the high-frequency noise can be removed, the interference of the high-frequency noise on the signal is reduced, and the preliminary filtering of the signal is realized.
Step 303: judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing step 304, otherwise, executing step 301.
Step 304: and determining the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value as the signal change amplitude.
In this way, the signal filtering value obtained later can be more gently followed to the true value, and the follow-up speed is slower.
Step 305: whether the signal variation amplitude accords with the preset signal range is judged, if yes, step 306 is executed, otherwise step 307 is executed.
Thus, if the signal variation amplitude exceeds the preset signal range, it is indicated that the signal may be abnormal, and further specific analysis should be performed.
Step 306: a signal filtering value is determined based on each sampling value and/or each historical signal filtering value.
Specifically, when step 306 is performed, the following manner may be adopted:
the first way is: and determining the mean value or the median value of each sampling value as a signal filtering value.
The second mode is as follows: and obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of each sampling value and each historical signal filtering value to obtain the signal filtering value.
Compared with the first mode, the second mode can be adopted to carry out smoothing processing on the signal filtering values, so that a signal curve drawn through each signal filtering value is smoother.
Step 307: and carrying out trend change analysis on each sampling value to obtain an analysis result.
Specifically, when step 307 is performed, specific steps are referred to above in step 104.
Thus, if the signal is abnormal, trend change analysis is performed on each sampling value so as to perform further specific analysis on the signal.
Step 308: judging whether the analysis result represents the consistency of the variation trend, and each sampling value accords with a preset abnormal condition, if so, executing step 309, otherwise, executing step 310.
In this way, if the analysis result indicates the consistency of the variation trend, it is indicated that each sampling value is a preset special case, and no fault or other condition occurs.
Step 309, determining the mean or median of each sampling value as the signal filtering value.
Step 310: judging whether the analysis result represents the consistency of the variation trend, and each sampling value does not accord with the preset abnormal condition, if yes, 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 the 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 fact that each sampling value acquired at this time is erroneous data is indicated, the signal filtering value is directly determined according to the last historical signal filtering value, the influence of the erroneous data is avoided, and the accuracy of signal filtering is improved.
Referring to fig. 4, a flowchart of a detailed implementation of a method for filtering signals provided in the present application is shown. The specific implementation flow of the method is as follows:
step 401: a primary sample value of the specified signal is acquired as a sampling value.
Therefore, the obtained sample value is directly used as a sampling value, the method is suitable for an environment with less high-frequency noise, and the signal filtering speed is high.
Step 402: the number of cyclic samples is increased by one.
Step 403: and judging whether the cycle sampling frequency is higher than the set sampling frequency, if so, executing step 404, otherwise, executing step 401.
Step 404: the difference between the maximum value and the minimum value in each sampling value is determined as the signal variation amplitude.
By adopting the mode, the signal filtering value obtained later can follow up the true value faster, and the follow-up speed is faster.
Step 405: judging whether the signal variation amplitude accords with the preset signal range, if so, executing step 406, otherwise, executing step 407.
Thus, if the signal variation amplitude exceeds the preset signal range, it is indicated that the signal may be abnormal, and further specific analysis should be performed.
Step 406: a signal filtering value is determined based on each sampling value and/or each historical signal filtering value.
Specifically, when step 406 is performed, the following manner may be adopted:
the first way is: and determining the mean value or the median value of each sampling value as a signal filtering value.
The second mode is as follows: and obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of each sampling value and each historical signal filtering value to obtain the signal filtering value.
Compared with the first mode, the second mode can be adopted to carry out smoothing processing on the signal filtering values, so that a signal curve drawn through each signal filtering value is smoother.
Step 407: and carrying out trend change analysis on each sampling value to obtain an analysis result.
Step 408: judging whether the analysis result represents the consistency of the variation trend, if so, executing step 409, otherwise, executing step 410.
In this way, if the analysis result represents the consistency of the variation trend, the fact that each sampling value is the preset special condition is indicated, otherwise, the fact that each sampling value acquired at this time is erroneous data is indicated.
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 the signal filtering value.
Step 410: and determining the last historical signal filtering value as a signal filtering value.
Thus, for the case of little or no high frequency interference, the step of collecting a plurality of sample values at a time to perform preliminary filtering is eliminated. Further, only whether the signal variation amplitude accords with a preset signal range or not and whether the analysis result represents variation trend consistency or not are judged, so that judgment logic is simplified, and signal processing efficiency is improved. However, if the change of the actual signal value is large, the following speed of the signal target value is slow, so that the method is suitable for application scenes with small change of the actual signal value.
Referring to fig. 5, a flowchart of a detailed implementation of a method for filtering signals provided in the present application is shown.
Step 501: a primary sample value of the specified signal is acquired as a sampling value.
Therefore, the obtained sample value is directly used as a sampling value, the method is suitable for an environment with less high-frequency noise, and the signal filtering speed is high.
Step 502: the number of cyclic samples is increased by one.
Step 503: whether the number of cyclic sampling is higher than the set number of sampling is determined, if so, step 504 is executed, otherwise, step 501 is executed.
Step 504: and determining the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value as the signal change amplitude.
In this way, the signal filtering value obtained later can be more gently followed to the true value, and the follow-up speed is slower.
Step 505: judging whether the signal variation amplitude accords with the preset signal range, if so, executing step 506, otherwise, executing step 507.
Thus, if the signal variation amplitude exceeds the preset signal range, it is indicated that the signal may be abnormal, and further specific analysis should be performed.
Step 506: a signal filtering value is determined based on each sampling value and/or each historical signal filtering value.
Specifically, when step 506 is performed, the following manner may be adopted:
the first way is: and determining the mean value or the median value of each sampling value as a signal filtering value.
The second mode is as follows: and obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of each sampling value and each historical signal filtering value to obtain the signal filtering value.
Compared with the first mode, the second mode can be adopted to carry out smoothing processing on the signal filtering values, so that a signal curve drawn through each signal filtering value is smoother.
Step 507: and carrying out trend change analysis on each sampling value to obtain an analysis result.
Step 508: judging whether the analysis result represents the consistency of the variation trend, if so, executing step 509, otherwise, executing step 510.
In this way, if the analysis result represents the consistency of the variation trend, the fact that each sampling value is the preset special condition is indicated, otherwise, the fact that each sampling value acquired at this time is erroneous data is indicated.
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 the signal filtering value.
Step 510: and determining the last historical signal filtering value as a signal filtering value.
Thus, for the case of little or no high frequency interference, the step of collecting a plurality of sample values at a time to perform preliminary filtering is eliminated. Further, only whether the signal variation amplitude accords with a preset signal range or not and whether the analysis result represents variation trend consistency or not are judged, so that judgment logic is simplified, and signal processing efficiency is improved. However, if the change of the actual signal value is large, the following speed of the signal target value is slow, so that the method is suitable for application scenes with small change of the actual signal value.
Based on the same inventive concept, the embodiments of the present application further provide a device for filtering signals, and because the principle of solving the problems by using the device and the apparatus is similar to that of a method for filtering signals, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Fig. 6 is a schematic structural diagram of a device for filtering signals 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 specified signal;
a determining unit 61, 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 accords with a preset signal range, if yes, determine a signal filtering value according to each sampling value, where the signal filtering value represents a signal value after filtering the signal; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the previous 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 values are obtained in a periodically sampled or randomly sampled manner.
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, the last historical signal filtering value is obtained, and the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value is determined as the signal variation amplitude.
Preferably, the judging unit 62 is configured to:
the average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
Preferably, the judging unit 62 is configured to:
sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
Preferably, the judging unit 62 is configured to:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
Preferably, the judging unit 62 is configured to:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with the preset abnormal condition, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
In the method, the device, the equipment and the medium for filtering the signals provided by the embodiment of the application, sampling values of set sampling times of the specified signals are 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 after the signal is subjected to filtering treatment; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and the last historical signal filtering value. Thus, according to the variation amplitude of the signal and the difference of analysis results of trend variation analysis of each sampling value, different signal filtering modes are executed, so that accurate filtering of the signal is realized, and the accuracy of the signal filtering is improved.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or 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 control device is schematically shown.
The present embodiment provides a control device, which may include a processor 710 (Center Processing Unit, CPU), a memory 720, an input device 730, an output device 740, and the like, where 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 (Liquid Crystal Display, LCD), 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 the program for signal filtering in the embodiment of the present application.
Processor 710, by calling program instructions stored in memory 720, processor 710 is configured to execute according to the obtained program instructions:
Acquiring sampling values of set sampling times of a designated signal;
according to each acquired sampling value, determining a signal variation amplitude, 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 after the signal is subjected to filtering treatment;
otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a previous historical signal filtering value, wherein the previous historical signal filtering value is the signal filtering value obtained by the previous 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 values are obtained in a periodically sampled or randomly sampled manner.
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, the last historical signal filtering value is obtained, and the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value is determined as the signal variation amplitude.
Preferably, the processor 710 is configured to:
the average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
Preferably, the processor 710 is configured to:
sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
Preferably, the processor 710 is configured to:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the signal filtering value.
Preferably, the processor 710 is configured to:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
If the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with the preset abnormal condition, determining the last historical signal filtering value or 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 inconsistency of the variation trend, determining the last historical signal filtering value as the 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
It should be noted that, the control device in the embodiment of the present application may be a power system, or may be a terminal device, a server, or the like, which is not limited in this embodiment of the present application.
In an embodiment of the present application, there is also provided a computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for filtering a signal in any of the above-mentioned method embodiments.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 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. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (16)

1. A method of filtering a signal, comprising:
acquiring sampling values of set sampling times 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 after the signal is filtered;
otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a last historical signal filtering value, wherein the last historical signal filtering value is the signal filtering value obtained by the last signal filtering processing;
trend analysis is carried out on each sampling value, and the trend analysis comprises the following steps:
sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
2. The method of claim 1, wherein obtaining the sample value for the set number of samples of the specified signal comprises:
respectively determining a primary sampling value in the corresponding set sampling duration according to the sample value of the set acquisition times of the specified signal acquired in each set sampling duration;
wherein the sample values are obtained in a periodically sampled or randomly sampled manner.
3. The method of claim 1 wherein determining the magnitude of the signal change from each sample value comprises:
determining a maximum value and a minimum value in each sampling value, and determining a difference value between the maximum value and the minimum value as a signal variation amplitude;
or acquiring a last historical signal filtering value, and determining the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value as the signal variation amplitude.
4. The method of claim 1, wherein determining a signal filtered value from each sample value comprises:
The average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
5. The method of any of claims 1-4, wherein determining a signal filtered value based on the obtained analysis result and a last historical target signal value comprises:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as the signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the last historical signal filtering value as a signal filtering value.
6. The method according to any of claims 1-4, wherein determining a signal filtered value based on each sample value or a last historical target signal value based on the obtained analysis result comprises:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
If the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with a preset abnormal condition, determining a last historical signal filtering value or the sum of the last historical signal filtering value and a preset signal variation amount as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the last historical signal filtering value as a signal filtering value.
7. The method of claim 6, wherein determining that each sample value meets a preset 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
8. An apparatus for filtering a signal, comprising:
an acquisition unit for acquiring a sampling value of a set sampling number of a specified signal;
the determining unit is used for determining signal variation amplitude according to the acquired sampling values, wherein the signal variation amplitude represents the variation 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, determining a signal filtering value according to each sampling value, wherein the signal filtering value represents a signal value after the signal is subjected to filtering processing; otherwise, carrying out trend change analysis on each sampling value, and determining a signal filtering value according to the obtained analysis result and a last historical signal filtering value, wherein the last historical signal filtering value is the signal filtering value obtained by the last signal filtering processing;
the judging unit is used for:
sequencing all sampling values according to the sequence from big to small or from small to big, and counting the exchange times of every two 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 an analysis result for representing the inconsistency of the variation trend.
9. The apparatus of claim 8, wherein the acquisition unit is 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 specified signal acquired in each set sampling duration;
wherein the sample values are obtained in a periodically sampled or randomly sampled manner.
10. The apparatus of claim 8, wherein the determining unit is to:
determining a maximum value and a minimum value in each sampling value, and determining a difference value between the maximum value and the minimum value as a signal variation amplitude;
or acquiring a last historical signal filtering value, and determining the difference value between the mean value or the median value of each sampling value and the last historical signal filtering value as the signal variation amplitude.
11. The apparatus of claim 8, wherein the determination unit is configured to:
the average value or the median value of each sampling value is determined as a signal filtering value;
or, obtaining the historical signal filtering values with the set superposition quantity, and carrying out weighting treatment on the average value or the median value of the sampling values and the historical signal filtering values to obtain the signal filtering values.
12. The apparatus according to any one of claims 8-11, wherein the judging unit is configured to:
if the analysis result represents the consistency of the variation trend, determining the last historical signal filtering value or the sum of the last historical signal filtering value and the preset signal variation as the signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the last historical signal filtering value as a signal filtering value.
13. The apparatus according to any one of claims 8-11, wherein the judging unit is configured to:
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be in accordance with a preset abnormal condition, determining the mean value or the median value of each sampling value as a signal filtering value;
if the analysis result represents the consistency of the variation trend and each sampling value is determined to be not in accordance with a preset abnormal condition, determining a last historical signal filtering value or the sum of the last historical signal filtering value and a preset signal variation amount as a signal filtering value;
and if the analysis result represents the inconsistency of the variation trend, determining the last historical signal filtering value as a signal filtering value.
14. The apparatus of claim 13, wherein the determination 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 the preset difference threshold value, adding one to the obtained abnormal times;
if the updated abnormal times are higher than the preset abnormal times threshold value, determining that each sampling value accords with the preset abnormal conditions.
15. A control apparatus, characterized by comprising:
At least one memory for storing program instructions;
at least one processor for invoking program instructions stored in said memory and for performing the steps of the method according to any of the preceding claims 1-7 according to the obtained program instructions.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1-7.
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 CN111510109A (en) 2020-08-07
CN111510109B true 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)

Families Citing this family (2)

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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355230A (en) * 2011-07-05 2012-02-15 中兴通讯股份有限公司 Digital filtering apparatus and method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101168968B1 (en) * 2009-09-14 2012-07-26 순환엔지니어링 주식회사 Detecting and filtering method of random noise signal
CN101820299B (en) * 2010-02-09 2013-03-27 北京创毅视讯科技有限公司 Method and device for solving multipath interference and mobile multimedia broadcasting receiver
US9467113B2 (en) * 2012-08-30 2016-10-11 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
CN109843158A (en) * 2016-07-13 2019-06-04 悦享趋势科技(北京)有限责任公司 Judge the whether effective method and device of pulse wave

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355230A (en) * 2011-07-05 2012-02-15 中兴通讯股份有限公司 Digital filtering apparatus and method thereof

Also Published As

Publication number Publication date
CN111510109A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN105786860B (en) Data processing method and device in data modeling
CN106933992B (en) Distributed data purging system and method based on data analysis
CN109583594B (en) Deep learning training method, device, equipment and readable storage medium
CN111510109B (en) Signal filtering method, device, equipment and medium
CN109242099B (en) Training method and device of reinforcement learning network, training equipment and storage medium
CN111222553B (en) Training data processing method and device of machine learning model and computer equipment
CN108521547A (en) Image processing method, device and equipment
CN106909454B (en) Rule processing method and equipment
CN113743661A (en) Method, system, equipment and storage medium for predicting online capacity of lithium ion battery
CN117590142B (en) Switch cabinet fault diagnosis method and system based on deep learning
CN109472846A (en) The method for obtaining Bode diagram with MATLAB processing frequency sweep data
CN111507923B (en) Noise processing method, device, equipment and medium for video image
CN110968835A (en) Approximate quantile calculation method and device
CN115510998A (en) Transaction abnormal value detection method and device
CN113205215A (en) Knowledge-based battlefield situation prediction method
CN110413607B (en) Distributed counting method, server and system
CN113238911A (en) Alarm processing method and device
CN116671867B (en) Sleep quality evaluation method and system for underwater operators
CN111221821A (en) AI model iterative updating method, electronic equipment and storage medium
CN118100914B (en) Dual-frequency synthesizer control method and system based on artificial intelligence
CN115586485B (en) Signal step value extraction method and system, electronic equipment and storage medium
CN110580429B (en) Video background library management method, device and application thereof
CN110221202B (en) Current curve processing method and device for working current of circuit breaker
CN112406748B (en) Vehicle data acquisition method and device and vehicle diagnosis system
CN114706743B (en) Comprehensive evaluation method supporting real-time evaluation

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