Non-Invasive PPG-Based System for Continuous Heart Rate Monitoring of Incubated Avian Embryo

The chicken embryo is a widely used experimental animal model in many studies, including in the field of developmental biology, of the physiological responses and adaptation to altered environments, and for cancer and neurobiology research. The embryonic heart rate is an important physiological variable used as an index reflecting the embryo’s natural activity and is considered one of the most difficult parameters to measure. An acceptable measurement technique of embryonic heart rate should provide a reliable cardiac signal quality while maintaining adequate gas exchange through the eggshell during the incubation and embryonic developmental period. In this paper, we present a detailed design and methodology for a non-invasive photoplethysmography (PPG)-based prototype (Egg-PPG) for real-time and continuous monitoring of embryonic heart rate during incubation. An automatic embryonic cardiac wave detection algorithm, based on normalised spectral entropy, is described. The developed algorithm successfully estimated the embryonic heart rate with 98.7% accuracy. We believe that the system presented in this paper is a promising solution for non-invasive, real-time monitoring of the embryonic cardiac signal. The proposed system can be used in both experimental studies (e.g., developmental embryology and cardiovascular research) and in industrial incubation applications.


Introduction
The chicken embryo is not only an important product in the global demand for chicken meat but is also a widely used experimental animal model in developmental biology research, the study of physiological responses and adaptation to altered environments, and neurobiology research [1][2][3]. Additionally, embryonic chorioallantoic membrane (CAM) assays have been widely used to study angiogenesis and tumour cell invasion metastasis. The CAM-based assay has many advantages, such as its highly vascularised nature, which promotes the efficiency of tumour cell grafting, and its simplicity and cost effectiveness [4]. Moreover, chicken eggs can be incubated to any developmental stage, simplifying experimental design. Furthermore, within two to three days of incubation, chick embryos gastrulate, neurulate, and fold into three-dimensional (3D) animal models with beating hearts and complex nervous systems [5]. Many parameters of interest can be monitored during the development of the embryo. The heart rate (HR) is an important physiological variable useful as an index reflecting the embryo's natural activity and traditionally has been one of the most difficult parameters to measure [6].
The heart is the first organ to function during the developmental stage of the avian embryo [7]. Maturing tissues and organs require a higher oxygen consumption during later stages of development. This can only be met by an increasing oxygen delivery when blood flow finally takes place. The heart rate of a chicken embryo is therefore an important autonomic controlled index of the cardiovascular system [8]. Additionally, the embryonic heart rate (HR) during incubation and before hatching can be a useful physiological parameter for studying the regulation mechanisms of the cardiovascular system and the thermoregulatory development. Photoplethysmography (PPG) is a measurement of the heartbeat rate based on changes in the rate of blood flow. Unlike an electrocardiogram (ECG), which measures the heart rate by placing electrodes on the patient's chest to measure electrical potential, PPG is a low cost, simple, non-invasive optical measurement based on the reflection of light and is used in the biomedical field to detect blood volume changes in the microvascular bed of tissue through red and infrared lights [9].
In the literature, cardiogenic signals of avian embryos are detected using various sensors noninvasively, semi-invasively, or invasively while maintaining adequate gas exchange through the eggshell [10,11].
As cited by Bellville [12] and Romanoff [13], the early research of Bogue [14] in 1932 showed that the heart rate of chicken embryos could, at that time, only be studied using an electrocardiogram (ECG). In this technique, at least three electrodes have to be inserted into the tissues surrounding the embryo.
Later, Bamelis et al. [11] used an ECG measuring technique in which the electrodes were positioned between the shell and the outer membrane. However, due to the exposed holes in the eggshell the gaseous exchange (i.e., water vapour, oxygen and carbon dioxide) between the egg and it surrounding environment will change dramatically [11]. Moreover, long-term recording of the heart-rate in this way involves risks due to the increased possibility of bacterial infections passing through the exposed holes.
The same concerns also exist in the case of the impedance cardiogram (ICG), developed by Tazawa and Whittow [15], and the pulse-oximetry technique first presented by Lewin et al. [8].
To overcome these concerns, different researchers have developed various techniques to measure the heart rate. Several invasive and less-invasive techniques have been tested and demonstrated to measure the longer-term heart rate and heart rate variability of the chicken embryo [16][17][18].
The ballistocardiogram (BCG) is based on slight movements or vibrations of the eggshell, caused by contraction of the embryonic heart, which can be detected by piezoelectric sensors [19] or optically via laser interference [3]. The acoustocardiogram (ACG) uses the effect of the pulsatile air movement across the eggshell, detected by microphone [20] or differential pressure transducer [21]. In their work [20], Rahn et al. developed a technique that involved placing an egg in a tightly sealed vessel containing a condenser microphone. Akiyama et al. [10] measured the instantaneous heart rate (IHR) in chicken embryos using an acoustocardiogram (ACG) from day 12 until hatching. They found that the IHR comprised transient bradycardia and tachycardia, which first developed on day 14 and 16 in most embryos, respectively.
In their study [8], Lewin et al. introduced a PPG-based technique to measure the chicken embryonic heart rate. Youssef et al. [22] introduced a novel approach for the real-time, semi-invasive measurement of the embryonic heart rate based on image photoplethysmographic (iPPG) techniques via a small window (1 cm 2 ) in the eggshell. Although the technique developed by Youssef et al. [22] provided continuous and real-time measurements of the developing embryo during incubation, it is an invasive technique that requires careful handling to prevent contamination from taking place. Yu et al. [23] used the PPG technology to non-invasively distinguish between live and dead chicken embryos. In a recent study [24], Phuphanin et al. developed a smartphone-based algorithm for non-invasive detection of the embryonic heart rate.
Although a substantial amount of research has been conducted on continuous long-term monitoring of the HR in chicken embryos, to date, no practical and affordable technique, implementable in commercial incubators, is available. In the present work, we present a full description of a prototype of a non-invasive PPG-based system, including hardware and a real-time algorithm, for continuous long-term heart rate monitoring of the developing chicken embryo during incubation.

