CN107247819B - Filtering method and filter for sensor - Google Patents

Filtering method and filter for sensor Download PDF

Info

Publication number
CN107247819B
CN107247819B CN201710301714.XA CN201710301714A CN107247819B CN 107247819 B CN107247819 B CN 107247819B CN 201710301714 A CN201710301714 A CN 201710301714A CN 107247819 B CN107247819 B CN 107247819B
Authority
CN
China
Prior art keywords
type
filtering
filter
point
module
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
CN201710301714.XA
Other languages
Chinese (zh)
Other versions
CN107247819A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201710301714.XA priority Critical patent/CN107247819B/en
Publication of CN107247819A publication Critical patent/CN107247819A/en
Application granted granted Critical
Publication of CN107247819B publication Critical patent/CN107247819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Abstract

The invention discloses a filtering method of a sensor. Performing primary filtering on the original output value of the sensor, and outputting the original output value A of the sensor by the ith primary filteringiThe ith filtering step comprises the following steps: s1, judging A according to the trip point judgment ruleiAnd then the original output values of the continuous N sensors are jumping points or non-jumping points, N is more than or equal to 1, and the step S2 is carried out; s2, if AiIs a trip point and AiIf the non-skip point exists in the original output values of the subsequent continuous N sensors, the step is switched to the step S3, otherwise, AiThe original value is used as a type of filtering predicted value; s3, comparing the current maximum gradient with Ai‑1The type I filter prediction value of (1) is added, and the result is used as AiThe current maximum gradient is AiAnd the gradient value with the maximum gradient absolute value in the previous continuous M type-one filtering prediction values. The invention solves the technical problem of abnormal skip point elimination.

Description

