CN111529829B - PPG (photoplethysmography) equipment and signal adjusting method thereof - Google Patents

PPG (photoplethysmography) equipment and signal adjusting method thereof Download PDF

Info

Publication number
CN111529829B
CN111529829B CN202010647476.XA CN202010647476A CN111529829B CN 111529829 B CN111529829 B CN 111529829B CN 202010647476 A CN202010647476 A CN 202010647476A CN 111529829 B CN111529829 B CN 111529829B
Authority
CN
China
Prior art keywords
light data
gain
current
preset
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010647476.XA
Other languages
Chinese (zh)
Other versions
CN111529829A (en
Inventor
陈良寿
卢赛文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202010647476.XA priority Critical patent/CN111529829B/en
Publication of CN111529829A publication Critical patent/CN111529829A/en
Application granted granted Critical
Publication of CN111529829B publication Critical patent/CN111529829B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02405Determining heart rate variability
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • A61B5/02427Details of sensor
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/0245Detecting, measuring or recording pulse rate or heart rate by using sensing means generating electric signals, i.e. ECG signals

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Cardiology (AREA)
  • Engineering & Computer Science (AREA)
  • Pathology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Physiology (AREA)
  • Biophysics (AREA)
  • Veterinary Medicine (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Signal Processing (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The embodiment of the application provides a signal adjusting method of PPG equipment and the PPG equipment. The method comprises the following steps: when the background light data does not satisfy the preset background light data interval or the actual effective light data does not satisfy the preset first effective light data interval, executing dimming operation, wherein the dimming operation comprises the following steps: determining a predicted current transfer ratio; estimating a driving current required by a light source and a gain required by a simulation front end; calculating estimated effective light data of the PPG equipment according to estimated driving current required by the light source, gain required by the analog front end and estimated current transmission ratio; and when the estimated effective light data meets a preset second effective light data interval, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end. According to the method provided by the embodiment of the application, the PPG signal can be rapidly and adaptively converged in the dynamic range of the ADC.

Description

PPG (photoplethysmography) equipment and signal adjusting method thereof
Technical Field
The application relates to the technical field of intelligent equipment, in particular to a PPG (photoplethysmography) equipment and a signal adjusting method thereof.
Background
The heart rate value can reflect the heart activity of a person, and further measure the health state of the person from the side. Heart rate measurement in hospitals often adopts an electrocardiogram mode, which is inconvenient to measure in daily activities and sports.
The scheme of photoplethysmography (PPG) is a method of illuminating human skin with a controllable Light source (e.g., a Light Emitting Diode (LED)), connecting a Photodiode (PD) with an Analog Front End (AFE) as a detector, and measuring attenuation Light of Light rays reflected and absorbed by blood vessels and tissues of a human body, thereby tracing the pulsation state of the blood vessels and measuring pulse waves. The PPG solution has the characteristics of simple acquisition of measurement signals and easy wearing of the measurement device, and is gradually becoming the main method for measuring blood oxygen, pulse and heart rate under non-hospital conditions.
In the PPG device, after the detector samples the PPG signal, the Analog PPG signal is transmitted to an Analog-to-Digital Converter (ADC) for conversion into a Digital quantity. The ADC outputs the digital quantity of the PPG signal to other control logic such as a Heart rate, Heart Rate Variability (HRV) algorithm, etc. The heart rate algorithm and the HRV algorithm have higher requirements on the stability of the PPG signal, and under the condition that the AC-DC ratio of the PPG signal is certain, the DC quantity is increased, the AC quantity can be correspondingly increased, and the accuracy of the algorithms such as the heart rate algorithm and the HRV algorithm can be improved. Since the dynamic range of the ADC is limited, in order to ensure that the signal quality of the PPG signal is stabilized in an optimal state, it is necessary to limit the range of the PPG signal to converge within the dynamic range of the ADC.
In practical application scenarios, component parameter changes of the PPG device (for example, component parameter changes caused by hardware performance degradation of PPG device components) and usage environment changes directly affect sampling of the PPG signal. For example, the PPG signal may be affected by background light, PPG device light source luminous intensity and angle, PPG device light source discreteness, data sampling window distance and angle from the skin, skin color, sub-skin tissue characteristics, PD size and photoelectric conversion efficiency, AFE gain, and other factors. When component parameters and/or usage environment of the PPG device change, it may cause the PPG signal to exceed the dynamic range of the ADC.
Disclosure of Invention
The application provides a signal adjusting method of a PPG device, the PPG device and a computer-readable storage medium, aiming at the problem that a PPG signal of the PPG device exceeds the dynamic range of an ADC.
The embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a signal adjustment method for a PPG device, including:
sampling background light data and mixed light data;
judging whether the backlight data meet a preset backlight data interval or not according to the backlight data, and/or judging whether the effective light data meet a preset first effective light data interval or not according to calculated actual effective light data, wherein the actual effective light data is a difference value of the mixed light data and the backlight data;
when the backlight data does not satisfy the preset backlight data interval, or the actual effective light data does not satisfy a first preset effective light data interval, performing a dimming operation, where the dimming operation includes:
determining an estimated current transfer ratio according to a preset current transfer ratio or an actual current transfer ratio of the PPG equipment;
estimating a driving current required by a light source and a gain required by a simulation front end based on a current driving current of the light source, a current gain of the simulation front end, sampled background light data and mixed light data of PPG equipment;
calculating estimated effective light data of the PPG equipment according to estimated driving current required by the light source, the gain required by the analog front end and the estimated current transmission ratio;
judging whether the estimated effective light data meet a preset second effective light data interval or not, and when the estimated effective light data meet the preset second effective light data interval, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end so as to adjust the driving current of the light source of the PPG equipment and the gain of the analog front end.
In a feasible implementation manner of the first aspect, when the estimated effective light data does not satisfy a preset second effective light data interval, according to the currently estimated driving current required by the light source and the gain required by the analog front end, the driving current required by the light source and the gain required by the analog front end are estimated again in a convergence manner, so as to recalculate the estimated effective light data;
and if the recalculated estimated effective light data meets a preset second effective light data interval, generating a current/gain value to be adjusted according to the newly estimated driving current required by the light source and the gain required by the analog front end.
In a feasible implementation manner of the first aspect, if the recalculated estimated effective light data does not satisfy a preset second effective light data interval and the currently estimated driving current and gain do not exceed an adjustable current interval and an adjustable gain interval preset by the PPG device, the driving current required by the light source and the gain required by the analog front end are estimated again by using a convergence manner.
In a feasible implementation manner of the first aspect, if the recalculated estimated effective light data does not satisfy the preset second effective light data interval and the currently estimated driving current and gain exceed the preset adjustable current interval and adjustable gain interval, the dimming operation is stopped.
In a possible implementation manner of the first aspect, the dimming operation further includes: before estimating the driving current required by the light source and the gain required by the analog front end, triggering a primary adjustment when the background light data does not meet the preset background light data interval, wherein the primary adjustment comprises:
and adjusting the current gain of the analog front end in a convergence mode.
In a possible implementation manner of the first aspect, the adjusting the current gain of the analog front end in a convergence manner includes:
when the background light data is larger than the upper limit of the preset background light data interval, adjusting the current gain of the analog front end to be low;
and when the background light data is smaller than the lower limit of the preset background light data interval, increasing the current gain of the analog front end.
In a possible implementation manner of the first aspect, the driving current required by the light source and the gain required by the analog front end are estimated by a bisection method or a stepping method.
In a possible implementation manner of the first aspect, in the process of estimating the driving current required by the light source and the gain required by the analog front end:
when the current driving current of the light source does not exceed an adjustable current interval preset by the PPG equipment, adjusting the current driving current of the light source;
and when the current driving current of the light source exceeds an adjustable current interval preset by the PPG equipment, and when the current gain of the analog front end does not exceed an adjustable gain interval preset by the PPG equipment, adjusting the current gain of the analog front end.
In a possible implementation manner of the first aspect, determining an estimated current transfer ratio according to an actual current transfer ratio of the PPG device includes:
the estimated current transfer ratio is the actual current transfer ratio during single sampling of mixed light data, or is an average value of a plurality of actual current transfer ratios during multiple sampling of mixed light data, wherein the actual current transfer ratio during sampling of the PPG device during sampling of mixed light data is calculated according to the driving current of a light source during sampling of mixed light data, the gain of a simulation front end and the calculated actual effective light data.
In a feasible implementation manner of the first aspect, the determining whether the backlight data meets a preset backlight data interval according to the backlight data includes:
and when the background light data sampled for the nth time or continuous n times do not meet the preset background light data interval, judging that the background light data do not meet the preset background light data interval.
In a feasible implementation manner of the first aspect, the determining whether the calculated effective light data satisfies a preset first effective light data interval according to the calculated effective light data includes:
and when the effective light data calculated for the nth time or the continuous n times do not meet the preset first effective light data interval, judging that the effective light data do not meet the preset first effective light data interval.
In a feasible implementation manner of the first aspect, when a light leakage level threshold is located in the preset first valid light data interval, a lower limit of the second valid light data interval is the light leakage level threshold, where the light leakage level threshold is a parameter value determined according to a light leakage state of an application scenario of the PPG device.
In a feasible implementation manner of the first aspect, when the estimated effective light data satisfies a preset second effective light data interval, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the estimated gain required by the analog front end, including:
acquiring a device jitter parameter of the PPG device;
calling or calculating a corresponding attenuation coefficient according to the equipment jitter parameter;
and carrying out attenuation calculation on the estimated driving current required by the light source and the gain required by the analog front end according to the attenuation coefficient, and taking the calculation result of the attenuation calculation as the current/gain value to be adjusted.
In a possible implementation manner of the first aspect, the method further includes:
sampling and verifying: after the driving current of the light source of the PPG equipment and the gain of the analog front end are adjusted according to the current/gain value to be adjusted, obtaining background light data and mixed light data again, and calculating the actual effective light data again according to the obtained background light data and mixed light data;
cyclically performing the dimming operation and the sampling verification when the recalculated actual valid light data does not satisfy the second valid light data interval.
In a second aspect, an embodiment of the present application provides a PPG device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the PPG device to perform the method steps as described in the first aspect above.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored therein, which, when running on a PPG device, causes the PPG device to perform the method steps as described in the first aspect above.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
according to the method of the embodiment of the application, the current/gain value to be adjusted can be obtained, and the driving current of the light source of the PPG equipment and the gain of the analog front end are adjusted based on the current/gain value to be adjusted, so that the PPG signal of the PPG equipment is converged in the dynamic range of the ADC; compared with the prior art, according to the method provided by the embodiment of the application, the times of actually adjusting the driving current of the light source of the PPG equipment and the gain of the analog front end can be greatly reduced, so that the dimming time is effectively shortened, the convergence rate of the PPG signal is improved, the working efficiency of the PPG equipment is improved, and the adaptability of the PPG equipment is improved.
Drawings
Fig. 1 is a flowchart illustrating a signal adjustment method of a PPG device according to an embodiment of the present application;
fig. 2 is a partial flowchart of an embodiment of a signal adjustment method for a PPG device according to the present application;
fig. 3 is a flowchart illustrating a signal adjustment method of a PPG device according to an embodiment of the present application;
fig. 4 is a partial flowchart of an embodiment of a signal adjustment method for a PPG device according to the present application;
fig. 5 is a flowchart illustrating a signal adjustment method of a PPG device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a PPG apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of an embodiment of a PPG device dimming device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, 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 application.
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
In order to solve the problem that a PPG signal of a PPG device exceeds a dynamic range of an ADC, an embodiment of the present application provides a signal adjustment method for a PPG device. Specifically, in an embodiment of the present application, a dimming operation is triggered when the PPG signal exceeds the dynamic range of the ADC, and a current/gain value to be adjusted is generated in the dimming operation, so as to adjust the driving current of the light source of the PPG device and the gain of the analog front end. The PPG equipment adjusts the light source driving current and/or the AFE gain according to the generated current/gain value to be adjusted, so that the PPG signal is converged in the dynamic range of the ADC as soon as possible. For example, the light source driving current and/or AFE gain needs to be increased when the PPG signal sampled by the ADC is below the lower dynamic range limit of the ADC, and the light source driving current and/or AFE gain needs to be decreased when the PPG signal sampled by the ADC is above the upper dynamic range limit of the ADC.
Further, the PPG signal is light data sampled by the PPG device by the detector, based on the operating mode of the PPG device. Therefore, a preset light data interval can be set according to the dynamic range of the ADC, and the light dimming operation is triggered when the light data sampled by the PPG equipment exceeds the preset light data interval.
Further, the PPG scheme is a method in which light emitted from a light source of a sampling device is reflected and absorbed by blood vessels and tissues of a human body to attenuate light, thereby tracing the pulse state of the blood vessels and measuring pulse waves. Therefore, when the light source of the PPG device is turned on, the light data sampled by the PPG device includes the light data obtained by sampling the attenuation light emitted by the light source of the PPG device, absorbed by the blood vessels and tissues of the human body, and reflected by the PPG device, the light data obtained by sampling the attenuation light emitted by the light source of the PPG device, reflected by the blood vessels and tissues of the human body, and absorbed by the PPG device is defined as effective light data, and the effective light data is recorded as RawdataReal.
Further, in a practical application scenario of the PPG device, not only one light source, which is the PPG device light source, but also light sources other than the PPG device light source, such as sunlight and light. When the light source of the PPG device is turned off, the light data sampled by the PPG device is light data originating from a light source other than the light source of the PPG device, the light data sampled by the PPG device originating from a light source other than the light source of the PPG device is defined as background light data, and the background light data is denoted as RawdataBg.
Since the detector of the PPG device cannot prevent the light data sampling from light sources other than the PPG device light source, the light data sampled by the PPG device is mixed light data containing both valid light data and background light data when the PPG device light source is on. When the light source of the PPG device is turned on, the mixed light data sampled by the PPG device is denoted as RawdataMix, and then:
RawdataReal=RawdataMix-RawdataBg。(1)
therefore, in an embodiment of the present application, the preset backlight data interval and/or the preset valid light data interval are set according to the dynamic range of the ADC. Whether the dimming operation needs to be triggered or not is determined by judging whether the background light data sampled by the PPG equipment meets a preset background light data interval or not and/or judging whether the effective light data sampled by the PPG equipment meets a preset effective light data interval or not.
Further, in practical application scenarios, there are many specific implementations of the dimming operation of the PPG device. A feasible dimming operation scheme is to increase/decrease the light source driving current by a fixed step length and/or increase/decrease the AFE gain by a fixed step length in each dimming operation, to actually measure the effective light data after each dimming operation, and to finally make the actual measured value of the effective light data meet the preset effective light interval through multiple adjustments. Since the above adjustment scheme requires the dimming operation to be repeatedly performed a plurality of times, the data processing amount is greatly increased, and the time consumption of the dimming operation is prolonged, thereby reducing the response sensitivity of the dimming operation of the PPG device.
In view of the above problems of the dimming operation scheme, in an embodiment of the present application, an adjustment mode based on the estimation of the effective light data is adopted in the dimming operation. Specifically, when performing the dimming operation, before performing the actual light source driving current and/or AFE gain adjustment, the driving current required by the light source of the PPG device and the gain required by the analog front end are estimated, and then the light source driving current and/or the AFE gain are adjusted based on the estimated driving current required by the light source of the PPG device and the estimated gain required by the analog front end. In the above process, the estimated value of the effective light data (' RawdataReal) obtained by estimating the effective light data based on the estimated driving current required by the light source of the PPG device and the gain required by the analog front end can satisfy the preset effective light interval. Since the' ravdatareal has high consistency with the ravdatareal after the dimming operation is performed, the number of repeated dimming operations is greatly reduced.
Specifically, in the embodiment of the present application, the effective light data is estimated based on a Current Transfer Ratio (CTR) of the PPG device. A Current Transfer Ratio (CTR), a light source driving Current (Current) of the PPG device, an analog front end gain (gain), and a valid light data (ravdatareal) sampled by the PPG device satisfy the following equation:
CTR * current * gain = RawdataReal。(2)
the technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a signal adjustment method of a PPG device according to an embodiment of the present application. In an embodiment of the present application, as shown in fig. 1, the method includes:
step 100, sampling the background light data and the mixed light data, for example, acquiring an actual measurement value of the background light data sampled for the nth time and the mixed light data sampled for the nth time (n is a natural number greater than zero) of the PPG device;
step 110, determining whether to perform a dimming operation, including:
judging whether the background light data meets a preset background light data interval or not according to the background light data, and/or judging whether the effective light data meets a preset first effective light data interval or not according to the calculated actual effective light data, wherein the actual effective light data is a difference value between the mixed light data and the background light data;
when the background light data does not meet the preset background light data interval, or the actual effective light data does not meet the preset first effective light data interval, executing dimming operation;
when the dimming is not triggered, returning to the step 100;
when dimming is triggered, step 120 is performed;
step 120, performing a dimming operation, the dimming operation including:
step 121, determining an estimated current transfer ratio according to a preset current transfer ratio or an actual current transfer ratio of the PPG device;
step 122, estimating a driving current required by the light source and a gain required by the analog front end based on the current driving current of the light source of the PPG device, the current gain of the analog front end, the sampled background light data and the mixed light data;
step 123, calculating to obtain estimated effective light data of the PPG equipment according to the estimated driving current required by the light source, the gain required by the analog front end and the estimated current transmission ratio;
step 124, judging whether the estimated effective light data meets a preset second effective light data interval;
when the estimated effective light data satisfies the preset second effective light data interval, executing step 125;
and step 125, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end, so as to adjust the driving current of the light source of the PPG device and the gain of the analog front end.
In a specific application scenario, the backlight data interval, the first valid light data interval, and the second valid light data interval preset in the above process are all numerical value intervals determined by the backlight data state and the valid light data state corresponding to the PPG signal in the dynamic range of the ADC. That is, when the backlight data does not satisfy the backlight data interval or the valid light data does not satisfy the first valid light data interval, it is said that the PPG signal is beyond the dynamic range of the ADC. When the valid light data meets the second valid light data interval, the PPG signal is converged within the dynamic range of the ADC.
According to the method shown in fig. 1, when the PPG signal exceeds the dynamic range of the ADC, the current/gain value to be adjusted for adjusting the drive current of the light source of the PPG device and the gain of the analog front end can be obtained, so that the PPG signal of the PPG device can be converged within the dynamic range of the ADC under various use conditions, the quality of the PPG signal is ensured, and the adaptivity of the PPG device is improved.
Compared with the prior art, according to the method shown in fig. 1, the timing of triggering the dimming operation is determined by monitoring the backlight data and/or the effective light data, and the current/gain to be adjusted is generated when the estimated effective light data is within the dynamic range of the ADC, and is further used to adjust the driving current of the actual operation of the light source of the PPG device and the gain of the actual operation of the analog front end, so that while ensuring the sensitivity of the dimming operation and the adaptivity of the PPG device, unnecessary dimming operations can be effectively avoided (for example, multiple adjustments of the driving current of the actual operation of the light source of the PPG device and the gain of the actual operation of the analog front end, multiple sampling of the dimmed PPG signal, and data processing of the dimmed PPG signal) are avoided, thereby greatly reducing the execution frequency of the dimming operation, the data processing pressure and power consumption of the PPG equipment are reduced, the working efficiency and convergence rate of the PPG equipment are ensured, and the service life of the PPG equipment is prolonged.
Further, according to the method of the embodiment shown in fig. 1, in the dimming operation, the driving current required by the light source and the gain required by the analog front end are estimated, and the estimation calculation is performed on the effective light data based on the current transmission ratio, so as to verify whether the estimated driving current and gain can enable the effective light data to satisfy the preset effective light data interval, and further, the driving current required by the light source and the gain required by the analog front end, which can enable the estimated effective light data to satisfy the preset effective light data interval, are finally obtained.
Because the estimated effective light data and the actual effective light data calculated after the PPG device actually samples have high consistency, after the light source driving current and the analog front end gain are adjusted according to the estimated driving current required by the light source and the gain required by the analog front end, the actual effective light data calculated after the PPG device samples can meet the preset second effective light data interval, namely, the PPG signal can be converged in the dynamic range of the ADC.
The process of obtaining the driving current required by the light source and the gain required by the analog front end can enable the estimated effective light data to meet the preset effective light data interval, and the actual adjustment of the driving current of the light source and the gain of the analog front end is not needed. Therefore, compared with the prior art, according to the method shown in fig. 1, the number of times of actually adjusting the driving current of the light source of the PPG device and the gain of the analog front end can be greatly reduced, so that the dimming time is effectively shortened, the convergence rate of the PPG signal is increased, and the working efficiency of the PPG device is increased.
Further, in an embodiment of the present application, after step 124, when the estimated effective light data does not satisfy the preset second effective light data interval, according to the currently estimated driving current required by the light source and the gain required by the analog front end, the driving current required by the light source and the gain required by the analog front end are estimated again in a convergence manner, so as to recalculate the estimated effective light data;
and if the recalculated estimated effective light data meets a preset second effective light data interval, generating a current/gain value to be adjusted according to the newly estimated driving current required by the light source and the gain required by the analog front end.
By adopting the method of re-estimation, the finally generated current/gain value to be adjusted can be ensured to meet the requirement of the dynamic range of the ADC. The re-estimation process is still a calculation process and does not include an actual PPG adjustment process, so that significant time consumption cannot be caused by re-estimation, and the times of actually adjusting the drive current of the light source of the PPG equipment and simulating the gain of the front end can be greatly reduced by re-estimation, so that the time consumed by dimming is effectively shortened, the convergence speed of a PPG signal is improved, and the working efficiency of the PPG equipment is improved.
Specifically, in an embodiment of the present application, as shown in fig. 1:
when the estimated valid light data does not satisfy the preset second valid light data interval, executing step 126;
step 126, according to the drive current required by the light source and the gain required by the analog front end which are estimated currently, the drive current required by the light source and the gain required by the analog front end are estimated again in a convergence mode so as to recalculate the estimated effective light data;
step 127, judging whether the recalculated estimated effective optical data meets a preset second effective optical data interval;
if the recalculated estimated effective light data meets the preset second effective light data interval, go to step 128;
and step 128, generating a current/gain value to be adjusted according to the driving current required by the light source and the gain required by the analog front end which are estimated again.
Further, in an actual application scenario, due to limitation of factors such as hardware conditions, the light source driving current and the analog front end gain of the PPG device have adjustable ranges, the PPG device can normally operate only when the light source driving current and the analog front end gain of the PPG device are respectively located in the respective adjustable ranges, and the PPG device cannot normally operate when the light source driving current or the analog front end gain of the PPG device is set outside the adjustable ranges.
For example, there is a maximum operating current D2 and a minimum operating current D1 for the LEDs of the PPG device, i.e., the adjustable range of the LED drive current is [ D1, D2] (e.g., [ D1, D2] is [0, 100] mA in an application scenario). When the driving current of the LED is greater than D2, the LED may be burned out, and when the driving current of the LED is less than D1, the LED may not emit light.
Also for example, there are a maximum gain value G2 and a minimum gain value G1 for the AFE gain of the PPG device, i.e., the adjustable range of the AFE gain is [ G1, G2] (e.g., [ G1, G2 is [100, 1000] in an application scenario). When an attempt is made to set the gain value of the AFE gain to a value greater than G2 or less than G1, there may be cases where the PPG device cannot be set or cannot operate after the setting.
Therefore, in the process of estimating and re-estimating the driving current required by the light source and the gain required by the analog front end, it is required to ensure that the estimated driving current required by the light source and the estimated gain required by the analog front end respectively satisfy the adjustable ranges of the driving current of the light source and the gain of the analog front end. For example, in an application scenario, there is a need to increase the LED drive current or AFE gain. If both the LED driving current and the AFE gain reach the upper limit, it indicates that neither the LED driving current nor the AFE gain has an adjustment space, and the adjustment operation of the working parameters cannot be performed, and the adjustment fails.
Specifically, in an embodiment of the present application, after step 127, if the recalculated estimated effective light data does not satisfy the preset second effective light data interval and the currently estimated driving current and gain do not exceed the preset adjustable current interval and adjustable gain interval of the PPG device, the driving current required by the light source and the gain required by the analog front end are estimated again in a convergence manner.
Specifically, in an embodiment of the present application, as shown in fig. 1:
if the recalculated estimated effective light data does not satisfy the preset second effective light data interval, go to step 129;
step 129, judging whether the current estimated drive current and gain exceed an adjustable current interval and an adjustable gain interval preset by the PPG equipment;
and if the currently estimated driving current and gain do not exceed the adjustable current interval and the adjustable gain interval preset by the PPG device, returning to step 126.
Further, in an embodiment of the present application, after the step 127, if the recalculated estimated effective light data does not satisfy the preset second effective light data interval and the currently estimated driving current and gain exceed the preset adjustable current interval and adjustable gain interval, the dimming operation is stopped.
Specifically, in an embodiment of the present application, as shown in fig. 1, after step 129:
if the currently estimated driving current and gain exceed the adjustable current interval and the adjustable gain interval preset by the PPG device, executing step 130;
step 130, the dimming operation is stopped.
The judgment of the adjustable current interval and the adjustable gain interval is added, so that the condition that the finally generated current/gain value to be adjusted exceeds the adjustable current interval and the adjustable gain interval can be effectively avoided, the PPG equipment is ensured to work in a normal state all the time, and the operation safety and the operation stability of the PPG equipment are maintained.
Further, in an embodiment of the present application, in step 130, a dimming operation prompt is further output to the user, and/or a dimming operation failure flag is output so that other components of the PPG device perform other control processes according to the dimming operation failure flag (for example, the master outputs other control instructions according to the flag) or the external device reads relevant information of the dimming operation failure.
Further, in an actual application scenario, various steps of the embodiment shown in fig. 1 may have a plurality of different implementations. A skilled person may implement the method steps of the embodiment shown in fig. 1 by using a suitable implementation manner according to the specific application scenario requirements. The following description describes, by way of example, the implementation of the steps of the embodiment shown in fig. 1.
Specifically, in an implementation manner of step 110, when none of the n-th or consecutive n-th sampled backlight data satisfies the preset backlight data interval, it is determined that the backlight data does not satisfy the preset backlight data interval.
In an implementation manner of step 110, when the valid light data calculated for the nth time or n consecutive times does not satisfy the preset first valid light data interval, it is determined that the valid light data does not satisfy the preset first valid light data interval.
For example, in one implementation of step 110:
when the sampled backlight data of the nth time is greater than the upper limit of the preset backlight data interval or less than the lower limit of the preset backlight data interval, or when the actual effective light data calculated according to the sampled backlight data of the nth time and the mixed light data is greater than the upper limit of the preset first effective light interval or less than the lower limit of the preset first effective light interval, it is determined that the dimming operation is triggered (step 120 is executed).
For example, in one implementation of step 110:
when the background light data sampled for n consecutive times are all greater than the upper limit of the preset background light data interval or are all less than the lower limit of the preset background light data interval, or when the actual n effective light data calculated according to the background light data sampled for n consecutive times and the mixed light data are all greater than the upper limit of the preset first effective light interval or are all less than the lower limit of the preset first effective light interval, it is determined that the dimming operation is triggered (step 120 is executed).
Whether the background light data meet the preset background light data interval or not is judged through the background light data sampled for n times continuously, and the situation that when single sampling is just positioned at the fluctuating wave crest/trough of the background light data, the light dimming operation is triggered by the fluctuating wave crest/trough of the background light data in error can be effectively avoided.
Whether the effective light data meet a preset first effective light data interval or not is judged through actual n effective light data calculated by the background light data and the mixed light data which are sampled for n times continuously, and the situation that when single sampling is just positioned at the fluctuating wave crest/trough of the background light data/the mixed light data, the light dimming operation is triggered by the fluctuating wave crest/trough of the background light data/the mixed light data in a false mode can be effectively avoided.
In the implementation manner of the step 110, the value of n may be set according to the actual application scene requirement. For example, in an application scenario, when the PPG device sampling frequency is 25Hz, n is set to 5 or 6.
Further, in an embodiment of the present application, the preset backlight data interval, the first valid light data interval, and the second valid light data interval are determined according to a dynamic range of the ADC. Specifically, in an embodiment of the present application, an ideal interval of the backlight data and an ideal interval of the effective light data are determined according to a dynamic range of the PPG device ADC. Then, a preset background light data interval, a preset first effective light data interval and a preset second effective light data interval are set according to the ideal interval of the background light data and the ideal interval of the effective light data.
For example, in an application scenario, define: the preset first effective light data interval is [ TH1, TH2 ]; the preset background light data interval is [ BTH1, BTH2 ]. Assume that the ideal range of the mixed light data Rawdatamix is determined to be [0, 131071] based on the dynamic range of the PPG device ADC, the background light data settles to the middle point 65535, and the ideal interval of the valid light data is [0, 65535 ]. The values of the first effective light data interval [ TH1, TH2] are set as [25000, 60000] according to the interval values, and the values of the preset background light data interval [ BTH1, BTH2] are set as [45536, 85536 ].
When the backlight data RawdataBg sampled by the PPG device is continuously greater than the preset upper limit BTH2 of the backlight data interval for n times or is continuously less than the preset lower limit BTH1 of the backlight data interval for multiple times, or the effective light data RawdataReal is continuously greater than the first upper limit TH2 of the effective light data interval for n times or is continuously less than the first lower limit TH1 of the effective light data interval for n times, the dimming operation is triggered.
Further, in an embodiment of the present application, the first valid optical data interval and the second valid optical data interval are the same value interval. In another embodiment of the present application, for example, in an application scenario, there is defined: the second valid optical data interval is [ RTH1, RTH2 ]. The second valid optical data interval [ RTH1, RTH2] is set to be identical to the first valid optical data interval [ TH1, TH2], and the values of [ RTH1, RTH2] are [25000, 60000 ].
Further, in practical application scenarios, the light leakage level is one of the factors influencing the PPG signal. In an ideal environment, the light leakage level is 0. Light leakage levels are typically caused by the manufacturing process, and in the empty case, the LED light is reflected/refracted through the structure to the PD, resulting in a default data baseline, which is defined as the light leakage level threshold. If the effective light data sampled by the PPG device is below the light leakage level threshold, the product performance may be affected, and generally the production process needs to be improved. In order to avoid the occurrence of the situation that the effective light data is lower than the light leakage level threshold, in another embodiment of the present application, in the process of presetting the second effective light data interval, the light leakage level threshold is used as the lower limit of the second effective light data interval, so that the effective light data after dimming is not lower than the light leakage level threshold.
Specifically, in an embodiment of the present application, when the light leakage level threshold is located in a preset first valid light data interval, a lower limit of the second valid light data interval is the light leakage level threshold, where the light leakage level threshold is a parameter value determined according to a light leakage state of an application scene of the PPG device. The second effective light data interval is determined by introducing the light leakage level threshold, so that the effective light data can be effectively prevented from being lower than the light leakage level threshold, and the performance of the PPG is ensured.
Further, in one implementation of step 121, the preset current transfer ratio or the estimated current transfer ratio used in the previous dimming operation is directly called to determine the estimated current transfer ratio.
Further, in one implementation of step 121, the estimated current transfer ratio is an actual current transfer ratio at the time of sampling the mixed light data once. Specifically, based on formula (2), an actual current transfer ratio of the PPG device when sampling the mixed light data is calculated from the drive current of the light source when sampling the mixed light data, the gain of the analog front end, and the calculated actual effective light data.
For example, in one implementation of step 121:
substituting the actual measurement value of the effective light data sampled at the nth time, the current value of the light source driving current of the PPG equipment at the sampling at the nth time and the gain value of the analog front-end gain into a formula (2), and calculating the value of the CTR; that is, the actual measurement value of the effective light data sampled for the last time before the current dimming operation is performed, the current value of the light source driving current of the PPG device at the time of the last sampling, and the gain value of the analog front-end gain are substituted into formula (2), and the value of the CTR is calculated.
For example, in an application scenario, let us say that valid light data Rawdatareal calculated at the time of nth samplingn= 60000, and the second valid light data interval is set to [32000, 43000]. At the time of sampling for the nth time, the AFE gain is 50, the light source driving current is 80, and the adjustable interval of the light source driving current is [0, 100]]。
When it is determined that dimming is triggered, a dimming operation is performed. From the effective light data RawdatarealnCTR =15 was calculated for = 60000, AFE gain 50, and source drive current 80. At this time, effective light data is estimated according to the estimated driving current required by the light source and the estimated gain required by the analog front end by the following formula.
15 * current * gain = RawdataReal。(3)
Further, in a practical application scenario, there may be fluctuations in sampled data due to sampling of mixed light data as well as background light data, and there may be fluctuations in calculation errors in calculating the actual current transfer ratio. Therefore, when calculating the actual current transfer ratio at the time of sampling the mixed light data once, there is a case where the calculated actual current transfer ratio deviates excessively from the true actual current transfer ratio. Thus, in one implementation of step 121, the estimated current transfer ratio is an average of a plurality of actual current transfer ratios at the time of sampling the mixed light data a plurality of times, wherein the actual current transfer ratio at the time of sampling the mixed light data by the PPG device is calculated from the drive current of the light source at the time of sampling the mixed light data, the gain of the analog front end, and the calculated actual effective light data. By averaging a plurality of actual current transfer ratios, the deviation between the calculated actual current transfer ratio and the actual current transfer ratio can be effectively reduced.
For example, in one implementation of step 121:
respectively substituting the measured value of the effective light data sampled for n times before the current dimming operation is executed, the current value of the light source driving current of the PPG equipment during the n times of continuous sampling and the gain value of the analog front-end gain into a formula (2), and respectively calculating the corresponding CTR value of each sampling; and averaging the calculated n CTR values.
For example, assuming that the 1 st sampling time effective light data RawdataReal is 60000, the gain value is 50, and the current value is 80, the CTR =15 is obtained by conversion; if the effective light data RawdataReal at the 2 nd sampling is 62000, the gain value is 50, and the current value is 80, the CTR =15.5 is obtained through conversion; setting the effective light data RawdataReal at the 2 nd sampling as 59000, the gain value as 50 and the current value as 80, and then converting to obtain CTR = 14.75; if the raw datareal of the effective light data at the nth sampling is 61000, the gain value is 50, and the current value is 80, the CTR =15.25 is obtained through conversion;
and calculating the average value of the n CTR values to obtain the CTR average value of 15.05, and taking the CTR average value of 15.05 as the estimated current transfer ratio. At this time, the estimated effective light data is calculated according to the estimated driving current required by the light source, the gain required by the analog front end, and the estimated current transmission ratio by the following formula.
15.05 * current * gain = RawdataReal。(4)
Further, in an actual application scenario, the PPG device does not perform lighting when sampling the backlight data, i.e., the setting of the drive current of the light source does not affect the acquisition of the backlight data. When the background light data does not meet the preset background light data interval, the gain of the analog front end is directly adjusted so that the PPG signal can be converged in the dynamic range of the ADC as soon as possible. For example, when the sampled backlight data is too large, the analog front end gain needs to be adjusted down, and when the sampled backlight data is too small, the analog front end gain needs to be adjusted up. Therefore, in an embodiment of the present application, the dimming operation (step 120) further includes:
before estimating the driving current required by the light source and the gain required by the analog front end (before step 122), triggering a primary adjustment when the background light data does not meet a preset background light data interval, wherein the primary adjustment comprises:
and adjusting the current gain of the analog front end in a convergence mode.
Therefore, when the backlight data does not meet the preset backlight data interval, the gain of the analog front end is firstly adjusted, so that the times of estimating the driving current required by the light source and the gain required by the analog front end can be reduced, the data processing amount is reduced, and the current/gain to-be-adjusted value for adjusting the driving current of the light source of the PPG equipment and the gain of the analog front end is obtained as soon as possible.
Specifically, fig. 2 is a partial flowchart of an embodiment of a signal adjustment method for a PPG device according to the present application. In one embodiment of the present application, as shown in fig. 2:
step 210, judging whether the background light data meets a preset background light data interval;
when the backlight data satisfies the preset backlight data interval, go to step 222;
when the backlight data does not satisfy the preset backlight data interval, execute step 211;
step 211, adjusting the current gain of the analog front end in a convergence mode;
after step 211, perform step 222;
in step 222, the driving current required by the light source and the gain required by the analog front end are estimated based on the current driving current of the light source of the PPG device, the current gain of the analog front end, the sampled background light data and the mixed light data (step 122 shown in fig. 1).
Specifically, in one implementation of step 211:
when the background light data is larger than the upper limit of a preset background light data interval, the current gain of the analog front end is reduced;
and when the background light data is smaller than the lower limit of the preset background light data interval, increasing the current gain of the analog front end.
Specifically, in one implementation of step 211:
when the background light data sampled for n times continuously are all larger than the upper limit of the preset background light data interval, subtracting 1 from the gain value of the analog front-end gain before the dimming operation is executed;
and when the actual measurement values of the background light data sampled for n times are all smaller than the lower limit of the preset background light data interval, adding 1 to the gain value of the analog front-end gain before the current dimming operation is executed.
Specifically, fig. 3 is a partial flowchart of an embodiment of a signal adjustment method for a PPG device according to the present application. In an embodiment of the present application, it is assumed that the gain value of the AFE gain is Z before the dimming operation is performednThe current value of the light source driving current is Dn. As shown in fig. 3, the PPG device performs the following steps:
step 300, obtaining background light data and mixed light data of an nth sampling of PPG equipment, and calculating effective light data corresponding to the nth sampling;
311, judging whether the background light data sampled for n times continuously are all larger than the upper limit of a preset background light data interval;
when the background light data obtained by continuous n-time sampling is greater than the upper limit of the preset background light data interval, executing step 312;
step 312, calculate Zn-1, based on AFE gain Zn-1 light source drive current DnEstimating a driving current required by a light source and a gain required by a simulation front end;
when the determination result of step 311 is no, step 320 is executed;
step 320, judging whether the background light data sampled for n times continuously are all smaller than the lower limit of a preset background light data interval;
when the measured values of the background light data sampled for n consecutive times are all smaller than the lower limit of the preset background light data interval, step 321 is executed;
step 321, calculate Zn+1, based on AFE gain Zn+1, light source drive current DnEstimating a driving current required by a light source and a gain required by a simulation front end;
when the determination result of step 320 is no, step 330 is executed;
step 330, determining whether the n effective optical data corresponding to the n consecutive samplings are all larger than the upper limit of the first effective optical data interval;
when the n effective optical data corresponding to the n consecutive samples are all larger than the upper limit of the first effective optical data interval, execute step 331;
step 331, based on AFE gain ZnLight source driving current DnEstimating a driving current required by a light source and a gain required by a simulation front end;
when the determination result of step 330 is negative, go to step 340;
step 340, judging whether the n effective optical data corresponding to the continuous n-time sampling are all smaller than the lower limit of the first effective optical data interval;
when the n effective optical data corresponding to the n consecutive samples are all smaller than the lower limit of the first effective optical data interval, execute step 331;
when the determination result of step 340 is negative, return is made to step 300.
Further, in an embodiment of the present application, the light source driving current is preferably adjusted in consideration of better adjustability of the light source driving current compared to the AFE gain. Therefore, in step 122, in the process of estimating the driving current required by the light source and the gain required by the analog front end, the driving current is preferentially estimated, and the gain is estimated only when the current driving current reaches the upper limit or the lower limit of the preset adjustable current interval and the estimated effective light data still cannot meet the second effective light data interval.
Specifically, in one implementation of step 122:
when the current driving current of the light source does not exceed an adjustable current interval preset by the PPG equipment, adjusting the current driving current of the light source;
and when the current driving current of the light source exceeds an adjustable current interval preset by the PPG equipment and the current gain of the analog front end does not exceed an adjustable gain interval preset by the PPG equipment, adjusting the current gain of the analog front end.
Specifically, fig. 4 is a partial flowchart of an embodiment of a signal adjustment method for a PPG device according to the present application. In an embodiment of the present application, as shown in fig. 4, the PPG device performs the following steps to implement step 122 shown in fig. 1:
step 410, determining whether the current driving current of the light source exceeds an adjustable current interval preset by the PPG device, that is, determining whether the current driving current is equal to an upper limit of the adjustable current interval when the driving current of the light source needs to be adjusted upwards, or determining whether the current driving current is equal to a lower limit of the adjustable current interval when the driving current of the light source needs to be adjusted downwards;
when the current driving current of the light source does not exceed the adjustable current interval preset by the PPG device, step 411 is executed;
step 411, increasing or decreasing the current driving current of the light source to estimate the driving current required by the light source, and using the current gain of the analog front end as the estimated gain required by the analog front end;
when the current driving current of the light source exceeds an adjustable current interval preset by the PPG device, executing step 420;
step 420, determining whether the current gain of the analog front end exceeds an adjustable gain interval preset by the PPG device, that is, determining whether the current gain of the analog front end is equal to an upper limit of the adjustable gain interval when the AFE gain needs to be adjusted up, or determining whether the current gain of the analog front end is equal to a lower limit of the adjustable gain interval when the AFE gain needs to be adjusted down;
when the current gain of the analog front end does not exceed an adjustable gain interval preset by the PPG device, performing step 421;
step 421, increasing or decreasing the current gain of the analog front end to estimate the gain required by the analog front end, and using the current driving current of the light source as the estimated driving current required by the light source;
when the current gain of the analog front end exceeds an adjustable gain interval preset by the PPG equipment, executing step 422;
and step 422, ending the dimming operation and outputting a dimming failure prompt.
Further, in an embodiment of the present application, a method of preferentially driving the current is also adopted in the process of re-estimating the driving current required by the light source and the gain required by the analog front end. Specifically, in an embodiment of the present application, the flow shown in fig. 4 is executed in step 126 shown in fig. 1.
Further, in an embodiment of the present application, in order to quickly generate the current/gain value to be adjusted, a dichotomy is adopted in the process of estimating the driving current required by the light source. The driving current required by the light source is estimated by adopting the bisection method, so that the driving current required by the light source can be estimated quickly, and the frequency of estimating the driving current required by the light source again can be effectively reduced.
Specifically, in one implementation of step 411:
when an upper dimming supply drive current is required,
estimated drive current = (current drive current + adjustable current interval upper limit)/2; (5)
when the light source drive current needs to be adjusted down,
estimated drive current = (current drive current + adjustable current interval lower limit)/2. (6)
For example, in an application scenarioSetting the effective light data Rawdatareal corresponding to the nth samplingn= 60000, and the second valid light data interval is set to [32000, 43000]. At the time of sampling for the nth time, the AFE gain is 50, the light source driving current is 80, and the adjustable interval of the light source driving current is [0, 100]]。
When the dimming operation is judged to be triggered, the Rawdatareal is judged according to the effective light datanCTR =15 is calculated for = 60000, AFE gain 50, and source drive current 80, and the effective light calculation function is:
15 * current * gain = RawdataReal。(7)
and (3) initial adjustment is not triggered, and the driving current of the light source is preferentially adjusted by adopting a dichotomy:
and estimating the light source driving current to be 40 by adopting a dichotomy method according to the light source driving current of 80 and the lower limit of the adjustable interval of the light source driving current of 0. Assuming the light source drive current 40, AFE gain 50,' ravdatareal is calculated to be 30000 from CTR =15. At 30000, ` Rawdatareal `, is below the lower limit 32000 of the second valid optical data interval and therefore needs to be estimated again.
And estimating again, and estimating the light source driving current to be 70 by adopting a dichotomy according to the light source driving current of 40 and the adjustable interval upper limit of the light source driving current of 100. Assuming the light source drive current 70, AFE gain 50,' ravdatareal is calculated to be 52500 from CTR =15. The value of the upper limit 43000 of the second valid light data interval is higher than that of the lower limit of the second valid light data interval when the value of the Rawdatareal is 52500, and therefore, the value needs to be estimated again.
And re-estimating, and determining that the second preset value of the light source driving current is 35 by adopting a dichotomy according to the light source driving current of 70 and the lower limit of the adjustable interval of the light source driving current of 0.
The binary method steps are performed in a circulating manner, and finally, when the estimated light source driving current is 50 and the AFE gain is 50, 'Rawdatareal' is 37500, 'Rawdatareal' satisfies the second effective light data interval [32000, 43000 ]. And generating a current/gain value to be adjusted according to the light source driving current of 50 and the AFE gain of 50 to finish dimming.
Further, in an embodiment of the present application, in order to quickly generate the current/gain value to be adjusted, a stepping method is adopted in the process of estimating the driving current required by the light source. The driving current required by the light source is estimated by adopting a stepping method, so that the driving current required by the light source can be estimated quickly, and the data processing amount of the estimated driving current required by the light source can be effectively reduced.
For example, in one implementation of step 411:
when an upper dimming supply drive current is required,
the estimated drive current = the current drive current + a preset current step value; (8)
when the light source drive current needs to be adjusted down,
estimated drive current = current drive current-preset current step value. (9)
For example, in an application scenario, let the raw datareal corresponding to the nth sampling of the effective light datan= 60000, and the second valid light data interval is set to [32000, 43000]. At the time of sampling for the nth time, the AFE gain is 50, the light source driving current is 80, and the adjustable interval of the light source driving current is [0, 100]]。
When it is determined that the dimming operation is triggered. According to RawdatarealnCTR =15 is calculated for = 60000, AFE gain 50, and source drive current 80, and the effective light calculation function is:
15 * current * gain = RawdataReal。(10)
and (3) not triggering initial adjustment, preferably estimating the light source driving current by adopting a stepping method:
the light source driving current is estimated to be 79 according to the light source driving current of 80 and the preset step value 1. Assuming the light source drive current 79, AFE gain 50,' ravdatareal is calculated to be 59250 from CTR =15. The value of the upper limit 43000 of the second valid light data interval is higher than that of the lower limit of the second valid light data interval when the value of the Rawdatareal is 59250, and therefore, the value needs to be estimated again.
And re-estimating, and determining that the second preset value of the light source driving current is 78 according to the light source driving current being 79 and the preset step value 1.
And circularly executing the stepping method steps, and finally estimating that the light source driving current is 57 and the AFE gain is 50, wherein' Rawdatareal is 42750, and meets a second effective light data interval [32000, 43000 ]. And generating a current/gain value to be adjusted according to the light source driving current of 57 and the AFE gain of 50, and finishing dimming.
Further, in an embodiment of the present application, in order to quickly generate the current/gain value to be adjusted, a dichotomy is adopted in the process of estimating the gain required by the analog front end. The gain required by the analog front end is estimated by adopting the bisection method, so that the gain required by the analog front end can be estimated quickly, and the frequency of re-estimating the gain required by the analog front end can be effectively reduced.
For example, in one implementation of step 411:
when the AFE gain needs to be adjusted up,
estimated gain value = (current gain value + adjustable gain interval upper limit)/2; (11)
when the light source drive current needs to be adjusted down,
estimated gain value = (current gain value + lower limit of adjustable gain interval)/2. (12)
Further, in an embodiment of the present application, in order to quickly generate the current/gain value to be adjusted and reduce the number of times of re-estimating the gain required by the analog front end, a stepping method is adopted in the process of estimating the gain required by the analog front end. The gain required by the analog front end is estimated by adopting a stepping method, so that the gain required by the analog front end can be estimated quickly, and the data processing amount of the estimated gain required by the analog front end can be effectively reduced.
In one implementation of step 411:
when the AFE gain needs to be adjusted up,
estimated gain value = current gain value + 1; (13)
when the AFE gain needs to be adjusted down,
estimated gain value = current gain value-1. (14)
The method flow of an embodiment of the present application is described below by way of an example of a specific application scenario. In an application scenario according to an embodiment of the present application, it is assumed that the first valid light data interval is [ TH1, TH2]]The adjustable current interval of the LED driving current is [ D1, D2]]The adjustable gain interval of the AFE gain is [ G1, G2]]LED drive CurrentSet value is DnCurrent setting value Z of AFE gainn
Step (1.1)
If the effective light data RawdataReal is greater than TH2 n times continuously, it is necessary to turn down the LED driving current or turn down the AFE gain.
Step (1.2)
When D is presentnWhen the value is larger than D1, a dichotomy calculation is carried out,
Dn1=(Dn+ D1)/2;(15)
assume that the second valid optical data interval is [ RTH1, RTH2]]According to Dn1 and ZnCalculating' Rawdatareal1Judging ` Rawdatareal `1Whether or not at [ RTH1, RTH2]And (4) the following steps.
Step (1.3)
If' Rawdatareal1At [ RTH1, RTH2]In, then according to Dn1 and ZnAnd generating a current/gain value to be adjusted.
Step (1.4)
If' Rawdatareal1>RTH2, e.g. Dn1 is greater than D1, then D isn1 by DnAnd (4) executing the steps (1.2) - (1.4) again.
Such as Dn1 equals D1, then Z is judgednWhether greater than G1;
if Z isnAnd G1, the dimming is judged to fail, and the dimming is finished.
Step (1.5)
If Z isnIf G1 is exceeded, Z is calculatedn1= Zn-1;
According to Dn1 and Zn1 calculate' Rawdatareal2Judging ` Rawdatareal `2Whether or not at [ RTH1, RTH2]And (4) the following steps.
Step (1.6)
If' Rawdatareal2At [ RTH1, RTH2]Then according to Dn1 and Zn1 generates a current/gain value to be adjusted.
Step (1.7)
If' Rawdatareal2>RTH2, e.g. Zn1 is greater than G1, then is represented by Zn1 by ZnPerforming the steps (1.5) - (1.7) again;
such as ZnIf 1 is equal to G1, dimming failure is determined, and dimming is ended.
Step (2.1)
If RawdataReal is less than TH1 n consecutive times, it is necessary to either increase the LED drive current or increase the AFE gain.
Step (2.2)
When D is presentnWhen the value is less than D2, a dichotomy calculation is carried out,
Dn2=(Dn+ D1)/2;(16)
assume that the second valid optical data interval is [ RTH1, RTH2]]According to Dn2 and ZnCalculating' Rawdatareal3Judging ` Rawdatareal `3Whether or not at [ RTH1, RTH2]And (4) the following steps.
Step (2.3)
If' Rawdatareal3At [ RTH1, RTH2]In, then according to Dn2 and ZnAnd generating a current/gain value to be adjusted.
Step (2.4)
If' Rawdatareal3<RTH1, e.g. Dn2 is less than D2, then D isn2 replacement of DnAnd (4) executing the steps (2.2) - (2.4) again.
Such as Dn2 equals D2, then Z is judgednWhether less than G2;
if Z isnAnd G2, the dimming is judged to fail, and the dimming is finished.
Step (2.5)
If Z isnLess than G2, then calculate
Zn2= Zn+1;(17)
According to Dn2 and Zn2 calculate' Rawdatareal4Judging ` Rawdatareal `4Whether or not at [ RTH1, RTH2]And (4) the following steps.
Step (2.6)
If' Rawdatareal4At [ RTH1, RTH2]Then according to Dn2 and Zn2 generating a current/gain value to be adjusted。
Step (2.7)
If' Rawdatareal4 <RTH1, e.g. Zn2 is less than G2, then is represented by Zn2 by ZnPerforming the steps (2.5) - (2.7) again;
such as ZnAnd 2 is equal to G2, the dimming is judged to be failed, and the dimming is finished.
Further, in an implementation manner of step 125, in the process of generating the current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end, the estimated driving current required by the light source and the gain required by the analog front end are directly used as the current/gain value to be adjusted.
Further, in practical application scenarios, the influence factor of the PPG signal also includes device jitter (e.g., jitter of the PPG device caused by wearer motion). Jitter of the PPG device may result in an increased fluctuation range of the sampled background light data as well as the valid light data. This makes the first current value and the first gain value determined according to the effective light calculation function larger than in the non-dithered state. Therefore, in an embodiment of the present application, the estimated driving current required by the light source and the estimated gain required by the analog front end are not directly used as the current/gain value to be adjusted, but the estimated driving current required by the light source and the estimated gain required by the analog front end are further adjusted according to the jitter state of the PPG device.
Specifically, in one implementation of step 125:
acquiring a device jitter parameter of PPG (photoplethysmography) equipment;
calling or calculating a corresponding attenuation coefficient according to the equipment jitter parameter;
and performing attenuation calculation on the estimated driving current required by the light source and the gain required by the analog front end according to the attenuation coefficient, and taking the calculation result of the attenuation calculation as a current/gain value to be adjusted.
Specifically, in one embodiment of the present application, the attenuation is calculated as a multiplication of the estimated required drive current for the light source and/or the required gain for the analog front end by an attenuation factor.
For example, in an application scenario, the motion sensor acquires the jitter data of the PPG device, and calculates the acquisition jitter amplitude a. And calling the corresponding attenuation coefficient according to the jitter amplitude A. Specifically, a plurality of different jitter amplitude intervals are defined, the intervals are used for grading, and different gears correspond to different attenuation coefficients. Confirming the gear corresponding to the jitter amplitude A, and further calling the attenuation coefficient corresponding to the gear.
For another example, in an application scenario, the motion sensor acquires the jitter data of the PPG device, and calculates the acquired jitter amplitude a. And calculating a motion compensation calculation parameter according to the jitter amplitude A. Specifically, in this application scenario, the jitter amplitude a is multiplied by an S-type function (Sigmoid), the product is normalized using a Normalization algorithm (Normalization), and the attenuation coefficient is calculated based on the Normalization result. The attenuation coefficient is calculated by the formula:
attenuation coefficient =1-0.7 normalysis (a Sigmoid). (18)
Further, in an actual application scenario, there may be a deviation between effective light data calculated based on the estimated driving current required by the light source and the gain required by the analog front end, and effective light data obtained after sampling and calculation by the PPG device after setting the driving current of the light source and the gain required by the analog front end to the estimated driving current required by the light source and the gain required by the analog front end. That is to say, in some application scenarios, the effective light data calculated based on the estimated driving current required by the light source and the gain required by the analog front end satisfies the second effective light data interval, but is not equal to that, after the driving current of the light source and the gain required by the analog front end are set to the estimated driving current required by the light source and the estimated gain required by the analog front end, the effective light data sampled and calculated by the PPG device also satisfies the second effective light data interval, and the PPG signal after the dimming operation may not be converged within the ADC dynamic range.
In view of the above situation, in an embodiment of the present application, after the dimming operation is completed, sampling and actual measurement of the effective light data are performed, when the actual measurement value of the effective light data cannot satisfy the second effective light data interval, the dimming operation is performed again, and the dimming operation is repeatedly performed until the actual measurement value of the effective light data satisfies the second effective light data interval or the light source driving current and the analog front end gain both exceed the preset adjustable current/gain interval.
Specifically, in an embodiment of the present application, after step 120, the method further includes:
sampling and verifying: after the driving current of the light source of the PPG equipment and the gain of the analog front end are adjusted according to the current/gain value to be adjusted, acquiring background light data and mixed light data again, and calculating actual effective light data again according to the acquired background light data and mixed light data;
cyclically performing the dimming operation and the sampling verification when the recalculated actual valid light data does not satisfy the second valid light data interval.
Fig. 5 is a flowchart illustrating a signal adjustment method of a PPG device according to an embodiment of the present application. In an embodiment of the present application, as shown in fig. 5, the method includes:
step 500, obtaining background light data and mixed light data of an nth sampling of the PPG device, and calculating actual effective light data (n is a natural number greater than zero) corresponding to the nth sampling;
step 510, judging whether to trigger dimming according to the background light data sampled at the nth time and/or the effective light data corresponding to the nth time;
when the dimming is not triggered, returning to the step 500;
when dimming is triggered, step 520 is performed;
step 520, performing a dimming operation to generate a current/gain value to be adjusted;
step 521, adjusting the driving current of the light source of the PPG device and the gain of the analog front end according to the current/gain value to be adjusted;
step 530, sampling the background light data and the mixed light data, and calculating effective light data;
step 540, determining whether the effective optical data calculated in step 530 meets a second effective optical data interval;
if yes, dimming is finished;
if not, return to step 520.
Further, in one implementation of the embodiment shown in fig. 5, when step 520 is performed for the first time after step 510 determines that dimming is triggered, a value of CTR is calculated in step 520 according to the driving current of the light source at the time of sampling by the PPG device, the gain of the analog front end, and the calculated actual effective light data. When it is determined in step 540 that the effective optical data does not satisfy the second effective optical data interval and step 520 needs to be executed again, the CTR value used in the previous execution of step 520 is directly called instead of being recalculated in step 520 executed this time.
For example, in an application scenario, let Rawdatareal at nth samplingn= 60000, and the second valid light data interval is set to [32000, 43000]. At the time of sampling for the nth time, the AFE gain is 50, the light source driving current is 80, and the adjustable interval of the light source driving current is [0, 100]]。
When it is determined that the first dimming is not triggered and the second dimming is triggered, the dimming operation is performed. According to RawdatarealnCTR =15 was calculated for = 60000, AFE gain 50, and source drive current 80.
Without initially adjusting the AFE gain, the light source driving current is preferentially adjusted, and finally, when the light source driving current is estimated to be 57 and the AFE gain is estimated to be 50, 'ravdatareal is 42750,' RawdataReal satisfies the second effective optical data interval [32000, 43000 ]. Setting the light source driving current of the PPG device to 57 and setting the AFE gain to 50, completes the first dimming operation.
After the light source driving current of the PPG equipment is set to 57 and the AFE gain is set to 50, sampling is carried out for the (n + 1) th time to obtain Rawdatarealn+1= 43100。RawdataRealn+1= 43100 has exceeded the second valid light data interval upper limit 43000, and thus, the dimming operation is performed again.
In the second dimming operation, the AFE gain is not initially adjusted, and the light source driving current is preferentially adjusted. CTR =15 is obtained in the first dimming operation, and finally, when the light source driving current is estimated to be 50 and the AFE gain is estimated to be 50, ' ravdatareal is 37500, ' and ' ravdatareal satisfies the second valid light data interval [32000, 43000 ]. Setting the light source driving current of the PPG device to 50 and setting the AFE gain to 50, a second dimming operation is completed.
After the light source driving current of the PPG equipment is set to be 50 and the AFE gain is set to be 50, sampling is carried out for the (n + 2) th time to obtain Rawdatarealn+2= 37600。RawdataRealn+2= 37600 satisfying second valid light data interval [32000, 43000]Thus, dimming ends.
Take a specific application scenario as an example. Fig. 6 is a schematic structural diagram of a PPG device according to an embodiment of the present application. As shown in fig. 6, the led driving module 604 outputs a driving current to the led 602 to drive the led 602 to emit light. The light sensor 601 collects external light data (background light data and mixed light data) and sends the collection result to the analog front end 603. The analog front end 603 sends the external light data to the ADC module 605, and the ADC module 605 performs analog-to-digital conversion on the received external light data and sends the conversion result to the dimming algorithm logic module 606.
The dimming algorithm logic 606 determines whether to dim based on the data sent from the ADC module 605.
During the dimming process, the dimming algorithm logic 606 predicts the driving current required by the led 602 and the gain required by the analog front end 603 according to the driving current currently output by the led driving module 604 and the gain currently set by the analog front end 603. After the estimation is completed, the dimming algorithm logic module 606 adjusts the led driving module 604 to make the output driving current be the estimated driving current; the analog front end 603 is adjusted so that its gain becomes the estimated gain.
Further, during the dimming process, the dimming algorithm logic module 606 performs data interaction with the dimming algorithm data recording module 608, for example, calls or records the CTR value.
Further, during dimming, the dimming algorithm logic module 606 outputs a dimming failure flag to the other algorithm logic module 607 when dimming fails.
Further, after dimming is completed, the other algorithm logic 607 obtains the external light data from the ADC module 605 for other data processing operations, such as analyzing the pulsation of the blood vessel.
It is to be understood that some or all of the steps or operations in the above-described embodiments are merely examples, and other operations or variations of various operations may be performed by the embodiments of the present application. Further, the various steps may be performed in a different order presented in the above-described embodiments, and it is possible that not all of the operations in the above-described embodiments are performed.
Further, according to a signal adjustment method of the PPG device in an embodiment of the present application, an embodiment of the present application further provides a PPG device dimming apparatus. Specifically, fig. 7 is a structural diagram of an embodiment of a PPG device dimming device according to the present application. In an embodiment of the present application, as shown in fig. 7, the PPG device dimming apparatus 700 includes:
a data acquisition module 710 for sampling the background light data and the mixed light data;
a dimming determination module 720, configured to determine whether the backlight data meets a preset backlight data interval according to the backlight data, and/or determine whether the effective light data meets a preset first effective light data interval according to the calculated actual effective light data, where the actual effective light data is a difference between the mixed light data and the backlight data;
the dimming module 730 is configured to perform a dimming operation when the backlight data does not satisfy the preset backlight data interval or the actual valid light data does not satisfy the preset first valid light data interval.
The dimming module 730 includes:
a current transfer ratio confirmation submodule 731, configured to determine an estimated current transfer ratio according to a preset current transfer ratio or an actual current transfer ratio of the PPG device;
a prediction sub-module 732 for predicting the driving current required by the light source and the gain required by the analog front end based on the current driving current of the light source of the PPG device, the current gain of the analog front end, the sampled background light data and the mixed light data;
the effective light data calculation submodule 733 is used for calculating estimated effective light data of the PPG equipment according to estimated driving current required by the light source, gain required by the analog front end and estimated current transmission ratio;
the judging sub-module 734, configured to judge whether the estimated valid optical data meets a preset second valid optical data interval;
and an adjustment value generation submodule 735, configured to generate a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end when the estimated effective light data meets a preset second effective light data interval, so as to adjust the driving current of the light source of the PPG device and the gain of the analog front end.
Further, in an embodiment of the present application:
predictor module 732 is further configured to: when the estimated effective light data does not meet a preset second effective light data interval, according to the currently estimated driving current required by the light source and the gain required by the analog front end, estimating the driving current required by the light source and the gain required by the analog front end again in a convergence mode to recalculate the estimated effective light data;
the decision sub-module 734 is further configured to: judging whether the recalculated estimated effective optical data meets a preset second effective optical data interval or not;
the adjustment value generation submodule 735 is further configured to: and if the recalculated estimated effective light data meets a preset second effective light data interval, generating a current/gain value to be adjusted according to the newly estimated driving current required by the light source and the gain required by the analog front end.
Further, in an embodiment of the present application:
predictor module 732 is further configured to: and if the recalculated estimated effective light data does not meet the preset second effective light data interval and the currently estimated drive current and gain do not exceed the adjustable current interval and the adjustable gain interval preset by the PPG equipment, re-estimating the drive current required by the light source and the gain required by the analog front end by adopting a convergence mode.
Further, in an embodiment of the present application:
predictor module 732 is further configured to: and if the recalculated estimated effective light data does not meet the preset second effective light data interval and the current estimated driving current and gain exceed the preset adjustable current interval and adjustable gain interval, stopping the dimming operation.
Further, in an embodiment of the present application, the dimming module 730 further includes a primary dimming sub-module.
The primary tuning sub-module is used for: in the operation of adjusting luminance, before predicting the drive current that the light source needs and the gain that the simulation front end needs, trigger the primary adjustment when the ambient light data does not satisfy preset ambient light data interval, the primary adjustment includes: and adjusting the current gain of the analog front end in a convergence mode.
Specifically, in an embodiment of the present application, in a process in which the initial tuning sub-module adjusts the current gain of the analog front end in a convergence manner:
when the background light data is larger than the upper limit of a preset background light data interval, the current gain of the analog front end is reduced;
and when the background light data is smaller than the lower limit of the preset background light data interval, increasing the current gain of the analog front end.
Specifically, in an embodiment of the present application, the estimation sub-module 732 estimates the driving current required by the light source and the gain required by the analog front end by using a bisection method or a stepping method.
Specifically, in an embodiment of the present application, the estimation sub-module 732 estimates the driving current required by the light source and the gain required by the analog front end, during the process:
when the current driving current of the light source does not exceed an adjustable current interval preset by the PPG equipment, adjusting the current driving current of the light source;
and when the current driving current of the light source exceeds an adjustable current interval preset by the PPG equipment and the current gain of the analog front end does not exceed an adjustable gain interval preset by the PPG equipment, adjusting the current gain of the analog front end.
Specifically, in an embodiment of the present application, the current transfer ratio determining sub-module 731 determines the estimated current transfer ratio according to the actual current transfer ratio of the PPG device, including:
the estimated current transfer ratio is an actual current transfer ratio when the mixed light data is sampled once or an average value of a plurality of actual current transfer ratios when the mixed light data is sampled for multiple times, wherein the actual current transfer ratio when the PPG device samples the mixed light data is calculated according to the driving current of the light source when the mixed light data is sampled, the gain of the analog front end and the calculated actual effective light data.
Specifically, in an embodiment of the present application, the determining module 720 determines whether the backlight data meets a preset backlight data interval according to the backlight data, including:
and when the background light data sampled for the nth time or continuous n times do not meet the preset background light data interval, judging that the background light data do not meet the preset background light data interval.
Specifically, in an embodiment of the present application, the determining whether the calculated effective light data satisfies a preset first effective light data interval according to the calculated effective light data by the dimming determining module 720 includes:
and when the effective light data calculated for the nth time or the continuous n times do not meet the preset first effective light data interval, judging that the effective light data do not meet the preset first effective light data interval.
Specifically, in an embodiment of the present application, when the light leakage level threshold is located in a preset first valid light data interval, the lower limit of the second valid light data interval used by the sub-module 734 is determined as the light leakage level threshold, where the light leakage level threshold is a parameter value determined according to a light leakage state of an application scenario of the PPG device.
Specifically, in an embodiment of the present application, the adjusting value generating sub-module 735 generates a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end, including:
acquiring a device jitter parameter of PPG (photoplethysmography) equipment;
calling or calculating a corresponding attenuation coefficient according to the equipment jitter parameter;
and performing attenuation calculation on the estimated driving current required by the light source and the gain required by the analog front end according to the attenuation coefficient, and taking the calculation result of the attenuation calculation as a current/gain value to be adjusted.
Further, in an embodiment of the present application, the apparatus 700 further includes a sampling verification module, configured to:
sampling and verifying: after the driving current of the light source of the PPG equipment and the gain of the analog front end are adjusted according to the current/gain value to be adjusted, acquiring background light data and mixed light data again, and calculating actual effective light data again according to the acquired background light data and mixed light data;
and when the recalculated actual valid light data does not meet the second valid light data interval, cyclically executing dimming operation and sampling verification.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Further, in the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. Such as Programmable Logic Devices (PLDs). Furthermore, instead of manually manufacturing the integrated circuit chip, the programming is often implemented by using "logic compiler" software, which is similar to a software compiler used in program development, and the original code before compiling is written by using a specific programming Language, which is called Hardware Description Language (HDL). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows with a hardware description language and programming into an integrated circuit.
In the description of the embodiments of the present specification, for convenience of description, the device is described as being divided into various modules by functions, the division of each module is only a division of logic functions, and the functions of each module/unit can be implemented in one or more software and/or hardware when the embodiments of the present specification are implemented.
Specifically, the apparatuses proposed in the embodiments of the present disclosure may be wholly or partially integrated into one physical entity or may be physically separated when actually implemented. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the detection module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of electronic hardware and computer software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present specification.
An embodiment of this specification also proposes a PPG device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps as described in the embodiments of this specification.
Specifically, in an embodiment of the present specification, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the apparatus, cause the apparatus to perform the method steps described in the embodiment of the present specification.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In particular, in an embodiment of the present specification, the processor and the memory may be combined into a processing device, and more generally, independent components, and the processor is configured to execute the program code stored in the memory to implement the method described in the embodiment of the present specification. In particular implementations, the memory may be integrated within the processor or may be separate from the processor.
Further, the apparatuses, devices, and modules described in the embodiments of this specification may be implemented by a computer chip or an entity, or by a product with certain functions.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
In the several embodiments provided in the present specification, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present specification may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present specification.
Specifically, an embodiment of the present specification further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the method provided by the embodiment of the present specification.
An embodiment of the present specification also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided by the embodiment of the present specification.
The embodiments in this specification are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the embodiments of the present invention, the term "at least one" means one or more, and the term "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
In the embodiments of the present specification, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an embodiment of the present disclosure, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in the present disclosure, and all the changes or substitutions should be covered within the protection scope of the present disclosure. The protection scope of this specification shall be subject to the protection scope of the claims.