Photoplethysmographic (PPG)-Based Embryonic Heart Rate Extraction
In general, the photoplethysmographic (known most commonly as PPG) system consists of a light source (usually a light-emitting diode) and a photodiode to detect the light. When a light-emitting diode (LED) emits light, it passes through living body (tissue) and can be absorbed by the surrounding substances such as arterial blood, venous blood, bone, and skin [25]. The absorption of this light can either be constant (bone and skin) or alternating (arterial blood). The alternating occurrence in arterial blood is attributable to the blood flow rate or volume per unit of time, which is greater during the systolic phase than during the diastolic phase. Depending on the relative position of the photodiode to the light source, two different modes of operation exist, namely, transmittance and reflective modes. In the reflectance mode, the light emitter is placed next to the detector, which measures the backscattered or reflected light from the tissue (body). Alternatively, in the transmittance mode, the photodiode is placed opposite the light emitter in such a manner that the photodiode only detects the transmitted light through the body.
Many studies have previously indicated that green light (495-570 nm) shows a higher absorptivity for oxygenated blood than other spectra (e.g., [25,26]). In general, short wavelengths (i.e., green and blue) are known to have a lower penetration depth (δ) than longer wavelengths (i.e., red and infrared) [27,28]. This is defined as the depth when the light intensity decreases to 37% of the intensity on the incident surface [26]. Therefore, short wavelengths are more common in detecting superficial blood flow while deeper tissue movements have less impact.
The penetration depth is described as [28]: where δ is the penetration depth (mm), and µ a and µ s are the absorption and scattering coefficients (cm −1 ), respectively. The penetration depth depends mainly on the extinction coefficient of the tissue or the material through which the light passes. This extinction coefficient is defined as the sum the absorption and scatter coefficients (i.e., (µ a (λ) + µ s (λ))). As known fact, light travels further through tissue with low absorptive and scatter properties [26]. Because wavelengths such as red and infrared have low coefficients in most biological tissue, these wavelengths are used in the transmittance mode.

Hardware Design and Prototype (Egg-PPG)
The main components of the designed and developed Egg-PPG prototype are presented as a block diagram in Figure 1. The Egg-PPG prototype ( Figure 2) consists of the two main components, namely, the light source system and the photodiode system. In general, the photoplethysmographic (known most commonly as PPG) system consists of a light source (usually a light-emitting diode) and a photodiode to detect the light. When a lightemitting diode (LED) emits light, it passes through living body (tissue) and can be absorbed by the surrounding substances such as arterial blood, venous blood, bone, and skin [25]. The absorption of this light can either be constant (bone and skin) or alternating (arterial blood). The alternating occurrence in arterial blood is attributable to the blood flow rate or volume per unit of time, which is greater during the systolic phase than during the diastolic phase. Depending on the relative position of the photodiode to the light source, two different modes of operation exist, namely, transmittance and reflective modes. In the reflectance mode, the light emitter is placed next to the detector, which measures the backscattered or reflected light from the tissue (body). Alternatively, in the transmittance mode, the photodiode is placed opposite the light emitter in such a manner that the photodiode only detects the transmitted light through the body.
Many studies have previously indicated that green light (495-570 nm) shows a higher absorptivity for oxygenated blood than other spectra (e.g., [25,26]). In general, short wavelengths (i.e., green and blue) are known to have a lower penetration depth ( ) than longer wavelengths (i.e., red and infrared) [27,28]. This is defined as the depth when the light intensity decreases to 37% of the intensity on the incident surface [26]. Therefore, short wavelengths are more common in detecting superficial blood flow while deeper tissue movements have less impact.
The penetration depth is described as [28]: where is the penetration depth (mm), and and are the absorption and scattering coefficients (cm −1 ), respectively. The penetration depth depends mainly on the extinction coefficient of the tissue or the material through which the light passes. This extinction coefficient is defined as the sum the absorption and scatter coefficients (i.e., ( ) ( ) ). As known fact, light travels further through tissue with low absorptive and scatter properties [26]. Because wavelengths such as red and infrared have low coefficients in most biological tissue, these wavelengths are used in the transmittance mode.