Filtering method and filter for sensor
Technical Field
The present invention relates to digital signal filtering, and more particularly, to a digital signal filtering and filter for a sensor.
Background
The error sources of the sensor can be roughly divided into two categories of deterministic errors and random errors, the deterministic errors can be compensated by testing and calibrating under laboratory conditions under normal conditions, the random errors are complex, the change rule of the random errors is random, the statistical rules of the random errors are obtained through a statistical method, and a reasonable mathematical model is established for error compensation.
In a common random error analysis and compensation method, an autocorrelation function method is easy to introduce more errors, so that the error modeling precision is not high, and real-time error compensation cannot be realized; the power spectral density analysis method only gives a curve of a power spectral density function of a signal in a frequency domain and cannot directly give time domain characteristics of each error, so that the identification result needs to be further processed, and the method is relatively troublesome; the cost of the finite impulse response filtering method is high, and the signal delay is also large; the phase of the recursive digital filter is non-linear.
Disclosure of Invention
The invention aims to provide a new technical scheme for performing abnormal skip point elimination on sensor data.
According to a first aspect of the invention, a method of filtering a sensor is provided.
Performing primary filtering on the original output value of the sensor, and outputting the original output value A of the sensor by the ith primary filteringiThe predicted value of the corresponding type I filtering, i is more than or equal to 1, A1The first-type filtering prediction values of the previous M continuous sensor original output values default to the corresponding sensor original output values, M is larger than or equal to 3, and the ith first-type filtering step comprises the following steps: s1, judging A according to the trip point judgment ruleiAnd then the original output values of the continuous N sensors are jumping points or non-jumping points, N is more than or equal to 1, and the step S2 is carried out; s2, if AiIs a trip point and AiIf the non-skip point exists in the original output values of the subsequent continuous N sensors, the step is switched to the step S3, otherwise, AiThe original value is used as a type of filtering predicted value; s3, comparing the current maximum gradient with Ai-1The type I filter prediction value of (1) is added, and the result is used as AiThe current maximum gradient is AiThe gradient value with the maximum absolute value of the gradient in the previous continuous M type-I filtering predicted values; s4, output AiFiltering the prediction value.
Optionally, the skip point determination method includes: ith first-order filtering, AiThe first M of the type one filter prediction values and AiAnd AiAnd then, forming a sequence of the continuous N sensor raw output values according to the time sequence of the appearance of the corresponding sensor raw output values, calculating the gradient of each data point, and if the following two conditions are simultaneously met: condition one, AnHas an absolute value of the gradient greater than AnMaximum of absolute values of gradients of previous M data points, condition two, AnIs greater than erroroffset1And erroroffset2Of wherein
Figure BDA0001284357740000021
Figure BDA0001284357740000022
Wherein i is not less than N not more than i + N, Dn-1Is A in the arraynK is a settable coefficient, k is more than or equal to 0.3 and less than or equal to 0.8, then A is judgednIs a jump point, otherwise AnIs a non-skip point.
Optionally, according to a type-two filter decision rule, performing type-two filtering on Q consecutive first-type filter prediction values, and outputting respective corresponding type-two filter output values, where Q is greater than or equal to 5, where the type-two filter decision rule is: performing secondary filtering on the continuous Q primary filtering prediction values when two or more inflection points exist in the continuous Q primary filtering prediction values; otherwise, the secondary type filtering output value of the continuous Q primary type filtering prediction values is the respective primary type filtering prediction value.
Optionally, according to a type-two filter decision rule, performing type-two filtering on Q consecutive first-type filter prediction values, and outputting respective corresponding type-two filter output values, where Q is greater than or equal to 5, where the type-two filter decision rule is: performing secondary filtering on the continuous Q primary filtering prediction values when two or more inflection points exist in the continuous Q primary filtering prediction values; otherwise, the secondary type filtering output value of the continuous Q primary type filtering prediction values is the respective primary type filtering prediction value.
Optionally, the numerical values of the plurality of gradient data points are in an arithmetic progression with the adjacent non-inflection points.
The invention also provides a filter, which comprises an input end, a first-type filtering output storage module and a first-type filtering module; the first-type filtering module comprises a jumping point marking module, a jumping point judging module and a first-type filtering control module; the input end is connected with the first-type filtering control module; the first-type filtering output storage module is connected with the first-type filtering control module and is set to store the output value of the filter; the jumping point judging module is connected with the first-type filtering control module and is used for judging whether the data points in the first-type filtering output storage module are jumping points or non-jumping points; the jumping point marking module is connected with the jumping point judging module and is set to mark whether a data point in the linear filtering output storage module is a jumping point or a non-jumping point according to a judging result of the jumping point judging module; the first-type filtering control module is also connected with the jumping point marking module and is configured to judge that the data points to be filtered in the first-type filtering output storage module are marked as jumping points in the jumping point marking module corresponding to the jumping points, and N consecutive data points after the data point are marked as non-skip points in the corresponding skip point marking module, adding the gradient value of the data point with the maximum absolute value of the gradient in M data points before the data point to be filtered with the previous data point of the data point to be filtered, and assigning the result to the data point to be filtered again, wherein M is more than or equal to 3, N is more than or equal to 1, otherwise, the value of the first-type filtering output storage module is unchanged, the original values of the first M + N +1 data points at the input end are assigned to the data points corresponding to the first-type filtering output storage module in the initial state, and the jumping point marking module correspondingly marks the first M data points in the first-type filtering output storage module as non-jumping points.
Optionally, the jumping-point determining module is configured to determine that a corresponding marker of the data point in the jumping-point marking module is a jumping point if the data point in the type-one filter output storage module simultaneously satisfies the following two conditions, otherwise, the corresponding marker of the data point in the jumping-point marking module is a non-jumping point, where a condition one is that an absolute value of a gradient of the data point is greater than a maximum value of absolute values of gradients of M data points before the data point, and M is greater than or equal to 3; condition two, the absolute value of the gradient of the data point is greater than erroroffset1And erroroffset2Of wherein
Figure BDA0001284357740000031
Figure BDA0001284357740000032
Wherein k is a settable coefficient, k is more than or equal to 0.3 and less than or equal to 0.8.
Optionally, the filter further comprises a second type filter module, the second type filter module is connected to the first type filter storage module, the second type filter module is configured to perform second type filtering on consecutive Q data points in the first type filter output storage module, and output corresponding Q second type filter output values, Q is greater than or equal to 5, the second type filter module comprises a second type filter input terminal, a second type filter decision module, a second type filter compensation module, and a second type filter output terminal, the second type filter decision module is connected to the second type filter input terminal, the second type filter output terminal, and the second type filter compensation module, the second type filter decision module is configured to decide that the number of inflection points of Q data points to be subjected to second type filtering input by the second type filter input terminal is less than 2, and then the Q original values of data points are output to the second type filter output terminal, or will Q data point warp type filtering compensation module carries out the output after type two filtering compensation and gives type two filtering output, type two filtering compensation module still with type two filtering output is connected, type two filtering compensation module set up to with Q data point carries out type two filtering compensation and exports for type two filtering output.
Optionally, the two-type filtering compensation module is configured to interpolate a plurality of gradient values between non-inflection points and non-inflection points of the Q data points, perform quadratic function fitting on all the gradient values and the Q data points, and output fitting values corresponding to the Q data points obtained after fitting to the secondary filtering output end.
Optionally, the numerical values of the plurality of gradient values are in an arithmetic progression with the adjacent non-inflection points.
The inventor of the present invention found an effective model for abnormal skip point rejection of sensor signals in the prior art. Therefore, the technical task to be achieved or the technical problems to be solved by the present invention are never thought or anticipated by those skilled in the art, and therefore the present invention is a new technical solution.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart of a combination of type one filtering and type two filtering.
Fig. 2 is a block diagram of a corresponding filter of the type one filtering method.
FIG. 3 is a flow chart of one embodiment of a two-type filtering method.
Fig. 4 is a diagram of the effect of filtering of type one filtering.
Fig. 5 is a diagram of the effect of filtering of type one filtering.
FIG. 6 is a diagram of the filtering effect of two-type filtering.
FIG. 7 is a diagram of the filtering effect of two-type filtering.
FIG. 8 is a diagram of the filtering effect of two-type filtering.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
It should be noted that: any two modules, components, circuits and the like described in the present invention may be directly connected, or may be indirectly connected through other modules, components, circuits and the like.
FIG. 1 is a flow chart of the combined operation of type one filtering and type two filtering, which illustrates the general design concept of the filtering method of the sensor provided by the present invention. The sensor data 100 is subjected to type one filtering 200 followed by type two filtering 300, and finally the stationary data 400 is output.
The first type filtering effectively eliminates large abnormal jumping points, and the second type filtering can realize fitting smooth processing of small continuous burrs. The combination of the two can obtain more accurate and smooth data.
In particular, the type one filtering and the type two filtering may be implemented separately.
The implementation of type one filtering and type two filtering is described in detail below.
When filtering starts, 5 original sensor output values output by the sensors firstly are not judged, the first-type filtering predicted values corresponding to the 5 original output values are defaulted to be the respective original output values, gradient values of the 5 first-type filtering predicted values are calculated, and 4 gradient values can be obtained.
In actual operation, the original output values of M sensors output firstly by the sensors are not judged, and M is more than or equal to 3; the significance of this is that at least two gradient values are first obtained, and the reference data is selected in which the maximum of the absolute values of the gradients is the largest for the first type of filtered output data point.
All gradients described in this patent are differences of a data point relative to a data point prior to the data point.
The symbol of "| |" in all formulas of this patent is an absolute value symbol.
Original output value A of ith filtering output sensoriThe predicted value of the corresponding type I filtering, i is more than or equal to 1, A1The first-type filtering prediction values of the previous 5 continuous sensor original output values default to the corresponding sensor original output values, and the ith-time first-type filtering step comprises the following steps of: s1, judging A according to the trip point judgment ruleiAnd then the original output values of the continuous 2 sensors are jumping points or non-jumping points, and the step is switched to step S2; s2, if AiIs a trip point and AiIf the non-skip point exists in the subsequent 2 continuous sensor raw output values, the step is switched to the step S3, otherwise, AiThe original value is used as a type of filtering prediction value to step S4; s3, comparing the current maximum gradient with Ai-1The type I filter prediction value of (1) is added, and the result is used as AiThe current maximum gradient is AiThe gradient value with the maximum absolute value of the gradient in the previous continuous 4 type-I filtering prediction values; s4, output AiFiltering the prediction value.
Optionally, the skip point determination method includes: ith first-order filtering, AiThe first 5 type-I filter prediction values and AiAnd AiThen, the 2 continuous sensor raw output values form a sequence according to the time sequence of the appearance of the corresponding sensor raw output values, the gradient of each data point is calculated, and if the following two conditions are met simultaneously: condition one, AnHas an absolute value of the gradient greater than AnMaximum of absolute values of gradients of previous M data points, condition two, AnIs greater than erroroffset1And erroroffset2Of wherein
Figure BDA0001284357740000061
Figure BDA0001284357740000062
Wherein i is not less than n is not less than i +2, Dn-1Is A in the arraynThe immediately preceding data point, k is a settable coefficient, k is 0.3 ≦ k ≦ 0.8, and k is 0.5 in this example, then a is determinednIs a jump point, otherwise AnIs a non-skip point.
The 0 drift value of a BMI160 sensor of BOSCH company is 40mg, and the 0 drift value of each type of sensor of each company can be determined by reference to the specification or actual measurement.
The significance of the setting is that the output value of the sensor, especially the output value of the motion sensor, cannot be connected with a gradual change process again in the instant giant change of one motion within the time corresponding to 1+ N data points; jumping does not mean an error point, which may be the start of the next motion and is thus not the same motion state as the previous points.
In the filtering of the type I, delaying the time corresponding to the two data points to output a type I filtering compensation value of the original output value of the sensor; taking the sampling time of 5ms as an example, the calculation time of the filter is not considered, the delay of the actual filter is 10ms, and the technical effect of filtering abnormal skip points in near real time is achieved.
Fig. 2 is a block diagram of a filter corresponding to the type one filtering method.
The exemplary explanation of this embodiment is given by taking M-5 and N-2 as an example, and the data points to be filtered, which are subjected to one-time one-type filtering by the filter, need to refer to the previous predicted values of 5 one-type filtering and the subsequent 2 raw output values of the sensor.
Those skilled in the art may implement the functions of the modules of the filter by using hardware circuits, and may also implement the functions of the modules of the filter by using software.
The filter 201 includes an input 202, an output storage module 203, a type-one filtering module 204, and the type-one filtering module 204 includes a skip point marking module 205, a skip point judging module 206, and a type-one filtering control module 207.
Raw sensor data 100, which enters the filter 201 through the input 202, may be stored in a separate memory; or may be assigned to the one-type filter output storage block 203 to determine whether to modify a data point in the one-type filter output storage block 203 each time one-type filtering is performed.
The first-type filtering output storage module 203 is connected with the first-type filtering control module 207, the minimum data size of the first-type filtering output storage module 203 is 3, namely the latest 3 original sensor output values to be subjected to first-type filtering are stored, and after first-type filtering is performed, a first-type filtering prediction value of the first original sensor output value to be subjected to first-type filtering is output; the type-one filter output storage module 203 may be followed by other output control modules, specifically to control whether the output data of the filter 201 is output in real time.
The type one filtering control module 207 determines that the original output values of the 5 sensors received first do not need to be corrected, and directly outputs or does not output reference data only for subsequent type one filtering.
Starting from the first-type filtering, each time the first-type filtering is performed, the first-type filtering control module 207 drives the trip point judgment module 206 to judge whether the latest 3 sensor original output values to be subjected to the first-type filtering are trip points or non-trip points, and marks the judgment result in the trip point marking module 205; illustratively, the skip point is labeled 1 and the non-skip point is labeled 0; the skip point judgment module uses the skip point judgment method described above when performing skip point judgment, and may also set other judgment methods.
The type one filtering control module 207 determines that the most recent 3 sensor raw output values to be type one filtered correspond to trip points labeled 100, 101, 110, the previous number corresponds to the sensor raw output value occurring earlier in time, that is, there is a non-skip point in the original output values of two consecutive sensors after a skip point, the type-one filtering control module 207 controls the gradient value with the largest absolute value of the gradient among 4 gradient values calculated by 5 type-one filtering predicted values before the original output value of the first sensor to be subjected to type-one filtering as the gradient value of the original output value of the first sensor to be subjected to type-one filtering, and assigning the sum of the gradient value and the current last one-type filtering prediction value to a storage unit of a one-type filtering output storage module corresponding to the original output value of the first sensor to be subjected to one-type filtering.
Alternatively, the marked-skip-point marking module 205 is recalculated before the end of one-type filtering, or the marked-skip-point marking module 205 may be calculated at the beginning of each one-type filtering.
FIG. 3 is a flow chart of an embodiment of the type-5-point filtering, which can be scaled up to a larger scale such as 6-point filtering, 7-point filtering, etc. according to actual needs; the flowchart of the second-type filtering embodiment is an explanation of the second-type filtering method, wherein each module can be understood as a hardware circuit module or a software program module.
The two-type filtering can be implemented independently, or after the one-type filtering, the corresponding filter can be implemented independently by the two-type filtering, or after the one-type filtering, by the two-type filtering.
The second-type filtering in the embodiment is quadratic function fitting filtering, and can be filtering in other forms according to the characteristics of actual data.
With 5 points as research objects, if the sampling interval is 6ms and the research time is 24ms, within such a short time, it is impossible to complete the motion once, and it appears on the image that: the curve formed by connecting the 5 points can only be downward or upward all the time, the curve can be upward and then downward or downward and then upward at most once, the curve can not be downward, upward, downward or upward and upward, and the curve can be called as an inflection point at most in mathematics; when a plurality of inflection points exist, the inaccurate values of some points in the points are shown, namely, a burr phenomenon occurs.
The fitting is performed using a function of degree 2, since the function of degree 2 has only one inflection point, and at points other than the inflection point, it is desirable that the fitted curve passes through such points because of its accuracy, while at points other than the true inflection point, it is desirable that the fitting be performed using a least squares method.
The mathematical mode that the function passes through the non-inflection points is weighting, for example, 5 points are interpolated between the non-inflection points, and quadratic function fitting is carried out on the 10 data points, because the 5 points are inserted between 2 adjacent non-inflection points, the probability that the fitting curve passes through or is close to the 2 non-inflection points is greatly increased, so that the accuracy of interpolation is improved, and the method accords with the physical expression process.
According to actual needs, 3 points, 4 points, 6 points and the like can be additionally inserted between non-inflection points, the number is not limited, but the scale of the calculation amount needs to be considered, and 5 linear filtering output values are not interpolated.
The numerical value of the interpolation point is between two adjacent non-inflection points, and can be in an equidistant relationship or other models, and an implementer can select the interpolation point according to specific situations in actual operation.
In specific implementation, the module 301 is first entered to update the data of the five nearest real values, then the number of inflection points is determined according to the number of times of transition of the positive sign and the negative sign of the gradient, if the number of inflection points is equal to 0, the five-point value is in the same direction, the data value is always increased or always decreased, which is normal, and the module 307 is entered to output the data; if the number of turning points is 1, it indicates that there is a new starting point of motion within 24ms, which is also normal, and the module 307 is entered for outputting; if the number of turns is 2 or more, this indicates that there is at least one complete movement within 24ms, which is clearly not conventional for a sensor applied to a VR handle, so a correction of the fitting filter is made.
The data to be filtered enters a module 303, 5 new data points are interpolated between adjacent non-inflection points, the 5 new data points and the adjacent non-inflection points are in an arithmetic progression, all the 10 data points are subjected to quadratic function fitting by a least square method, and fitting values corresponding to the 5 original output values of the sensors after fitting are used as the output values of the respective two-type filtering.
And finally, the data enters a module 304 for filtering and outputting.
Fig. 4 and 5 are actual filtering results of one embodiment of type one filtering.
In fig. 4, there are 2 consecutive skip points on the top and 1 skip point on the bottom, and the red curve is the result after filtering, and it can be seen that the skip points are filtered out.
There are 6 consecutive jumps above fig. 5, and according to the settings of the type one filter, more than 3 consecutive jumps are no longer taken as errors, but a new movement, so that these 6 jumps remain as shown by the red curve.
In this embodiment, the first-type filtering is set to 3 points, and in practical application, analysis is required according to specific situations, and the setting of 8, 10 points and the like is all in accordance with the operation requirement.
Fig. 6, 7 and 8 are comparison of three situations after fitting and filtering.
Before the fitting filtering, the inflection point calculation of the nearest 5 points is required, and when the number of inflection points is more than or equal to 2, the fitting filtering is carried out.
FIG. 6 shows that the data points are rising all the time, the number of turning points is 0, and no fitting filtering is needed, so that the red curve after fitting and the black point before fitting are completely coincident; FIG. 7 has only one inflection point, which the present invention considers to be the beginning of another motion, which follows the motion law within 24ms, without fitting filtering; in fig. 8, the number of inflection points is 2, the first point and the second point obtained after calculation are points far away from the inflection point, which are considered to be real in the present invention, and their values should be changed as little as possible, so that the 2 points need to be weighted and emphasized during the fitting filtering, the fitting result is shown as a red curve, the first 2 points are retained, and the last 3 points are obtained by quadratic curve fitting.
The invention relates to a set of brand-new low-delay near-real-time filtering method, which can filter out larger jumping points and smaller continuous burr data after two-step filtering to form stable data for attitude settlement, and can adjust each parameter according to different specific signal characteristics.
In the first type filtering, the invention has the following most advantages: combines the attitude calculation algorithm and the sensor characteristic, sets the gradient and erroroffsetBoth thresholds have a better interpretation in both mathematics and physics. And the number of points of the new motion where successive jumping points become authentic, which is determined according to the actual sampling time interval of 6ms, is 3, '3' which is a parameter that can be adjusted. This achieves a filtering that is determined in a physical sense.
When fitting the filter, a method of preserving the points with small influence of the inflection points by using weighting is also proposed for the first time.
The fitting weighting mode is as follows: interpolation is carried out between points needing weighting, 3-8 gradual change points are additionally inserted, and the gradual change points are also taken as points needing fitting to be brought into a fitting equation.
The benefits of this fitting approach are: compared with other smoothing methods, the value of the real point obtained by judgment is kept to the maximum extent, and the value of the real point is not influenced by the error point to be unrealistic.
The filter of the present invention may be a hardware circuit and/or a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including AN object oriented programming language such as Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (8)

