Arithmetic mean of instantaneous value filtering method and device and equipment based on gyroscope acceleration

文档序号:1770591 发布日期:2019-12-03 浏览:15次 中文

阅读说明:本技术 基于陀螺仪加速度的算术平均值滤波方法和装置以及设备 (Arithmetic mean of instantaneous value filtering method and device and equipment based on gyroscope acceleration ) 是由 欧阳满玉 刘凯 李友余 张严林 于 2019-08-01 设计创作,主要内容包括:本发明公开了一种基于陀螺仪加速度的算术平均值滤波方法和装置以及设备。其中,所述方法包括:通过陀螺仪采集机器人在行走时的三轴加速度数据,和根据该通过陀螺仪采集机器人在行走时的三轴加速度数据,通过算术平均值滤波算法,计算该通过陀螺仪采集机器人在行走时的三轴加速度数据的算术平均值。通过上述方式,能够实现通过无需做浮点运算的滤波算法,采用不带浮点运算单元的单片机亦能够实现对机器人的行走方向进行实时控制。(The invention discloses a kind of arithmetic mean of instantaneous value filtering methods and device and equipment based on gyroscope acceleration.Wherein, the described method includes: acquiring the 3-axis acceleration data of robot when walking by gyroscope, gyroscope should be passed through with basis and acquire the 3-axis acceleration data of robot when walking, by arithmetic mean of instantaneous value filtering algorithm, the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope is calculated.By the above-mentioned means, can be realized through the filtering algorithm without doing floating-point operation, it also can be realized using the single-chip microcontroller without FPU Float Point Unit and real-time control carried out to the direction of travel of robot.)

1. a kind of arithmetic mean of instantaneous value filtering method based on gyroscope acceleration characterized by comprising

The 3-axis acceleration data of robot when walking are acquired by gyroscope;

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, are calculated by arithmetic average value filtering Method calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope.

2. as described in claim 1 based on the arithmetic mean of instantaneous value filtering method of gyroscope acceleration, which is characterized in that described The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, pass through arithmetic mean of instantaneous value filtering algorithm, meter Calculate the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope, comprising:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, by passing through gyro described in acquisition Instrument acquires newest ten data in the 3-axis acceleration data of robot when walking, by newest ten of the acquisition Data remove maximum value and minimum value, remove the sum of eight data of residue of maximum value and minimum value described in calculating, then move to right three The arithmetic mean of instantaneous value filtering algorithm of position calculates the arithmetic mean of instantaneous value of remaining eight data, and calculating is described to be adopted by gyroscope Collect the arithmetic mean of instantaneous value of the 3-axis acceleration data of robot when walking.

3. as described in claim 1 based on the arithmetic mean of instantaneous value filtering method of gyroscope acceleration, which is characterized in that described Robot 3-axis acceleration data when walking are acquired by gyroscope according to described, by arithmetic mean of instantaneous value filtering algorithm, After the arithmetic mean of instantaneous value for calculating the 3-axis acceleration data by gyroscope acquisition robot when walking, further includes:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, retains predetermined number With the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

4. as claimed in claim 3 based on the arithmetic mean of instantaneous value filtering method of gyroscope acceleration, which is characterized in that described right It is described robot 3-axis acceleration data when walking are acquired by gyroscope to optimize, retain predetermined number with it is described The immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, comprising:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, passes through top described in comparison Spiral shell instrument acquires the absolute difference of robot 3-axis acceleration data when walking and the arithmetic mean of instantaneous value being calculated, The absolute difference that the comparison obtains is ranked up by sequence from small to large, and according to the sequence from small to large into Capable sequence, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

5. a kind of arithmetic mean of instantaneous value filter based on gyroscope acceleration characterized by comprising

Acquisition module and computing module;

The acquisition module, for acquiring the 3-axis acceleration data of robot when walking by gyroscope;

The computing module leads to for acquiring the 3-axis acceleration data of robot when walking by gyroscope according to described Arithmetic mean of instantaneous value filtering algorithm is crossed, the calculation for acquiring the 3-axis acceleration data of robot when walking by gyroscope is calculated Art average value.

