A kind of landform recognition methods
Technical field
The present invention relates to robotic technology fields, more particularly to a kind of landform recognition methods.
Background technology
Wheeled robot is often subject to the influence of barrier, therefore it will often detour to arrive at the destination.And leg foot formula
Robot can easily cross over groove, gap, step or sand ground in the non-structured landform movement of coarse and height
Etc. complicated landforms.But the stability of standing of leg legged type robot is a critical problem.In order to realize that walking robot exists
High stability walking under static and dynamic needs to consider such as roughness, friction coefficient, small geometry harm terrain parameter.
It is identified based on real-time landform, leg legged type robot can optimize paces pattern and leg gesture stability algorithm, and then improve steady
It is qualitative.
In the present invention, we devise a kind of landform recognition methods, including off-line training portion for leg legged type robot
Divide and online classification part.The advantages of the technical program, is as follows:1) classification of landform is carried out based on the analysis of joint pressure data,
It is not easily susceptible to the influence of external environmental interference, there is stronger environmental suitability;2) be based on time domain carry out feature extraction, have compared with
High operation efficiency;3) sample that the sample acquired offline obtains is simplified, has obtained representing sample set, has helped to reduce
The calculating time of subsequent classification algorithm;4) it by the analysis of the landform prediction data to history, can find out by mistake classification
Sample, and then on-line amending grader is to promote its performance.
Invention content
To solve the above problems, the present invention proposes a kind of landform recognition methods, include the following steps:
Off-line training part:
1. installing 4 pressure sensors in the leg joint of leg legged type robot, control robot is identified in expectation
It walks in landform, and collects pressure sensor signal, the sample frequency of sensor is N hertz, obtains each sensor reading
Time series ri, it sums to the reading of 4 pressure sensors on each sampled point, the time series r after being merged.
2. the time series r that pair the 1st step obtains carries out data segmentation as unit of time T, the number of μ data frame is obtained
According to frame set f={ a1,a2,a3,…,aμ, each element in f is a data frame, each data frame packet contains l=NT
A data.
3. the data frame set f that pair the 2nd step obtains carries out feature extraction and normalizes, the sample set of μ sample is obtained
Close Σ, each sample S in sample set Σt∈ Σ are by 6 feature descriptions, wherein t=1,2 ..., μ, then each sample It is a vector of 6 dimension sample spaces,It is StIn an element, subscript i=1,2 ..., 6;It is special
The extracting mode of sign is as follows:
4. the sample set Σ that pair the 3rd step obtains is marked, sample set omega={ (S is obtained1,Y1),(S2,Y2),…
(Sμ,Yμ), wherein Yt∈ C, t=1,2 ..., μ indicates sample StCorresponding label, YtThat is real terrain, μ indicate sample in Ω
Quantity;Landform set C={ c1,c2,…,cm, m indicates the quantity of landform.
5. calculating represents sample set
Extraction represents sample set Φ from the sample set Ω that the 4th step obtains, as follows:
5.1 initialization represent sample set Φ, and it is empty set to enable Φ;Generate sample set copy
5.2 fromOne sample E of middle taking-up, and fromMiddle deletion sample;
5.3 one new representative sample example collection R of generation are added in Φ, wherein R=E;
5.4 ifFor empty set, then step 5.6 is skipped to;Otherwise, fromOne sample E of middle taking-up, and fromMiddle deletion should
Sample;Then R is calculated+, meet ρ (R+, E) and=min { ρ (Ri,E),Ri∈ Φ }, wherein ρ indicates the sample and R of EiCenter of a sample
Euclidean distance, RiCenter of a sample be RiIn the corresponding sample of all samples mean value;
If 5.5 ρ (R+,E)>The label and R of σ or E+Label is different, then skips to step 5.3;Otherwise, E is added to R+
In, then skip to step 5.4;
5.6 algorithms stop, and obtain representing sample set Φ.
Online classification part:
6. acquiring k-th of data frame ak。
7. extracting feature from the data frame that the 6th step obtains and normalizing and obtain sample Sk。
8. the sample S that pair the 7th step obtainskLandform prediction is carried out using k-nearest neighbor model, uses Euler's distance first,
The calculating distance S of the Ω obtained in 4th stepkK nearest sample set N (Sk);Then N (S are foundk) in most most landform,
The landform x of as k-th predictionk;The toposequence X predictedk={ x1.x2,…,xk}。
9. classifier result amendment
The X that 8th step is obtainedk={ x1.x2,…,xkBe modified, modification method is as follows:
Wherein, cj∈C;II is indicative function, works as xi=cjWhen, II=1, otherwise II=0;τ>0 indicates length of window, is
Positive integer;It can obtain modified toposequence
10. grader amendment
9th step is obtainedIt is analyzed, ifThen utilize sampleIt corrects
Sample set Φ is represented, method is as follows:
Calculate R+, meet ρ (R+, E) and=min { ρ (Ri,E),Ri∈ Φ }, if ρ (R+,E)>The label and R of σ or E+Mark
Label are different, generate a new representative sample example collection R and are added in Φ, otherwise E is added to R by wherein R=E+In.
Compared with prior art, the present invention advantage is:1) classification of landform is carried out based on the analysis of joint pressure data,
It is not easily susceptible to the influence of external environmental interference, there is stronger environmental suitability;2) be based on time domain carry out feature extraction, have compared with
High operation efficiency;3) sample that the sample acquired offline obtains is simplified, has obtained representing sample set, has helped to reduce
The calculating time of subsequent classification algorithm;4) it by the analysis of the landform prediction data to history, can find out by mistake classification
Sample, and then on-line amending grader is to promote its performance.
Description of the drawings
Fig. 1 is the placement location schematic diagram of pressure sensor in the present invention
Fig. 2 is the distribution schematic diagram of pressure sensor in the present invention
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, below in conjunction with attached drawing and specific implementation
The present invention is described in detail for example.
As shown in Figure 1, the present invention is divided into off-line training part and online classification part, specific implementation step is as follows:
Off-line training part:
1. installing 4 pressure sensors, specific mounting means institute as shown in Figure 1, Figure 2 in the leg joint of leg legged type robot
Show;Control robot walks on it is expected identified landform, and collects pressure sensor signal, and the sample frequency of sensor is
N hertz, obtain the time series r of each sensor readingi, it sums to the reading of 4 pressure sensors on each sampled point,
Time series r after being merged.
2. the time series r that pair the 1st step obtains carries out data segmentation as unit of time T, the number of μ data frame is obtained
According to frame set f={ a1,a2,a3,…,aμ, each element in f is a data frame, each data frame packet contains l=NT
A data.
3. the data frame set f that pair the 2nd step obtains carries out feature extraction and normalizes, the sample set of μ sample is obtained
Close Σ, each sample S in sample set Σt∈ Σ are by 6 feature descriptions, wherein t=1,2 ..., μ, then each sample It is a vector of 6 dimension sample spaces,It is StIn an element, subscript i=1,2 ..., 6;It is special
The extracting mode of sign is as follows:
4. the sample set Σ that pair the 3rd step obtains is marked, sample set omega={ (S is obtained1,Y1),(S2,Y2),…
(Sμ,Yμ), wherein Yt∈ C, t=1,2 ..., μ indicates sample StCorresponding label, YtThat is real terrain, μ indicate sample in Ω
Quantity;Landform set C={ c1,c2,…,cm, m indicates the quantity of landform.
5. calculating represents sample set
Extraction represents sample set Φ from the sample set Ω that the 4th step obtains, as follows:
5.1 initialization represent sample set Φ, and it is empty set to enable Φ;Generate sample set copy
5.2 fromOne sample E of middle taking-up, and fromMiddle deletion sample;
5.3 one new representative sample example collection R of generation are added in Φ, wherein R=E;
5.4 ifFor empty set, then step 5.6 is skipped to;Otherwise, fromOne sample E of middle taking-up, and fromMiddle deletion should
Sample;Then R is calculated+, meet ρ (R+, E) and=min { ρ (Ri,E),Ri∈ Φ }, wherein ρ indicates the sample and R of EiCenter of a sample
Euclidean distance, RiCenter of a sample be RiIn the corresponding sample of all samples mean value;
If 5.5 ρ (R+,E)>The label and R of σ or E+Label is different, then skips to step 5.3;Otherwise, E is added to R+
In, then skip to step 5.4;
5.6 algorithms stop, and obtain representing sample set Φ.
Online classification part:
6. acquiring k-th of data frame ak。
7. extracting feature from the data frame that the 6th step obtains and normalizing and obtain sample Sk。
8. the sample S that pair the 7th step obtainskLandform prediction is carried out using k-nearest neighbor model, uses Euler's distance first,
The calculating distance S of the Ω obtained in 4th stepkK nearest sample set N (Sk);Then N (S are foundk) in most most landform,
The landform x of as k-th predictionk;The toposequence X predictedk={ x1.x2,…,xk}。
9. classifier result amendment
The X that 8th step is obtainedk={ x1.x2,…,xkBe modified, modification method is as follows:
Wherein, cj∈C;II is indicative function, works as xi=cjWhen, II=1, otherwise II=0;τ>0 indicates length of window, is
Positive integer;It can obtain modified toposequence
10. grader amendment
9th step is obtainedIt is analyzed, ifThen utilize sampleCorrect generation
Table sample set Φ, method are as follows:
Calculate R+, meet ρ (R+, E) and=min { ρ (Ri,E),Ri∈ Φ }, if ρ (R+,E)>The label and R of σ or E+Mark
Label are different, generate a new representative sample example collection R and are added in Φ, otherwise E is added to R by wherein R=E+In.
In order to verify the present invention, we are separately operable using legged mobile robot in 6 kinds of common landform, and acquire joint
Pressure sensor signal.Each landform about 10 minutes data of record.Sample rate is 10Hz, therefore the sound of each landform
Sequence length is 6000 sampled points.We carried out truncated data with 2 seconds, obtained 1800 samples in total, and each sample is one
Data frame, including 20 pressure datas.These data are handled using MATLAB softwares and obtain grader on the desktop
Model, and carry out cross validation with test set.Error rate before amendment is 28.9%, is 18.3% after amendment, it is seen that this
Invention is effective.