1. The filtering method of the sensor is characterized in that the primary output value of the sensor is subjected to primary filtering, and the ith primary filtering outputs a primary output value A of the sensoriThe predicted value of the corresponding type I filtering, i is more than or equal to 1, A1The first-type filtering prediction values of the previous M continuous sensor original output values default to the corresponding sensor original output values, M is larger than or equal to 3, and the ith first-type filtering step comprises the following steps:
s1, judging A according to the jumping point judging methodiAnd then the original output values of the continuous N sensors are jumping points or non-jumping points, N is more than or equal to 1, and the step S2 is carried out;
s2, if AiIs a trip point and AiIf the non-skip point exists in the original output values of the subsequent continuous N sensors, the step is switched to the step S3, otherwise, AiThe original value is used as a type of filtering predicted value;
s3, comparing the current maximum gradient with Ai-1The type I filter prediction value of (1) is added, and the result is used as AiThe type one filter prediction value of (1),
the current maximum gradient is AiThe gradient value with the maximum absolute value of the gradient in the previous continuous M type-I filtering predicted values;
s4, output AiThe type one filter prediction value of (1),
wherein the trip point determinationThe method comprises the following steps: ith first-order filtering, AiThe first M of the type one filter prediction values and AiAnd, AiAnd then, forming a sequence of the continuous N sensor raw output values according to the time sequence of the appearance of the corresponding sensor raw output values, calculating the gradient of each data point, and if the following two conditions are simultaneously met:
condition one, AnHas an absolute value of the gradient greater than AnThe maximum of the absolute values of the gradients of the previous M data points,
condition two, AnIs greater than erroroffset1And erroroffset2Of wherein
Figure FDA0002461879190000011
Wherein i is not less than N not more than i + N, Dn-1Is A in the arraynK is a coefficient which can be set, k is more than or equal to 0.3 and less than or equal to 0.8,
then determine AnIs a jump point, otherwise AnIs a non-skip point.
2. The method for filtering a sensor according to claim 1,
according to the decision rule of type two filtering, the type two filtering is performed to Q continuous predicted values of the type one filtering, and the corresponding type two filtering output values are output, Q is not less than 5,
the two-type filtering judgment rule is as follows:
performing secondary filtering on the continuous Q primary filtering prediction values when two or more inflection points exist in the continuous Q primary filtering prediction values;
otherwise, the secondary type filtering output value of the continuous Q primary type filtering prediction values is the respective primary type filtering prediction value.
3. Method for filtering a sensor according to claim 2, characterized in that
The type-II filtering is quadratic function fitting filtering, and a plurality of gradient data points are inserted between non-inflection points and non-inflection points of the continuous Q predicted values of the type-I filtering;
and performing quadratic function fitting on all gradient data points inserted in the Q primary filter predicted values and the Q primary filter predicted values, and taking fitting values corresponding to the Q primary filter predicted values obtained after fitting as corresponding secondary filter output values.
4. The method of filtering a sensor of claim 3,
the numerical values of the gradual change data points and the adjacent non-inflection points are in an arithmetic progression.
5. A filter, characterized in that it comprises a filter element,
the device comprises an input end, a first-type filtering output storage module and a first-type filtering module;
the first-type filtering module comprises a jumping point marking module, a jumping point judging module and a first-type filtering control module;
the input end is connected with the first-type filtering control module;
the first-type filtering output storage module is connected with the first-type filtering control module and is set to store the output value of the filter;
the trip point judging module is connected with the type-I filtering control module and is configured to judge whether a data point in the type-I filtering output storage module is a trip point or a non-trip point;
the jumping point marking module is connected with the jumping point judging module and is set to mark whether a data point in the linear filtering output storage module is a jumping point or a non-jumping point according to a judging result of the jumping point judging module;
the first-type filtering control module is further connected with the jumping point marking module, and is configured to:
judging that the data points to be filtered in the I-type filtering output storage module are marked as jumping points in a jumping point marking module corresponding to the data points to be filtered, and N continuous data points behind the data points are marked as non-jumping points in a corresponding jumping point marking module, adding the gradient value of the data point with the maximum absolute value of the gradient in M data points before the data points to be filtered with the previous data point of the data points to be filtered, and re-assigning the result to the data point to be filtered, wherein M is more than or equal to 3, N is more than or equal to 1,
otherwise, the type one filter output memory module value is unchanged,
in the initial state, the first M data points at the input end are judged as non-jumping points,
wherein the jumping point determining module is configured to determine that the corresponding mark of the data point in the jumping point marking module is a jumping point if the data point in the filtering output storage module of the type I satisfies the following two conditions at the same time, otherwise, the corresponding mark of the data point in the jumping point marking module is a non-jumping point,
the method comprises the following steps that firstly, the absolute value of the gradient of a data point is larger than the maximum value of the absolute values of the gradients of M data points before the data point, and M is larger than or equal to 3;
condition two, the absolute value of the gradient of the data point is greater than erroroffset1And erroroffset2Of wherein
Figure FDA0002461879190000031
Figure FDA0002461879190000032
Wherein k is a settable coefficient, k is more than or equal to 0.3 and less than or equal to 0.8.
6. The filter of claim 5, further comprising a type II filter module coupled to the type I filter storage module, the type II filter module configured to type II filter successive Q data points in the type I filter output storage module to output corresponding Q type II filter output values, Q ≧ 5
The two-type filter module comprises a two-type filter input end, a two-type filter judging module, a two-type filter compensating module and a two-type filter output end,
the type-II filter judging module is connected with the type-II filter input end, the type-II filter output end and the type-II filter compensating module, the type-II filter judging module is set to judge that the quantity of inflection points of Q data points to be subjected to type-II filtering input by the type-II filter input end is less than 2, then the original values of the Q data points are output to the type-II filter output end, otherwise, the Q data points are subjected to type-II filter compensation by the type-II filter compensating module and then output to the type-II filter output end,
the type II filter compensation module is also connected with the type II filter output end, and the type II filter compensation module is set to output the Q data points to the type II filter output end after the type II filter compensation.
7. The filter of claim 6,
the two-type filtering compensation module is set to interpolate a plurality of gradual change values between the non-inflection point and the non-inflection point of the Q data points, perform quadratic function fitting on all the gradual change values and the Q data points, and output fitting values corresponding to the Q data points to a quadratic filtering output end after fitting.
8. The filter of claim 7, wherein the values of the plurality of tapered values are in an equal difference sequence with adjacent non-inflection points.
CN201710301714.XA 2017-05-02 2017-05-02 Filtering method and filter for sensor Active CN107247819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710301714.XA CN107247819B (en) 2017-05-02 2017-05-02 Filtering method and filter for sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710301714.XA CN107247819B (en) 2017-05-02 2017-05-02 Filtering method and filter for sensor

Publications (2)

Publication Number Publication Date
CN107247819A CN107247819A (en) 2017-10-13
CN107247819B true CN107247819B (en) 2020-07-24

Family

ID=60016445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710301714.XA Active CN107247819B (en) 2017-05-02 2017-05-02 Filtering method and filter for sensor

Country Status (1)

Country Link
CN (1) CN107247819B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114689968A (en) * 2022-03-16 2022-07-01 河南翔宇医疗设备股份有限公司 Filtering method and related device in electromagnetic compatibility test

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324421B1 (en) * 1999-03-29 2001-11-27 Medtronic, Inc. Axis shift analysis of electrocardiogram signal parameters especially applicable for multivector analysis by implantable medical devices, and use of same
CN101261293A (en) * 2007-03-08 2008-09-10 国网南京自动化研究院 Electric power steady-state signal tracking measurement based on self-adapting filter
CN101918864A (en) * 2008-01-21 2010-12-15 阿克斯有限责任公司 Geophysical data processing systems
CN102647168A (en) * 2010-10-28 2012-08-22 矽统科技股份有限公司 Dynamic filtering device and method
JP2013035513A (en) * 2011-08-10 2013-02-21 Hi-Lex Corporation Electric parking brake device
CN105913382A (en) * 2016-03-01 2016-08-31 南京信息工程大学 High-fidelity anisotropy filtering method for threshold searching optimization
CN106456067A (en) * 2014-06-06 2017-02-22 德克斯康公司 Fault discrimination and responsive processing based on data and context

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012082721A2 (en) * 2010-12-13 2012-06-21 The Board Of Trustees Of The University Of Illinois Method and apparatus for evaluating dynamic middle ear muscle activity
US8754699B2 (en) * 2011-11-03 2014-06-17 Texas Instruments Incorporated Switched-capacitor filter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324421B1 (en) * 1999-03-29 2001-11-27 Medtronic, Inc. Axis shift analysis of electrocardiogram signal parameters especially applicable for multivector analysis by implantable medical devices, and use of same
CN101261293A (en) * 2007-03-08 2008-09-10 国网南京自动化研究院 Electric power steady-state signal tracking measurement based on self-adapting filter
CN101918864A (en) * 2008-01-21 2010-12-15 阿克斯有限责任公司 Geophysical data processing systems
CN102647168A (en) * 2010-10-28 2012-08-22 矽统科技股份有限公司 Dynamic filtering device and method
JP2013035513A (en) * 2011-08-10 2013-02-21 Hi-Lex Corporation Electric parking brake device
CN106456067A (en) * 2014-06-06 2017-02-22 德克斯康公司 Fault discrimination and responsive processing based on data and context
CN105913382A (en) * 2016-03-01 2016-08-31 南京信息工程大学 High-fidelity anisotropy filtering method for threshold searching optimization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Atmospheric boundary-layer height estimation by adaptive Kalman filtering of lidar data;Francesc Rocadenbosch等;《Proc.of SPIE》;20101231;全文 *
伺服电机极限特性测试试验台的抗干扰研究;段永强;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20170115(第1期);全文 *

Also Published As

Publication number Publication date
CN107247819A (en) 2017-10-13

Similar Documents

Publication Publication Date Title
CN112448760B (en) Method and device for obtaining transmitter test parameters and storage medium
KR101099179B1 (en) Delay time determining method, delay time adjusting method and variable delay circuit
US9197459B1 (en) Decision feedback equalizer
CN107357764B (en) Data analysis method, electronic device, and computer storage medium
US20170032284A1 (en) Machine learning apparatus for learning filter in accordance with machine command, motor drive apparatus and motor drive system having machine learning apparatus, and machine learning method
CN107247819B (en) Filtering method and filter for sensor
Kong et al. Metamorphic moving horizon estimation
Kallapur et al. A discrete-time robust extended Kalman filter for uncertain systems with sum quadratic constraints
EP3496327B1 (en) Method for acquiring phase discrimination signal in clock recovery circuit and phase discriminator
CN109781341B (en) Data calibration method and device for air pressure sensor
Cox et al. A comparison of software-based approaches to identifying FOPDT and SOPDT model parameters from process step response data
Zhao et al. Unbiased, optimal, and in‐betweens: the trade‐off in discrete finite impulse response filtering
EP3751382A1 (en) Sequence signal generator and sequence signal generation method
JP2013025467A (en) Approximation operation circuit for logarithmic function
US20160233875A1 (en) Circuit and method of adaptive filtering digital calibration of adc
EP3709299A1 (en) Digital audio processing device, method for processing digital audio, and digital audio processing program
CN115660957A (en) Resampling method, device, equipment and medium for waveform data
CN115244855B (en) Improved analog-to-digital converter
JP5456422B2 (en) Power electronics system state evaluation method
Depraetere et al. Identification of linear systems with binary outputs using short independent experiments
CN108871385B (en) Encoder, motor, encoder data processing method, and storage medium
CN113014206A (en) Scale factor temperature drift compensation device and method for current/frequency conversion circuit
Zhang et al. Asynchronous Estimation for Two-Dimensional Nonhomogeneous Markovian Jump Systems with Randomly Occurring Nonlocal Sensor Nonlinearities
CN109116725B (en) High-accuracy approximate pure hysteresis method and device
Karampetakis et al. Discretization of singular systems and error estimation

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
TR01 Transfer of patent right

Effective date of registration: 20201014

Address after: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Patentee after: GoerTek Optical Technology Co.,Ltd.

Address before: 266104 Laoshan Qingdao District North House Street investment service center room, Room 308, Shandong

Patentee before: GOERTEK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221123

Address after: 266104 No. 500, Songling Road, Laoshan District, Qingdao, Shandong

Patentee after: GOERTEK TECHNOLOGY Co.,Ltd.

Address before: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Patentee before: GoerTek Optical Technology Co.,Ltd.

TR01 Transfer of patent right