6. as claimed in claim 5 based on the arithmetic mean of instantaneous value filter of gyroscope acceleration, which is characterized in that the meter Module is calculated, is specifically used for:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, by passing through gyro described in acquisition Instrument acquires newest ten data in the 3-axis acceleration data of robot when walking, by newest ten of the acquisition Data remove maximum value and minimum value, remove the sum of eight data of residue of maximum value and minimum value described in calculating, then move to right three The arithmetic mean of instantaneous value filtering algorithm of position calculates the arithmetic mean of instantaneous value of remaining eight data, and calculating is described to be adopted by gyroscope Collect the arithmetic mean of instantaneous value of the 3-axis acceleration data of robot when walking.

7. as claimed in claim 5 based on the arithmetic mean of instantaneous value filter of gyroscope acceleration, which is characterized in that the base In the arithmetic mean of instantaneous value filter of gyroscope acceleration, further includes:

Optimization module;

The optimization module, for described excellent by the 3-axis acceleration data progress of gyroscope acquisition robot when walking Change, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

8. as claimed in claim 7 based on the arithmetic mean of instantaneous value filter of gyroscope acceleration, which is characterized in that described excellent Change module, be specifically used for:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, passes through top described in comparison Spiral shell instrument acquires the absolute difference of robot 3-axis acceleration data when walking and the arithmetic mean of instantaneous value being calculated, The absolute difference that the comparison obtains is ranked up by sequence from small to large, and according to the sequence from small to large into Capable sequence, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

9. a kind of arithmetic mean of instantaneous value filter apparatus based on gyroscope acceleration characterized by comprising

At least one processor;And

The memory being connect at least one described processor communication;Wherein,

The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so that at least one described processor is able to carry out according to any one of claims 1 to 4 based on gyroscope The arithmetic mean of instantaneous value filtering method of acceleration.

10. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located Reason device realizes the arithmetic mean of instantaneous value filtering method described in any one of Claims 1-4 based on gyroscope acceleration when executing.

Technical field

The present invention relates to gyroscope technology field more particularly to a kind of arithmetic average value filterings based on gyroscope acceleration Method and apparatus and equipment.

Background technique

Robot when walking, if necessary to control direction, usually first acquires 3-axis acceleration number with gyroscope According to the mode for carrying out data fusion again with three axis angular rate data, to control the direction of travel of robot.Gyroscope exists When acquiring the 3-axis acceleration data of robot, there are biggish random errors, generally use Kalman filtering, single order complementation filter The filtering algorithms such as wave, second order complementary filter compensate.The Kalman filtering of the use, single order complementary filter, second order complementation filter The mode that the filtering algorithms such as wave compensate can preferably compensate the random error, but the Kalman of the use The filtering algorithms such as filtering, single order complementary filter, second order complementary filter need to do a large amount of floating-point operation can be to this with chance error Difference compensates, if using the single-chip microcontroller without FPU (Float Point Unit, FPU Float Point Unit), it is difficult to realization pair The random error carries out real-time compensation, leads to not realize the direction of travel progress real-time control to robot.

But at least there are the following problems in the prior art for inventor's discovery:

The existing filters solutions based on gyroscope acceleration, usually first acquire 3-axis acceleration data and three with gyroscope Axis angular rate data carry out the mode of data fusion again, and to control the direction of travel of robot, gyroscope is in harvester When the 3-axis acceleration data of device people, there are biggish random errors, generally use Kalman filtering, single order complementary filter, two The filtering algorithms such as rank complementary filter compensate, the filter such as Kalman filtering, single order complementary filter, second order complementary filter of the use Wave algorithm, which needs to do a large amount of floating-point operation, to compensate the random error, if using without FPU Float Point Unit Single-chip microcontroller, cannot achieve and real-time control is carried out to the direction of travel of robot.

Summary of the invention

In view of this, it is an object of the invention to propose a kind of arithmetic mean of instantaneous value filtering method based on gyroscope acceleration With device and equipment, can be realized by the filtering algorithm without doing floating-point operation, using the list without FPU Float Point Unit Piece machine, which also can be realized, carries out real-time control to the direction of travel of robot.

According to an aspect of the present invention, a kind of arithmetic mean of instantaneous value filtering method based on gyroscope acceleration is provided, is wrapped It includes:

The 3-axis acceleration data of robot when walking are acquired by gyroscope;

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, are filtered by arithmetic mean of instantaneous value Wave algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope.

