Sampling filtering method, device, equipment and computer readable storage medium
By weighted filtering, dynamic and static characteristic analysis and multiple filtering processing of the sampling waveform signal collected by the ADC, the problem that the ADC-based sampling method is difficult to take into account stability and real-time, and the sampling value with high stability and high real-time is achieved.
Patent Information
- Application Number
- CN202111479580.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-12-06
AI Technical Summary
The existing ADC-based sampling methods are difficult to take into account the stability and real-time nature of the sampling value. They are often either smooth and stable but have waveform lag, or have strong real-time properties but obvious noise interference.
By weighted filtering the sampled waveform signal collected by the ADC, its dynamic and static characteristics are analyzed, and combined with these characteristics, average filtering and Schmitt filtering are performed to finally obtain the target filtering signal.
It realizes the problem that the waveform stability is not only stable but also real-time, but also solves the problem that the prior art is difficult to take into account both stability and real-time.
Smart Images

Figure CN114337665B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of embedded technology, and in particular to a sampling filtering method, device, equipment and a computer-readable storage medium. Background Art
[0002] In embedded development, ADC (Analog-to-digital converter) is a very commonly used external device, and common applications include power detection, temperature detection, and pressure detection. ADC sampling is susceptible to many interferences, resulting in inaccurate sampling, such as inaccurate ADC clock, inaccurate reference voltage, drift of the measured voltage, etc. At this time, software algorithm filtering can be used to reduce noise interference. However, filtering the waveform signal obtained by ADC sampling through the existing filtering algorithm is often difficult to balance stability and real-time performance. The filtered waveform signal is either smooth and stable but has waveform lag, or the waveform is highly real-time but has obvious noise interference. That is, the above situations reflect that the existing ADC-based sampling method is difficult to meet the actual needs of balancing stability and real-time performance of the obtained sampling value. Summary of the invention
[0003] The main purpose of the present invention is to propose a sampling filtering method, device, equipment and computer-readable storage medium, aiming to solve the technical problem that the existing ADC-based sampling method is difficult to meet the actual requirements of both stability and real-time performance of the obtained sampling values.
[0004] To achieve the above object, the present invention provides a sampling filtering method, the sampling filtering method comprising:
[0005] 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;
[0006] Analyzing the dynamic and static characteristics of the first filtered signal, and performing average filtering processing on the first filtered signal based on the dynamic and static characteristics to obtain a second filtered signal;
[0007] The second filtered signal is subjected to Schmidt filtering based on the dynamic and static characteristics to obtain a target filtered signal.
[0008] Optionally, the step of analyzing the dynamic and static characteristics of the first filtered signal includes:
[0009] Determining whether a slope between adjacent sampling points in the first filtered signal exceeds a preset slope threshold;
[0010] 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;
[0011] If not, the waveform signal in the sampled waveform signal corresponding to the slope that does not exceed the preset slope threshold is used as a static waveform signal.
[0012] Optionally, the first filtered signal includes a dynamic waveform signal and a static waveform signal.
[0013] The step of performing average filtering on the first filtered signal based on the dynamic and static characteristics to obtain a second filtered signal comprises:
[0014] Using an average filtering algorithm to filter the static waveform signal in the first filtering signal to obtain a static average filtering result;
[0015] The second filtered signal is obtained by combining the static average filtering result with the dynamic waveform signal.
[0016] Optionally, the step of performing Schmidt filtering on the second filtered signal based on the dynamic-static characteristic to obtain a target filtered signal includes:
[0017] Using a Schmidt filtering algorithm, filtering the static average filtering result to obtain a static Schmidt filtering result;
[0018] The target filtering signal is obtained by combining the Schmidt filtering result and the dynamic waveform signal.
[0019] Optionally, the step of performing weighted filtering on the sampled waveform signal to obtain a first filtered signal includes:
[0020] 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.
[0021] Optionally, before the step of acquiring a sampling waveform signal collected by an analog-to-digital converter ADC, the step further includes:
[0022] receiving a scene selection instruction, and determining a target acquisition scene based on the scene selection instruction;
[0023] 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.
[0024] Optionally, after the step of performing Schmidt filtering on the second filtered signal based on the dynamic-static characteristic to obtain a target filtered signal, the step further includes:
[0025] The sampled waveform signal, the first filtered signal, the second filtered signal and the target filtered signal are associated and output for display.
[0026] In addition, to achieve the above object, the present invention further provides a sampling filter device, the sampling filter device comprising:
[0027] 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;
[0028] a dynamic and static characteristics analysis module, configured to analyze the 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;
[0029] The target signal acquisition module is used to perform Schmidt filtering on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a sampling filtering device, which includes: 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 described above when executed by the processor.
[0031] In addition, to achieve the above-mentioned purpose, the present invention further provides a computer-readable storage medium, on which a sampling filtering program is stored, and when the sampling filtering program is executed by a processor, the steps of the sampling filtering method described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the sampling filtering method as described above are implemented.
[0033] The present invention performs weighted filtering on the sampling signal first to eliminate burr noise in the ADC sampling process, thereby improving the stability of the sampled signal to a certain extent; by performing dynamic and static characteristic analysis on the first filtered signal obtained by weighted filtering, it is possible to perform average filtering and Schmidt filtering on the first filtered signal in a targeted manner in combination with the dynamic and static characteristics of the waveform, and 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, Schmidt filtering is performed on the second filtered signal obtained by average filtering in a targeted manner according to the dynamic and static characteristics of the waveform, which can further thoroughly eliminate small-amplitude jitters in the waveform while ensuring the stability of the waveform, so that the final ADC sampling value can have both stability and real-time performance, thereby solving the technical problem that the existing ADC-based sampling method is difficult to meet the requirements of both stability and real-time performance of the obtained sampling value. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;
[0035] Figure 2 It is a schematic diagram of the flow chart of the first embodiment of the sampling filtering method of the present invention;
[0036] Figure 3 A schematic diagram of waveform dynamic characteristics of the first embodiment of the sampling and filtering method of the present invention;
[0037] Figure 4 A schematic diagram of the waveform static characteristics of the first embodiment of the sampling filtering method of the present invention;
[0038] Figure 5 A schematic diagram of an average filtering of the second embodiment of the sampling filtering method of the present invention;
[0039] Figure 6 Another schematic diagram of average filtering of the second embodiment of the sampling filtering method of the present invention;
[0040] Figure 7 A schematic diagram of Schmidt filtering of a second embodiment of a sampling filtering method of the present invention;
[0041] Figure 8 Schematic diagram of the functional modules of the sampling and filtering device of the present invention.
[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0044] In embedded development, ADC (Analog-to-digital converter) is a very commonly used external device, and common applications include power detection, temperature detection, and pressure detection. ADC sampling is susceptible to many interferences, resulting in inaccurate sampling, such as inaccurate ADC clock, inaccurate reference voltage, drift of the measured voltage, etc. At this time, software algorithm filtering can be used to reduce noise interference. However, filtering the waveform signal obtained by ADC sampling through the existing filtering algorithm is often difficult to balance stability and real-time performance. The filtered waveform signal is either smooth and stable but has waveform lag, or the waveform is highly real-time but has obvious noise interference. That is, the above situations reflect that the existing ADC-based sampling method is difficult to meet the actual needs of balancing stability and real-time performance of the obtained sampling value.
[0045] In order to solve the above problems, the present invention provides a sampling filtering method, namely, by first performing weighted filtering on the sampling signal, the burr noise in the ADC sampling process is eliminated, and the stability of the sampled signal is improved to a certain extent; by performing dynamic and static characteristic analysis on the first filtered signal obtained by weighted filtering, it is possible to perform average filtering and Schmidt filtering on the first filtered signal in a targeted manner in combination with the dynamic and static characteristics of the waveform, and 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, according to the dynamic and static characteristics of the waveform, the second filtered signal obtained by the average filtering is Schmidt filtered in a targeted manner, which can further completely eliminate small-amplitude jitters in the waveform while ensuring the stability of the waveform, so that the final ADC sampling value can have both stability and real-time performance, thereby solving the technical problem that the existing ADC-based sampling method is difficult to meet the requirements of both stability and real-time performance of the obtained sampling value.
[0046] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0047] like Figure 1 As shown, the sampling and filtering 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. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a 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 be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0049] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a sampling filter program.
[0050] exist Figure 1In the device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (programmer side) and communicate data with the client; and the processor 1001 can be used to call the sampling filtering program stored in the memory 1005 and perform the operations in the following sampling filtering method.
[0051] Based on the above hardware structure, an embodiment of the sampling filtering method of the present invention is proposed.
[0052] Reference Figure 2 , Figure 2 1 is a flow chart of a first embodiment of a sampling and filtering method of the present invention. The sampling and filtering method comprises:
[0053] Step S10, acquiring a sampling waveform signal collected by an analog-to-digital converter ADC, and performing weighted filtering on the sampling waveform signal to obtain a first filtered signal;
[0054] In this embodiment, the present invention is applied to a terminal device with an internal or external ADC. 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 (abbreviated as A / D converter or ADC, Analog to Digital Converter). The function of A / D conversion is to convert an analog signal with continuous time and continuous amplitude into a digital signal with discrete time and discrete amplitude. In the actual sampling process, ADC sampling is susceptible to more interference such as inaccurate ADC clock, inaccurate reference voltage, drift of the measured voltage, etc., resulting in inaccurate sampling. At this time, software algorithm filtering can be used to reduce noise interference. The sampled waveform signal refers to the analog waveform signal collected by the ADC. The specific acquisition method can be real-time acquisition, or it can be uniform acquisition after ADC acquisition for a period of time, etc. Weighted filtering processing refers to the use of a weighted filtering algorithm to process the sampled waveform signal. The principle of the weighted filtering algorithm is to assign corresponding weights to several historical sampling values and the current sampling value respectively, and the filtering result is the weighted summation result of several historical sampling values and the current sampling value. The first filtered signal refers to the result obtained after the sampled filtered signal is processed by weighted filtering.
[0055] Specifically, after the ADC collects the original sampled waveform signal, it can be transmitted to the terminal in real time. The terminal first needs to eliminate the burr noise. The terminal uses a weighted filtering algorithm to filter the received sampled waveform signal and uses the waveform signal obtained after filtering as the first waveform signal.
[0056] Step S20, analyzing the dynamic and static characteristics of the first filtered signal, and performing average filtering processing on the first filtered signal based on the dynamic and static characteristics to obtain a second filtered signal;
[0057] In this embodiment, the dynamic and static characteristics refer to the dynamic and static characteristics presented by the waveform. The dynamic characteristics refer to the characteristics presented by the sampling waveform when the sampling object changes greatly (for example, the detection pressure increases instantly, such as Figure 3 As shown in the figure, the horizontal axis is the sampling time and the vertical axis is the amplitude. When the pressure increases instantaneously, the sampling value changes and obvious burr noise appears. In order to prevent interference with the program running results, the burr must be weakened or even eliminated. Therefore, the aforementioned weighted filtering can be used to eliminate the burr noise first). The static characteristic refers to the characteristics of the sampling waveform when the sampling object changes little or even does not change (which is conducive to detecting that the pressure remains unchanged, such as Figure 4 As shown, although the sampled value should be a constant straight line in theory when the collected object does not change, the actual sampled value still fluctuates. In order to prevent interference with the program running results, the static sampled value must be made more stable, so that dynamic and static changes can be accurately distinguished, and the accuracy of identifying dynamic changes can be improved). Average filtering refers to the use of a mean filtering algorithm to process the first filtered signal. Due to the characteristics of the mean filter, the filtered data takes a long time to reach the peaks and troughs, and the slope (rising slope or descending slope) will also become much smoother than the actual. The point is that the waveform can become significantly stable in a static state. Therefore, in order to use the static characteristics of the average filter, it is also necessary to ensure the real-time response in a dynamic state. It is necessary to selectively use the average filter, that is, when the waveform changes dynamically, it is not average filtered, and the waveform is average filtered in a static state, so as to adjust in real time according to the dynamic and static conditions. The second filtered signal refers to the result obtained after the first filtered signal is targetedly averaged and filtered according to the dynamic and static characteristics of the waveform.
[0058] Specifically, after processing the first filtered signal, the terminal continues to determine whether the first filtered signal presents static characteristics or dynamic characteristics, and selectively filters the static characteristic part using a mean filtering algorithm, and uses the signal obtained after filtering as the second filtered signal.
[0059] Step S30: Perform Schmidt filtering on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal.
[0060] In this embodiment, the waveform stability of the second filtered signal obtained after the average filter in the static state has been greatly improved, but it may still fluctuate up and down in a small range. In order to eliminate these small-amplitude high-frequency jitters in the morning, a Schmidt filter algorithm can be used for processing. Schmidt filter processing refers to the use of a Schmidt filter algorithm to process the second filtered signal. The Schmidt filter algorithm is a Schmidt-Kalman filter algorithm. In order not to affect the dynamic characteristics, the algorithm still only works in a static state. The target filtered signal refers to the final result obtained after the second filtered signal is subjected to targeted Schmidt filter processing using the above-mentioned dynamic and static characteristics.
[0061] Specifically, the terminal uses the Schmidt-Kalman filter algorithm to filter the static part of the second filtered signal according to the above-mentioned dynamic and static characteristics, and finally filters the second filtered signal into the final target filtered signal. After obtaining the target filtered signal, the terminal can pass it to the ADC for the ADC to convert it into a digital signal, thereby ensuring the accuracy and stability of the obtained digital signal.
[0062] The present embodiment provides a sampling filtering method, which first performs weighted filtering on the sampling signal to eliminate the burr noise in the ADC sampling process, thereby improving the stability of the sampled signal to a certain extent; by performing dynamic and static characteristic analysis on the first filtered signal obtained by weighted filtering, it is possible to perform average filtering and Schmidt filtering on the first filtered signal in a targeted manner in combination with the dynamic and static characteristics of the waveform, and 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, Schmidt filtering is performed on the second filtered signal obtained by average filtering in a targeted manner according to the dynamic and static characteristics of the waveform, which can further completely eliminate small-amplitude jitters in the waveform while ensuring the stability of the waveform, so that the final ADC sampling value can have both stability and real-time performance, thereby solving the technical problem that the existing ADC-based sampling method is difficult to meet the requirements of both stability and real-time performance of the obtained sampling value.
[0063] Furthermore, based on the above Figure 2 The first embodiment shown in the figure proposes a second embodiment of the sampling filtering method of the present invention. In this embodiment, the step of analyzing the dynamic and static characteristics of the first filtered signal in step S20 includes:
[0064] Step S21, determining whether the slope between adjacent sampling points in the first filtered signal exceeds a preset slope threshold;
[0065] Step S22, if yes, taking the waveform signal in the sampled waveform signal corresponding to the slope exceeding the preset slope threshold as the dynamic waveform signal;
[0066] Step S23: if not, the waveform signal in the sampled waveform signal corresponding to the slope that does not exceed the preset slope threshold is used as a static waveform signal.
[0067] In this embodiment, the method for determining the dynamic and static changes of the waveform is to determine the slope of the curve change. (In the specific implementation process, it can be determined by determining whether the difference between the two most recent samples is greater than a certain threshold).
[0068] The preset slope threshold can be flexibly set according to the actual application scenario. The applicable thresholds for different application scenarios may vary greatly. This embodiment does not make specific limitations on this. Relevant personnel can set the applicable thresholds for each scenario on the terminal in advance, associate them with the scenes one by one, and then select the corresponding scene before filtering. The terminal can apply the threshold associated with the scene to the subsequent filtering process.
[0069] Specifically, the terminal determines whether the slope between two adjacent sampling points in the first filtered signal is greater than a preset slope threshold value one by one. If the slope between the two sampling points is greater than the preset slope threshold value, it means that the waveform portion corresponding to the two points is a dynamic waveform portion; if the slope between the two sampling points is less than or equal to the preset slope threshold value, it means that the waveform portion corresponding to the two points is a static waveform portion. In the actual sampling process, the waveform obtained by sampling usually includes both a dynamic portion and a static portion, and of course it may also consist of only a dynamic portion or a static portion.
[0070] Furthermore, the first filtered signal includes a dynamic waveform signal and a static waveform signal, and the step of performing average filtering on the first filtered signal based on the dynamic and static characteristics to obtain the second filtered signal in step S20 includes:
[0071] Step S24, using an average filtering algorithm to filter the static waveform signal in the first filtered signal to obtain a static average filtering result;
[0072] Step S25, combining the static average filtering result with the dynamic waveform signal to obtain the second filtered signal.
[0073] In this embodiment, if Figure 5 As shown in the figure, the terminal uses the mean filtering algorithm, and does not perform average filtering when the slope of the waveform is greater than the threshold, so it does not affect the real-time performance of the waveform. However, in the area with a gentle slope (the area framed in the figure), the waveform is further slowed down by average filtering, and the impact of the slowdown is controllable. Figure 6 As shown, it can be seen that using average filtering in static state can effectively increase the stability of this waveform and eliminate small amplitude jitter that should not appear in static state.
[0074] Further, step S30 includes:
[0075] Step S31, using a Schmidt filter algorithm to filter the static average filter result to obtain a static Schmidt filter result;
[0076] Step S32, combining the Schmidt filtering result and the dynamic waveform signal to obtain the target filtering signal.
[0077] In this embodiment, the purpose of Schmidt's filtering is to eliminate random noise in static state, and to eliminate it by using the characteristics of random noise (small amplitude and short stable duration). The principle of the algorithm is: compare the real-time sampling value with the reference value in static state. If the change is less than a certain amplitude (the amplitude is greater than the maximum amplitude of static random noise), it is considered to be random noise and the reference value is not updated. If it exceeds the amplitude, the reference value is updated. If the change is less than the amplitude but the duration is less than the threshold time (the time is greater than the stable duration of static random noise), it is considered to be random noise and the reference is not updated. If it exceeds the threshold time, the reference value is updated. Finally, the terminal combines the static waveform part after Schmidt filtering with the original dynamic waveform part to obtain the target filtered signal.
[0078] like Figure 7 As shown in the figure, the waveform with frequent small amplitude jitter is the second filter signal, and the waveform with less fluctuation and more stability is the target filter signal. When using Schmidt filtering in static state, the stability of the waveform has become very stable, almost completely eliminating small amplitude jitter.
[0079] 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 on the sampled waveform signal to obtain a first filtered signal in step S10 includes:
[0080] Step S11, obtaining a weighted filtering result of the sampled waveform signal according to a preset weighted filtering formula, and using the filtering result as the first filtered signal.
[0081] In this embodiment, the algorithm principle of weighted filtering is as follows:
[0082] Q(n)=a0P(n)+a1P(n-1)+a2P(n-2)+a3P(n-3)
[0083] Among them, Q(n): represents the filtering result; a1~3: represents the constant coefficient (representing a percentage, the sum of which is 1), which means the weight ratio of the last four sampling values. The more the weight is biased towards new data, the better the real-time performance is, and the more it is biased towards historical data, the better the stability is; P(n-0~3): represents the historical sampling value, P(n) represents the current sampling value, and P(n-1) represents the previous sampling value;
[0084] The terminal may substitute a preset set of constant coefficients (eg, (0.7, 0.15, 0.1, 0.05)) into the formula to perform weighted filtering on the sampled waveform signal to obtain a first filtered signal.
[0085] Furthermore, before step S10, the method further includes:
[0086] Step S01, receiving a scene selection instruction, and determining a target acquisition scene based on the scene selection instruction;
[0087] Step S02: selecting a target weight ratio that matches the target acquisition scene from a pre-stored weight ratio set, and applying the target weight ratio to the weighted filtering formula.
[0088] In this embodiment, since the constant coefficient ratios applicable to different scenarios may vary greatly, the tester can pre-set the constant coefficient ratios to be used on the terminal, and then select the current scene on the terminal before performing the filtering operation. After the terminal receives the scene selection instruction, it can call a set of constant parameter configurations associated with this scene according to the scene selected by the tester as the above-mentioned target weight ratio, and bring it into the weighted filtering formula, so that the real-time collected sampling signal can be weighted filtered to increase the convenience of the filtering operation. It should be noted that the weight ratios pre-stored on the terminal are adjustable.
[0089] Furthermore, after step S30, the method further includes:
[0090] Step S40: Correlate the sampled waveform signal, the first filtered signal, the second filtered signal and the target filtered signal for output and display.
[0091] In this embodiment, after generating the target filter signal, the terminal may output only the target filter signal, or may output the sampled waveform signal, the first filter signal, the second filter signal and the target filter signal in association. Specifically, they may be displayed in a superimposed manner, displayed in partitions on the same page, etc., and the display effect may be set to output different waveform signals in different colors and / or different forms (such as solid lines and dotted lines), display the waveform signal names in the vicinity of different waveform signals, etc., which may be flexibly set according to actual needs.
[0092] like Figure 8 As shown, the present invention also provides a sampling filtering device, the sampling filtering device comprising:
[0093] The weighted filtering processing module 10 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;
[0094] A dynamic and static characteristic analysis module 20, configured to analyze the 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;
[0095] The target signal acquisition module 30 is used to perform Schmidt filtering on the second filtered signal based on the dynamic and static characteristics to obtain a target filtered signal.
[0096] Optionally, the dynamic and static characteristics analysis module 20 includes:
[0097] A sampling slope determination unit, used to determine whether the slope between adjacent sampling points in the first filtered signal exceeds a preset slope threshold;
[0098] a dynamic waveform determination unit, configured to, if yes, use a waveform signal in the sampled waveform signal corresponding to a slope exceeding a preset slope threshold as a dynamic waveform signal;
[0099] The static waveform determination unit is used to, if not, take 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.
[0100] Optionally, the first filtered signal includes a dynamic waveform signal and a static waveform signal, and the dynamic and static characteristics analysis module 20 includes:
[0101] A static average filtering unit, configured to filter the static waveform signal in the first filtering signal using an average filtering algorithm to obtain a static average filtering result;
[0102] The second signal acquisition unit is used to combine the static average filtering result and the dynamic waveform signal to obtain the second filtered signal.
[0103] Optionally, the target signal acquisition module 30 includes:
[0104] A static Schmidt filtering unit, configured to filter the static average filtering result using a Schmidt filtering algorithm to obtain a static Schmidt filtering result;
[0105] A target signal acquisition unit is used to obtain the target filtered signal by combining the Schmidt filtering result and the dynamic waveform signal.
[0106] Optionally, the weighted filtering processing module 10 includes:
[0107] The first signal acquisition unit is used to obtain a weighted filtering result of the sampled waveform signal according to a preset weighted filtering formula, and use the filtering result as the first filtered signal.
[0108] Optionally, the sampling and filtering device further includes:
[0109] A collection scene determination module, used to receive a scene selection instruction and determine a target collection scene based on the scene selection instruction;
[0110] The target ratio application module is used to select a target weight ratio that matches the target acquisition scene from a pre-stored weight ratio set, so as to apply the target weight ratio to the weighted filtering formula.
[0111] Optionally, the sampling and filtering device further includes:
[0112] The signal waveform association display module is used to associate the sampling waveform signal, the first filtered signal, the second filtered signal and the target filtered signal for output and display.
[0113] The invention also provides a sampling filtering device.
[0114] The sampling filtering device comprises a processor, a memory and a sampling filtering program stored in the memory and executable on the processor, wherein when the sampling filtering program is executed by the processor, the steps of the sampling filtering method described above are implemented.
[0115] The method implemented when the sampling filtering program is executed can refer to the various embodiments of the sampling filtering method of the present invention, which will not be described in detail here.
[0116] The present invention also provides a computer-readable storage medium.
[0117] The computer-readable storage medium of the present invention stores a sampling filtering program, and when the sampling filtering program is executed by a processor, the steps of the sampling filtering method described above are implemented.
[0118] The method implemented when the sampling filtering program is executed can refer to the various embodiments of the sampling filtering method of the present invention, which will not be described in detail here.
[0119] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the sampling filtering method described above are implemented.
[0120] The method implemented when the computer program is executed can refer to the various embodiments of the sampling filtering method of the present invention, which will not be described in detail here.
[0121] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0122] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A sampling filtering method, characterized in that: The sampling filtering method comprises: 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. The sampling filtering method according to claim 1, characterized in that: The step of performing weighted filtering on the sampled waveform signal to obtain a 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. The sampling 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, the method further 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. 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 a target filtered signal, the method further includes: The sampled waveform signal, the first filtered signal, the second filtered signal and the target filtered signal are associated and output for display.
5. A sampling filter device, characterized in that: The sampling and filtering device comprises: 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. A sampling and 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. When the sampling filtering program is executed by the processor, the steps of the sampling filtering method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a sampling filtering program, 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.
Citation Information
Patent Citations
Gravity wave parameter calculation method and device and terminal
CN108334710A
Signal filtering method and device, equipment and medium
CN111510109A