Detailed Description
The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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.
Referring to fig. 1, a schematic flow chart of a method for heart rate detection according to an embodiment of the present invention is applied to a heart rate detection device, where the heart rate detection device includes a controller, a constant current source, a photosensitive device, and a light emitting device, the controller is respectively connected to the constant current source, the photosensitive device, and the light emitting device, and the method includes the following steps:
s101, the light emitting device emits monochromatic light to irradiate the detected object, and the photosensitive device converts the received reflected light of the detected object into a frequency signal and outputs the frequency signal to the controller.
In a specific implementation, as shown in fig. 2, a schematic diagram of a reflective optical measurement method, where a light emitting device, such as an LED lamp, contacts the skin of a subject, light emitted from the LED lamp passes through a micro vein and a micro artery to absorb corresponding light, and a light signal is received by a light sensing device at a receiving end, the embodiment employs the reflective optical measurement method, that is, the light emitting device emits light and receives light on the same side of the subject, so that the heart rate detection method is applicable to a wearable device, which can be worn on different parts of the living body, such as a wrist, an arm, a finger, a forehead, etc., to perform single-point measurement, and is applicable to measuring dynamic and static heart rates. Due to differences in skin color, muscle tissue and fat thickness of the person, and differences in the test area of the body, the relative position between the LED lamp and the receiving photosensitive device, such as a photosensor, can be adjusted as needed to receive a reasonable signal.
The LED lamp is used for sending monochromatic light, and the single light can adopt pure green or 640nm red light, 900nm infrared light and the like. The pure green light reflects better to human tissue, making the photosensor more receptive to signals. Red blood cells in human blood absorb red light and infrared light greatly, so that when the heart contracts, blood vessels are full, the blood vessels dilate, and blood flow of the blood vessels is less, light reflection is greatly different to form a heart rate waveform, the heart rate waveform is convenient to receive by a photosensitive device, and the frequency of the received reflected light is converted by the photosensitive device.
And S102, the controller carries out frequency digitization processing on the frequency signal to obtain a digital signal.
In a specific implementation, in order to further process the frequency signal, the controller needs to perform frequency digitization on the frequency signal, and the frequency signal can be processed and converted into a digital signal by the controller.
And S103, the controller extracts a direct current level from the digital signal and drives a constant current source to adjust the brightness of the light-emitting device.
In the specific implementation, because the brightness of a light emitting device, such as an LED lamp, affects the accuracy of the test, in order to ensure that the emitted monochromatic light is constant monochromatic light and to be able to more accurately measure the heart rate value, the brightness of the light emitting device needs to be automatically adjusted by the device. Therefore, in this embodiment, the controller obtains the dc level to drive the constant current source to adjust the brightness of the light emitting device.
And S104, the controller filters the digital signal and identifies the heart rate mode to obtain the heart rate value of the detected object.
In a specific implementation, in order to prevent the digital signal from being affected by the noise, the controller performs filtering processing on the digital signal to filter out the noise. The pattern recognition can be used for learning the brightness parameter information according to a preset rule, and the parameter information required by heart rate detection is obtained by processing and analyzing the parameters so as to calculate and obtain the heart rate value of the detected object.
By adopting the embodiment of the invention, the brightness of the light-emitting device can be adjusted by adopting a reflection type optical measurement method and adopting the constant current source, the measurement complexity is reduced, and the detection accuracy is improved.
Referring to fig. 3, a schematic flow chart of another heart rate detection method according to an embodiment of the present invention is applied to a heart rate detection device, where the heart rate detection device includes a controller, a constant current source, a photosensitive device, and a light emitting device, the controller is respectively connected to the constant current source, the photosensitive device, and the light emitting device, and the flow chart of the method is as follows:
the photosensitive device emits monochromatic light to irradiate a detected object such as a human body measuring part through the receiving light-emitting device, received reflected light of the detected object is converted into a frequency signal, and when the controller receives the frequency signal, the frequency signal is converted into a digital signal through frequency digitization processing; the digital signal is used for providing a constant current source for a light-emitting device such as an LED lamp, taking out a direct current level from a processed signal, converting the direct current level into an analog signal through a controller, processing the converted direct current level in a mode of increasing a modulation carrier for anti-interference, and driving the LED constant current source to adjust the brightness of the light-emitting device; and on the other hand, the method is used for calculating the heart rate, filtering the digital signal in a high-pass, low-pass and wave-limiting mode, acquiring a useful signal through heart rate mode identification processing, and calculating the heart rate value through the signal.
Referring to fig. 4, a schematic flow chart of another heart rate detection method according to an embodiment of the present invention is applied to a heart rate detection device, where the heart rate detection device includes a controller, a constant current source, a photosensitive device, and a light emitting device, the controller is respectively connected to the constant current source, the photosensitive device, and the light emitting device, and the method includes the following steps:
s201, at least two LED lamps emit monochromatic light to irradiate the detected object, the photosensitive device converts the received reflected light of the detected object into a frequency signal and outputs the frequency signal to the controller, and the LED lamps and the photosensitive device are not located at the same position.
In a specific implementation, as shown in fig. 2, the LED lamp contacts with the skin of the subject, the light emitted from the LED lamp passes through the venules and arterioles to absorb corresponding light, and the light signal is received by the light-sensitive device at the receiving end, and the embodiment adopts a reflective optical measurement method, i.e. the light is emitted and received on the same surface of the subject, so the heart rate detection method is applicable to wearing equipment, and the wearing equipment can be worn on different parts of the subject, such as wrists, arms, fingers, forehead and the like to perform single-point measurement, and is applicable to measuring dynamic and static heart rates. Due to differences in skin color, muscle tissue and fat thickness of the person, and differences in the test area of the body, the relative position between the LED lamp and the receiving photosensitive device, such as a photosensor, can be adjusted as needed to receive a reasonable signal.
The LED lamp is used for sending monochromatic light, and the single light can adopt pure green or red light of 640nm and infrared light of 900 nm. The pure green light reflects better to human tissue, making the photosensor more receptive to signals. Red blood cells in human blood absorb red light and infrared light very greatly, so when the heart contracts, blood vessels are full, the blood vessels dilate, and blood flow of the blood vessels is less, light reflection is greatly different to form a heart rate waveform, the heart rate waveform is convenient to receive by a photosensitive device, the received reflected light is subjected to frequency conversion by the photosensitive device, and a frequency signal is in direct proportion to the brightness of the reflected light.
The embodiment can send at least two beams of monochromatic light through at least two LED lamps, the photosensitive device receives at least two beams of reflected light irradiating the detected object, wherein a plurality of LED lamps are selected to send the plurality of beams of monochromatic light to generate the plurality of beams of reflected light, the more the reflected light beams are, the more accurate the monitoring data are, but the higher the cost of the monitoring device is, the detection method can be generally used in portable detection equipment, power is mainly supplied by batteries or storage batteries and the like, more LED lamps can consume more energy, and therefore the number of the LED lamps can be selected according to actual needs under the condition of considering power consumption and cost.
And S202, the controller carries out frequency digital processing on the frequency signal to obtain a digital signal.
In a specific implementation, in order to further process the frequency signal, the controller needs to perform frequency digitization on the frequency signal, and convert the frequency signal into a digital signal that can be further processed by the controller.
S203, the controller carries out moving average filtering on the digital signal to filter out periodic noise.
In specific implementation, the heart rate detection method is mainly applicable to portable wearable embedded devices, and because the embedded devices have limited memory space relative to other devices, a simplified operating system or no operating system is generally adopted, and the processing speed is low, in order to ensure that the digital signals are processed accurately, stably and reliably, and because the moving average filtering has a good filtering effect on periodic noise, the digital signals can be filtered in a moving average filtering mode, and a butterworth filter designed by MATLAB tool software can be selected during the moving average filtering, so that the development efficiency is improved, and a better filtering effect can be achieved.
And S204, after extracting the direct current level from the digital signal, the controller performs digital-to-analog conversion on the direct current level, processes the converted direct current level by adopting a mode of increasing a modulation carrier, and drives a constant current source to adjust the brightness of the light-emitting device.
In specific implementation, the brightness of a light-emitting device such as an LED (light-emitting diode) influences the accuracy of the testIn order to ensure that the emitted monochromatic light is constant monochromatic light so as to be able to measure the heart rate value more accurately, it is necessary to automatically adjust the brightness of the light emitting device by the apparatus. Therefore, in this embodiment, the controller obtains the dc level to drive the constant current source to adjust the brightness of the light emitting device. In this embodiment, any one of the acquired heart rate waveform signals is f (t) ═ f composed of dc and acD+fA(t)(ii) a Sine plus cosine signals all of which can be fourier decomposed into dc and various frequency componentsIn the formula A0I.e. the required dc levelTake out A0And acquiring the direct current level in the light brightness parameter.
In order to solve the interference on a specific frequency, the converted direct current component is processed by increasing a modulation carrier wave to obtain a constant current source to adjust the brightness of the LED lamp, so that the brightness of the LED lamp is kept in a constant state.
And S205, the controller performs filtering processing on the digital signal to obtain a filtered digital signal.
In a specific implementation, due to differences in skin color, thickness of muscle tissue and fat, and differences in body test parts of a test subject, the intensity of reflected light received by the photosensor may be different, and thus various kinds of clutter may appear after frequency digitization processing is performed according to the received reflected light signal. In order to prevent the digital signal from being affected by the noise, the controller filters the digital signal to filter out the noise. The controller can filter the digital signal by adopting a high-pass, low-pass and wave-limiting mode.
And S206, after the controller carries out heart rate mode identification processing on the filtered digital signal, acquiring the heart rate value of the detected object according to the digital signal after the heart rate mode identification processing.
In the concrete implementation, the controller carries out heart rate pattern recognition processing on the filtered digital signal, and the main steps comprise that the acquired information is subjected to normalization processing and the like, characteristic extraction and selection are carried out, the information provided by a training sample is changed into a discrimination function for discriminating objects in the training process, the characteristic components of the sample are classified according to the calculation result of the discrimination function, then whether the characteristic components meet the conditions of certain objects is analyzed, and finally the heart rate value of the measured object is calculated according to a heart rate value calculation formula.
By adopting the embodiment of the invention, the converted direct current level can be processed by adopting frequency datamation, direct current signal acquisition, DAC digital-to-analog conversion and modulation carrier increasing modes, the constant current source is driven to adjust the brightness of the light-emitting device, and the heart rate value is calculated after the processing by adopting filtering and heart rate mode identification, so that the stability of light emitted by the LED lamp is ensured, and the detection accuracy is improved.
Referring to fig. 5, a schematic structural diagram of another heart rate detection apparatus according to an embodiment of the present invention is shown, where the apparatus includes: the controller is respectively connected with the constant current source, the photosensitive device and the light-emitting device, and the light-emitting device is connected with the constant current source; wherein,
and a light emitting device 11 for emitting monochromatic light to be irradiated to the object to be detected.
In specific implementation, the light emitting device may be an LED lamp, or may be another light emitting device that can provide monochromatic light for a test. The light emitting device is used for sending monochromatic light, and the single light can adopt pure green or red light with the wavelength of 640nm, infrared light with the wavelength of 900nm and the like. The pure green light reflects better to human tissue, making the photosensor more receptive to signals. Red blood cells in human blood absorb red light and infrared light very greatly, so when the heart contracts, blood vessels are full, the blood flow of the heart expands and the blood vessels are less, the reflection of the light rays is greatly different, a heart rate waveform is formed, and the receiving of a photosensitive device is facilitated.
Because the photosensitive device receives at least two beams of reflected light irradiating an object to be detected, wherein a plurality of LED lamps are selected to send a plurality of monochromatic light beams to generate a plurality of reflected light beams, the more the reflected light beams are, the more accurate the detection data is, but the higher the cost of the detection device is, because the detection method can be generally used in portable detection equipment, the power is mainly supplied by batteries or storage batteries and the like, and more LED lamps consume more energy, the number of the LED lamps can be selected according to actual needs under the condition of considering the power consumption and the cost.
And the photosensitive device 12 is used for converting the received reflected light of the detected object into a frequency signal and outputting the frequency signal to the controller.
In the specific implementation, the photosensitive device is an element capable of converting an optical signal into a frequency signal, and the common photosensitive elements include a photoresistor, a photodiode and a phototriode. In the present embodiment, the photosensor is used to receive reflected light irradiated to the detected object. The heart rate detection method adopts a reflection type optical measurement method, namely, the light is emitted and received on the same side of a tested body, so the heart rate detection method can be suitable for wearing equipment, the wearing equipment can be worn on different parts of a living body, such as a wrist, an arm, a finger, a forehead and the like to carry out single-point measurement, and is suitable for measuring dynamic and static heart rates. Due to the difference of human skin color, muscle tissue and fat thickness and the difference of body test parts, the relative position between the light-emitting device and the light-sensitive device such as the light sensor can be adjusted according to the requirement to receive reasonable reflected light, the received reflected light is converted into a frequency signal, and the frequency signal is output to the controller, wherein the frequency signal is in direct proportion to the brightness of the reflected light.
The controller 13 is configured to perform frequency digitization on the frequency signal to obtain a digital signal, perform moving average filtering on the digital signal to filter out periodic noise, extract a dc level from the digital signal, perform digital-to-analog conversion on the dc level, process the converted dc level by increasing a modulation carrier, drive a constant current source to adjust the brightness of the light emitting device, perform filtering processing on the digital signal to obtain a filtered digital signal, further perform heart rate mode identification processing on the filtered digital signal, and obtain a heart rate value of the detected object according to the digital signal after the heart rate mode identification processing.
In specific implementation, the controller can adopt an MCU (microprogrammed control unit) microcontroller such as a Cortex _ M3 kernel, the microcontroller is a single-cycle simplified instruction, is operated in a pipeline mode and is operated in 32 bits, the microcontroller belongs to one of high-performance single-chip microcomputers at present, and the microcontroller is suitable for the current heart rate detection device. When the MCU is used for heart rate detection, the MCU is required to be provided with a catcher, a DAC digital-to-analog converter, a timer and other common peripherals. In order to facilitate further processing of the frequency signal, the controller needs to perform frequency digitization on the frequency signal, and the frequency signal can be processed and converted into a digital signal by the controller.
In this embodiment, the heart rate detection method is mainly applicable to a portable wearable embedded device, and because the embedded device has a limited memory space compared with other devices, a simplified operating system or no operating system is generally adopted, and the processing speed is low, so that in order to ensure that a controller can correctly, stably and reliably process a digital signal, and because the moving average filtering has a relatively good filtering effect on periodic noise, the digital signal can be filtered in a moving average filtering manner, and a butterworth filter designed by MATLAB tool software can be selected when the moving average filtering is performed, so that the development efficiency is improved, and a better filtering effect can be achieved.
Since the brightness of the light emitting device, such as an LED, affects the accuracy of the test, in order to ensure that the emitted monochromatic light is constant monochromatic light and to be able to measure the heart rate value more accurately, the brightness of the light emitting device needs to be automatically adjusted by the apparatus. Therefore, this embodimentIn the embodiment, the controller obtains a direct current level to drive the constant current source to adjust the brightness of the light-emitting device. In this embodiment, any one of the acquired heart rate waveform signals is f (t) ═ f composed of dc and acD+fA(t)(ii) a Sine plus cosine signals all of which can be fourier decomposed into dc and various frequency componentsIn the formula A0I.e. the required dc levelTake out A0And acquiring the direct current level in the light brightness parameter.
In order to solve the interference on a specific frequency, the converted direct current component is processed by increasing a modulation carrier wave to obtain a constant current source to adjust the brightness of the LED lamp, so that the brightness of the LED lamp is kept in a constant state.
Since the intensity of reflected light received by the photosensor may be different depending on differences in the subject such as skin color, muscle tissue, and fat thickness, and differences in the test portion of the body, various clutter may occur after frequency-digitizing processing is performed on the received reflected light signal. In order to prevent the digital signal from being affected by the noise, the controller filters the digital signal to filter out the noise. The controller can filter the digital signal by adopting a high-pass, low-pass and wave-limiting mode.
The controller carries out heart rate pattern recognition processing on the filtered digital signal, and the main steps comprise that after the acquired information is subjected to normalization processing and the like, feature extraction and selection are carried out, the information provided by a training sample is changed into a discrimination function for discriminating objects in the training process, sample feature components are classified according to the calculation result of the discrimination function, whether the sample feature components meet the conditions of certain objects is analyzed, and finally, the heart rate value of the tested object is calculated according to a heart rate value calculation formula.
And the constant current source 14 is used for adjusting the brightness of the light-emitting device.
In a specific implementation, the constant current source may be used to adjust the brightness of a light emitting device, such as an LED lamp, in this embodiment, the constant current source is a constant current source composed of an MSFET field effect transistor and an operational amplifier, and the constant current source is needed because the temperature change has a large image of the luminous intensity of the LED light emitting diode, and the light change affects the measurement accuracy.
By adopting the embodiment of the invention, the converted direct current level can be processed by adopting frequency datamation, direct current signal acquisition, DAC digital-to-analog conversion and modulation carrier increasing modes, the constant current source is driven to adjust the brightness of the light-emitting device, and the heart rate value is calculated after the processing by adopting filtering and heart rate mode identification, so that the stability of light emitted by the LED lamp is ensured, and the detection accuracy is improved.
Referring to fig. 6, a circuit diagram of a heart rate detection device according to an embodiment of the present invention is shown, where the circuit diagram of the heart rate detection device includes an LED lamp module 201, a processing module 202, an MCU microcontroller module 203, and a constant current source module 204, and specifically includes the following steps:
the LED lamp module 201 uses at least 2 LEDs to emit monochromatic light, and the LEDs may use pure green light or 640nm red light and 900nm infrared light. The pure green light reflects better to human tissues, and the photosensitive device is easy to receive useful signals; red blood cells in human blood have stronger absorption capacity to red light and infrared light, and when the condition that systole, blood vessel are full or diastole, blood vessel blood flow are less appears, the light reflection has great difference, the reflected light will form a heart rate waveform, makes things convenient for photosensitive device to receive.
The light receiving sensor module 202, in this embodiment, the light receiving sensor employs the light frequency conversion device TSL238, such sensor can linearly convert the received light brightness into a frequency signal for output, and has a wide receiving spectrum range, and the light waves from 500 and 900nm all have relatively good receiving efficiency.
The controller module 203, in this embodiment, is a Cortex _ M3 kernel MCU microcontroller, which is a single cycle reduced instruction, pipeline, 32-bit operation. In this embodiment, the MCU microcontroller is required to have a capture device, a DAC, a digital-to-analog converter, and a timer. In this embodiment, a 32-bit Cortex _ M3 kernel MCU microprocessor is adopted, or an 8-bit MCU microprocessor capable of completing the functions herein may be adopted, and the MCU microprocessor may be a self-contained D/a microprocessor, or a D/a may be separately added outside the MCU microprocessor to realize the digital-to-analog conversion function.
The MCU microcontroller software part adopts a catcher to obtain signals generated by the optical sensor, the signals are processed by the frequency digitization unit to obtain the brightness value, the MCU microcontroller realizes the processing of filter functions such as high pass, low pass, wave limiting, self-adaptive filtering and the like, then the signals enter the heart rate waveform mode identification unit, useful signals are distinguished, and finally the calculation of the heart rate value is completed. The filter may be a butterworth filter designed using MATLAB tool software. Since the sensor TSL238 itself has the function of anti-power frequency interference, the filter limiter only uses a simple moving average filter, because the moving average filter has a better filtering effect on the periodic noise. The DAC of the MCU microcontroller is converted from analog to digital, a TIMER TIMER is used for generating a time sequence control signal, namely a modulation carrier is generated, and finally a proper signal level is output through an I/O port.
And the constant current source module 204 is a constant current source consisting of a MOSFET (metal-oxide-semiconductor field effect transistor) and an operational amplifier. Because the temperature change has a large influence on the luminous intensity of the LED, and the light change can influence the change of the measured human body signal, the constant current source can be adopted, and the accuracy of the heart rate detection result is ensured.
The hardware device models listed in this embodiment are only examples listed, and this embodiment is not limited to the above-listed device models, and devices with related effects or functions are all within the protection scope of this embodiment.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by controlling the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.