Claims (16)

1. A signal adjustment method of a PPG device, comprising:
sampling background light data and mixed light data;
judging whether the backlight data meet a preset backlight data interval or not according to the backlight data, and/or judging whether the effective light data meet a preset first effective light data interval or not according to calculated actual effective light data, wherein the actual effective light data is a difference value of the mixed light data and the backlight data;
when the backlight data does not satisfy the preset backlight data interval, or the actual effective light data does not satisfy a first preset effective light data interval, performing a dimming operation, where the dimming operation includes:
determining an estimated current transfer ratio according to a preset current transfer ratio or an actual current transfer ratio of the PPG equipment;
estimating a driving current required by a light source and a gain required by a simulation front end based on a current driving current of the light source, a current gain of the simulation front end, sampled background light data and mixed light data of PPG equipment;
calculating estimated effective light data of the PPG equipment according to estimated driving current required by the light source, the gain required by the analog front end and the estimated current transmission ratio;
judging whether the estimated effective light data meet a preset second effective light data interval or not, and when the estimated effective light data meet the preset second effective light data interval, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end so as to adjust the driving current of the light source of the PPG equipment and the gain of the analog front end.
2. The method according to claim 1, wherein when the estimated effective light data does not satisfy a preset second effective light data interval, re-estimating the driving current required by the light source and the gain required by the analog front end in a convergence manner according to the currently estimated driving current required by the light source and the gain required by the analog front end to re-calculate the estimated effective light data;
and if the recalculated estimated effective light data meets a preset second effective light data interval, generating a current/gain value to be adjusted according to the newly estimated driving current required by the light source and the gain required by the analog front end.
3. The method according to claim 2, wherein if the recalculated estimated effective light data does not satisfy a preset second effective light data interval and the currently estimated driving current and gain do not exceed an adjustable current interval and an adjustable gain interval preset by the PPG device, the driving current required by the light source and the gain required by the analog front end are estimated again in a convergent manner.
4. The method according to claim 2, wherein the dimming operation is stopped if the recalculated estimated available light data does not satisfy a preset second available light data interval and the current estimated driving current and gain exceed an adjustable current interval and an adjustable gain interval preset by the PPG device.
5. The method according to any one of claims 1 to 4, wherein the dimming operation further comprises: before estimating the driving current required by the light source and the gain required by the analog front end, triggering a primary adjustment when the background light data does not meet the preset background light data interval, wherein the primary adjustment comprises:
and adjusting the current gain of the analog front end in a convergence mode.
6. The method of claim 5, wherein adjusting the current gain of the analog front end in a convergent manner comprises:
when the background light data is larger than the upper limit of the preset background light data interval, adjusting the current gain of the analog front end to be low;
and when the background light data is smaller than the lower limit of the preset background light data interval, increasing the current gain of the analog front end.
7. The method according to any one of claims 1 to 4, wherein the driving current required by the light source and the gain required by the analog front end are estimated by a bisection method or a stepping method.
8. The method according to any one of claims 1 to 4, wherein in the process of estimating the driving current required by the light source and the gain required by the analog front end:
when the current driving current of the light source does not exceed an adjustable current interval preset by the PPG equipment, adjusting the current driving current of the light source;
and when the current driving current of the light source exceeds an adjustable current interval preset by the PPG equipment, and when the current gain of the analog front end does not exceed an adjustable gain interval preset by the PPG equipment, adjusting the current gain of the analog front end.
9. The method according to any one of claims 1-4, wherein determining an estimated current transfer ratio from an actual current transfer ratio of the PPG device comprises:
the estimated current transfer ratio is the actual current transfer ratio during single sampling of mixed light data, or is an average value of a plurality of actual current transfer ratios during multiple sampling of mixed light data, wherein the actual current transfer ratio during sampling of the PPG device during sampling of mixed light data is calculated according to the driving current of a light source during sampling of mixed light data, the gain of a simulation front end and the calculated actual effective light data.
10. The method according to any one of claims 1 to 4, wherein the determining whether the backlight data satisfies a preset backlight data interval according to the backlight data comprises:
and when the background light data sampled for the nth time or continuous n times do not meet the preset background light data interval, judging that the background light data do not meet the preset background light data interval.
11. The method according to any one of claims 1 to 4, wherein the determining whether the calculated effective light data satisfies a preset first effective light data interval according to the calculated effective light data comprises:
and when the effective light data calculated for the nth time or the continuous n times do not meet the preset first effective light data interval, judging that the effective light data do not meet the preset first effective light data interval.
12. The method according to any one of claims 1 to 4, wherein when a light leakage level threshold value is within the preset first valid light data interval, the lower limit of the second valid light data interval is the light leakage level threshold value, wherein the light leakage level threshold value is a parameter value determined according to a light leakage state of an application scene of the PPG device.
13. The method according to any one of claims 1 to 4, wherein when the estimated effective light data satisfies a preset second effective light data interval, generating a current/gain value to be adjusted according to the estimated driving current required by the light source and the gain required by the analog front end, comprises:
acquiring a device jitter parameter of the PPG device;
calling or calculating a corresponding attenuation coefficient according to the equipment jitter parameter;
and carrying out attenuation calculation on the estimated driving current required by the light source and the gain required by the analog front end according to the attenuation coefficient, and taking the calculation result of the attenuation calculation as the current/gain value to be adjusted.
14. The method according to any one of claims 1 to 4, further comprising:
sampling and verifying: after the driving current of the light source of the PPG equipment and the gain of the analog front end are adjusted according to the current/gain value to be adjusted, obtaining background light data and mixed light data again, and calculating the actual effective light data again according to the obtained background light data and mixed light data;
cyclically performing the dimming operation and the sampling verification when the recalculated actual valid light data does not satisfy the second valid light data interval.
15. A PPG device, characterized in that the PPG device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the PPG device to perform the method steps of any of claims 1-14.
16. A computer-readable storage medium, in which a computer program is stored which, when run on a PPG device, causes the PPG device to carry out the method steps of any of claims 1-14.
CN202010647476.XA 2020-07-07 2020-07-07 PPG (photoplethysmography) equipment and signal adjusting method thereof Active CN111529829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010647476.XA CN111529829B (en) 2020-07-07 2020-07-07 PPG (photoplethysmography) equipment and signal adjusting method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010647476.XA CN111529829B (en) 2020-07-07 2020-07-07 PPG (photoplethysmography) equipment and signal adjusting method thereof