Wherein, described that the 3-axis acceleration data of robot when walking are acquired by gyroscope according to, pass through calculation It is flat to calculate the arithmetic for acquiring the 3-axis acceleration data of robot when walking by gyroscope for art average value filtering algorithm Mean value, comprising:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, by passing through described in acquisition Gyroscope acquires newest ten data in the 3-axis acceleration data of robot when walking, by the newest of the acquisition Ten data remove maximum value and minimum value, remove the sum of eight data of residue of maximum value and minimum value described in calculating, then right Three arithmetic mean of instantaneous value filtering algorithms are moved, the arithmetic mean of instantaneous value of remaining eight data is calculated, passes through gyro described in calculating Instrument acquires the arithmetic mean of instantaneous value of the 3-axis acceleration data of robot when walking.

Wherein, the 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, passed through Arithmetic mean of instantaneous value filtering algorithm calculates the arithmetic that the 3-axis acceleration data of robot when walking are acquired by gyroscope After average value, further includes:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, retains default It is several with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

It is wherein, described to be optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, Retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, comprising:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, it is more described logical It crosses the 3-axis acceleration data of gyroscope acquisition robot when walking and the difference of the arithmetic mean of instantaneous value being calculated is exhausted To value, the absolute difference that the comparison obtains is ranked up by sequence from small to large, and according to it is described from small to large The sequence that sequence carries out, retain predetermined number with the immediate 3-axis acceleration number of the arithmetic mean of instantaneous value being calculated According to.

According to another aspect of the present invention, a kind of arithmetic mean of instantaneous value filter based on gyroscope acceleration is provided, Include:

Acquisition module and computing module;

The acquisition module, for acquiring the 3-axis acceleration data of robot when walking by gyroscope;

The computing module, for acquiring the 3-axis acceleration number of robot when walking by gyroscope according to described According to by arithmetic mean of instantaneous value filtering algorithm, calculating is described to acquire the 3-axis acceleration number of robot when walking by gyroscope According to arithmetic mean of instantaneous value.

Wherein, the computing module, is specifically used for:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to described, by passing through described in acquisition Gyroscope acquires newest ten data in the 3-axis acceleration data of robot when walking, by the newest of the acquisition Ten data remove maximum value and minimum value, remove the sum of eight data of residue of maximum value and minimum value described in calculating, then right Three arithmetic mean of instantaneous value filtering algorithms are moved, the arithmetic mean of instantaneous value of remaining eight data is calculated, passes through gyro described in calculating Instrument acquires the arithmetic mean of instantaneous value of the 3-axis acceleration data of robot when walking.

Wherein, the arithmetic mean of instantaneous value filter based on gyroscope acceleration, further includes:

Optimization module;

The optimization module, for it is described by gyroscope acquire robot 3-axis acceleration data when walking into Row optimization, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

Wherein, the optimization module, is specifically used for:

It is optimized to described by the 3-axis acceleration data of gyroscope acquisition robot when walking, it is more described logical It crosses the 3-axis acceleration data of gyroscope acquisition robot when walking and the difference of the arithmetic mean of instantaneous value being calculated is exhausted To value, the absolute difference that the comparison obtains is ranked up by sequence from small to large, and according to it is described from small to large The sequence that sequence carries out, retain predetermined number with the immediate 3-axis acceleration number of the arithmetic mean of instantaneous value being calculated According to.

According to a further aspect of the invention, a kind of arithmetic mean of instantaneous value filter apparatus based on gyroscope acceleration is provided, Include:

At least one processor;And

The memory being connect at least one described processor communication;Wherein,

The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes so that at least one described processor be able to carry out it is described in any of the above embodiments based on gyroscope acceleration Arithmetic mean of instantaneous value filtering method.

According to a further aspect of the invention, a kind of computer readable storage medium is provided, computer program is stored with, institute It states and realizes the arithmetic mean of instantaneous value filter described in any of the above embodiments based on gyroscope acceleration when computer program is executed by processor Wave method.

