Disclosure of Invention
In order to solve the technical problems, the invention provides a human body characteristic vibration waveform extraction and analysis device and a use method thereof.
In order to achieve the above object, the present invention provides an apparatus for extracting and analyzing a human body characteristic vibration waveform, comprising:
the piezoelectric sensor is made of a piezoelectric film and used for acquiring the vibration intensity of a human body and outputting an analog signal;
the amplifier is connected with the piezoelectric sensor and used for amplifying the analog signal;
the filter circuit is connected with the amplifier and is used for dividing the analog signal into a low-pass data analog signal and a high-pass data analog signal;
the analog-to-digital converter is connected with the filter circuit and is used for converting the low-pass data analog signal and the high-pass data analog signal into a low-pass data digital signal and a high-pass data digital signal;
the micro control unit is connected with the analog-to-digital converter, acquires the low-pass data digital signal and the high-pass data digital signal as original data at the frequency of 200Hz, and directly pushes the acquired original data into a cyclic array; performing FFT filtering on the original data in the array, filtering the original data on a frequency domain at a specific frequency, and dividing the original data into heartbeat waveform data and respiratory waveform data; searching an extreme value for identifying and judging the quantity of heartbeats and breaths in each section of data; and extracting heart rate and respiration rate, analyzing the heartbeat waveform data and the respiration waveform data obtained by filtering respectively, and extracting the heart rate data and the respiration rate data through waveforms.
Further, the voltage variation range of the piezoelectric sensor is-100 mV to 100 mV.
The use method of the human body characteristic vibration waveform extraction and analysis device comprises the following steps:
s1, hardware filtering
The piezoelectric sensor made of the piezoelectric film outputs an analog signal for acquiring the intensity of vibration, and the voltage variation range is-100 mV to 100 mV;
the charge amplifier amplifies the analog signal, so that the upper and lower amplitudes of the signal are both in the acquisition range of the analog/digital converter;
the filter circuit filters the analog signals, and low-pass data analog signals and high-pass data analog signals of the analog signals are obtained at the analog front end at different band-pass frequencies;
s2, data acquisition
An analog-to-digital converter converts the low-pass data analog signal and the high-pass data analog signal into a low-pass data digital signal and a high-pass data digital signal;
the micro control unit collects the low-pass data digital signals and the high-pass data digital signals at the frequency of 200Hz as original data, and directly pushes the collected original data into a cyclic array;
s3, FFT Filtering
The embedded platform performs time domain to frequency domain conversion on the low-pass data digital signal and the high-pass data digital signal which are stored in the array by self-realization of an FFT algorithm, two different band-pass frequencies are used again, the heartbeat use frequency is 2-10Hz, the respiration use frequency is 0.1-0.5Hz, and after components except a target data frequency band are eliminated in the frequency domain, the data are restored by using inverse FFT; the restored data is heartbeat data or respiration data; respectively storing the filtered data into the arrays for the next step of processing;
s4, searching filtered data extreme value
Carrying out extremum search on the data acquired in the S3, searching extremum for the data in the current array in a sliding window mode, wherein the window size needs to be adjusted to 60ms data compared with the size of each window according to the sampling rate and the monitoring heart rate range; finding out all maximum values and minimum values of the current array;
filtering the extreme value by comparing the maximum value with the minimum value, filtering the searched extreme value, eliminating the points which do not accord with the conditions, and storing the rest points into an extreme value array for the next calculation;
for the respiratory data, all data of the current array types are searched for an extremum value in a sliding window mode, and the window size can be set to be 500 ms; comparing the maximum value with the subsequent minimum value for no more than 500ms, and determining that the interval between the minimum value and the previous maximum value is no less than 100ms, and storing the filtered extreme value points into an array for the next calculation;
s5, calculating the heart rate and the respiration rate
Calculating the heart rate by using the number of the extreme points in the extreme value array, wherein the calculation mode is that the length of the original data array is converted into time according to the sampling rate, the number of the found maximum values is divided by the time, and the time is multiplied by 60 seconds/minute:
the respiratory rate calculation mode is the same as the heart rate calculation mode, the length of the original data array is converted into time according to the sampling rate, the number of the searched maximum values is divided by the time, and the time is multiplied by 60 seconds/minute:
advantageous effects
The invention provides a human body characteristic vibration waveform extraction and analysis device and a use method thereof, which can simply and accurately process and extract human body sign data acquired by a piezoelectric sensor, and the application of FFT filtering can greatly increase the accuracy of a data extraction result, and the flow and related algorithms are tested to be well represented in embedded equipment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in figures 1-6 of the drawings,
a human body characteristic vibration waveform extraction and analysis device comprises:
the piezoelectric sensor is made of a piezoelectric film and used for acquiring the vibration intensity of a human body and outputting an analog signal; the voltage variation range of the piezoelectric sensor is-100 mV to 100 mV.
The amplifier is connected with the piezoelectric sensor and used for amplifying the analog signal;
the filter circuit is connected with the amplifier and is used for dividing the analog signal into a low-pass data analog signal and a high-pass data analog signal;
the analog-to-digital converter is connected with the filter circuit and is used for converting the low-pass data analog signal and the high-pass data analog signal into a low-pass data digital signal and a high-pass data digital signal;
the micro control unit is connected with the analog-to-digital converter, acquires the low-pass data digital signal and the high-pass data digital signal as original data at the frequency of 200Hz, and directly pushes the acquired original data into a cyclic array; performing FFT filtering on the original data in the array, filtering the original data on a frequency domain at a specific frequency, and dividing the original data into heartbeat waveform data and respiratory waveform data; searching an extreme value for identifying and judging the quantity of heartbeats and breaths in each section of data; and extracting heart rate and respiration rate, analyzing the heartbeat waveform data and the respiration waveform data obtained by filtering respectively, and extracting the heart rate data and the respiration rate data through waveforms.
The use method of the human body characteristic vibration waveform extraction and analysis device comprises the following steps:
s1, hardware filtering
According to the electrical characteristics of the used piezoelectric sensor, the specific parameters of the analog front end are different, the output of the piezoelectric sensor made of the used piezoelectric film is an analog signal, and the voltage variation range is about-100 mV to 100mV according to the intensity of the sensed vibration;
firstly, the mean value of a signal is improved to be the middle value of an ADC (analog to digital converter) acquisition range, namely the input voltage is 0-3.3V, and the signal is amplified by a charge amplifier so that the upper and lower amplitudes of the signal are in the ADC range;
then, filtering is carried out by using a filter circuit, and the signals are divided into original analog signals of low-pass data signals and high-pass data signals at the analog front end by using different band-pass frequencies;
s2, data acquisition
Original heartbeat and respiration analog signals obtained by hardware filtering are converted into digital signals through an equipment mainboard ADC, an MCU acquires original data at the frequency of 200Hz, and the acquired data are directly pushed into a cyclic array to wait for further processing;
the original data waveform at this time is shown in fig. 2: fig. 2 is a waveform diagram with the abscissa as time in milliseconds (ms) converted from the collected points according to the sampling rate and the ordinate as voltage generated by vibration. The waveform reflects the changing force acting on the sensor, and the force is converted into an electric signal through the piezoelectric effect and is detected by the MCU. In fig. 2, the vibration waveform with noise is observed, and the abscissa of the graph is observed, and the first heartbeat interval is roughly estimated as a peak, and is about 700ms, that is, 0.7 s.
S3, FFT Filtering
Using an FFT algorithm which is self-realized by an embedded platform, converting the time domain to the frequency domain of the low-pass signal original data stored in the array, reusing two different band-pass frequencies, wherein the heartbeat use frequency is 2-10Hz, the respiration use frequency is 0.1-0.5Hz, and restoring the data by using inverse FFT after eliminating the components except the target data frequency band on the frequency domain; the restored data is heartbeat data or respiration data; respectively storing the filtered data into the arrays for the next step of processing; the obtained heartbeat waveform is quite clear, and the waveform generated by each heartbeat can be basically observed;
the waveform of fig. 3 is a graph in which the abscissa is time in milliseconds (ms), the number of collected points is converted according to the sampling rate, and the ordinate is the voltage generated by vibration. The waveform reflects the changing force acting on the sensor, and the force is converted into an electric signal through the piezoelectric effect and is detected by the MCU. Comparing the ordinate of fig. 3 with the ordinate of fig. 2, it is known that the waveforms at the two ends are generated by the same vibration, and after filtering, the vibration amplitude of fig. 3 is smaller than that of fig. 2, because a part of noise energy is filtered, the filtered graph is clearer, and information can be extracted more accurately.
As shown in fig. 4, the respiration waveform is as follows (here, a waveform of 2 breaths): fig. 4 is a waveform diagram in which the abscissa is time in milliseconds (ms) converted from the collected points according to the sampling rate and the ordinate is voltage generated by vibration. The waveform reflects the changing force acting on the sensor, and the force is converted into an electric signal through the piezoelectric effect and is detected by the MCU.
S4, searching filtered data extreme value
And performing extremum search on the data acquired in the step S3, searching extremum for the data in the current array in a sliding window mode, wherein the window size needs to be adjusted to 60ms data compared with the window size according to the sampling rate and the monitored heart rate range. Finding out all maximum values and minimum values of the current array, wherein the found extreme values reflect the following points in each heartbeat waveform: as shown in fig. 5, the abscissa of the waveform of fig. 5 is time in milliseconds (ms), the collected points are converted according to the sampling rate, and the ordinate is voltage generated by vibration. The waveform reflects the changing force acting on the sensor, and the force is converted into an electric signal through the piezoelectric effect and is detected by the MCU.
The extreme value data found at the moment cannot be guaranteed to be ideal, and accurate heartbeat data are marked, so that the extreme value data cannot be directly used for calculating the heart rate; filtering the extreme value by using a method for comparing the maximum value with the minimum value, and according to the existing research literature about the heart, the maximum time interval between the maximum value and the minimum value found in each heartbeat is considered not to exceed 150ms, so that the searched extreme value is filtered by using the judgment condition, the points which do not meet the condition are eliminated, and the rest points are stored in an extreme value array for the next calculation;
for respiratory data, all data of the current array types are searched for extremum values in a sliding window mode, the window size can be set to 500ms, and the extremum marking result is as follows: as shown in fig. 6, the abscissa of the waveform of fig. 6 is time in milliseconds (ms), the collected points are converted according to the sampling rate, and the ordinate is voltage generated by vibration. The waveform reflects the changing force acting on the sensor, and the force is converted into an electric signal through the piezoelectric effect and is detected by the MCU.
Comparing the maximum value with the subsequent minimum value for no more than 500ms, and determining that the interval between the minimum value and the previous maximum value is no less than 100ms, and storing the filtered extreme value points into an array for the next calculation;
s5, calculating the heart rate and the respiration rate
Calculating the heart rate (BPM) by using the number of the extreme points in the extreme value array, converting the length of the original data array into time (t) according to the sampling rate, dividing the time by the number (n) of the found maximum values, and multiplying the time by 60 seconds/minute:
the breathing rate calculation mode is the same as the heart rate calculation mode, the length of the original data array is converted into time (t) according to the sampling rate, the number (n) of the searched maximum values is divided by the time, and the time is multiplied by 60 seconds/minute:
by adopting the method, the human body sign data acquired by the piezoelectric sensor can be simply and accurately processed and extracted, and the accuracy of the data extraction result can be greatly improved by applying the FFT filtering, so that the method disclosed by the invention is well represented in embedded equipment after being tested.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.