Publications (2)

Publication Number Publication Date
CN111529829A CN111529829A (en) 2020-08-14
CN111529829B true CN111529829B (en) 2020-11-27

Family

ID=71970988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010647476.XA Active CN111529829B (en) 2020-07-07 2020-07-07 PPG (photoplethysmography) equipment and signal adjusting method thereof

Country Status (1)

Country Link
CN (1) CN111529829B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114569102A (en) * 2020-11-30 2022-06-03 华为技术有限公司 Method and device for measuring biological characteristic parameters
CN116430213A (en) * 2021-12-31 2023-07-14 芯海科技(深圳)股份有限公司 Signal detection circuit, signal detection method, integrated circuit, detection device and electronic equipment
CN117440563A (en) * 2022-07-22 2024-01-23 华为技术有限公司 Light source dimming method and electronic equipment
CN116112107B (en) * 2023-04-13 2023-09-08 深圳市奋达智能技术有限公司 Multi-PD signal selection method and related equipment thereof

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162288B2 (en) * 2004-02-25 2007-01-09 Nellcor Purtain Bennett Incorporated Techniques for detecting heart pulses and reducing power consumption in sensors
US7039538B2 (en) * 2004-03-08 2006-05-02 Nellcor Puritant Bennett Incorporated Pulse oximeter with separate ensemble averaging for oxygen saturation and heart rate
US20060089557A1 (en) * 2004-10-27 2006-04-27 Motorola, Inc. Method and apparatus to facilitate heart rate detection
CN101677773B (en) * 2007-06-08 2011-11-02 松下电器产业株式会社 Pulse wave detection device, apparatus control device, and pulse wave detection method
CN103209641B (en) * 2010-11-16 2015-04-15 株式会社日立医疗器械 Biological light measuring device and operation method therefor
US10244987B2 (en) * 2015-08-13 2019-04-02 Pixart Imaging Inc. Physiological detection system with adjustable signal source and operating method thereof
CZ2017430A3 (en) * 2017-07-26 2019-02-20 České vysoké učení technické v Praze System for monitoring the blood supply into a transplanted organ
CN108652605A (en) * 2018-03-27 2018-10-16 上海交通大学 Real-time blood pressure monitoring device based on single channel PPG signals
US10874352B2 (en) * 2018-11-05 2020-12-29 General Electric Company Systems and methods for low power pulse oximetry

