{'fraction_non_alphanumeric': 0.028774062816616007, 'fraction_numerical': 0.021344140493076664, 'mean_word_length': 4.606209769026884, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A 1D binary photonic crystal sensor for detecting fat concentrations in commercial milk

Our goal in this study is to design an efficient sensor to detect the fat volume in commercial milk. We used a one-dimensional binary photonic crystal to design the sensor and the Transfer Matrix Method to study theoretically its optical response as the refractive index of milk samples changes due to the change in fat concentration. We found that the proposed sensor is efficient in sensing the fat concentration in milk. The optimum defect layer thickness is found to be 1.20 μm and the sensitivity of the sensor improved as the angle of incidence of radiation increased up to 60°. Besides, we proposed an empirical formula that can be used to estimate the fat concentration in milk. The efficiency of our sensor is based on the quick response of the sensor to the changes in the fat concentration in milk. The output signal of the sensor would be processed in a signal processing unit that will give an accurate estimation of the fat concentration in milk. The sensor is easy to fabricate, cost-effective, and user-friendly.


Introduction
Milk and dairy-related products are the most common components of many food products, hence, controlling their qualities is a vital matter. Researchers have been working on detecting and quantifying the adulterants in milk such as added water, whey, formalin, starch, sodium citrate, formaldehyde and sucrose, indigenous vegetable oils, etc. [1][2][3][4][5][6][7] The refractive index of milk is dependent on the concentrations of its constituents. As an example, the refractive index of milk changes upon changing fat concentration. [8][9][10][11] Thus, knowing the refractive index of milk helps in determining the fat concentration.
Estimating the refractive index of a liquid is traditionally based on the use of a commercial Abbe refractometer. This experimental method relies on the detection of the critical angle of total reection in a liquid-prism interface and will be a more accurate and reliable method for transparent liquids. Due to the inaccuracy in detecting the critical angle, it is not possible to use the Abbe refractometer for determining the refractive index of absorbing and turbid liquids. 12,13 Other refractometer systems have been developed to assess the refractive index of absorbing and turbid liquids such as milk. [14][15][16][17][18] However, the accuracy of these systems is dependent on some conditions such as the polarization of incident light and the oscillation of the reectance which depends on the size of solids in liquids.
The current methods and systems used in the food industries for quality control are very time-consuming and highly expensive. Recently, researchers have been exploring a new eld of research of optical sensing; like refractive-index sensor, 9 biosensor, 19 chemical and biochemical sensors, 20 etc. In recent years, optical sensors based on the photonic crystals (PCs) structures have been developed by researchers to meet the needs of certain applications in biomedicine, 19 environmental bio-sensing, 21-23 optoelectronics 24 and optical communication. 25 Several successful attempts have been carried out to fabricate the photonic crystals using different experimental setups to suit certain applications. [26][27][28] The main attractive optical feature of the PC is the photonic bandgap (PBG) where the incident light of a certain wavelength range is hindered from transmitting through the PC. 29,30 The spectral width of the PBG depends on some structural parameters of the PC such as the thicknesses and spatial refractive indices of the PC constituents. [31][32][33] For sensing applications, however, the structure of the PC has to be modied as the wide PBG is not suitable for sensing purposes. Introducing a defect layer in the PC structure will produce a resonant optical mode in the transmittance spectrum of the PC. 34,35 The incident radiation having the resonant wavelength within the PBG can propagate through the PC. The resonant wavelength is sensitive to any minute change in the refractive index of the defect layer, as such this property makes the defected PC a suitable device for sensing use. 9,36 One, two and three dimensional PC structures have been proposed 34,37 and the transmittance spectrum has been theoretically simulated using different simulation techniques. [38][39][40][41] Since the PC structure consists of a nite number of alternating layers, the transfer matric method (TMM) is widely used in calculating numerically the transmittance spectrum of the PC. 31,33,42 In this work, a 1D defective photonic crystal sensor structure is proposed to detect the fat volume concentrations in commercial milk. An empirical relation is developed to estimate the fat volume concentrations in commercial milk as a function of the refractive index. Hence, the proposed sensor can be efficiently used in quality control in the food-processing industry. The proposed design is very simple and easy to fabricate as it comprises only one single defective PC. Furthermore, it has a fast response with a high sensitivity and quality factor. Fig. 1 shows a schematic diagram of the proposed structure of the PC-based sensor. The design consists of alternating nite layers of N-FK51A glass (uor crown) and ZrO 2 (zirconia) arranged in a planar manner forming a periodic multiple unitcell structure. The periodicity of the structure is broken by introducing a defect layer in the middle of the structure. The whole structure is mounted on a glass substrate.

Proposed design and theory
According to the TMM, each layer is characterized by a transfer matrix given by 42 or d refers to the alternating layers or defect layer, respectively. n j and t j are the refractive index and the thickness of the jth layer, respectively. 3 0 , m 0 are the permittivity and permeability of free space, respectively, l 0 and q 0 are the wavelength and angle of incidence of the radiation in free space, respectively. q j is the angle of incidence in the jth layer. For the whole proposed structure with a number of N unit cells of N-FK51A/ZrO 2 and a defect layer in the middle of the structure, the overall transfer matrix, T M , is given by The transmission coefficient of the spectra tunnelling through the entire structure in terms of the elements of T M is given by Hence, the transmittance, T, can then be determined using The sensitivity (S), quality factor (Q) and gure of merit (FOM) are the main parameters to describe the proposed structure efficacy. The sensitivity is dened as the ratio of the change in the resonant wavelength (due to the presence of analyte), Dl res , to the change in the refractive index, Dn. It is measured in nm RIU À1 .
The quality factor (Q) which explains the sharpness of the resonant peak is dened as the ratio of the obtained resonant wavelength, l res , to the Full Width at Half Maximum, FWHM. Q should be as high as possible and it is a unit-less parameter.
The gure of merit (FOM) is the ability of the sensor to probe the change in the resonant peaks. It is directly proportional to the sensitivity (S) and inversely proportional to the full width at half maxima (FWHM) of the resonant peak and is given by
In this work, the transmittance is simulated in the spectrum range of 400 to 900 nm using the MAPLE soware based on the Transfer Matrix Method (TMM). In this method, the incident radiation at an angle of incidence (q 0 ) experiences successive transmissions and reections at the interfaces separating the adjacent layers of the PC. 42 The electric eld vector of the incident beam is assumed to be perpendicular to the plane of incidence (the so-called s-polarization or TE mode). The materials used in the proposed structure are nonmagnetic (relative permeability equals unity) and their refractive indices are dependent on the wavelength of the incident radiation. The layers are also assumed to be both homogeneous, isotropic and optically at. The thicknesses of the N-FK51A and zirconia layers are chosen as 94.14 nm and 64.75 nm, respectively. The thickness of each layer is chosen in the order of the incident light wavelength so to keep the path difference between re-ected and transmitted beams small in comparison to the coherence length of the monochromatic light. This ensures that the beams are essentially coherent. 42 Fig. 2 illustrates the transmittance spectrum of the proposed PC without and with a defect layer. A trial and error method is used in simulating the transmittance spectrum to obtain the right number of unit cells that will produce a PBG with well-dened edges. Aer a series of trials, a well-dened PBG (of 128 nm spectral width) is achieved when the number of unit cells N ¼ 20 as can be seen in Fig. 2 (the red colored curve). When an additional defect layer, with a thickness of t d ¼ 1.0 mm lled merely with air (no analyte), is introduced in the middle of the structure, the PBG spectral width increased to 137 nm (Fig. 2, the blue-colored curve). Besides, a resonant guided optical mode is developed within the PBG at a resonant wavelength of 566.1 nm. Producing the guided optical mode as a result of breaking the periodicity of the PC structure is very essential for sensing purposes. We focus now on determining the thickness of the defect layer with which the resonant peak becomes as sharp and distinguishable from other undesired peaks as possible. It was reported that during homogenization process which is widely used in milk processing in the dairy industry, the milk fat globule (MFG) size is between 0.3-0.8 mm in diameter. 10,45,46 Therefore, to accommodate the fat globules, we have chosen four thicknesses of 1.00 mm, 1.05 mm, 1.10 mm and 1.20 mm for the defect layer. Fig. 3 demonstrates the transmittance spectrum versus wavelength for some commercial milk samples of different refractive indices when defect layer thicknesses of 1.00 mm, 1.05 mm, 1.10 mm and 1.20 mm are used. Practically, the liquid milk is injected in the defect layer using a syringe. 47,48 We assume that the volume concentration of the main nutritional constituents in commercial milk such as fat, protein, lactose, mineral and vitamins, 49 except the volume concentration of fat, is the same for all milk samples investigated here. Therefore, the difference in refractive indices among the milk samples used is assumed to be only due to the difference in fat volume concentrations. The refractive indices and fat volume concentrations of milk samples investigated in this work are taken from ref. 8. For each defect layer thickness, as can be seen in Fig. 3(a-d), a reasonable redshi in the resonant wavelengths occurs as the refractive index increases due to the increase of the fat concentration in milk. This indicates that the proposed structure is very efficient in sensing the miniature change in the refractive index. To further investigate the efficiency of the proposed structure, the sensitivity (S), quality factor (Q), and the gure of merit (FOM) for the chosen defect thicknesses are calculated and listed in Table 1. The sensitivity of the proposed structure on average increased from 55.1 nm RIU À1 to 101.3 nm RIU À1 as the defect layer thickness increased from 1.00 mm to 1.20 mm. Also, this increase in the defect layer thickness resulted in an increase in the quality factor and gure of merit average values from 7479 to 9121 and from 702 to 1588, respectively. As such, considering the highest values of S, Q and FOM, we will assume that 1.20 mm is the right choice for the defect layer thickness of the proposed structure to have an efficient sensor.
To study the effect of the incident angle of radiation on the performance of the proposed sensor we plot in Fig. 4(a-e) the transmittance versus wavelength for the different milk samples at angles of 10 , 20 , 30 , 45 and 60 . At each angle of incidence, the values of S, Q and FOM are evaluated and listed in Table 2.
From Fig. 4 and the data listed in Table 2, one can see that when the angle of incidence increased from 0 to 60 the average values of S, Q and FOM increased from 101 nm RIU À1 to 142 nm RIU À1 , from 9120 to 48 365 and from 1588 to 12 853, respectively. This behavior of the sensor gives an extra degree of freedom for the designer since they have a window of 60 tolerance to set up the sensor.
The variation of the resonant wavelength as a function of the refractive index of milk samples is depicted in Fig. 5, with a defect layer thickness of 1.2 mm and an angle of incidence of 60 . The resonant wavelength is found to vary linearly with the refractive index. Hence, an empirical linear relationship between the resonant wavelength and the refractive index is obtained using the least square tting and expressed in the following equation l res ¼ À75.7613727 + 448.2721165n (9) Fig. 6 shows the variation of the resonant wavelength with the fat volume concentration (%). The data obtained is also tted to a linear relationship between the resonant wavelength  Table 1 The sensitivity, quality factor, and the figure of merit at normal incidence for the proposed PC structure where F is the fat volume (%) in milk. From eqn (9) and (10) an empirical formula that relates n and F can be deduced as The refractive index for different fat volumes in milk is calculated using eqn (11) and compared with the published values from literature in Table 3. Fig. 7 displays a density-colored map of the effects of both the wavelength and refractive index of milk samples on the transmittance at normal incidence. The wavelength range is 577-585 nm which covers the PBG spectral widths with the resonant wavelengths for all milk samples. The resonant wavelength shis towards higher values as the refractive index increased which is consistent with the results obtained in Fig. 3(d). Table 2 The sensitivity, quality factor, and figure of merit for the proposed sensor when t d ¼ 1.20 mm q 0 ( ) n ¼ 1.

Conclusions
We conclude that the proposed structure is very efficient in detecting the fat volume in milk as it is very sensitive to any minute change in fat volume. The change in the resonant wavelength due to the change in fat volume is formulated empirically. The empirical formulae deduced in this work can be used to estimate the refractive index of milk and determine its fat volume density. We believe that the proposed sensor is very useful in quality control in the food-processing industry. The proposed sensor is simple in structure and easy to fabricate.  7 Density plot mapping the variation of the transmittance at normal incidence of the proposed structure with both the wavelength of the incident radiation and the refractive index of commercial milk samples. The defect layer thickness is 1.20 mm.