The specific embodiment:
A kind of head sleeping posture of digital sound of snoring signal identification is corrected pillow type device, comprise the medicated pillow body, adorn 4 air bags 1,2,3,4 in the medicated pillow body, air bag 1,2,3,4 is connected with miniature inflator pump 5,6,7,8 respectively, air bag 1,2,3,4 is connected with baroceptor 9,10,11,12 respectively, and baroceptor 9,10,11,12 is connected with electric damper air bleeding valve 13,14,15,16 respectively; The sound collector (condenser type MIC) 17 of gathering sound is set in the medicated pillow body, sound collector with acoustical signal is carried out pretreated amplification and is connected with filter circuit 18, amplification is connected with digital signal processing device 19 with filter circuit, and digital signal processing device is connected with each baroceptor and each electric damper air bleeding valve.Digital signal processing device is the digital signal processing device that DSP forms.
Operation principle of the present invention is: extract sleeper's acoustical signal by condenser type MIC (17), via amplify and filter circuit (18) to the acoustical signal pretreatment, pass to circuit (19) after reaching certain signal to noise ratio.The digital signal processing device that circuit (19) is made up of DSP, it is that digital signal is transferred to DSP inside then to the analog-signal transitions of circuit (18) output at first.DSP utilizes BP neutral net (being also referred to as the multilayer perception network) to handle the acoustical signal of input, and the sound of snoring feature according to learning in advance identifies the sound of snoring in the respiratory murmur.After the sound of snoring arrives certain number of times, judge the gas pressure of the baroceptor (9,10,11,12) that communicates with air bag (1,2,3,4) earlier, according to pressure control micro air pump (5,6,7, the 8) inflation or the aerofluxus of control damping air bleeding valve (13,14,15,16) of each air bag.Because the change of pressure changes the volume of its inflation in the air bag, the posture that has changed sleeper's head reaches improves the purpose that breath rhythm promotes sleep quality.
The BP neutral net has three-decker promptly in DSP: input layer 20, hidden layer 21 (also claiming the intermediate layer) and output layer 22, as shown in Figure 2.
Circle among the figure is represented neuron, and each neuron between the adjacent layer is realized full the connection, promptly descends each neuron of one deck all to realize being connected entirely with each neuron of last layer, does not connect but have between each neuron in every layer.
Utilize the multilayer perception network to carry out the process that pattern recognition must have " study ".Both at first each different sound of snoring pattern was set a desired output.Propagate to output layer through the intermediate layer then to network input model of memory, and by input layer, this process is called " pattern is saequential transmission broadcast ".Actual output is the study error with the difference of desired output.According to the rule of " least squares error ", successively revise the connection weights by output layer toward the intermediate layer, this process is called " error Back-Propagation ".Along with the alternate repetition of " pattern is saequential transmission broadcast " and " error Back-Propagation " process carries out.The actual output of network approaches to pairing desired output separately gradually, and network also constantly rises to the accuracy of the response of input pattern.By this learning process, determine with preserve each interlayer be connected weights after just can from acoustical signal, identify the sound of snoring.
The BP Learning Algorithms is the learning style of Minimum Mean Square Error.Hypothesis BP network has N processing unit for every layer earlier, and each processing unit is non-linear input/output relation, and the output function of employing is:
f(x)=1/[1+exp(-x)] (1)
Training set comprises M sample mode to (X
k, Y
k) (k=1,2 ..., m), the input summation of P sample unit j is designated as net
Pj, the output note of unit i is made O
Pj, then:
net
pj=∑W
jiO
pi (2)
O
pj=1/[1+exp(-net
pj)] (3)
W wherein
JiBe neuron i, the weights of getting in touch between j.
If arbitrarily the network initial weight is set,, between the actual input of network and the desired output certain error is arranged, the define grid error so to each input pattern P:
E
p=1/2∑(d
pj-O
pi)
2 (4)
E=∑E
P (5)
D in the formula
PjRepresent P input pattern, the desired output of output unit j.
Based on this ultimate principle, sound of snoring identifying of the present invention mainly realizes by " learning training " and " identification " two stages,
1, " learning training process "
Input sample---pretreatment---feature extraction---BP network training
The input sample: the sound of snoring sample that at first will gather becomes digital signal input computer.
Pretreatment: then sample signal is carried out pretreatment such as denoising, amplitude adjustment, normalization.
Feature extraction: the eigenvalue sample that digital audio signal is taken out it is to (X
k, Y
k), as the input value of BP network.
The BP network training: BP network training process is divided into " pattern is saequential transmission broadcast " " error Back-Propagation ":
When the forward direction of " pattern is saequential transmission broadcast " training is started working, weighting parameters such as first initialization " input layer---hidden layer " and " hidden layer---output layer ".
Sample is scanned one by one, the sound in the sample is extracted characteristic vector, they are transported to input layer, according to the weights W that connects between neuron
JiCalculate net
Pj, O
Pj, obtain the ideal output of this layer; These data obtain the ideal output of hidden layer equally as the input of hidden layer; Pass to output layer from hidden layer again, obtain the result.
" error Back-Propagation " is that the result of output layer and desirable output are compared, and calculates the weights error on each node of output layer, according to the error on each node of Error Calculation hidden layer on the output layer node; Calculate the error of hidden layer, input layer more respectively, to each interneuronal weights correction.
To add up error in the error Back-Propagation, calculate mean square error, if the mean square error value of meeting the expectation, and be no more than maximum cycle and then jump out circulation.If do not reach the error amount of expection, perhaps surpassed maximum cycle-index, need to change training parameter.Finish up to training.
After training finishes, can generate multi-group data: the both number information of the weights between the weights between input layer and the hidden layer, hidden layer and output layer and each layer node is stored among the ROM of DSP the identification use for the back respectively.
2, " identifying "
Step: sound to be identified---pretreatment---feature extraction---BP Network Recognition
Through the early stage pretreatment and sample training work, found proper weight equivalence after, just can discern.At first, system acquisition sleeper's respiratory murmur.(X when reading training
k, Y
k) be kept at the data among the ROM, then digital audio and video signals is scanned one by one.Shift to an earlier date method as characteristic in the above-mentioned learning training process, constitutive characteristic value sample is right.The characteristic vector of extracting is transported to input layer, and the forward direction input treatment channel according to weights information activation pattern is saequential transmission broadcast obtains differentiating the output result on the neuron output node.Promptly finished the identification of this respiratory murmur signal.
Concrete hands-on approach based on the pillow formula nip automatic regulating system of sound of snoring identification is:
(1) each several part among Fig. 1 is placed on (particular location can be regulated according to individual's situation test and determine) in sleeper's the medicated pillow respectively.
(2) by condenser type MIC (17) collection sleeper's respiratory murmur, after circuit (18) pretreatment, be sent in the circuit (19).
(3) utilize DSP identification software of the present invention that the respiratory murmur signal that obtains is discerned processing.
(4) sound of snoring that identifies is carried out degree and judge, and, change its sleeping posture, reach the state that reduces or eliminate respiratory obstruction the airbag aeration or the venting of sleeper's incidence.