It can be found that above scheme, can acquire the 3-axis acceleration data of robot when walking by gyroscope, and The 3-axis acceleration data of robot when walking can be acquired by gyroscope according to this, be calculated by arithmetic average value filtering Method calculates the arithmetic mean of instantaneous value for acquiring the 3-axis acceleration data of robot when walking by gyroscope, can be realized logical The filtering algorithm without doing floating-point operation is crossed, the row to robot also can be realized using the single-chip microcontroller without FPU Float Point Unit It walks direction and carries out real-time control.

Further, above scheme can acquire the 3-axis acceleration of robot when walking by gyroscope according to this Data acquire newest ten stroke count in robot 3-axis acceleration data when walking by obtaining this by gyroscope According to newest ten data of the acquisition are removed maximum value and minimum value, calculate the residue for removing maximum value and minimum value The sum of eight data, then three arithmetic mean of instantaneous value filtering algorithms are moved to right, the arithmetic mean of instantaneous value of eight data of residue is calculated, is counted The arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope is calculated, such benefit is can Realize that the arithmetic that the 3-axis acceleration data of robot when walking are acquired by gyroscope can be acquired by being not necessarily to floating-point operation Average value can reduce this and pass through gyroscope existing random error when acquiring the 3-axis acceleration data of robot.

Further, above scheme can acquire the 3-axis acceleration number of robot when walking by gyroscope to this According to optimizing, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, in this way Benefit be that by improve this by gyroscope acquire the stability of robot 3-axis acceleration data when walking with Accuracy.

Further, above scheme can acquire the 3-axis acceleration number of robot when walking by gyroscope to this According to optimizing, compares this by gyroscope and acquire the 3-axis acceleration data and the calculation being calculated of robot when walking The absolute difference relatively obtained is ranked up by the absolute difference of art average value by sequence from small to large, and according to The sequence that the sequence from small to large carries out, retain predetermined number with immediate three axis of the arithmetic mean of instantaneous value being calculated Acceleration information, such benefit are that by the 3-axis acceleration for improving this by gyroscope acquisition robot when walking The stability and accuracy of data.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.

Fig. 1 is the flow diagram of one embodiment of arithmetic mean of instantaneous value filtering method the present invention is based on gyroscope acceleration;

Fig. 2 is the process signal of another embodiment of arithmetic mean of instantaneous value filtering method the present invention is based on gyroscope acceleration Figure;

Fig. 3 is the structural schematic diagram of one embodiment of arithmetic mean of instantaneous value filter the present invention is based on gyroscope acceleration;

Fig. 4 is the structural representation of another embodiment of arithmetic mean of instantaneous value filter the present invention is based on gyroscope acceleration Figure;

Fig. 5 is the structural schematic diagram of one embodiment of arithmetic mean of instantaneous value filter apparatus the present invention is based on gyroscope acceleration.

Specific embodiment

With reference to the accompanying drawings and examples, the present invention is described in further detail.It is emphasized that following implement Example is merely to illustrate the present invention, but is not defined to the scope of the present invention.Likewise, following embodiment is only portion of the invention Point embodiment and not all embodiments, institute obtained by those of ordinary skill in the art without making creative efforts There are other embodiments, shall fall within the protection scope of the present invention.

The present invention provides a kind of arithmetic mean of instantaneous value filtering method based on gyroscope acceleration, can be realized by without doing The filtering algorithm of floating-point operation, using the single-chip microcontroller without FPU Float Point Unit also can be realized to the direction of travel of robot into Row real-time control.

Referring to Figure 1, Fig. 1 is the stream of one embodiment of arithmetic mean of instantaneous value filtering method the present invention is based on gyroscope acceleration Journey schematic diagram.It is noted that if having substantially the same as a result, method of the invention is not with process sequence shown in FIG. 1 It is limited.As shown in Figure 1, this method comprises the following steps:

S101: the 3-axis acceleration data of robot when walking are acquired by gyroscope.

In the present embodiment, the gyroscope can be with the moment of momentum sensitivity shell relative inertness space of high-speed rotator around It is orthogonal to the angular movement detection device of one or two axis of the axis of rotation, is can be out using playing same function made of other principles The angular movement detection device of energy, the present invention are not limited.

S102: the 3-axis acceleration data of robot when walking are acquired by gyroscope according to this, pass through arithmetic average Value filtering algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope.