Hardware Design and Prototype (Egg-PPG)
The main components of the designed and developed Egg-PPG prototype are presented as a block diagram in Figure 1. The Egg-PPG prototype ( Figure 2) consists of the two main components, namely, the light source system and the photodiode system (abbreviation list is shown in Appendix A).

Embrypnic Cardiac Wave Extraction Algorithm and Heart Rate Calculation
The main components of the continuous wavelet transform (CWT)-based embryonic cardiac wave (ECW) extraction algorithm are depicted in the following block diagram ( Figure 3).  Due to the continuous changes in the internal physical and optical properties of the incubated egg resulting from embryonic development, the Egg-PPG was designed to adapt the light intensity of the three LEDs to ensure a high-quality PPG signal during the embryonic developmental stages. Thus, the LED control circuit board (LB) was developed to control the light intensity of the LEDs via a linear voltage regulator (LVR). The developed LED control board is provided with an external input terminal (0-5 DC-Voltage), which allows the user to externally control the LED's current and consequently regulate the LED's intensity between 0 and 300 mW·Sr −1 .

Photodiode System
The Photodiode system comprises the following: When reflected/transmitted light is partly absorbed by the photodiode, a very small current I P , with an order of nano-amperes (photodiode maximum current = 74 nA), is produced. This photodiode maximum current (I Pmax = 74 nA) is equivalent to the direct current (DC) signal of the received light.
The embryonic cardiac waves appear as a small alternative current (AC) signal that is superimposed on the baseline DC signal. Hence, an amplification circuit board (AB see Figure 2) was developed to amplify and condition the photodiode signal ( Figure 1). The output of the amplification board is a PPG voltage signal (V out = −5 V to +5 V), which can be read using a suitable data acquisition interface. The developed AB consists of the following main components: The transimpedance amplifier (TIA see Figure 2) converts the very small current I P , produced by the photodiode, into a readable voltage. The TIA has a gain stage equal to the feedback resistor value R f eedback , where the voltage output of the TIA is given by V TIA = I P × R f eedback . -

Analog filters
The amplification circuit board contains a low-pass filter (LPF) with a cut-off frequency of 16 Hz to filter out the high frequency TIA noise, which originate mainly from the input voltage noise (noise gain), the input current noise, and the thermal noise (resistor). Additionally, a high-pass filter (HPF), with a cut-off frequency of 23 mHz eliminates the DC-offset originating from the constant LED light. -

Programmable gain amplifier
A programmable gain amplifier (PGA) provides control of the TIA gain with 10 gain levels from −10 to −100 dB (in 10 dB steps) via an external digital I/O interface. The PGA provides the possibility and flexibility to adapt the received PPG signal to maximize the signal-to-noise ratio (SNR).

Embrypnic Cardiac Wave Extraction Algorithm and Heart Rate Calculation
The main components of the continuous wavelet transform (CWT)-based embryonic cardiac wave (ECW) extraction algorithm are depicted in the following block diagram ( Figure 3).

Embrypnic Cardiac Wave Extraction Algorithm and Heart Rate Calculation
The main components of the continuous wavelet transform (CWT)-based embryonic cardiac wave (ECW) extraction algorithm are depicted in the following block diagram (Figure 3).

Pre-Processing of PPG Signals
Firstly, the PPG signals are normalized to zero mean and unit variance [29]. The normalized signals are filtered using a zero-phase 4th order Butterworth low pass (BWLP) filter with a cut-off frequency of 7 Hz. This cut-off frequency is chosen to contain, in the filter passband, the documented (e.g., [3,10,14,30]) physiological heart rate range (160-300 bpm) of the chicken embryo during different developmental stages. The Butterworth filter provides a maximally flat passband and the zero-phase implementation to preserve the embryonic cardiac wave. The second derivative of the PPG signal, also called the acceleration plethysmogram (APG), shows more defined peaks than those of PPG signal, which more accurately detect the heart rate [31]; the APG was used in the presented approach. Figure 4 shows an example of the resulting APG signal after pre-processing compared with the raw PPG signal obtained from an incubated fertile egg at embryonic day ED09. To further distinguish the cardiac wave peaks, positive values of the APG signal are squared, whereas negative values are equated to zero (see an example in Figure 4).
Sensors 2020, 20, x FOR PEER REVIEW 6 of 17 Firstly, the PPG signals are normalized to zero mean and unit variance [29]. The normalized signals are filtered using a zero-phase 4th order Butterworth low pass (BWLP) filter with a cut-off frequency of 7 Hz. This cut-off frequency is chosen to contain, in the filter passband, the documented (e.g., [3,10,14,30]) physiological heart rate range (160-300 bpm) of the chicken embryo during different developmental stages. The Butterworth filter provides a maximally flat passband and the zero-phase implementation to preserve the embryonic cardiac wave. The second derivative of the PPG signal, also called the acceleration plethysmogram (APG), shows more defined peaks than those of PPG signal, which more accurately detect the heart rate [31]; the APG was used in the presented approach. Figure 4 shows an example of the resulting APG signal after pre-processing compared with the raw PPG signal obtained from an incubated fertile egg at embryonic day ED09. To further distinguish the cardiac wave peaks, positive values of the APG signal are squared, whereas negative values are equated to zero (see an example in Figure 4).

