A kind of wireless unbundling human body behavioral value algorithm
Technical field
The invention belongs to feature extraction, pattern recognition and behavioral value field, be specifically related to a kind of wireless unbundling human body
Behavioral value algorithm.
Background technology
Now with development and the raising of people's living standard of science and technology, Smart Home theory and virtual reality skill
Art has obtained rapid development.As people can manipulate smart machine in indoor by certain gestures, by limbs Behavior modeling
Operation realizes more preferably game experiencing and man-machine interaction.People it is also proposed new requirement for life monitoring technology simultaneously.Logical
Cross the sitting posture sleeping position of detection people, if the health monitoring systems of Deviant Behavior reflection people's healths such as smoking;Can be
Old man or child make prompting in time and notify the life early warning system of medical personnel and household before falling or falling down.On
The premise of the realization stating technology is all the limbs behavior that requirement system could accurately detect and identify people.
The method realizing human body behavioral value at present mainly has image recognition algorithm based on photographic head, based on sensor with
Detection algorithm based on wifi signal.
Image recognition algorithm based on photographic head generally can realize a high-precision behavioral value system, but such
Within system requirements people necessarily be in the monitoring range of photographic head, under the influence of barrier and light, easily produce monitoring
Blind area, the privacy of people is also lived and is caused interference greatly by simultaneity factor.
Sensor-based detection algorithm requires that user binds special installation on health and carries out the such system of behavior perception
Although system will not produce impact to privacy of user, but cannot meet the convenience of use.
Detection algorithm based on wifi signal is by analyzing the difference that the feature such as signal frequency, amplitude is produced by human body behavior
Changing pattern identifies limbs behavior, and owing to the information comprised in these signal characteristics is less, and existing system does not have analysis
The ability of complicated limbs behavior so that system identification accuracy and practicality are by certain limitation.
Summary of the invention
In order to solve the problems of the prior art, the present invention proposes a kind of different changes by analyzing channel condition information
Pattern identifies human body behavior, it is possible to while realizing higher recognition accuracy, meet the one nothing of convenience and safety
Line unbundling human body behavioral value algorithm.
In order to realize object above, the technical solution adopted in the present invention is: comprise the following steps:
1) system deployment and model initialization: wireless transmitting terminals sets up the wifi field of waveform stabilization, performs in wifi field
Each metaaction, wireless receiving end receives wifi signal and calculates the CSI value of each metaaction, and the CSI to each metaaction
After value carries out noise filtering, draw the change oscillogram at the CSI phase angle of each metaaction according to sequential, preserve waveform change sequence
Row feature, as metaaction template sequence feature, completes to initialize;
2) action sequence feature extraction to be identified: user performs action to be identified in wifi field, wireless receiving end calculates
Complete the CSI value of action to be identified, and after the CSI value treating identification maneuver carries out noise filtering, draw the CSI of action to be identified
The timing variations oscillogram at phase angle, preserves waveform variation characteristic as action sequence feature to be identified;
3) Activity recognition:
3.1) the timing variations oscillogram at the CSI phase angle treating identification maneuver carries out rim detection, determines action executing
Initial and end time;
3.2) utilize dynamic time warping calculate all metaaction template sequence features distance value between any two, and to
Upper distance value is averaged as threshold value T;
3.3) dynamic time warping is utilized to treat identification maneuver sequence signature with each metaaction template sequence feature one by one
Mate, and calculate the distance value between action sequence feature to be identified and each metaaction template sequence feature successively, if away from
Distance values is not to be all higher than threshold value T, then the metaaction that chosen distance value is minimum is as the recognition result of action to be identified;If distance value
It is all higher than threshold value T, then recognition failures, jumps to step 2) re-start identification, if distance value is still all higher than threshold value T, then will
This action sequence feature to be identified preserves as metaaction template sequence feature.
Described step 1) in system deployment time need wifi field is debugged under static situation: wireless transmitting terminals is sent out
The signal waveform penetrated is X, and the ratio that signal waveform is Y, Y and X that wireless receiving termination receives is the CSI under static situation
Value, is worth for plural number, and wireless receiving end draws CSI phase angle timing waveform, if waveform fluctuation range is less than 0.2dBm, then it is assumed that
Waveform stabilization;After otherwise improving signal transmission power, then draw CSI phase angle timing waveform, until waveform fluctuation range is little
In 0.2dBm.
Described step 1) in the CSI value of each metaaction and described step 2) in treat the CSI value of identification maneuver and adopt
Noise filtering is realized with wavelet transformation.
Described wavelet transformation uses many shellfishes western small echo db3 that CSI value is carried out noise filtering process.
Described wavelet transformation uses three rank wavelet transformations to carry out noise filtering process:
The formula of (1) first rank wavelet transformation is as follows:
Wherein, x [2n-k] represents original input signal;What n represented is array indexing;K represents circulation summation variable, from 0
To the most infinite traversal;G [k] and h [k] represents low pass and high pass weight coefficient respectively, and g [k] and h [k] is determined by db3 small echo;Thus
Obtain single order low-frequency wavelet coefficients x1,L[n] and single order high-frequency wavelet coefficient x1,H[n], subscript 1 represents the first rank wavelet transformation,
x1,L[n] and x1,H[n] coefficient corresponds respectively to low frequency component and the high fdrequency component of original input signal;
(2) second-order wavelet transformation is by x1,L[n], as input signal, the formula obtaining second-order wavelet transformation is as follows:
Thus obtain second order low-frequency wavelet coefficients x2,L[n] and second order high-frequency wavelet coefficient x2,H[n];
(3) the 3rd rank wavelet transformations are by x2,L[n], as input signal, the formula obtaining the 3rd rank wavelet transformation is as follows:
Thus obtain three rank low-frequency wavelet coefficients x3,L[n] and three rank high-frequency wavelet coefficient x3,H[n];
(4) according to x1,L[n]、x1,H[n]、x2,L[n]、x2,H[n]、x3,L[n] and x3,H[n] is carried out under different frequency resolution
Signal analysis, the formula of reconstruction signal is as follows:
cj[n]=∑kg[n-2k]xj+1,L[n]+∑kh[n-2k]xj+1,H[n]
Wherein j represents the exponent number that wavelet transformation is different, is reconstructed the signal of every single order from back to front, finally gives
c1[n] is the signal after denoising, completes noise filtering.
All by the wavedec () in Matlab wavelet transformation tool set, appcoef in three described rank wavelet transformations
(), three functions of detcoef () are calculated low-frequency wavelet coefficients and the high-frequency wavelet coefficient on first, second and third rank.
Described step 3.3) in distance value between motion characteristic to be identified and each metaaction template characteristic calculate process
As follows:
(1) matrix D and the d of two n × m, respectively Cumulative Distance matrix D and frame matching distance matrix d, wherein n are set
With the length that m is respectively action waveforms sequence to be identified and metaaction wave sequence;
(2) by the frame matching distance matrix between cycle calculations action waveforms to be identified sequence and metaaction wave sequence
D, (i, j) i-th element and jth element in metaaction wave sequence in element representation action waveforms to be identified sequence in matrix
Between distance;
(3) calculate Cumulative Distance matrix D, make D (0,0)=0, to each point (i, j) respectively calculate:
((i, j) (D (i-1, j), D (i-1, j-1), D (i, j-1)), wherein i, j represent and wait to know+min D respectively for i, j)=d
Do not move and make i-th element and jth element in metaaction wave sequence in wave sequence;
(4) (n m) represents the distance between action waveforms sequence to be identified and metaaction wave sequence to select D.
Described step 1) in wireless transmitting terminals be for wifi signal launch wireless router, wireless receiving end for use
In the wireless router that wifi signal receives.
Compared with prior art, the present invention utilizes wireless transmitting terminals to set up wifi field, when user is wifi area of coverage expert
When walking or make certain action, wifi channel can be produced specific impact, utilize wireless receiving end receive wifi signal and count
The CSI value of calculation action, extracts channel change feature, to wifi when utilizing people to move in wifi field or perform certain action
The different variation characteristics that channel produces, by analyzing the different changing patteries of channel condition information, use feature extraction and classifying
Matching algorithm carries out Activity recognition, the different changing patteries of human body behavior and channel is combined, thus realizes using wifi channel
Feature identifies human body behavior, and the present invention can meet convenience and safety while realizing higher recognition accuracy, and
Need not user and carry any special installation, the privacy life of user will not be recorded, there is convenient easily deployment, the spy that safety is high
Point.
Further, need when system deployment under static situation, wifi field to be debugged, make wireless transmitting terminals launch
Stable wifi field, and make the waveform fluctuation range of wireless receiving end drafting CSI phase angle timing waveform less than 0.2dBm, have
It is beneficial to improve the identification precision to action.
Further, selecting many shellfishes western small echo db3 to process data, db3 small echo has a following two advantage: 1) have
Preferably orthogonal symmetry, convenient calculating and signal reconstruction;2) db3 small echo can produce zero as far as possible many wavelet coefficients, favorably
In data compression with abate the noise.Selecting three rank wavelet transformations, to obtain the signal effect after denoising best, the most effectively eliminates and makes an uproar
Sound, remains again the local feature of signal.
Accompanying drawing explanation
Fig. 1 is system deployment and model initialization flow chart;
Fig. 2 is action sequence feature extraction flow chart to be identified;
Fig. 3 is Activity recognition flow chart;
Fig. 4 is Second-Order Discrete wavelet transform procedure figure;
Fig. 5 a is the noisy characteristic sequence figure obtained after two users perform same action, and Fig. 5 b is discrete little through three rank
Wave conversion denoising characteristic sequence result figure;
Fig. 6 is the characteristic sequence dynamic time warping result figure of action to be identified and template metaaction.
Detailed description of the invention
Below in conjunction with specific embodiment and Figure of description, the present invention is further explained.
When the present invention utilizes user move in wifi field or perform certain action, the different changes that wifi channel is produced
Change feature, use feature extraction and classifying matching algorithm to carry out Activity recognition, specifically include following steps:
Step one, see Fig. 1, system deployment and model initialization:
1., at two wireless routers of indoor deployment, a transmitting for wifi signal, one for wifi signal
Receive;
Opening two wireless routers the most simultaneously, launch signal waveform X for one, another receives signal waveform is Y, then
The ratio of Y Yu X is the CSI under static situation, is worth for plural number;
3. draw CSI phase angle timing waveform, if waveform fluctuation range is less than 0.2dBm, then it is assumed that waveform stabilization, jump
Go to 5;
4. improve signal transmission power, jump to 2;
5. user is sequentially completed appointment metaaction (such as wave, walk, kick, squat down) in indoor;
6. the CSI value of channel when receiving terminal calculates each action of execution;
7. pair original CSI result carries out noise filtering;
8. the change oscillogram at CSI phase angle is drawn according to sequential;
9. preserve the characteristic sequence feature mode as corresponding element action of waveform;
10. Initialize installation completes, and system returns;
Step 2, see Fig. 2, action sequence feature extraction to be identified:
1. opening two wireless routers, transmitting terminal sends signal waveform X;
2. user is in one action to be identified of indoor execution;
3. receive ratio that signal waveform is Y, Y and X as CSI value at receiving terminal;
4. pair original CSI value carries out noise filtering;
5. draw the timing variations oscillogram at CSI phase angle;
6. system returns;
Step 3, see Fig. 3, Activity recognition:
1. pair CSI phase waveform figure carries out rim detection, determines the initial of action executing and end time;
2. utilize dynamic time warping (Dynamic Time Warping, DTW) to calculate any two constituent element motion characteristic sequences
Distance value between row, averages as threshold value T to above distance value;
3. utilize DTW that the characteristic sequence of motion characteristic to be measured with metaaction template is mated, calculate both it successively
Between distance value;
If 4. distance value is all higher than threshold value T, jump to 6;
5. the metaaction that chosen distance value is minimum, as the recognition result of action to be measured, jumps to 7;
6. screen prompt identification mistake, jumps to step 2 behavior sequence to be identified feature extraction, re-executes dynamic
Make and abstraction sequence feature;
7. screen exports the recognition result of action to be measured;
8. system returns.
Core methed in the present invention is as follows:
1. in system deployment and model initialization and action sequence feature extraction to be identified, CSI value is carried out noise mistake
Filter, is waveform noise filtering based on wavelet transform:
The original CSI value obtained comprises substantial amounts of noise information, noise mainly by the Gaussian white noise in environment with logical
The thermal noise composition of letter equipment, in order to improve the accuracy of the 3rd step Activity recognition, needs to filter the noise in signal.
The reason that can not simply use low pass or high pass filter to carry out noise filtering is that we cannot determine useful signal in advance
Frequency range and design preferable wave filter.We use discrete wavelet transformer to bring and realize noise filtering.Discrete wavelet changes
By original signals and associated noises repeatedly being decomposed and reconstructing, carry out the analysis that fine granularity is multiple dimensioned, thus realize optimal
Filter effect.Wavelet transform can provide the optimal resolution of time-frequency domain simultaneously, can adapt to environmental change more flexibly
Impact on data.
The selection of wavelet function: observing that the primary signal entirety that we gather is relatively flat, we select many shellfishes western little
Data are processed by ripple db3.Db3 small echo has a following two advantage: 1) have preferable orthogonal symmetry, convenient calculate with
Signal reconstruction;2) db3 small echo can produce zero much more as far as possible wavelet coefficients, beneficially data compression and abating the noise.
Wavelet transform denoising principle: the output result that a discrete series carries out wavelet transformation is one group of wavelet systems
Number.These coefficients correspond respectively to the high/low frequency component under list entries different frequency yardstick.The high frequency that would correspond to noise is little
Wave system number is set to zero, utilizes this group wavelet coefficient after change to be reconstructed signal, i.e. can get the signal after denoising.This
The difficult point of process is to select suitable wavelet transformation exponent number, thus separates signal and noise under optimum frequency resolution.
Through experimental verification, it is best that we select three rank wavelet transformations to obtain the signal effect after denoising, the most effectively eliminates noise,
Remain again the local feature of signal.
See Fig. 4, illustrate Second-Order Discrete wavelet transform procedure.It is formulated the first rank wavelet transformation as follows:
Wherein x [2n-k] represents the primary signal of input;What n represented is array indexing;K represents circulation summation variable, from 0
To the most infinite traversal;G [k] and h [k] represents low pass and high pass weight coefficient respectively, and these coefficients are determined by db3 small echo;Pass through
Three functions of wavedec () in Matlab wavelet transformation tool set, appcoef (), detcoef () can directly calculate low
Frequently wavelet coefficient x1,L[n] and high-frequency wavelet coefficient x1,H[n], subscript 1 represents the first rank wavelet transformation, these coefficients correspondence respectively
High fdrequency component and low frequency component in primary signal.Second-order wavelet transformation is by x1,L[n], as input signal, obtains second-order
The formula of wavelet transformation is as follows:
Thus obtain second order low-frequency wavelet coefficients x2,L[n] and second order high-frequency wavelet coefficient x2,H[n];
3rd rank wavelet transformation is by x2,L[n], as input signal, the formula obtaining the 3rd rank wavelet transformation is as follows:
Thus obtain three rank low-frequency wavelet coefficients x3,L[n] and three rank high-frequency wavelet coefficient x3,H[n];
This is according to x1,L[n]、x1,H[n]、x2,L[n]、x2,H[n]、x3,L[n] and x3,H[n] is carried out under different frequency resolution
Signal analysis, the formula of reconstruction signal is as follows:
cj[n]=∑kg[n-2k]xj+1,L[n]+∑kh[n-2k]xj+1,H[n]
Wherein j represents the exponent number that wavelet transformation is different, is reconstructed the signal of every single order from back to front, finally gives
c1[n] is the signal after denoising, completes noise filtering.It is noisy that Fig. 5 a represents that two users obtain after performing same action
Characteristic sequence figure, Fig. 5 b represents the denoising characteristic sequence result figure after three rank wavelet transforms, Denoising Algorithm main
Step is as follows:
(1) every time the original signals and associated noises sequence of 192 is carried out three rank wavelet transforms, obtain the high frequency of three layers with
Low-frequency wavelet coefficients;
(2) respectively by the high-frequency wavelet coefficient zero setting of three layers;
(3) utilize amended wavelet coefficient reconstruction signal, i.e. can get the signal sequence after denoising.
2. sequence signature coupling
This method (generally carrys out table by the distance between two sequences by calculating similarity degree between two sequences
Show) judge the action classification that action to be measured most likely belongs to.Owing to different users performs the moment of action and the fast of speed
Slow different, the length causing characteristic sequence is different.It is to say, the feature between two sequences is similar, simply in the time
On have the possibility not lined up, so needing under time shaft, one of them sequence to be distorted (warping), to reach the most right
Neat effect.This method uses dynamic time warping (Dynamic Time Warping, DTW) to realize this purpose.Sequence is special
Levy matching algorithm as follows:
(1) distance between action waveforms sequence to be measured and metaaction wave sequence is calculated, first two n × m's of application
Matrix D and d, respectively Cumulative Distance matrix and frame matching distance matrix, wherein n Yu m be respectively action waveforms sequence to be measured and
The length of metaaction wave sequence;
(2) by the frame matching distance matrix between two sequences of cycle calculations, in matrix, (i, j) element representation is to be measured dynamic
Make in wave sequence the distance between jth element in i-th element and metaaction wave sequence;
(3) calculate Cumulative Distance matrix D, make D (0,0)=0, to each point (i, j), calculate respectively D (i, j)=d (and i, j)
+ min (D (i-1, j), D (i-1, j-1), D (i, j-1)), wherein i, j represent i-th element in action waveforms sequence to be measured respectively
With jth element in metaaction wave sequence;
(4) (n m) represents the distance between action waveforms sequence to be measured and metaaction wave sequence to select D.
Fig. 6 represents the result figure after aliging two sequences, and solid line and dotted line represent action to be measured and template respectively
The characteristic sequence of action.
Present invention have the advantage that and use the human body behavioral value technology in the present invention compared with prior art, it is not necessary to
User carries any special installation, will not record the privacy life of user, and the accuracy of identification of system is by the obstacle in static situation
Thing and light impact are less.On the other hand, use dynamic time warping to carry out characteristic matching to be adapted to different user
Behavioral value, system can meet convenience and safety while realizing higher recognition accuracy.