Wherein, which should acquire the 3-axis acceleration data of robot when walking by gyroscope, flat by arithmetic Mean Filtering Algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope, May include:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to this, pass through gyro by obtaining this Instrument acquires newest ten data in the 3-axis acceleration data of robot when walking, by newest ten stroke count of the acquisition According to maximum value and minimum value is removed, the sum of eight data of residue for removing maximum value and minimum value is calculated, then moves to right three Arithmetic mean of instantaneous value filtering algorithm calculates the arithmetic mean of instantaneous value of eight data of residue, and robot should be acquired by gyroscope by calculating The arithmetic mean of instantaneous value of 3-axis acceleration data when walking, such benefit is that by can acquire without floating-point operation This acquires the arithmetic mean of instantaneous value of the 3-axis acceleration data of robot when walking by gyroscope, can reduce this and passes through gyro Instrument existing random error when acquiring the 3-axis acceleration data of robot.

In the present embodiment, which can be acquired to the sampling frequency of the 3-axis acceleration data of robot when walking Rate is arranged to 500Hz (Hertz, hertz), i.e. 2ms (millisecond, millisecond) acquires three axis of a robot when walking Acceleration information, 20 milliseconds of ms acquire the 3-axis acceleration data of No. 10 robots when walking.It can in data space The 3-axis acceleration data of newest 10 robots when walking are stored to retain, which is being walked When 3-axis acceleration data remove maximum value and minimum value, calculate 8 data of residue for removing maximum value and minimum value With since 8 be precisely 2 cube, then move to right 3, do not need floating-point operation and can acquire this to acquire robot by gyroscope The arithmetic mean of instantaneous value of 3-axis acceleration data when walking can reduce this and be added by gyroscope in three axis for acquiring robot Existing random error when speed data.

Wherein, the 3-axis acceleration data of robot when walking should be acquired by gyroscope in the basis, pass through arithmetic Average value filtering algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope Later, can also include:

The 3-axis acceleration data of robot when walking are acquired by gyroscope to this to optimize, and retain predetermined number With the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, such benefit is that by raising, and this is logical Cross the stability and accuracy of the 3-axis acceleration data of gyroscope acquisition robot when walking.

It can be found that in the present embodiment, the 3-axis acceleration number of robot when walking can be acquired by gyroscope According to, and the 3-axis acceleration data of robot when walking can be acquired by gyroscope according to this, it is filtered by arithmetic mean of instantaneous value Wave algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope, Neng Goushi Now by the filtering algorithm without doing floating-point operation, also can be realized using the single-chip microcontroller without FPU Float Point Unit to robot Direction of travel carry out real-time control.

Further, in the present embodiment, three axis of robot when walking can be acquired by gyroscope according to this to add Speed data acquires newest ten in robot 3-axis acceleration data when walking by obtaining this by gyroscope Newest ten data of the acquisition are removed maximum value and minimum value by data, are calculated this and are removed the surplus of maximum value and minimum value Remaining the sums of eight data, then move to right three arithmetic mean of instantaneous value filtering algorithms, calculates the arithmetic mean of instantaneous value of eight data of residue, The arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope is calculated, such benefit is energy It is enough to realize that the calculation that the 3-axis acceleration data of robot when walking are acquired by gyroscope be acquired by being not necessarily to floating-point operation Art average value can reduce this and pass through gyroscope existing random error when acquiring the 3-axis acceleration data of robot.

Fig. 2 is referred to, Fig. 2 is another embodiment of arithmetic mean of instantaneous value filtering method the present invention is based on gyroscope acceleration Flow diagram.In the present embodiment, method includes the following steps:

S201: the 3-axis acceleration data of robot when walking are acquired by gyroscope.

Can be as above described in S101, therefore not to repeat here.

S202: the 3-axis acceleration data of robot when walking are acquired by gyroscope according to this, pass through arithmetic average Value filtering algorithm calculates the arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope.

Can be as above described in S102, therefore not to repeat here.

S203: the 3-axis acceleration data of robot when walking are acquired by gyroscope to this and are optimized, are retained pre- If number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

Wherein, this acquires the 3-axis acceleration data of robot when walking by gyroscope to this and optimizes, and retains Predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, may include:

The 3-axis acceleration data of robot when walking are acquired by gyroscope to this to optimize, and are compared this and are passed through top Spiral shell instrument acquires the 3-axis acceleration data and the absolute difference of the arithmetic mean of instantaneous value being calculated of robot when walking, will The absolute difference relatively obtained is ranked up by sequence from small to large, and the row carried out according to the sequence from small to large Sequence, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, such benefit is It can be realized and improve the stability and accuracy that acquire the 3-axis acceleration data of robot when walking by gyroscope.

It can be found that in the present embodiment, three axis of robot when walking can be acquired by gyroscope to this and accelerated Degree according to optimizing, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, Such benefit, which is that by, improves the stabilization that the 3-axis acceleration data of robot when walking are acquired by gyroscope Property and accuracy.

Further, in the present embodiment, three axis of robot when walking can be acquired by gyroscope to this to accelerate Degree compares this and is calculated by the 3-axis acceleration data of gyroscope acquisition robot when walking with this according to optimizing Arithmetic mean of instantaneous value absolute difference, which is ranked up by sequence from small to large, and According to the sequence that the sequence from small to large carries out, retain the immediate with the arithmetic mean of instantaneous value being calculated of predetermined number 3-axis acceleration data, such benefit is that by raising, and this is added by three axis of gyroscope acquisition robot when walking The stability and accuracy of speed data.

The present invention also provides a kind of arithmetic mean of instantaneous value filters based on gyroscope acceleration, can be realized by being not necessarily to The filtering algorithm for doing floating-point operation also can be realized the direction of travel to robot using the single-chip microcontroller without FPU Float Point Unit Carry out real-time control.

Fig. 3 is referred to, Fig. 3 is the knot of one embodiment of arithmetic mean of instantaneous value filter the present invention is based on gyroscope acceleration Structure schematic diagram.It should include 31 He of acquisition module based on the arithmetic mean of instantaneous value filter 30 of gyroscope acceleration in the present embodiment Computing module 32.

The acquisition module 31, for acquiring the 3-axis acceleration data of robot when walking by gyroscope.

The computing module 32 should acquire the 3-axis acceleration data of robot when walking for basis by gyroscope, By arithmetic mean of instantaneous value filtering algorithm, the calculation that the 3-axis acceleration data of robot when walking are acquired by gyroscope is calculated Art average value.

Optionally, the computing module 32, can be specifically used for:

The 3-axis acceleration data of robot when walking are acquired by gyroscope according to this, pass through gyro by obtaining this Instrument acquires newest ten data in the 3-axis acceleration data of robot when walking, by newest ten stroke count of the acquisition According to maximum value and minimum value is removed, the sum of eight data of residue for removing maximum value and minimum value is calculated, then moves to right three Arithmetic mean of instantaneous value filtering algorithm calculates the arithmetic mean of instantaneous value of eight data of residue, and robot should be acquired by gyroscope by calculating The arithmetic mean of instantaneous value of 3-axis acceleration data when walking.

Fig. 4 is referred to, Fig. 4 is another embodiment of arithmetic mean of instantaneous value filter the present invention is based on gyroscope acceleration Structural schematic diagram.It is different from an embodiment, the arithmetic mean of instantaneous value filter based on gyroscope acceleration described in the present embodiment 40 further include optimization module 41.

The optimization module 41 is carried out for acquiring the 3-axis acceleration data of robot when walking by gyroscope to this Optimization, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

Optionally, the optimization module 41, can be specifically used for:

The 3-axis acceleration data of robot when walking are acquired by gyroscope to this to optimize, and are compared this and are passed through top Spiral shell instrument acquires the 3-axis acceleration data and the absolute difference of the arithmetic mean of instantaneous value being calculated of robot when walking, will The absolute difference relatively obtained is ranked up by sequence from small to large, and the row carried out according to the sequence from small to large Sequence, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated.

Each unit module of the arithmetic mean of instantaneous value filter 30/40 based on gyroscope acceleration can execute respectively It states and corresponds to step in embodiment of the method, therefore each unit module is not repeated herein, refer to the above corresponding step Explanation.

The present invention provides a kind of arithmetic mean of instantaneous value filter apparatus based on gyroscope acceleration again, as shown in Figure 5, comprising: At least one processor 51;And the memory 52 with the communication connection of at least one processor 51;Wherein, memory 52 stores There is the instruction that can be executed by least one processor 51, instruction is executed by least one processor 51, so that at least one is handled Device 51 is able to carry out the above-mentioned arithmetic mean of instantaneous value filtering method based on gyroscope acceleration.

Wherein, memory 52 is connected with processor 51 using bus mode, and bus may include any number of interconnection Bus and bridge, bus is by one or more processors 51 together with the various circuit connections of memory 52.Bus can also incite somebody to action Together with various other circuit connections of management circuit or the like, these are all abilities for such as peripheral equipment, voltage-stablizer Well known to domain, therefore, it will not be further described herein.Bus interface is provided between bus and transceiver and is connect Mouthful.Transceiver can be an element, is also possible to multiple element, such as multiple receivers and transmitter, provides for passing The unit communicated on defeated medium with various other devices.The data handled through processor 51 are carried out on the radio medium by antenna Transmission, further, antenna also receives data and transfers data to processor 51.

Processor 51 is responsible for management bus and common processing, can also provide various functions, including timing, periphery connects Mouthful, voltage adjusting, power management and other control functions.And memory 52 can be used for storage processor 51 and execute behaviour Used data when making.

The present invention provides a kind of computer readable storage medium again, is stored with computer program.Computer program is processed Device realizes above method embodiment when executing.

It can be found that above scheme, can acquire the 3-axis acceleration data of robot when walking by gyroscope, and The 3-axis acceleration data of robot when walking can be acquired by gyroscope according to this, be calculated by arithmetic average value filtering Method calculates the arithmetic mean of instantaneous value for acquiring the 3-axis acceleration data of robot when walking by gyroscope, can be realized logical The filtering algorithm without doing floating-point operation is crossed, the row to robot also can be realized using the single-chip microcontroller without FPU Float Point Unit It walks direction and carries out real-time control.

Further, above scheme can acquire the 3-axis acceleration of robot when walking by gyroscope according to this Data acquire newest ten stroke count in robot 3-axis acceleration data when walking by obtaining this by gyroscope According to newest ten data of the acquisition are removed maximum value and minimum value, calculate the residue for removing maximum value and minimum value The sum of eight data, then three arithmetic mean of instantaneous value filtering algorithms are moved to right, the arithmetic mean of instantaneous value of eight data of residue is calculated, is counted The arithmetic mean of instantaneous value that the 3-axis acceleration data of robot when walking are acquired by gyroscope is calculated, such benefit is can Realize that the arithmetic that the 3-axis acceleration data of robot when walking are acquired by gyroscope can be acquired by being not necessarily to floating-point operation Average value can reduce this and pass through gyroscope existing random error when acquiring the 3-axis acceleration data of robot.

Further, above scheme can acquire the 3-axis acceleration number of robot when walking by gyroscope to this According to optimizing, retain predetermined number with the immediate 3-axis acceleration data of the arithmetic mean of instantaneous value being calculated, in this way Benefit be that by improve this by gyroscope acquire the stability of robot 3-axis acceleration data when walking with Accuracy.

Further, above scheme can acquire the 3-axis acceleration number of robot when walking by gyroscope to this According to optimizing, compares this by gyroscope and acquire the 3-axis acceleration data and the calculation being calculated of robot when walking The absolute difference relatively obtained is ranked up by the absolute difference of art average value by sequence from small to large, and according to The sequence that the sequence from small to large carries out, retain predetermined number with immediate three axis of the arithmetic mean of instantaneous value being calculated Acceleration information, such benefit are that by the 3-axis acceleration for improving this by gyroscope acquisition robot when walking The stability and accuracy of data.

In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can To realize by another way.For example, device embodiments described above are only schematical, for example, module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, institute Display or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit Indirect coupling or communication connection can be electrical property, mechanical or other forms.

Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can select some or all of unit therein according to the actual needs to realize the mesh of present embodiment scheme 's.

In addition, each functional unit in each embodiment of the present invention can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.

It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute each implementation of the present invention The all or part of the steps of methods.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various It can store the medium of program code.

The foregoing is merely section Examples of the invention, are not intended to limit protection scope of the present invention, all utilizations Equivalent device made by description of the invention and accompanying drawing content or equivalent process transformation are applied directly or indirectly in other correlations Technical field, be included within the scope of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于陀螺仪加速度的多级滤波方法和装置以及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!