Wavelet Analysis and Peak Detection
Wavelet transform (WT) is a spectral estimation technique performed by breaking a general function into an infinite series of wavelets [29]. In the biomedical engineering field, wavelet transform (WT) is often preferred over fast Fourier transform (FFT) in signal processing because most of the physiological signals are non-stationary in nature, which makes WT a viable method. The wavelet transform can be used to analyse time series that contain nonstationary power at many different frequencies [32,33]. Using WT, the signals in the time domain are mapped into the frequency domain to preserve both the time and frequency information. -

Continuous Wavelet Transform method
Generally, in the continuous wavelet transform (CWT) method, a specific wavelet centred about a given frequency is computed from the mother wavelet by scaling and shifting it. In this manner, the length of the wavelet contains the same number of centre (also called peak) frequency cycles. For a scale parameter s > 0, and a position parameter b, which defines a translation of the wavelet and indicates the time localization, the CWT can be given by [33]:

Wavelet Analysis and Peak Detection
Wavelet transform (WT) is a spectral estimation technique performed by breaking a general function into an infinite series of wavelets [29]. In the biomedical engineering field, wavelet transform (WT) is often preferred over fast Fourier transform (FFT) in signal processing because most of the physiological signals are non-stationary in nature, which makes WT a viable method. The wavelet transform can be used to analyse time series that contain nonstationary power at many different frequencies [32,33]. Using WT, the signals in the time domain are mapped into the frequency domain to preserve both the time and frequency information. -

Continuous Wavelet Transform method
Generally, in the continuous wavelet transform (CWT) method, a specific wavelet centred about a given frequency is computed from the mother wavelet by scaling and shifting it. In this manner, the length of the wavelet contains the same number of centre (also called peak) frequency cycles. For a scale parameter s > 0, and a position parameter b, which defines a translation of the wavelet and indicates the time localization, the CWT can be given by [33]: Wavelet analysis is performed by convoluting the signal under investigation (i.e., the APG signal), x(t), with a mother wavelet, ψ(t) ψ * (t) is the complex conjugate of the analysed mother wavelet, and the term 1 √ s is an energy normalized factor (the energy of the wavelet must be the same for different s values of the scale). As the scale s increases, the wavelet is compressed, its spectrum dilates, and the peak frequency shifts to a higher value. Conversely, when s decreases, the wavelet dilates, its spectrum is compressed, and the peak frequency shifts to a lower value [34]. In practice, the CWT is usually computed over discrete values of the s scale in the range of continuous values. To approximate the continuous wavelet transform, the Equation (2) should be applied N times for each scale, where N is the number of points in the discrete signal f (t) [33]. In general, the classic CWT is time consuming and the computing power required is too high for it to be applied in real-time. Hence, more efficient algorithms have been developed to reduce the required computational power and time of CWT calculation (e.g., [35][36][37]).
In the presented approach, the CWT is calculated using fast Fourier transform (CWFT) [37] that allows N convolutions to be computed simultaneously, and is thus more suitable for real-time applications. The CWFT algorithm implements the following steps: i.
Compute the discrete Fourier transform (DFT) of the analysed signal x(n), including N samples, using Fast Fourier Transform (FFT) as follows: where k is an index of frequency. ii.
Obtain the DFT (ψ ) of the analysed wavelet (ψ) at the appropriate angular frequencies as follows: iii.
Scale the DFT of the analysed wavelet at different scales to ensure different scales are directly comparable. To obtain the unit energy for each scale s, the wavelet function is normalized using the following formula: where ∆t = 1/ f s is the sampling period with f s is the sampling frequency and ω k = 2πk N∆t . iv.
Compute the product of the signal DFT and the wavelet DFT over all of the scales. Invert the DFT to obtain the CWT coefficients as follows: The Gaussian function is perfectly local in both time and frequency domains and is indefinitely derivable; a derivative of any order (m) of the Gaussian function may be a Wavelet Transform (WT). A typical cardiac pulse event in the PPG signal consists of two modulus maxima with different signs of W s (s, b) (i.e., maxima and minima) [38]. Sahambi et al. [38] used a first-order odd function to detect the QRS complex in the ECG signal.
Hence, a first-order derivative of Gaussian (DOG) wavelet was chosen for the presented work because, in general, the obtained scalograms (scales "s" vs. positions "b") using this wavelet showed clear frequency contents within the expected pulse rate ranges of the chicken embryo. The first-order DOG wavelet is given as follows:

Power Spectral Entropy and Embryonic Cardiac Wave Recognition
Spectral entropy is used in different applications as a entropy-like index to identify the relative disorder in time dynamics of biological, ecological, and physical systems [39,40]. Detection of the specific waveform of the embryonic cardiac wave (ECW) is a challenging process, particularly in the presence of non-stationary noise, such as motion artefacts, and during the early stages of embryonic development due to the relatively weak cardiac signal. To overcome these problems in applications such as speech recognition and end-point detection, the entropy-based algorithm has been proposed by some investigators (e.g., [39,41]). In the present work, we used an entropy-based algorithm for automatic ECW detection. The application of the entropy concept for ECW recognition is based on the assumption that the spectrum of the PPG signal is more organised (lower entropy) during the segments of cardiac events than during noise segments. The power spectral entropy (E S ) of the PPG signal is computed as follows [39]: - The probability density function (PDF) of the spectrum of the PPG signal can be estimated by normalisation over all of the frequency components: where P i is the probability density for the S( f i ), which is the spectral energy of the ith frequency component f i , obtained by fast Fourier transform (FFT) and N f is the total number of frequency components in the FFT. -Then, the spectral entropy (H n ) of the PPG nth segment is calculated as follows: Usually, the spectral entropy (H) is normalized by dividing Equation (8) by log 2 N f , which represents the maximal spectral entropy of white noise, uniformly distributed in the frequency domain. In this paper, we propose a different approach of normalization of the spectral entropy, namely, by dividing the PPG spectral entropy (H n ), Equation (8), by the spectral entropy of a PPG segment obtained from an infertile egg (H ∞ ). The normalized spectral entropy (E S ) is given as follows: where P ∞ is the probability density of the PPG segment obtained from an interfile egg, which represents, in our case, the maximal spectral entropy. Hence, it is expected that the normalized spectral entropy (E S ) of the PPG signal is equal to or closer to unity in the absence of cardiac events.

Peak Detection and Heart Rate Calculation
In general, the heartbeat can be estimated by calculating the time between the peak intervals in the PPG signal. The peak is detected by calculating the local maxima of the decoupled cardiac pulse signal X(n) within a predefined interval (window) I and finding n o ∈ I such that: The algorithm then repeats the procedure of the tallest peak and iterates until all peaks are considered.

Incubation and Incbuated Eggs
Thirty fertile eggs of broiler chickens (breed Ross 308 and flock age of 42 weeks) were incubated in an experimental incubator (a detailed description of the experimental incubator can be found in [42]) at 37.8 • C, with relative air humidity of 60%, and automated turning every two hours. Four infertile eggs were also placed as a control (blank) test inside the incubator during the whole incubation period.

Data Acquesition and PPG Measurments
A three-dimensional (3D) printed plastic housing system (HS in Figure 2) was designed to contain the three LEDs (L 0 , L 1 , and L 2 ) and the photodiode (P) around the egg (see Figure 2). The housing system (HS) consists of two sections: the largest (M 1 ) was designed to hold the three LEDs around the egg with the possibility of placing each LED around the vertical axis of the egg (see Figure 2); the small section (M 2 ) held the photodiode (P) tightly around the egg.
The PPG signal obtained from the Egg-PPG prototype was read using a National Instrument ® USB-6009 multifunction data-acquisition (DAQ) device as an interface between the Egg-PPG and the computer. A customized MATLAB script was developed to interface/communicate with the Egg-PPG prototype through the National Instrument ® USB-6009. Using the developed MATLAB interface script, the PPG signal was acquired at a sampling rate of 128 Hz, and the interface controlled both the light intensity of the three LEDs and amplification gain of the acquired PPG signal.

Detection of Embryonic Cardiac Wave
During the first 24-30 h of incubation, blood and vascular development initiate both in the form of extra-embryonic blood islands and intra-embryonic endothelial cell specification and differentiation [43,44]. The first major blood vessels of the embryo, the paired dorsal aorta, are formed at 30-35 h of development [44][45][46], and a beating heart is apparent by 38-42 h of development [43,47]. Thus, theoretically, the embryonic cardiac wave (ECW) is detectable between the second and third days of incubation. However, this is not the case in reality due to many practical difficulties related to the optical properties of the incubated eggs and the weak cardiac signal, especially in such an early stage of development.
Successful detection of the ECW using the Egg-PPG prototype is dependent on the choice of suitable LED intensity (I) and amplification gain (G). In this phase of the investigation, starting from embryonic day ED03, a manual search for the ECW was performed by changing LED intensity and amplification gain. In total, combinations included eight intensity levels (from 50 to 300 mW·Sr −1 in 50 mW·Sr −1 dB steps) levels and 10 levels of gain (from −10 to −100 dB in 10 dB steps) to search for the ECW. For each combination, a segment of 60 s of PPG measurement was recorded. After performing the pre-processing step, spectral analysis was performed on the recorded PPG segment. Together with the visual inspection, the spectral analysis results were used to detect the presence of the ECW.
Once the ECW was detected, the PPG signal was acquired daily from three different fertile eggs. Each day the PPG measurement was performed for 10 min per egg. The daily selection of the test eggs was performed by randomly picking eggs from the incubation tray.

Detection of Embyonic Cardiac Wave and Signal Quality
The manual search for the embryonic cardiac wave (ECW) showed that it is only possible to detect an ECW starting from embryonic day ED07 using the Egg-PPG prototype. The results showed that the ECW is detectable from ED07 until ED19 using a light intensity range within I = 150 to 300 mW·Sr −1 and amplification gain range within G = −50 to −100 dB.
The daily acquired PPG signals within ED07 until ED18, from all tested eggs, were divided into segments of 10 s each (i.e., 1280 data samples) to be processed individually. In total, 180 PPG segments were analysed per each embryonic day (ED) from ED7 until ED18. After the pre-processing step (see Section 2.2.1), the continuous wavelet transform of each segment was computed using the CWTFT algorithm. The challenging step of embryonic cardiac wave (ECW) decoupling using CWT is the selection of the most suitable set of scales (s).
The suitable set of scales (s) should contain most of the energy of the ECW. We found that the energy of the cardiogenic pulse signals, in all acquired PPG segments, was dominated by five scales between 0.05 and 0.10. Figure 5 shows an example scalogram displaying the distribution of the calculated CWT coefficients (and energy) over the different scales (s), based on the PPG signal obtained from fertile eggs at embryonic ED09. The resulting scalogram (for example, Figure 5) showed that most of the energy (calculated from CWT coefficients) dominated the selected scale range (0.05-0.10).

Detection of Embyonic Cardiac Wave and Signal Quality
The manual search for the embryonic cardiac wave (ECW) showed that it is only possible to detect an ECW starting from embryonic day ED07 using the Egg-PPG prototype. The results showed that the ECW is detectable from ED07 until ED19 using a light intensity range within = 150 to 300 mW.Sr −1 and amplification gain range within = −50 to −100 dB. The daily acquired PPG signals within ED07 until ED18, from all tested eggs, were divided into segments of 10 s each (i.e., 1280 data samples) to be processed individually. In total, 180 PPG segments were analysed per each embryonic day (ED) from ED7 until ED18. After the pre-processing step (see Section 2.2.1), the continuous wavelet transform of each segment was computed using the CWTFT algorithm. The challenging step of embryonic cardiac wave (ECW) decoupling using CWT is the selection of the most suitable set of scales ( ).
The suitable set of scales ( ) should contain most of the energy of the ECW. We found that the energy of the cardiogenic pulse signals, in all acquired PPG segments, was dominated by five scales between 0.05 and 0.10. Figure 5 shows an example scalogram displaying the distribution of the calculated CWT coefficients (and energy) over the different scales ( ), based on the PPG signal obtained from fertile eggs at embryonic ED09. The resulting scalogram (for example, Figure 5) showed that most of the energy (calculated from CWT coefficients) dominated the selected scale range (0.05-0.10).

Embryonic Cadiac Wave Extraction and Heart Rate Calculation
The developed CWT-based ECW extraction algorithm was used to extract and reconstruct the ECW from each PPG segment, obtained from the tested fertile eggs, during the incubation period between ED07 until ED18. The instantaneous embryonic heart rate (bpm) based on the interpeak interval was calculated using the peak detection algorithm. The results showed that the reconstructed ECW in all cases was not affected by the dicrotic notch, which is a secondary upstroke in the descending part of a pulse tracing corresponding to the transient increase in aortic pressure upon closure of the aortic valve [48], which can lead to a false reading of the peaks (Figure 6).

Embryonic Cadiac Wave Extraction and Heart Rate Calculation
The developed CWT-based ECW extraction algorithm was used to extract and reconstruct the ECW from each PPG segment, obtained from the tested fertile eggs, during the incubation period between ED07 until ED18. The instantaneous embryonic heart rate (bpm) based on the interpeak interval was calculated using the peak detection algorithm. The results showed that the reconstructed ECW in all cases was not affected by the dicrotic notch, which is a secondary upstroke in the descending part of a pulse tracing corresponding to the transient increase in aortic pressure upon closure of the aortic valve [48], which can lead to a false reading of the peaks (Figure 6).
Sensors 2020, 20, x FOR PEER REVIEW 11 of 17 Figure 6. Detected cardiac peaks based on the reconstructed embryonic cardiac wave (ECW) in comparison to a pre-processed PPG segment obtained from an incubated fertile egg at embryonic day ED09. The magnified graph shows that the developed ECW extraction algorithm is not susceptible to false readings of the dicrotic notch.
In Figure 7, the daily averages and standard deviations (represented as error bars) of the estimated embryonic heart rate are shown as calculated from the acquired daily PPG segments between embryonic days ED07 and ED18. The resulting estimations of the daily embryonic heart rate, using the developed Egg-PPG and ECW estimation algorithm, are comparable to the documented (e.g., [3,10,14,22]) heart rates using different techniques (e.g., ECG, ICG, Pulse-Oximetry, and semiinvasive iPPG-based system).

Figure 7.
Average ± standard deviation (error bars) of estimated embryonic daily heart rate based on the acquired PPG segments using the developed Egg-PPG prototype and embryonic cardiac wave extraction algorithm. Figure 6. Detected cardiac peaks based on the reconstructed embryonic cardiac wave (ECW) in comparison to a pre-processed PPG segment obtained from an incubated fertile egg at embryonic day ED09. The magnified graph shows that the developed ECW extraction algorithm is not susceptible to false readings of the dicrotic notch.
In Figure 7, the daily averages and standard deviations (represented as error bars) of the estimated embryonic heart rate are shown as calculated from the acquired daily PPG segments between embryonic days ED07 and ED18. The resulting estimations of the daily embryonic heart rate, using the developed Egg-PPG and ECW estimation algorithm, are comparable to the documented (e.g., [3,10,14,22]) heart rates using different techniques (e.g., ECG, ICG, Pulse-Oximetry, and semi-invasive iPPG-based system).
Sensors 2020, 20, x FOR PEER REVIEW 11 of 17 Figure 6. Detected cardiac peaks based on the reconstructed embryonic cardiac wave (ECW) in comparison to a pre-processed PPG segment obtained from an incubated fertile egg at embryonic day ED09. The magnified graph shows that the developed ECW extraction algorithm is not susceptible to false readings of the dicrotic notch.
In Figure 7, the daily averages and standard deviations (represented as error bars) of the estimated embryonic heart rate are shown as calculated from the acquired daily PPG segments between embryonic days ED07 and ED18. The resulting estimations of the daily embryonic heart rate, using the developed Egg-PPG and ECW estimation algorithm, are comparable to the documented (e.g., [3,10,14,22]) heart rates using different techniques (e.g., ECG, ICG, Pulse-Oximetry, and semiinvasive iPPG-based system).  Although the estimated embryonic heart rate was within the expected and documented daily embryonic heart rate, the developed Egg-PPG system together with the ECW extraction algorithm had not yet been validated. A validation technique based on visual inspection (labelling) of the ECW and manual counting of the peaks was used as a ground-truth heart rate (reference). In total, 30 PPG-segments were visually labelled, and HRs were manually calculated and then compared to the corresponding estimated HR using the developed ECW extraction algorithm. Results showed that the average estimated HRs using the developed ECW extraction algorithm were in agreement with the manually calculated HRs with an accuracy of 98.7%. An ECG-based heart rate measurement technique, as reported by Aubert et al. [1], was attempted as a gold standard for this work. However, we did not succeed in obtaining a reliable measurement of the embryonic ECG.

Real-Time Heart Rate Monitoring Algorithm
A significant challenge to realizing a robust real-time embryonic heart rate monitoring system is developing an automatic ECW detection algorithm. As mentioned earlier, the reliability of the acquired PPG signal is dependent on the selected LED intensity I and amplification gain G. Therefore, to find the most suitable I and G at which the ECW is detectable, a search over all possible combinations of both variables is needed. Additionally, a reliable feature variable is needed as an indicator for the ECW. In this study, normalised spectral entropy (E S ) was used as a feature variable to detect the ECW.
The assumption is that the PPG epoch with ECW contains more information (low spectral entropy) in comparison with the PPG epoch with no ECW, as is the case in an infertile egg. To test this approach, the normalised spectral entropy of 25 PPG segments were acquired from infertile eggs (i.e., containing no ECW) and a further 25 segments were acquired from fertile eggs with a labelled ECW. The E S values of the PPG segments that contained no ECW were found to always be around 1 ± 0.04, whereas the PPG segments with labelled ECW epochs showed lower levels of E S (0.65 ± 0.1). Figure 8 shows that a PPG segment (upper graph) consists of two epochs of PPG signal with no ECW, sandwiching another epoch with the labelled ECW and the corresponding normalised spectral entropy (lower graph). As shown in Figure 8, the plot of E S differentiates the epoch with the ECW from that without.
Although the estimated embryonic heart rate was within the expected and documented daily embryonic heart rate, the developed Egg-PPG system together with the ECW extraction algorithm had not yet been validated. A validation technique based on visual inspection (labelling) of the ECW and manual counting of the peaks was used as a ground-truth heart rate (reference). In total, 30 PPGsegments were visually labelled, and HRs were manually calculated and then compared to the corresponding estimated HR using the developed ECW extraction algorithm. Results showed that the average estimated HRs using the developed ECW extraction algorithm were in agreement with the manually calculated HRs with an accuracy of 98.7%. An ECG-based heart rate measurement technique, as reported by Aubert et al. [1], was attempted as a gold standard for this work. However, we did not succeed in obtaining a reliable measurement of the embryonic ECG.

Real-Time Heart Rate Monitoring Algorithm
A significant challenge to realizing a robust real-time embryonic heart rate monitoring system is developing an automatic ECW detection algorithm. As mentioned earlier, the reliability of the acquired PPG signal is dependent on the selected LED intensity and amplification gain . Therefore, to find the most suitable and at which the ECW is detectable, a search over all possible combinations of both variables is needed. Additionally, a reliable feature variable is needed as an indicator for the ECW. In this study, normalised spectral entropy ( ) was used as a feature variable to detect the ECW. The assumption is that the PPG epoch with ECW contains more information (low spectral entropy) in comparison with the PPG epoch with no ECW, as is the case in an infertile egg. To test this approach, the normalised spectral entropy of 25 PPG segments were acquired from infertile eggs (i.e., containing no ECW) and a further 25 segments were acquired from fertile eggs with a labelled ECW. The values of the PPG segments that contained no ECW were found to always be around 1 ± 0.04, whereas the PPG segments with labelled ECW epochs showed lower levels of (0.65 ± 0.1). Figure 8 shows that a PPG segment (upper graph) consists of two epochs of PPG signal with no ECW, sandwiching another epoch with the labelled ECW and the corresponding normalised spectral entropy (lower graph). As shown in Figure 8, the plot of differentiates the epoch with the ECW from that without. Based on the 95% percentile of all the ECW epochs, a spectral entropy ( ) threshold confidence interval between 0.56 (lower threshold) and 0.69 (upper threshold) in which 95% of the ECW epochs Based on the 95% percentile of all the ECW epochs, a spectral entropy (E S ) threshold confidence interval between 0.56 (lower threshold) and 0.69 (upper threshold) in which 95% of the ECW epochs exist was defined. The estimated thresholds were calculated based on the defined PPG signal sampling rate (128 Hz) and the experimental conditions. Therefore, further sensitivity analysis and validation experiments are planned in future studies.
An automatic ECW detection algorithm was developed based on normalised spectral entropy as shown in the flow chart depicted in Figure 9 and the following pseudo-code: DO: continue LOOP END The proposed algorithm is based on examining a PPG segment of 15 s at each combination of amplification gain (G) and LED intensity (I). Thus, the maximum time for the testing all combinations is 6 min, which is sufficient to detect the ECW.
Sensors 2020, 20, x FOR PEER REVIEW 13 of 17 exist was defined. The estimated thresholds were calculated based on the defined PPG signal sampling rate (128 Hz) and the experimental conditions. Therefore, further sensitivity analysis and validation experiments are planned in future studies. An automatic ECW detection algorithm was developed based on normalised spectral entropy as shown in the flow chart depicted in Figure 9  The proposed algorithm is based on examining a PPG segment of 15 s at each combination of amplification gain ( ) and LED intensity ( ). Thus, the maximum time for the testing all combinations is 6 min, which is sufficient to detect the ECW. The developed ECW detection algorithm was tested offline against 10 recorded PPG segments that included cardiac (ECW) and non-cardiac epochs. The results showed that the algorithm successfully detects the ECW epochs with more than 98% accuracy. Figure 10 shows an example of a PPG segment obtained from a fertile egg at embryonic day ED09 that contains two manually labelled epochs of ECW and other non-cardiac epochs. As shown in the figure, during the ECW epochs, the calculated spectral entropy values were within the defined thresholds. It should be noted here that The developed ECW detection algorithm was tested offline against 10 recorded PPG segments that included cardiac (ECW) and non-cardiac epochs. The results showed that the algorithm successfully detects the ECW epochs with more than 98% accuracy. Figure 10 shows an example of a PPG segment obtained from a fertile egg at embryonic day ED09 that contains two manually labelled epochs of ECW and other non-cardiac epochs. As shown in the figure, during the ECW epochs, the calculated spectral entropy values were within the defined thresholds. It should be noted here that the developed system was validated based on visual inspection of the PPG signal, however, further validation studies are necessary to compare our system with a gold standard such as ECG [8,49].
Sensors 2020, 20, x FOR PEER REVIEW 14 of 17 the developed system was validated based on visual inspection of the PPG signal, however, further validation studies are necessary to compare our system with a gold standard such as ECG [8,49].

Conclusions
In this paper, we presented a detailed design and methodology for a non-invasive PPG-based prototype (Egg-PPG) for real-time and continuous monitoring of the embryonic heart rate during incubation. A developed automatic embryonic cardiac wave (ECW) detection algorithm based on normalised spectral entropy is described. The ECW detection algorithm successfully detected the ECW epochs in the test PPG segments with 98% accuracy. The resulting heart rate of the developed embryonic heart rate estimation algorithm was compared to manually labelled and calculated heart rates. The results showed that the algorithm successfully estimated the embryonic heart rate with 98.7% accuracy. The developed prototype is a promising solution for non-invasive, real-time, and continuous monitoring of the embryonic heart rate during incubation. However, further validation work is recommended in future research.