[go: up one dir, main page]

CN114337665B - Sampling filtering method, device, equipment and computer readable storage medium - Google Patents

Sampling filtering method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114337665B
CN114337665B CN202111479580.3A CN202111479580A CN114337665B CN 114337665 B CN114337665 B CN 114337665B CN 202111479580 A CN202111479580 A CN 202111479580A CN 114337665 B CN114337665 B CN 114337665B
Authority
CN
China
Prior art keywords
filtering
sampling
signal
static
waveform signal
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
CN202111479580.3A
Other languages
Chinese (zh)
Other versions
CN114337665A (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.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Maxeye Smart Technologies 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 Maxeye Smart Technologies Co ltd filed Critical Maxeye Smart Technologies Co ltd
Priority to CN202111479580.3A priority Critical patent/CN114337665B/en
Publication of CN114337665A publication Critical patent/CN114337665A/en
Application granted granted Critical
Publication of CN114337665B publication Critical patent/CN114337665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

本发明公开了一种采样滤波方法、装置、设备及计算机可读存储介质,通过先对采样信号进行加权滤波处理,消除ADC采样过程中的毛刺噪声,一定程度上提高了采样所得信号的稳定性;通过对加权滤波所得的第一滤波信号进行动静特性分析,使得能够结合波形的动静特性有针对性地对第一滤波信号进行平均滤波以及施密特滤波,而针对性使用平均滤波能够在保证波形实时性的同时有效增加波形稳定度,消除小幅度抖动;最后根据波形的动静特征有针对性地对平均滤波所得的第二滤波信号进行施密特滤波,能够在保证波形稳定性的同时进一步彻底消除波形中的小幅度抖动,从而使得最终得到的ADC采样值既能具有稳定性也能具有实时性。

The present invention discloses a sampling filtering method, device, equipment and computer-readable storage medium. The method first performs weighted filtering on a sampling signal to eliminate burr noise in an ADC sampling process, thereby improving the stability of the sampled signal to a certain extent. The method performs dynamic and static characteristic analysis on a first filtered signal obtained by weighted filtering, thereby enabling the first filtered signal to be targetedly averaged and Schmidt filtered in combination with the dynamic and static characteristics of a waveform. The targeted use of average filtering can effectively increase the stability of the waveform while ensuring the real-time performance of the waveform, and eliminate small-amplitude jitters. Finally, the second filtered signal obtained by average filtering is targetedly Schmidt filtered according to the dynamic and static characteristics of the waveform, thereby enabling the small-amplitude jitters in the waveform to be further thoroughly eliminated while ensuring the stability of the waveform, so that the final ADC sampling value can have both stability and real-time performance.

Description

Sampling filtering method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of embedded technologies, and in particular, to a sampling filtering method, apparatus, device, and computer readable storage medium.
Background
In embedded development, ADC (Analog-to-digital converter) is a very common external device, and common applications include electrical quantity detection, temperature detection, and pressure detection. ADC sampling is easy to be interfered more, so that sampling inaccuracy is caused, such as inaccurate ADC clock, inaccurate reference voltage, drift of measured voltage and the like, and noise interference can be reduced by filtering through a software algorithm. However, the waveform signal obtained by sampling the ADC is filtered by the existing filtering algorithm, which often has difficulty in considering stability and instantaneity, the filtered waveform signal is smooth and stable but has waveform hysteresis, or the waveform instantaneity is strong but noise interference is obvious. That is, the above cases reflect that the conventional sampling method based on ADC is difficult to meet the practical requirement of the obtained sampling value for both stability and real-time performance.
Disclosure of Invention
The invention mainly aims to provide a sampling filtering method, a device, equipment and a computer readable storage medium, and aims to solve the technical problem that the existing sampling mode based on an ADC is difficult to meet the actual requirement of taking the stability and the instantaneity into consideration.
To achieve the above object, the present invention provides a sampling filtering method, including:
acquiring a sampling waveform signal acquired based on an analog-to-digital converter ADC, and performing weighted filtering processing on the sampling waveform signal to obtain a first filtering signal;
Analyzing the dynamic and static characteristics of the first filtering signal, and carrying out average filtering processing on the first filtering signal based on the dynamic and static characteristics to obtain a second filtering signal;
and performing schmitt filtering processing on the second filtering signal based on the dynamic and static characteristics to obtain a target filtering signal.
Optionally, the step of analyzing the dynamic-static characteristic of the first filtered signal includes:
judging whether the slope between adjacent sampling points in the first filtering signal exceeds a preset slope threshold value or not;
if yes, taking a waveform signal with a slope exceeding a preset slope threshold value corresponding to the sampling waveform signal as a dynamic waveform signal;
if not, the waveform signal with the slope which does not exceed the preset slope threshold value corresponding to the sampling waveform signal is taken as a static waveform signal.
Optionally, the first filtered signal comprises a dynamic waveform signal and a static waveform signal,
The step of performing average filtering processing on the first filtering signal based on the dynamic and static characteristics to obtain a second filtering signal includes:
filtering the static waveform signal in the first filtering signal by using an average filtering algorithm to obtain a static average filtering result;
and combining the static average filtering result with the dynamic waveform signal to obtain the second filtering signal.
Optionally, the step of performing schmitt filtering processing on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal includes:
filtering the static average filtering result by using a Schmitt filtering algorithm to obtain a static Schmitt filtering result;
and combining the schmitt filtering result and the dynamic waveform signal to obtain the target filtering signal.
Optionally, the step of performing weighted filtering processing on the sampled waveform signal to obtain a first filtered signal includes:
and obtaining a weighted filtering result of the sampling waveform signal according to a preset weighted filtering formula, and taking the filtering result as the first filtering signal.
Optionally, before the step of acquiring the sampled waveform signal acquired by the analog-to-digital converter ADC, the method further includes:
receiving a scene selection instruction, and determining a target acquisition scene based on the scene selection instruction;
and selecting a target weight ratio matched with the target acquisition scene from a pre-stored weight ratio set so as to apply the target weight ratio to the weighted filtering formula.
Optionally, after the step of performing schmitt filtering processing on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal, the method further includes:
And outputting and displaying the sampled waveform signals, the first filtering signals, the second filtering signals and the target filtering signals in a correlated way.
In addition, to achieve the above object, the present invention also provides a sampling filter device, including:
the weighting filter processing module is used for acquiring the sampling waveform signals acquired based on the analog-to-digital converter ADC, and performing weighting filter processing on the sampling waveform signals to obtain first filter signals;
The dynamic and static characteristic analysis module is used for analyzing the dynamic and static characteristics of the first filtering signal, and carrying out average filtering processing on the first filtering signal based on the dynamic and static characteristics to obtain a second filtering signal;
And the target signal acquisition module is used for carrying out Schmitt filtering processing on the second filtering signal based on the dynamic and static characteristics to obtain a target filtering signal.
In addition, in order to achieve the above object, the present invention also provides a sampling filtering apparatus comprising a memory, a processor, and a sampling filtering program stored on the memory and executable on the processor, the sampling filtering program implementing the steps of the sampling filtering method as described above when executed by the processor.
In addition, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a sampling filter program which, when executed by a processor, implements the steps of the sampling filter method as described above.
Furthermore, to achieve the above object, the present invention provides a computer program product comprising a computer program which, when being executed by a processor, implements the steps of the sampling filtering method as described above.
The invention eliminates the burr noise in the ADC sampling process by carrying out weighted filtering treatment on the sampling signal, improves the stability of the signal obtained by sampling to a certain extent, carries out dynamic and static characteristic analysis on the first filtering signal obtained by weighted filtering, can carry out average filtering and Schmitt filtering on the first filtering signal in a targeted manner by combining the dynamic and static characteristics of the waveform, can effectively increase the stability of the waveform and eliminate small amplitude jitter while ensuring the instantaneity of the waveform by using the average filtering in a targeted manner, and finally carries out Schmitt filtering on the second filtering signal obtained by the average filtering in a targeted manner according to the dynamic and static characteristics of the waveform, thereby further thoroughly eliminating the small amplitude jitter in the waveform while ensuring the stability of the waveform, and further ensuring that the finally obtained ADC sampling value has the stability and instantaneity of the sampling value which is difficult to meet the obtained sampling value based on the sampling mode of the ADC.
Drawings
FIG. 1 is a schematic diagram of a device architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of the sampling filtering method of the present invention;
FIG. 3 is a diagram showing the dynamic characteristics of waveforms in a first embodiment of a sampling filtering method according to the present invention;
FIG. 4 is a schematic diagram showing static characteristics of waveforms according to a first embodiment of the sampling filtering method of the present invention;
FIG. 5 is an average filtering diagram of a second embodiment of the sampling filtering method according to the present invention;
FIG. 6 is another average filtering diagram of a second embodiment of the sampling filtering method of the present invention;
FIG. 7 is a schematic diagram of a Schmitt filtering method according to a second embodiment of the present invention;
fig. 8 is a schematic diagram of functional modules of a sampling filter device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In embedded development, ADC (Analog-to-digital converter) is a very common external device, and common applications include electrical quantity detection, temperature detection, and pressure detection. ADC sampling is easy to be interfered more, so that sampling inaccuracy is caused, such as inaccurate ADC clock, inaccurate reference voltage, drift of measured voltage and the like, and noise interference can be reduced by filtering through a software algorithm. However, the waveform signal obtained by sampling the ADC is filtered by the existing filtering algorithm, which often has difficulty in considering stability and instantaneity, the filtered waveform signal is smooth and stable but has waveform hysteresis, or the waveform instantaneity is strong but noise interference is obvious. That is, the above cases reflect that the conventional sampling method based on ADC is difficult to meet the practical requirement of the obtained sampling value for both stability and real-time performance.
In order to solve the problems, the invention provides a sampling filtering method, namely, the stability of signals obtained by sampling is improved to a certain extent by firstly carrying out weighted filtering treatment on sampling signals, the stability of signals obtained by sampling is improved to a certain extent, the first filtering signals obtained by weighted filtering are subjected to dynamic and static characteristic analysis, so that the first filtering signals can be subjected to targeted average filtering and Schmitt filtering in combination with the dynamic and static characteristics of waveforms, the waveform stability can be effectively increased and small amplitude jitter can be eliminated while the instantaneity of the waveforms is ensured by targeted average filtering, and finally, the second filtering signals obtained by targeted Schmitt filtering is carried out according to the dynamic and static characteristics of the waveforms, so that the small amplitude jitter in the waveforms can be further thoroughly eliminated while the stability of the waveform is ensured, and the technical problems that the obtained sampling values of the ADC can not only have stability but also have instantaneity, and the existing sampling mode based on the ADC is difficult to meet the requirements of the stability and instantaneity of the obtained sampling values are solved.
Referring to fig. 1, fig. 1 is a schematic device structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the sampling filter device may include a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, a memory 1005, and a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the device structure shown in fig. 1 is not limiting of the device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a sampling filter program may be included in a memory 1005, which is a type of computer storage medium.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server, the user interface 1003 is mainly used for connecting to a client (programmer side) and performing data communication with the client, and the processor 1001 may be used for calling a sampling filter program stored in the memory 1005 and performing operations in a sampling filter method described below.
Based on the hardware structure, the embodiment of the sampling filtering method is provided.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a sampling filtering method according to the present invention. The sampling filtering method comprises the following steps:
Step S10, acquiring a sampling waveform signal acquired based on an analog-to-digital converter ADC, and performing weighted filtering processing on the sampling waveform signal to obtain a first filtering signal;
In this embodiment, the present invention is applied to terminal devices that inscribe or circumscribe ADCs. For an analog-to-digital converter ADC, a circuit that converts an analog signal into a digital signal is called an analog-to-digital converter (a/D converter or ADC Analog to Digital Converter for short), and the a/D conversion functions to convert an analog signal that is continuous in time and continuous in amplitude into a digital signal that is discrete in time and also discrete in amplitude. In the actual sampling process, the ADC sampling is easy to be interfered by inaccurate ADC clock, inaccurate reference voltage, drift of the measured voltage and the like, so that the sampling is inaccurate, and the noise interference can be reduced by filtering through a software algorithm. The sampling waveform signal refers to an analog waveform signal acquired by the ADC, and the specific acquisition mode may be real-time acquisition, or unified acquisition after the ADC acquires for a period of time, or the like. The weighted filtering process refers to processing the sampled waveform signal using a weighted filtering algorithm. The principle of the weighted filtering algorithm is to assign corresponding weights to a plurality of historical sampling values and current sampling values respectively, and the filtering result is the weighted summation result of the historical sampling values and the current sampling values. The first filtered signal refers to a result obtained by subjecting the sampled filtered signal to a weighted filtering process.
Specifically, after the ADC collects the original sampled waveform signal, the ADC may transmit the signal to the terminal, and the terminal needs to perform the spur noise cancellation on the signal. The terminal filters the received sampled waveform signals by using a weighted filtering algorithm, and takes the waveform signals obtained after the filtering as first waveform signals.
Step S20, analyzing the dynamic and static characteristics of the first filtering signal, and carrying out average filtering processing on the first filtering signal based on the dynamic and static characteristics to obtain a second filtering signal;
In this embodiment, the dynamic and static characteristics refer to dynamic characteristics and static characteristics exhibited by the waveform, the dynamic characteristics refer to characteristics exhibited by the sampled waveform when the sampled object changes greatly (for example, the detected pressure increases instantaneously, as shown in fig. 3, the horizontal axis is sampling time, and the vertical axis is amplitude, when the pressure increases instantaneously, the sampling value changes to generate obvious burr noise, in order to prevent interference with the running result of the program, the burr must be weakened or even eliminated, so the burr noise can be eliminated first by adopting the weighting filtering described above), the static characteristic refers to a characteristic that a sampling waveform shows when a sampling object changes less or even does not change (the pressure is easy to be detected and kept unchanged, as shown in fig. 4, although a sampling value is theoretically a constant straight line when the collected object does not change, the actual sampling value also has fluctuation, in order to prevent interference with the running result of a program, the static sampling value must be made to be more stable, and thus, dynamic and static changes can be accurately distinguished, and the accuracy of identifying the dynamic changes can be improved). The average filtering process refers to processing the first filtered signal using an average filtering algorithm. The filtering data can reach the wave crest and the wave trough only slowly due to the characteristic of the mean value filtering, and the gradient (ascending gradient or descending gradient) can be more gentle than the actual gradient. It is a point that the waveform can become significantly stable in the static situation, so in order to use the static characteristics of the average filtering, and at the same time, it is also necessary to ensure the real-time response in the dynamic situation, it is necessary to selectively use the average filtering, that is, not to average the waveform when it changes dynamically, and to average the waveform in the static situation to adjust in real time according to the dynamic and static states. The second filtering signal refers to a result obtained by performing targeted average filtering processing on the first filtering signal according to the dynamic and static characteristics of the waveform.
Specifically, after the terminal processes the first filtered signal, the terminal continues to judge whether the first filtered signal presents static characteristics or dynamic characteristics, selectively filters a part of the static characteristics by using an average filtering algorithm, and takes the filtered signal as a second filtered signal.
And step S30, performing Schmitt filtering processing on the second filtering signal based on the dynamic and static characteristics to obtain a target filtering signal.
In this embodiment, the waveform stability of the second filtered signal obtained after passing through the average filter is greatly improved in the static state, but may still fluctuate in a small amplitude. In order to eliminate these small amplitude high frequency jitters in the morning, a schmitt filter algorithm may be used for processing. Schmitt filter processing refers to processing the second filtered signal using a schmitt filter algorithm, which is a schmitt-kalman filter algorithm. In order not to affect the dynamics, the algorithm still works only in the static state. The target filtered signal refers to a final result obtained by performing targeted schmitt filtering processing on the second filtered signal by using the dynamic and static characteristics.
Specifically, the terminal filters the static part of the second filtering signal by using a schmitt-kalman filtering algorithm according to the judging result of the dynamic and static characteristics, and finally, the second filtering signal can be filtered into a final target filtering signal. After the target filtered signal is obtained, the terminal can transmit the target filtered signal into the ADC so that the ADC can convert the target filtered signal into a digital signal, and therefore accuracy and stability of the obtained digital signal are ensured.
The embodiment provides a sampling filtering method, which comprises the steps of firstly carrying out weighted filtering treatment on a sampling signal, eliminating burr noise in the ADC sampling process, improving the stability of a signal obtained by sampling to a certain extent, carrying out dynamic and static characteristic analysis on a first filtering signal obtained by weighted filtering, carrying out targeted average filtering and Schmitt filtering on the first filtering signal by combining the dynamic and static characteristics of a waveform, and using the targeted average filtering to effectively increase the stability of the waveform and eliminate small amplitude jitter while guaranteeing the instantaneity of the waveform, and finally carrying out targeted Schmitt filtering on a second filtering signal obtained by the targeted average filtering according to the dynamic and static characteristics of the waveform, thereby further thoroughly eliminating the small amplitude jitter in the waveform while guaranteeing the stability of the waveform, so that the finally obtained ADC sampling value has the stability and the instantaneity, and solving the technical problem that the existing sampling mode based on the ADC is difficult to meet the requirements of the obtained sampling value on the stability and the instantaneity.
Further, based on the first embodiment shown in fig. 2, a second embodiment of the sampling filtering method of the present invention is proposed. In this embodiment, the step of analyzing the dynamic and static characteristics of the first filtered signal in step S20 includes:
step S21, judging whether the slope between adjacent sampling points in the first filtering signal exceeds a preset slope threshold value;
Step S22, if yes, the waveform signal with the slope exceeding the preset slope threshold value corresponding to the sampling waveform signal is used as a dynamic waveform signal;
Step S23, if not, the waveform signal with the slope which does not exceed the preset slope threshold value corresponding to the sampling waveform signal is taken as a static waveform signal.
In this embodiment, the mode of determining the dynamic-static change of the waveform is to determine the slope of the curve change. (in the implementation process, the difference between the last two samples can be judged to be greater than a certain threshold).
The preset slope threshold value can be flexibly set according to actual application scenes, applicable threshold values of different application scenes can be greatly different, the embodiment is not limited in particular, the applicable threshold values of each scene can be preset on the terminal by related personnel, the applicable threshold values are associated with the scenes one by one, then the corresponding scenes are selected before filtering, and the terminal can apply the threshold values associated with the scenes to a subsequent filtering process.
Specifically, the terminal judges whether the slope between two adjacent sampling points in the first filtering signal is larger than a preset slope threshold one by one, if the slope between the two sampling points is larger than the preset slope threshold, the waveform part corresponding to the two points is a dynamic waveform part, and if the slope between the two sampling points is smaller than or equal to the preset slope threshold, the waveform part corresponding to the two points is a static waveform part. In an actual sampling process, the sampled waveform typically includes both dynamic and static portions, although it is possible to include only dynamic or static portions.
Further, the first filtered signal includes a dynamic waveform signal and a static waveform signal, and the step of performing an average filtering process on the first filtered signal based on the dynamic and static characteristics in step S20 to obtain a second filtered signal includes:
Step S24, filtering the static waveform signals in the first filtering signals by using an average filtering algorithm to obtain a static average filtering result;
step S25, combining the static average filtering result with the dynamic waveform signal to obtain the second filtered signal.
In this embodiment, as shown in fig. 5, the terminal uses the average filtering algorithm, and does not perform average filtering at the point where the gradient (slope) of the waveform is greater than the threshold value, so that the real-time performance of the waveform is not affected. However, at a gentle slope (a region outlined by a square frame in the figure), the waveform is further slowed down by the average filtering, and the moderated influence is controllable. As shown in fig. 6, it can be seen that using average filtering in the quiescent state effectively increases the stability of this waveform, eliminating small amplitude jitter that should not occur in the quiescent state.
Further, step S30 includes:
Step S31, filtering the static average filtering result by using a Schmitt filtering algorithm to obtain a static Schmitt filtering result;
And step S32, combining the Schmitt filtering result and the dynamic waveform signal to obtain the target filtering signal.
In this embodiment, schmitt filtering aims to eliminate random noise in a static state, and the characteristics of random noise (small amplitude and short stability duration) are utilized to eliminate the random noise. The algorithm principle is that the real-time sampling value is compared with a reference value under static state, if the change is smaller than a certain amplitude (the amplitude is larger than the maximum amplitude of static random noise), the random noise is considered, the reference value is not updated, and if the change exceeds the amplitude, the reference value is updated. If the change is less than the amplitude but the duration is less than a threshold time (which is greater than the stationary duration of the static random noise) then the random noise is considered and the reference is not updated, and if the threshold time is exceeded then the reference value is updated. Finally, the terminal combines the static waveform part subjected to schmitt filtering with the original dynamic waveform part to obtain a target filtering signal.
As shown in fig. 7, the waveform with frequent small-amplitude jitter is the second filtered signal, and the waveform has less fluctuation and is the target filtered signal more stably. Using schmitt filtering in the static state, the stability of the waveform has become very stable, almost completely eliminating small amplitude jitter.
Further, based on the above second embodiment, a third embodiment of the sampling filtering method of the present invention is proposed. In this embodiment, the step of performing weighted filtering processing on the sampled waveform signal in step S10 to obtain a first filtered signal includes:
Step S11, obtaining a weighted filtering result of the sampling waveform signal according to a preset weighted filtering formula, and taking the filtering result as the first filtering signal.
In this embodiment, the algorithm principle of the weighted filtering is as follows:
Q(n)=a0P(n)+a1P(n-1)+a2P(n-2)+a3P(n-3)
Wherein Q (n) represents a filtering result, a 1-3 represents a constant coefficient (representing percentage, the sum of which is 1), meaning that the weight of the last four sampling values is a duty ratio, the weight is more favorable in real-time performance when being more biased to new data, and the stability of the more biased historical data is better;
the terminal may take a predetermined set of constant coefficients (e.g., 0.7,0.15,0.1,0.05) into the equation to perform a weighted filtering process on the sampled waveform signal to obtain a first filtered signal.
Further, before step S10, the method further includes:
Step S01, receiving a scene selection instruction, and determining a target acquisition scene based on the scene selection instruction;
Step S02, selecting a target weight ratio matched with the target acquisition scene from a pre-stored weight ratio set so as to apply the target weight ratio to the weighted filtering formula.
In this embodiment, since the constant coefficient ratios applicable to different scenes may have large differences, a tester may preset the constant coefficient ratio to be used on the terminal, then select the current scene on the terminal before performing the filtering operation, and after receiving the scene selection instruction, the terminal may call a set of constant parameter configuration associated with the scene according to the scene selected by the tester, as the target weight ratio, and bring the constant parameter configuration into the weighted filtering formula, so as to perform weighted filtering on the sampling signal acquired in real time, thereby increasing the convenience of the filtering operation. It should be noted that the weight ratio pre-stored on the terminal is adjustable.
Further, after step S30, the method further includes:
And step S40, the sampled waveform signals, the first filtering signals, the second filtering signals and the target filtering signals are output and displayed in a correlated mode.
In this embodiment, after the terminal generates the target filtered signal, the terminal may output only the target filtered signal, or may output the sampled waveform signal, the first filtered signal, the second filtered signal, and the target filtered signal in association with each other. The display effect can be set to be that different waveform signals are output in different colors and/or different forms (such as solid line dashed lines), waveform signal names are displayed in areas near different waveform signals, and the like, and the display effect can be flexibly set according to actual requirements.
As shown in fig. 8, the present invention further provides a sampling filter device, including:
The weighted filtering processing module 10 is configured to obtain a sampled waveform signal acquired based on the analog-to-digital converter ADC, and perform weighted filtering processing on the sampled waveform signal to obtain a first filtered signal;
The dynamic and static characteristic analysis module 20 is configured to analyze dynamic and static characteristics of the first filtered signal, and perform average filtering processing on the first filtered signal based on the dynamic and static characteristics to obtain a second filtered signal;
And the target signal acquisition module 30 is configured to perform schmitt filtering processing on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal.
Optionally, the dynamic and static characteristic analysis module 20 includes:
the sampling slope judging unit is used for judging whether the slope between adjacent sampling points in the first filtering signal exceeds a preset slope threshold value or not;
the dynamic waveform determining unit is used for taking a waveform signal with a slope exceeding a preset slope threshold value corresponding to the sampling waveform signal as a dynamic waveform signal if the dynamic waveform determining unit is used for determining the waveform signal;
and the static waveform determining unit is used for taking a waveform signal with a slope which does not exceed a preset slope threshold value corresponding to the sampling waveform signal as a static waveform signal if the static waveform signal does not exceed the preset slope threshold value.
Optionally, the first filtered signal includes a dynamic waveform signal and a static waveform signal, and the dynamic-static characteristic analysis module 20 includes:
The static average filtering unit is used for filtering the static waveform signals in the first filtering signals by using an average filtering algorithm to obtain a static average filtering result;
And the second signal acquisition unit is used for combining the static average filtering result and the dynamic waveform signal to obtain the second filtering signal.
Optionally, the target signal acquisition module 30 includes:
The static Schmitt filtering unit is used for filtering the static average filtering result by using a Schmitt filtering algorithm to obtain a static Schmitt filtering result;
And the target signal acquisition unit is used for combining the schmitt filtering result and the dynamic waveform signal to obtain the target filtering signal.
Optionally, the weighted filter processing module 10 includes:
And the first signal acquisition unit is used for obtaining a weighted filtering result of the sampling waveform signal according to a preset weighted filtering formula, and taking the filtering result as the first filtering signal.
Optionally, the sampling filtering device further includes:
The acquisition scene determining module is used for receiving a scene selection instruction and determining a target acquisition scene based on the scene selection instruction;
And the target proportion application module is used for selecting a target weight proportion matched with the target acquisition scene from a pre-stored weight proportion set so as to apply the target weight proportion to the weighted filtering formula.
Optionally, the sampling filtering device further includes:
and the signal waveform correlation display module is used for outputting and displaying the sampled waveform signals, the first filtering signals, the second filtering signals and the target filtering signals in a correlated way.
The invention also provides sampling filtering equipment.
The sampling filtering device comprises a processor, a memory and a sampling filtering program stored on the memory and capable of running on the processor, wherein the sampling filtering program realizes the steps of the sampling filtering method when being executed by the processor.
The method implemented when the sampling filtering program is executed may refer to various embodiments of the sampling filtering method of the present invention, which are not described herein.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention has stored thereon a sampling filter program which, when executed by a processor, implements the steps of the sampling filter method as described above.
The method implemented when the sampling filtering program is executed may refer to various embodiments of the sampling filtering method of the present invention, which are not described herein again.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a sampling filtering method as described above.
The method implemented when the computer program is executed may refer to various embodiments of the sampling filtering method of the present invention, which are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1.一种采样滤波方法,其特征在于,所述采样滤波方法包括:1. A sampling filtering method, characterized in that the sampling filtering method comprises: 获取基于模数转换器ADC所采集的采样波形信号,对所述采样波形信号进行加权滤波处理,得到第一滤波信号;Acquire a sampling waveform signal collected by an analog-to-digital converter ADC, and perform weighted filtering on the sampling waveform signal to obtain a first filtered signal; 判断所述第一滤波信号中相邻采样点之间的斜率是否超出预设斜率阈值;Determining whether a slope between adjacent sampling points in the first filtered signal exceeds a preset slope threshold; 若是,则将超出预设斜率阈值的斜率对应在所述采样波形信号中的波形信号作为动态波形信号;If so, taking the waveform signal in the sampled waveform signal corresponding to the slope exceeding the preset slope threshold as the dynamic waveform signal; 若否,则将未超出预设斜率阈值的斜率对应在所述采样波形信号中的波形信号作为静态波形信号;If not, taking the waveform signal in the sampled waveform signal corresponding to the slope that does not exceed the preset slope threshold as the static waveform signal; 使用平均滤波算法针对所述第一滤波信号中的静态波形信号进行滤波,得到静态平均滤波结果;Using an average filtering algorithm to filter the static waveform signal in the first filtering signal to obtain a static average filtering result; 结合所述静态平均滤波结果与所述动态波形信号得到第二滤波信号;Combining the static average filtering result with the dynamic waveform signal to obtain a second filtering signal; 使用施密特-卡尔曼滤波算法,对所述静态平均滤波结果进行滤波,得到静态施密特-卡尔曼滤波结果;Using a Schmidt-Kalman filter algorithm, filtering the static average filtering result to obtain a static Schmidt-Kalman filter result; 结合所述静态施密特-卡尔曼滤波结果和所述动态波形信号得到目标滤波信号。The target filtering signal is obtained by combining the static Schmidt-Kalman filtering result and the dynamic waveform signal. 2.如权利要求1所述的采样滤波方法,其特征在于,所述对所述采样波形信号进行加权滤波处理,得到第一滤波信号的步骤包括:2. The sampling and filtering method according to claim 1, wherein the step of performing weighted filtering on the sampled waveform signal to obtain the first filtered signal comprises: 按照预设的加权滤波算式得到所述采样波形信号的加权滤波结果,将所述滤波结果作为所述第一滤波信号。A weighted filtering result of the sampled waveform signal is obtained according to a preset weighted filtering formula, and the filtering result is used as the first filtered signal. 3.如权利要求2所述的采样滤波方法,其特征在于,所述获取基于模数转换器ADC所采集的采样波形信号的步骤之前,还包括:3. The sampling and filtering method according to claim 2, characterized in that before the step of acquiring the sampling waveform signal collected by the analog-to-digital converter ADC, it also includes: 接收场景选择指令,基于所述场景选择指令确定目标采集场景;receiving a scene selection instruction, and determining a target acquisition scene based on the scene selection instruction; 从预存的权重配比集合中选择与所述目标采集场景匹配的目标权重配比,以将所述目标权重配比应用于所述加权滤波算式。A target weight ratio matching the target acquisition scene is selected from a pre-stored weight ratio set to apply the target weight ratio to the weighted filtering formula. 4.如权利要求1-3任一项所述的采样滤波方法,其特征在于,所述基于动静特性对所述第二滤波信号进行施密特滤波处理,得到目标滤波信号的步骤之后,还包括:4. The sampling filtering method according to any one of claims 1 to 3, characterized in that after the step of performing Schmidt filtering on the second filtered signal based on the dynamic and static characteristics to obtain the target filtered signal, the method further comprises: 将所述采样波形信号、第一滤波信号、第二滤波信号和目标滤波信号关联输出显示。The sampled waveform signal, the first filtered signal, the second filtered signal and the target filtered signal are associated and output for display. 5.一种采样滤波装置,其特征在于,所述采样滤波装置包括:5. A sampling and filtering device, characterized in that the sampling and filtering device comprises: 加权滤波处理模块,用于获取基于模数转换器ADC所采集的采样波形信号,并对所述采样波形信号进行加权滤波处理,得到第一滤波信号;A weighted filtering processing module is used to obtain a sampling waveform signal collected by an analog-to-digital converter ADC, and perform weighted filtering on the sampling waveform signal to obtain a first filtered signal; 动静特性分析模块,用于判断所述第一滤波信号中相邻采样点之间的斜率是否超出预设斜率阈值;若是,则将超出预设斜率阈值的斜率对应在所述采样波形信号中的波形信号作为动态波形信号;若否,则将未超出预设斜率阈值的斜率对应在所述采样波形信号中的波形信号作为静态波形信号;使用平均滤波算法针对所述第一滤波信号中的静态波形信号进行滤波,得到静态平均滤波结果;结合所述静态平均滤波结果与所述动态波形信号得到第二滤波信号;A dynamic and static characteristic analysis module, used to determine whether the slope between adjacent sampling points in the first filtered signal exceeds a preset slope threshold; if so, the waveform signal in the sampled waveform signal corresponding to the slope exceeding the preset slope threshold is used as a dynamic waveform signal; if not, the waveform signal in the sampled waveform signal corresponding to the slope not exceeding the preset slope threshold is used as a static waveform signal; use an average filtering algorithm to filter the static waveform signal in the first filtered signal to obtain a static average filtering result; combine the static average filtering result with the dynamic waveform signal to obtain a second filtered signal; 目标信号获取模块,用于使用施密特-卡尔曼滤波算法,对所述静态平均滤波结果进行滤波,得到静态施密特-卡尔曼滤波结果;结合所述静态施密特-卡尔曼滤波结果和所述动态波形信号得到所述目标滤波信号。The target signal acquisition module is used to filter the static average filtering result using the Schmidt-Kalman filtering algorithm to obtain a static Schmidt-Kalman filtering result; and to obtain the target filtering signal by combining the static Schmidt-Kalman filtering result and the dynamic waveform signal. 6.一种采样滤波设备,其特征在于,所述采样滤波设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的采样滤波程序,所述采样滤波程序被所述处理器执行时实现如权利要求1至4中任一项所述的采样滤波方法的步骤。6. A sampling filtering device, characterized in that the sampling filtering device comprises: a memory, a processor, and a sampling filtering program stored in the memory and executable on the processor, wherein the sampling filtering program implements the steps of the sampling filtering method according to any one of claims 1 to 4 when executed by the processor. 7.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有采样滤波程序,所述采样滤波程序被处理器执行时实现如权利要求1至4中任一项所述的采样滤波方法的步骤。7. A computer-readable storage medium, characterized in that a sampling filtering program is stored on the computer-readable storage medium, and when the sampling filtering program is executed by a processor, the steps of the sampling filtering method according to any one of claims 1 to 4 are implemented.
CN202111479580.3A 2021-12-06 2021-12-06 Sampling filtering method, device, equipment and computer readable storage medium Active CN114337665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111479580.3A CN114337665B (en) 2021-12-06 2021-12-06 Sampling filtering method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111479580.3A CN114337665B (en) 2021-12-06 2021-12-06 Sampling filtering method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114337665A CN114337665A (en) 2022-04-12
CN114337665B true CN114337665B (en) 2025-03-14

Family

ID=81049051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111479580.3A Active CN114337665B (en) 2021-12-06 2021-12-06 Sampling filtering method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114337665B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116137532B (en) * 2023-02-06 2023-09-08 广芯微电子(广州)股份有限公司 Method, device, equipment and medium for improving sampling value precision of analog-to-digital converter

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334710A (en) * 2018-02-11 2018-07-27 上海长望气象科技股份有限公司 Computational methods, device and the terminal of gravity wave parameter
CN111510109A (en) * 2019-01-30 2020-08-07 维谛技术有限公司 Signal filtering method, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5853364A (en) * 1995-08-07 1998-12-29 Nellcor Puritan Bennett, Inc. Method and apparatus for estimating physiological parameters using model-based adaptive filtering
JP4617497B2 (en) * 2005-07-01 2011-01-26 株式会社国際電気通信基礎技術研究所 Noise suppression device, computer program, and speech recognition system
WO2020029031A1 (en) * 2018-08-06 2020-02-13 高维度(深圳)生物信息智能应用有限公司 Signal processing method and system, and computer storage medium
US12188964B2 (en) * 2019-10-04 2025-01-07 International Business Machines Corporation Spur detection in a sampled waveform in a mixed analog/digital system using the magnitude of the frequency response

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334710A (en) * 2018-02-11 2018-07-27 上海长望气象科技股份有限公司 Computational methods, device and the terminal of gravity wave parameter
CN111510109A (en) * 2019-01-30 2020-08-07 维谛技术有限公司 Signal filtering method, device, equipment and medium

Also Published As

Publication number Publication date
CN114337665A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
JP4845441B2 (en) Real-time power mask trigger generator
EP2418497B1 (en) Time-domain measurements in a test and measurement instrument
CN106405235A (en) Spectrum analyzer and data processing method thereof
CN114337665B (en) Sampling filtering method, device, equipment and computer readable storage medium
JP2014087071A (en) Integrated calibration device and run time calibration method
US20140103980A1 (en) Method and Apparatus for Reducing the Contribution of Noise to Digitally Sampled Signals
US9140730B2 (en) Signal analysis apparatus and signal analysis method
JP4090989B2 (en) Jitter measuring apparatus and jitter measuring method
JPWO2005119943A1 (en) Optical signal quality monitoring circuit and optical signal quality monitoring method
CN107483053A (en) Realize the method, apparatus and computer-readable recording medium of high-resolution sampling
JP6545221B2 (en) Spectrum analyzer and signal analysis method
US8396227B2 (en) Method of determining the harmonic and anharmonic portions of a response signal of a device
Kuhlmann et al. Effects of sampling rate and ADC width on the accuracy of amplitude and phase measurements in power-quality monitoring
De Vito et al. A compressive sampling-based method for classification and parameter estimation of FSK signals
Alekseev et al. Choosing sample frequency for accurate local signal detection using wavelet transform
KR100417114B1 (en) Apparatus and method to measure high frequency power
KR101828918B1 (en) Method for analyzing spectrum adaptively and apparatus thereof
CN111988097A (en) Method and device for detecting signal quality of PPG signal and computer readable storage medium
CN114650203B (en) Single-frequency amplitude noise suppression measurement method
Sovili FPGA based model of processing EEG signal
Sovilj et al. Influence of signal stationarity on digital stochastic measurement implementation
Sovilj et al. Metrological verification of FPGA based device for measuring EEG signal
US20140044266A1 (en) Real-time noise reduction apparatus for radio monitoring system
JP5071342B2 (en) Signal processing device, signal processing method, and current measurement device
EP2651034B1 (en) Method for determining a trigger level

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
CP03 Change of name, title or address

Address after: 518000 2101, building 3, Chongwen Park, Nanshan Zhiyuan, No. 3370 Liuxian Avenue, Fuguang community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong

Patentee after: Shenzhen Qianfenyi Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 2101, Building 3, Chongwen Park, Nanshan Zhiyuan, No. 3370 Liuxian Avenue, Fuguang Community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province

Patentee before: MAXEYE SMART TECHNOLOGIES Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address