Also Published As

Publication number Publication date
CN111529829A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN111529829B (en) PPG (photoplethysmography) equipment and signal adjusting method thereof
CA2556724C (en) Techniques for detecting heart pulses and reducing power consumption in sensors
TWI608826B (en) Optical sensing device and measurement method thereof
US8116837B2 (en) System for adjusting power employed by a medical device
US20180156660A1 (en) Ambient light determination using physiological metric sensor data
WO2019144318A1 (en) Wearing state detection method, and detection module and wearable device thereof
WO2016194490A1 (en) Noise reduction processing circuit and method, and biological information processing device and method
JP5115855B2 (en) Pulse oximetry and pulse oximeter
EP1737337A1 (en) Pulse oximeter with separate ensemble averaging for oxygen saturation and heart rate
KR20160008581A (en) Portable pulse measuring device
CN112806972B (en) PPG measuring circuit and method, and wearable electronic device
JP2010004972A (en) Photoelectric pulse wave measuring apparatus and program
KR20210049671A (en) Ambient light signal adjustment method, chip and electronic equipment
US20140243626A1 (en) Power reduction for oximetry sensor operation
Amiri et al. Context-aware sensing via dynamic programming for edge-assisted wearable systems
CN107714050B (en) Three-wavelength oxyhemoglobin saturation detection method and device and wearable equipment
US9030211B2 (en) Calibration resistance emulator
WO2022006747A1 (en) Signal adjustment method for ppg apparatus and ppg apparatus
CN114983353B (en) PPG control method and device and electronic equipment
GB2382406A (en) Analytical apparatus
CN109788919B (en) Optical vital sign sensor
JP6258024B2 (en) Lighting system and control device
CN114052696A (en) PPG signal detection method, PPG signal detection assembly and wearable device
US20220192529A1 (en) Pulse recognition and blood oxygen saturation systems and methods
CN115868943A (en) Wearable device, wearing state detection method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant