It is plugged into the universal serial bus (USB) port of a personal computer (PC) which serves to provide power and for downloading the measurements. The measurements can be viewed on the computer display where they also can be plotted as a graph to recognize trends. As the level of CO2 rises indoors when people are present and the air is not exchanged adequately the device can be employed as a personal device for monitoring indoor air quality. This is of particular interest when airborne pathogens might be present such as during the COVID-19 pandemic. The device utilizes a novel compact CO2 sensor which has only become available commercially recently, and is based on the photoacoustic measuring principle. A graphical user interface on the PC programmed in Python allows easy interaction with the user. A MSP430FR2433 microcontroller on the board controls the sensor and establishes the communication to the software application on the computer. This was facilitated by the choice of Forth as the programming framework for the microcontroller.The compact pocketable CO Relatively modest build-ups to 1000 ppm are already considered to lead to an impairment of human cognition, and higher levels can lead to drowsiness 2 levels are frequently measured as a general indicator for the effectiveness of ventilation 2 levels may serve as a monitor for the quality of ventilation.Carbon dioxide  and final programs are immediately executed when their name is passed to the microcontroller via its serial interface. This makes for an easy interaction with the attached computer, as it is not necessary to write a communication software for the microcontroller, which would be required if the more standard C/C++ language, as used on the Arduino platform, was employed. In the tethered approach, the complete Forth engine resides on a microcontroller with ports for interaction with experimental hardware. The PC can serve as a text based terminal for user interaction, or for routine use a graphical user interface (GUI) can be written. The Python software running on the PC then simply sends Forth words to the microcontroller via the USB port, and processes any data returned. Specific Forth words on the microcontroller developed for the CO2-sensor take care of its configuration and initiate measurements via the I2C serial interface. Forth allows for interactive testing of the subroutines while building a program, which greatly facilitated this task and minimizes the likelihood of introducing software bugs. The Python program on the computer essentially only has to handle the GUI and the sending and receiving of strings via the USB port. Writing the software for such a set-up is highly efficient as the task is divided up according to the different strengths of the two programming environments. Python comes with ready made libraries for creating the GUI and Forth excels in the low level hardware access. It may be argued that due to the similarity to standard Python used on the PC, it would be easier for someone skilled in this computer language to employ MicroPython on the microcontroller. However, Forth was developed in the 1970′s  when computer memory was limited and therefore it is ideally suited to run on current small microcontrollers. The complete Forth engine on the 2-dongleCO requires 11 kBytes of memory, while MicroPython, even being only a stripped down version of Python, requires 256 kByte (see micropython.com). Therefore a much more powerful microcontroller would have been required to implement the 2-dongleCO with MicroPython.The 22-measuring dongle is based on a single double-sided printed circuit board (PCB) with the dimensions of ca. 8.5 × 3 cm and after assembly has a weight of ca. 12 g.•Communication to the computer is via USB.•The USB port also provides the power to the dongle.•2-sensor includes built-in temperature and humidity transducers and these parameters are also read out.The COThe COhttps://sensirion.com) which achieves its unprecedented small dimensions for a CO2-sensor (10.1 × 10.1 × 6.5 mm) by utilization of the photoacoustic measuring principle. This sensor was therefore chosen in order to build a compact device as alternative sensors are based on infrared absorption measurements and require larger dimensions due to the necessary optical path length. For the photoacoustic sensor an intensity modulated infrared emitter inside its body excites acoustic waves on absorption of its energy, which are picked up by an acoustic transducer built into the device. Readers not familiar with photoacoustic gas sensing may wish to consult the recent reviews by Palzer 2 concentration at least once a week (see the manufacturer's data sheet for details). The microcontroller is a 16-bit MSP430 device (MSP430FR2433) from Texas Instruments with the Forth interpreter in firmware. The version of Forth employed is available as open source software under the designation of Mecrisp (https://mecrisp.sourceforge.net). Besides the sensor and the microcontroller a few other electronic components are required. To enable communication with the host computer a USB-to-UART bridge in form of a dedicated integrated circuit, the FT230XQ from FTDI is used. The sensor is powered directly by the 5 V of the USB bus, but the microcontroller is not 5 V compatible and is powered by 3.3 V, which is conveniently provided as an auxiliary by the FT230XQ. A level shifter IC to enable the I2C communication between the microcontroller and the sensor completes the basic set-up. A Micro B USB socket and auxiliary headers to allow the uploading of the firmware into the microcontroller complete the design. The detailed circuit diagram is shown in A detailed block diagram of the circuitry on the dongle is given in 33.1Forth-Words.txt is the Forth programming to be installed on the MPS430FR2433 microcontroller.GUI.zip contains the Python GUI software to be installed on the PC.4Mouser.com) or a LaunchPad , both from Texas Instruments, is required.55.1https://www.autodesk.com), for which a free version is available for educational users. The PCB was ordered together with a stencil from Beta Layout (https://de.beta-layout.com), by submitting the EAGLE CAD file. Gerber files can be created from native EAGLE files if required. The population of the board with the surface mount devices has to be done by reflow soldering, following application of solder paste with the stencil and a small squeeqee. The components were placed with small tweezers under a magnifying glass, and soldered in a reflow oven, but the pin headers were soldered in last with a regular soldering iron. The finished board is shown in 2-gadgetCO from Sensirion has a slot with an opening of ca. 30 mm2 on top of the sensor).The double-sided printed circuit board was designed with the CAD program EAGLE (from 5.2https://ftdichip.com). The instructions for use of this utility program can be found in the application note AN–124, which is also available from the website of the supplier. For this adjustment the dongle is simply connected to the USB port of the PC.The FT230X is set-up correctly for communication between the PC and the microcontroller by default. However, on establishing the communication with the host PC it also informs the PC how much maximum current it should make available on the USB port used, which is then the limit allowed by the PC as long as the connection is established. A notebook PC is capable of delivering up to 500 mA, but the 90 mA requested by the FT230X by default is not sufficient for the peak current consumption by the sensor during the brief measurement periods when the IR emitter is turned on (according to the datasheet a maximum of 137 mA when operated from 5 V). Therefore this setting must be adjusted accordingly by changing the corresponding parameter stored in a non-volatile register on the FT230X. This is carried out with a Windows only program (FT_PROG) available for download from the manufacturer of the device (5.3First the Forth interpreter must loaded onto the MSP430FR2433 with the help of a hardware programmer for the MSP430 microcontroller family. For this purpose the manufacturer of the microcontroller (Texas Instruments) produces a device programmer with the designation MSP-FET, which can obtained from the major distributors of electronic components such as Mouser or Digi-Key. Alternatively a so-called Launchpad is used. These are evaluation boards from Texas Instruments for some of the MSP430 microcontrollers and contain a programming section. A Launchpad for the MSP430FR2433 is available, but any other MSP430 Launchpad should also work.https://sourceforge.net/projects/mecrisp/files/). After expansion of the compressed package locate the forth-mecrisp-msp430fr2433.hex file.Download the mecrisp-2.0.7.tar.gz package from the Sourceforge repository (https://www.ti.com) and available for PCs running Windows, macOS or Linux.The device programmer is used in conjunction with a PC and requires a software running on the PC. The most simple option is UniFlash, which is downloaded from Texas Instruments (Connect the dongle to the computer in order to provide power to the microcontroller. Set the bridge on jumper 3 (J3) to connect pins 1 and 2. Connect the programming signals SBWTCK and SBWTDIO as well as GND from either the MSP-FET device programmer or the programming section of the LaunchPad to pins 1, 2 and 3 respectively of J4 on the dongle. .Open UniFlash on your PC. It should automatically recognize your programmer and the attached MSP430 microcontroller. Under “Choose Your Device” select “MSP430FR2433” (not the bootloader version). Select the USB port and click start. Under the Program menu select the forth-mecrisp-msp430fr2433.hex file downloaded from the Mecrisp repository. Under the Settings & Utilities menu tick the box labelled “On connect, erase user code and unlock the device” and make sure that “Erase main and information memory” is selected. Go back to the Program menu and click “Load Image”.https://freeware.the-meiers.org). The settings are a baudrate of 115200, 8 data bits 8, no parity and 1 stop bit. The USB port has to be selected according to your system. In the Transmit menu set the transmit character delay to 3 ms and the transmit line delay to 100 ms. This will allow the microcontroller sufficient time to process the Forth words sent to it.After the successful installation it should now be possible to communicate with the Forth system via the USB port. You can test this with a serial terminal emulator program on the PC, such as CoolTerm (After the communication has been established pressing the return key should produce an OK on the PC screen. Typing “words CR” should bring up a list of the available Forth words for use.2 sensor (Forth-Words.txt obtained from the file repository) is installed on the microcontroller. Simply download the file to the microcontroller by making use of the file send facility of CoolTerm. You can check on the success of this step by typing in “words CR” and confirming that the last entry is “read-values”.Now the Forth programming for the SCD41-D-R1 COThe dongle is now ready. It is possible to interact with it using the terminal program, but the Python GUI provides a more convenient user interface.5.4https://www.python.org/. The required packages  can then be installed using the package installer pip, which is included in the recent versions of Python. Copy the unzipped GUI directory downloaded from the file repository onto your computer. Do not change the directory structure. The GUI is started up by running the Python script GUI.py. It was successfully tested under MS Windows and macOS and should also run under Linux.Download and install the latest version of Python 3 from 62-dongleCO is not connected software-wise to your computer anymore via the terminal emulator program (use the Disconnect menu item in CoolTerm or close the program). Note, that if the dongle is connected to the computer after starting up the software, the list of COM ports shown on the GUI must be updated by clicking on the refresh button. Choose the COM port used by the dongle, and establish the connection by clicking on the icon with the two plugs. A continuous measurement is started by clicking the green play button. The CO2 level  is plotted in real time in the chart while the latest measured values for CO2, temperature and relative humidity  are displayed on the right. Above it, the air quality with respect to the CO2 level is indicated by a virtual traffic light: red > 2100 ppm, orange > 1000 ppm, else green. The 1000 ppm threshold was chosen as this corresponds to the general guidelines for upper indoor concentrations 2 data can be exported as a.csv file for further analysis.The sequence of the overall operation of the GUI software on the PC is shown in form of a flow-chart in 72 sensor is designed so that it does not need to be calibrated by the user, but it has a built in self-calibration mechanism which requires the sensor to be exposed to ambient air at least once per week. The accuracy and precision of the measurements are thus determined by the performance of the sensor and not dependent on the user, as it contains its own electronics and the data is given out already in the digital domain. The circuitry and software reported herein therefore has no effect on the quality of the data. The data sheet specifies an accuracy of ±(40 ppm + 5 % of the reading). However, for characterization readings were compared with those of a professional CO2-measuring instrument . This instrument is specified with an accuracy of ±(75 ppm + 5 % of the reading). A series of readings was obtained by placing both instruments into a box in which an initial high level of CO2 was produced by exhaling into it. The box was then closed, but not perfectly sealed, which led to a gradual decline of the CO2 concentration inside over a period of about 2 h during which readings were taken. The results are given in the table below.2-level dropped, the readings track each other well, with the 10 % deviation diminishing for the readings below about 1000 ppm.As mentioned above, the CO2 measuring session. This was carried out in a closed room with two persons present. At the beginning of the measurement the CO2 concentration was close to the ambient air level, but was then continually rising due to the respiration of the people. On opening the window about 90 min after starting the measurement the CO2 concentration dropped sharply as the air in the room was being exchanged. Note, that besides the current reading for CO2 also the temperature and relative humidity are displayed. These parameters are also determined by the CO2 sensor employed. The “traffic light” shows green as the level is below the threshold value to orange of 1000 ppm. In a long term test, the sensor and the software were found to work flawlessly over a period of at least two weeks (the PC must be prevented from hibernating).Specifications table.The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.


In lubricated tribo-contacts, hydrogen ingress in steel is possible due to chemical reactions of lubricant components like base oils or additives, and/or contamination upon service particularly water, and/or corrosion processes, and/or electrostatic fields or current flow. Absorbed by the metal, atomic hydrogen may cause serious deleterious effects on the physical–chemical and mechanical properties, reducing the material’s ability to withstand the design loads. The present research work is focused on analyzing the influence of electric field on lubricating oils in contact with steel surface. In order to evaluate the possibility of atomic hydrogen generation and permeation into the steel under cathodic polarization of lubricating oils the electrochemical permeation technique developed by Devanathan and Stachurski is used. The input cell of a Devanathan–Stachurski set up is appropriately modified by realizing a very close distance between the working electrode (steel membrane) and a Pt counter electrode with the oil between. This significantly increases the sensibility of the set up and allows the application of larger voltage and higher temperature to enable hydrogen generation from lubricating oils. The complex effects of cathodic polarization, temperature, additives and presence of water in model lubricating oils on atomic hydrogen permeation into steel is discussed. Hydrogen permeation into metals may cause very serious deleterious effect, well known as “hydrogen embrittlement”, on their physical–chemical, structural and mechanical properties. This phenomenon has stimulated studies of various aspects aimed to its understanding, prediction and prevention.1.Hydrogen embrittlement is caused by penetration of H atoms into metals. The hydrogenation of the metals leads to decrease in the ductility of the metal, deformation under applied stress, cracking and blisters. Hydrogen can be incorporated in the metal during various stages of manufacturing processes as well as during its use. The problem is most important in the case of iron and steel constructions5. The kinetics of hydrogen permeation into metals depends on many factors such as the nature of the metals and their surface state, especially the presence of oxides, applied potential or current density in the case of electrochemical charging, pH, chemical composition of the solution and additives which may inhibit or promote the hydrogen permeation14.The phenomenon “hydrogen embrittlement” is widely investigated mainly in aqueous media16. It provides rapid, reliable and precise information about hydrogen absorption and diffusivity. Suitable modifications of Devanathan–Stachurski cell were also developed to investigate hydrogen permeation through metals at different hydrogen entry conditions.Various experimental methods for evaluation of the hydrogen coverage, respectively hydrogen permeation into metals are proposed in the literature. Among them, the electrochemical technique, derived by Devanathan–Stachurski is widely usedThe phenomenon “hydrogen embrittlement” of steel constructions used in non-aqueous media is also investigated.17, bending stress18, chemical composition of the lubricant20 and current flow through the bearings22.It is reported that the steel bearings used in various machines, in particular in power trains, often suffer from a short service life due to flaking caused by the structural changes. Various factors are proposed as a cause of the problem of the brittle flaking accompanying peculiar structural changes in steel during the rolling contact. Among them are vibration20. According to other authors23, in normal bearing operation, hydrogen is considered to come mainly from the reaction of water (as water contaminants from the air humidity) at the bearing surface along with the decomposition of the lubricant. It is found in this study that the fatigue life of the steel bearings is inversely proportional to the hydrogen content of the steel. Possible source of hydrogen could be also the diffusion of hydrogen absorbed during the bearing manufacturing process.To answer what is the source of hydrogen in bearings and which factors prevent or promote hydrogen ingress, several hypotheses are proposed. Some of them support the basic idea that this phenomenon occurs when hydrogen formed after the decomposition of the lubricating oils by a tribochemical reaction diffuses into the steel bearings24.In the modern industry of lubricating oils, substances that are a complex mixture of organic compounds (base oil and additives) are commonly used. Some of the additives provide antioxidant, anti-corrosion, anti-wear, anti-friction and water-resistant properties25. After adsorption of the lubricating oil on the steel surface, the cleavage of C–C bonds follows, which results in the release of hydrogen and hydrocarbon gases.A mechanism of formation of atomic hydrogen from decomposition of lubricant molecules, additives or contaminants via tribochemical reactions under the tribological contact during surface friction is proposed as a result of investigations with a space lubricant under vacuum conditions25. Thus, hydrogen ingress into the steel occurs due to changes within the oil composition upon service. As a result, flaking of the steel bearings is observed. Thermal decomposition of chemisorbed water and surface contaminants participating in the tribochemical processes occurring at the interface are the other possible sources of hydrogen evolution25. The effect of the high temperature on the stability of the oil substances, formation of hydrogen and following micro structural changes of the steel induced by the hydrogen embrittlement is established and well described in Ref.26. Controlling the diffusion of hydrogen can effectively prevent the flaking and provide long bearing life.It is suggested that the oils, composed of hydrocarbons, decompose under conditions of high temperature and repeated stress caused by rubbing contact and generate hydrogen29. By replacing the charging side of the conventional cell with a “lubricated rubbing” device, and by recording H-permeation transients on the detection side, the effect of commonly used additives and water contamination of the lubricating oils on hydrogen permeation into steel is investigated28.To evaluate the hydrogen uptake from a lubricated tribo-contact into bulk steel, in-situ hydrogen detection methods are developed by suitable modification of the Devanathan–Stachurski set up31. WEC are networks of cracks below the surface of the raceway in the white etching areas. This phenomenon is one of the undesirable side effects during the operation of bearings. It leads to a drastic reduction in the bearing service life. The influence of small currents passing through the rolling bearings on formation of WEC is investigated in detail in Ref.32. On the basis of the results, the failure hypothesis “cathodic WEC fatigue” is suggested as follows: a direct current flow through a rolling bearing causing a small voltage drop can lead to very strong electrical fields (> 10 kV/mm) due to the extremely thin lubricating gaps. Relatively low current densities (10–6–10–4 A/mm2) could be sufficient for this. Depending on the lubricant composition and a sufficient voltage, electrochemical reactions take place and possibly also the formation of solvated hydrogen cations (protons). According to the bearing tests, a voltage drop across the bearing of approximately 1 V seems to be sufficient. At critical hydrogen concentrations of less than 1 ppm WEC formation begins.Early bearing failures, well known as white etching cracks (WEC), are observed when the rolling contact is subjected to so-called additional load such as electrical currents flowing through the bearings, in addition to the pure rolling loadNo reports in the literature on the effect of external polarization of lubricating oils on the hydrogen permeation in in situ measurements were found.Development of a modification of the Devanathan–Stachurski cell for detection and analysis of the hydrogen permeation into steel membrane in contact with lubricating oils subjected to cathodic polarization.Investigation of the influence of the cathodic polarization on the hydrogen permeation behaviour of various oil compositions (including water contamination) at room temperature and upon heating.It could be assumed that depending on the electrical currents passing through the rolling bearings and the lubricant composition, electrochemical reactions take place. As a result, formation and permeation of hydrogen into the steel bearings can be expected. The present work was motivated to study the influence of electric current on lubricating oils in contact with steel surface. The objectives of this work are:32.Model oil compositions, including commonly used in lubricating oils additives as Calcium Sulfonate (CaSulf) and/or Zinc-dialkyldithiophosphate (ZDDP) were chosen for the method validation. Based on literature, it is considered that both CaSul and ZDDP are critical in driving WEC formations, as one specific factor is the effect of the additives’ chemistry on the generation and diffusion of hydrogenPreliminary investigations of the hydrogen permeation into steel membrane in the presence of lubricating oils using the conventional Devanathan–Stachurski set up showed the necessity of a suitable modification of the input (charging) cell in order to facilitate the passing of the charging current or voltage through the oil and to increase the hydrogen permeation sensibility. The reason is the low conductivity of the lubricating oils.33. In this modified version, the output (detection) cell is the same as in the classical version.The input side of the conventional Devanathan–Stachurski cell was redesigned to achieve very close distance between the working electrode (steel membrane) and Pt counter electrode of the input cellThe working electrode and Pt counter electrodes are placed between two polymer rings, which after assembling form a large ring (modified input cell). To establish a close distance between the steel membrane and the Pt counter electrode, a thin spacer of filter paper  impregnated with the oil is used. The experiments were performed under room temperature or upon heating. At the experiments upon heating, the input cell was connected with a heating device through the Pt counter electrode.Schematic representation of the modified Devanathan–Stachurski cell with a close steel/Pt connection in the input cell is given in Fig. The "model compositions” of Base oil and additives tested by the modified Devanathan–Stachurski cell in order to demonstrate its application for investigation of the hydrogen permeation process into a steel membrane under cathodic polarization are presented in Table The chemistry of the model oil compositions is common for lubricants. Bis(nonylphenyl)amine is a typical antioxidant. ZDDP is widely referred as extreme-pressure/anti-wear additive and CaSulf as detergent/rust preventative. The concentrations of ZDDP and CaSulf are significantly higher than that in industrial oils aiming to clearly distinguish possible effects of the additives on the hydrogen generation and permeation.In order to achieve high sensitivity in the detection of diffusible H generated by polarization of the oils, mild steel with a thickness of 25 µm  was chosen instead of bearing 100Cr6 steel. The thickness of the steel electrodes is a critical parameter. 100Cr6 steel in the desired quality in bearings, i.e. heat treated, 62 ± 1 HRC with a specified roughness, surface flatness, thickness and dimensions for the hydrogen permeation setup is not commercially available. It could be assumed, that the different hydrogen trapping sites and the different hydrogen diffusivity of the two steels should not greatly affect the conclusions on the effect of cathodic polarization of lubricating oils on their ability to generate hydrogen as well as for the method validation.2.Before experiments, the steel electrodes, prepared from a mild steel foil with a thickness of 25 µm were cleaned by degreasing in NaOH solution and acetone, followed by etching in aqueous solution of HCl (1:1). The working surface area was 1 cm. Thereafter, the filter paper was impregnated with the oil tested (0.5 ml). After assembling the input cell, the exit side of the steel membrane was electroplated with a thin (nearly 2 µm) palladium layer.The spacer of filter paper was preliminary dried (at 150 °C for 30 min in a laboratory oven) and placed on the platinum counter electrode2 is proportional to the amount of diffusing hydrogen through the steel membrane. By a computerized system, the current I2 at the exit side of the steel membrane was recorded against time as a measure of the hydrogen penetrated into the steel membrane (hydrogen permeation transient).0.1 M NaOH solution was introduced into the output cell. Constant positive potential of 0.28 V vs. Hg/HgO was applied on the exit side of the steel membrane. The detected oxidation (permeation) current I2res) less than 2 µA/cm2.Before recording the permeation transient, a positive potential of 0.28 V vs. Hg/HgO was applied on the exit side of the steel membrane for a sufficiently long time to oxidize hydrogen resulting from its prior treatment  and to get a residual anodic current density  was applied on the entry side of the membrane by a programmable power supply Instek, PSP-405. The 30 V polarization is in agreement with reports in the literature (the bearing voltage can reach ~ 30 V34 and be higher than 70 V22). The reference value of the current at 30 V polarization at room temperature is in the 15–20 nA range, while at heating the current value is within the 0.8–1.7 µA range, depending on the oil composition and temperature. Upon heating, at first the heating device was switched on, set to 70 or 100 °C. After at least 40 min (which time was sufficient the system to be heated), the voltage of 30 V was applied. At the end of the experiment, first the voltage was switched off and then the heating device. The temperature was measured close to the platinum counter electrode, using a thermo-couple mounted within the input cell. Generally, in application the bearing temperature in lubricated contact can be 60–90 °C, though localized flash temperatures can be much higher31. In the present work the effect of temperature of 70 °C  and of 100 °C (upper temperature limit due to evaporation of the electrolyte in contact with the steel at the exit side of the membrane) on the hydrogen permeation was investigated. The increase of the temperature affects the viscosity and the electrical conductivity of the oil, depending on its composition and greatly affects the hydrogen diffusion through steel.In the case of experiments at room temperature, when reaching I0 V Fig. , U1 was Karl Fischer titration was used for determination of the water content in the BOil and in the oil compositions at room temperature. Both additives, ZDDP and CaSulf are known to have hygroscopic properties. Artificially, water was added to the BOil and the CombOil to investigate its effect on hydrogen permeation and electrical conductivity of the substances.2 (exposed to the oil) were used.Electrochemical impedance spectroscopy (EIS) was employed to measure the electrical resistance (impedance) of the steel membrane/oil interface within the 5–2 MHz range of frequencies. The results obtained in EIS for the low-frequency region were used to evaluate the effect of the water content on the oils resistance. The EIS measurements were performed in 2-electrode configuration at room temperature. Electrodes of mirror polished stainless steel with a distance in-between of 50 µm (defined by PTFE foil) and working area of 1 cmEach author certifies that his or her institution approved the study protocol and all investigations were conducted in conformity with ethical principles of research.2res reached the value of about 2 μA, the steel membrane was subjected to polarization. No rise of the permeation current is observed. On the contrary, the permeation current continues to decrease. Upon heating at 70 °C or 100 °C  and polarization (formation of atomic hydrogen) on the hydrogen permeation behavior.The transient of BOil, obtained at room temperature and under constant voltage of 30 V is shown in Fig. 2 further named “temperature peak”, because of its attribution only to the increased temperature. The initial “temperature peak” depends on the temperature and it is higher at 100 °C compared to 70 °C.It should be noted that all the permeation transients obtained upon heating begin with such a sharp increase of the hydrogen permeation current I2res value of about 1–2 μA. The subsequent increase of the temperature, on one hand changes the concentration of diffusible hydrogen by the exchange reaction with the traps in the steel; on the other hand, the value of the diffusion coefficient increases. Both effects contribute separately to the measured increase of the hydrogen oxidation current I2.Concerning the nature of the “temperature peak”, it can be associated with release of residual trapped hydrogen already present in the steel membrane from its manufacturing process and hydrogen resulting from the preliminary treatment of the steel membrane (etching and Pd plating). Such a peak was not registered when experiments with Pd working electrode were carried out, suggesting that the maximum is due to hydrogen, which is not evolved from the steel membrane at room temperature prior heating of the system. A part of the hydrogen (diffusible hydrogen) diffuses and oxidizes due to the applied positive potential at the exit side of the membrane at room temperature, reaching I35. Depending on the binding energy of hydrogen to the trapping sites, trapped hydrogen can be classified as reversible or irreversible38. Hydrogen trapping and hydrogen diffusion, both processes are temperature dependent.It is well known that metallic materials have defects in their atomic lattice structure, e.g. due to the manufacturing process. After absorption, hydrogen diffuses into the microstructure of the metal lattice and there, it is distributed in two forms: diffusible and trapped hydrogen. The trapped hydrogen is incorporated in the micro-structural in-homogeneities 2 is observed on the hydrogen permeation transient recorded under voltage at room temperature  at the transient of CombOil, i.e. more than twice than that registered on the transient of BOil. The observed additional increase in the permeation current on the transient of CombOil under polarization can be related to the presence of additives (and/or water contamination) in the CombOil. Therefore, in the case of CombOil, simultaneous action of the three factors  on hydrogen permeation behavior of the oil is registered.On the transients of CombOil obtained upon heating at 70 °C or 100 °C Fig. b, an inc2 under the applied voltage.The transient corresponding to BOil shows the lowest activity of the oil in regard to the hydrogen permeation under polarization Fig. . However2 immediately after applying polarization, the effect being more pronounced in the case of BOil + CaSulf. The trends of hydrogen permeation transients for BOil + CaSulf and BOil + ZDDP are also different. For BOil + CaSulf the permeation current slightly decreases with time, while that of BOil + ZDDP remarkably decreases with time. These suggest differences in the mechanism of action of the additives regarding the hydrogen permeation in steel.The addition of the antioxidant (AO) to the BOil slightly increases the hydrogen permeation activity of the BOil. The presence of the additives ZDDP or CaSulf into the oil compositions (BOil + ZDDP or BOil + CaSulf) leads to very strong increase of the hydrogen permeation current IConsidering the water contamination as an only source of hydrogen under polarization does not explain the higher permeation current registered for BOil + CaSulf, the composition with a lower water content than that of BOil + ZDDP Table . Therefo− species30. Sulfur at the steel surface is a poison for the recombination of atomic hydrogen to molecular, which would increase the surface concentration of atomic hydrogen. The hydrogen permeation current is proportional to the absorbed hydrogen and in correlation with the hydrogen concentration gradient . It is widely discussed in the literature that the hydrogen poisoning sulfur can promote hydrogen permeation by inhibiting molecular hydrogen recombination in aqueous systems14 and non-aqueous31 systems.It could be proposed that the presence of sulfur in the CaSulf additive greatly influences the rate of hydrogen permeation into the steel for BOil + CaSulf. As rust preventative additive, it could be assumed that CaSulf is present at the steel surface. Cathodic polarization might lead to partial reduction of the sulfonate to R–S30. At the condition of cathodic polarization, discharge of Zn ions and local deposition of Zn on the steel surface could also take place. Zn metal is unable to adsorb hydrogen atoms to any great extent40 and would serve as an effective barrier to hydrogen absorption, resulting in a decrease of the permeation current. Preliminary SEM and EDX analysis of the steel surface performed after hydrogen permeation tests in this research showed formation of a discontinuous layer and presence of Zn at the steel surface [in the range of 1–6 mass % ] among Fe, O, C, S and P. The images and the data from the surface analyses obtained after the permeation tests and their comparison with the penetration currents will be a subject of a separate manuscript.The ZDDP additive contains both critical for hydrogen absorption elements, sulfur and phosphorous. This suggests similarity in the course of the permeation transient for BOil + ZDDP to that of the BOil + CaSulf, if the same mechanism is assumed. However, the relatively high permeation current reached shortly after the polarization of BOil + ZDDP is followed by a decay. Formation of a layer at the steel surface inhibiting the hydrogen absorption could be a possible reason for this. Research on ZDDP highlights that ionic species formed during redox reactions will tend to be insoluble in non-aqueous liquids and, unless removed physically, will tend to block the electrochemical processes28. It is supposed that ZDDP exerts inhibition effect on the recombination of hydrogen atoms to hydrogen gas. As a result, the concentration of absorbed atomic hydrogen in the metal is increased. According to Refs.41, the products formed by hydrolytic decomposition of ZDDP (Alkyl sulphides and Zinc-polyphosphates) have a role of protection of the engine, but they promote the hydrogen permeation process.By in situ H-detection setup, developed on the basis of dynamic modification of Devanathan–Stachurski cell, the anti-wear additive ZDDP is confirmed to play a role of promoter on hydrogen uptake into steel during lubricated tribo-contactThe influence of the temperature is demonstrated by the hydrogen permeation measurements with the composition BOil + CaSulf under polarization at room temperature as well as upon heating at 70 °C or 100 °C Fig. .Figure 5Very low activity of the oil is registered at room temperature. Strong increase of the hydrogen permeation current under voltage is registered upon heating, the effect being more pronounced at 100 °C. This could be related to a release of water from hydrates of the hygroscopic CaSulf at elevated temperatures. It is well known, that at temperatures above 60 °C weakening of the hydrogen bonds in hydrates takes place.28. It is proven in Ref.28, that hydrogen entry into the steel plate is strongly promoted by the additives or water in the lubricant PAO at a lubricated rubbing contact. In addition, a synergistic effect between ZDDP and water is observed—the promoting effect of ZDDP + H2O is twice more than that of ZDDP or H2O separately. Two hypotheses are stated for the promoting effect of water: the surface protective layer formed from ZDDP is removed by water or water promotes surface corrosion and accelerates hydrogen formation as a corrosion product.Both, Ca-sulfonate and Zinc dialkyl-dithiophosphate have a hygroscopic effect. Data for the promoting effect of water contamination in lubricants are published in Refs.The effect of artificially added water to the lubricating oil is demonstrated in the next section.Water contamination of lubricating oils is considered as one of the prime sources of hydrogen in a lubricating tribo-system. The water enters the lubricating oil during operation of the bearing either from humid air in contact with the lubricant or by condensation of the water in the system. The water absorbing capacity of the lubricant varies depending on its chemical composition.45. According to the literature data, even low water concentrations are sufficient to dramatically reduce the service life of steel. It was established that the lubricant transports the water directly to the steel surface where it dissociates due to the heat released by the friction46. The dissociated water is reduced to hydrogen at the nascent steel surface and additionally promotes the oxidative decomposition of lubricants25. The hydrogen diffuses into the steel matrix, causing the initiation of hydrogen embrittlement and WEC.Deleterious effects of water contamination on the bearing fatigue life were well studiedIn the present work, the influence of water  for the CombOil on the hydrogen permeation into steel membrane subjected to cathodic polarization was investigated.2O recorded upon heating at 70 °C  on the electrical conductivity, then that of water content itself.The effect of water addition on the hydrogen permeation transients is not as significant as expected. On the one hand, the water is a source of hydrogen and on the other hand, affects the electrical conductivity of the substance. Therefore, electrochemical impedance spectroscopy was employed for investigating BOil, BOil + Hure Fig. . As seenA modification of the Devanathan–Stachurski cell is developed, aimed to achieve very close distance between the working electrode (steel membrane) and Pt counter electrode in the input cell using a spacer of filter paper. By this way, the ohmic resistance of the input cell is lowered sufficiently to allow in situ hydrogen permeation experiments with lubricating oils. Investigations are performed under constant voltage of 30 V at room temperature or upon heating with various oil substances.Subjecting the lubricating oils to cathodic polarization results in generation of hydrogen diffusing through the steel membrane. At a higher temperature, a stronger effect of polarization of the oils on the permeation current is observed.Under polarization and upon heating, the hydrogen entry into the steel membrane is promoted by the additives tested  as well as by the presence of water in the lubricating oils. The effect of the additives on the hydrogen permeation and on the electrical conductivity of the oils is much stronger than that of water content itself.The following regularities are found:The phenomenon hydrogen permeation into steel membrane from lubricating oils subjected to cathodic polarization is obviously related to the complex impact of several factors—temperature, additives and presence of water in the oil substances.The modified Devanathan–Stachurski setup can be used as a method for in situ evaluation of the lubricating oils (and ingredients) in respect to their ability to generate hydrogen under cathodic polarization. This finding is fundamental for further investigations on the effect of external polarization of lubricants on hydrogen generation and permeation in steel in a lubricated tribo-contact. By further modification of the set up the tribological load of the lubricants will be also examined.


This paper presents bearing fault diagnosis using the image classification of different fault patterns. Feature extraction for image classification is carried out using a novel approach of Color recurrence plots, which is presented for the first time. Color recurrence plots are created using non-linear embedding of the vibration signals into delay coordinate space with variable time lags. Deep learning-based image classification is then performed by building the database of the extracted features of the bearing vibration signals in the form of Color recurrence plots. A Series of computational experiments are performed to compare the accuracy of bearing fault classification using Color recurrence plots. The standard bearing vibration dataset of Case Western Reserve University is used for those purposes. The paper demonstrates the efficacy and the accuracy of a new and unique approach of scalar time series extraction into two-dimensional Color recurrence plots for bearing fault diagnosis. Any rotating equipment, which is part of heavy machinery, or comprising of mechanical motors employs rolling or other types of ball bearings as one of the key elements for the purpose of uni- or multi-dimensional rotations. Repeated use of the bearing and excessive vibrations, combined with limited lubrication of machine parts could sometimes lead to the development of mechanical faults in the bearing. These mechanical faults if gone undetected for some time could result in machine failure, consequently resulting in downtime and sometimes could also lead to injuries. Timely interventions or preventive maintenance is key to keeping high up-time of the rotating equipment. One way to ensure that preventive maintenance could be performed is if an early bearing fault detection could be available. Early fault detection is not easy as it is sometimes hard to nearly impossible to implement non-intrusive inspections of heavy machinery due to inaccessibility. Intrusive inspections are not always welcome as they could result in heavy downtime and impact production. Non-intrusive inspection is the preferred route to limit downtime. One way to perform the non-intrusive inspection is through the use of vibration data from the machine and analyzing it with help of machine learning algorithms.Machine learning algorithms have been successively used for early fault detection in rotational bearings. Tools such as support vector machines and artificial neural networks have been used in feature extraction for bearing fault diagnosis . An imagAdvanced ANN architectures are often utilized for bearing fault identification and classification ,7,8. BeaOne area where there is still a large gap is the use of non-uniform time delay space combined with colored recurrence analysis and deep learning. The literature in this area is largely missing to the best of the authors’ knowledge. Our paper addresses this gap. In this paper, we plan to study the ability of deep-learning CNN models to automatically learn the useful texture features in order to classify bearing faults. One-dimensional raw current signals are converted to 2D images, and the CNN model is used to successfully capture the temporal and spatial dependencies in the colored images, which are generated using recurrence analysis.The main objective of this paper is to propose Color recurrence plots as a new feature extraction technique for bearing fault diagnosis. Color recurrence plots are capable to extract visual features from a vibration signal represented in the form of a scalar time series. The paper demonstrates that the performance of fault classification is considerably improved by the combined implementation of feature extraction using Color recurrence plots, and the CNN classifier. The paper also highlights the role of non-uniform embedding in the generation of the database of images used for training the machine learning model. Since the main aim of this paper is to introduce novel feature extraction techniques; therefore, the transfer learning approach is used for training two different trained networks, namely Alexnet and SqueezeNet. The networks are chosen on the basis of their computational cost and accuracy. A detailed comparison is presented in the paper using these two networks for bearing fault diagnosis.The paper is presented as follows: The Introduction is presented in In this section, the basic building blocks for the fault diagnostic algorithm presented in this paper are discussed. First, the principles of non-uniform time-delay embedding are presented followed by details of recurrence plot concepts for feature extraction are introduced.N is the length of the observation window. Uniform embedding maps the time series into a trajectory matrix:d is the embedding dimension and Let us consider a scalar time series on a regular grid:) method . The ide) method , the mut) method , or the ) method . In geneNon-uniform attractor embedding also maps the original time series into a trajectory matrix:shown in  that nonshown in ,23. Non-shown in ,25. T:m is the upper limit for the time lags. This is a simple, straightforward, and efficient method for the determination of the optimal set of time lags for a scalar time series in a finite observation window [Many different techniques exist for the determination of the set of optimal time lags loyed in . A greedloyed in . The conloyed in . The fealoyed in . A pure loyed in . This apn window . We willDynamical systems may exhibit recurrence relationships in some time-space coordinate systems. A trajectory generated by a dynamical system does repeat itself at some time interval se space . The recThe recurrence plot shows the distance of every data point re equal .Mathematically the recurrence relationship is expressed as the collection of pairs of indexes at which the trajectory is at the same place:e series .Although the concept of the recurrence plot was introduced by Eckman in 1987 , over tiA standard recurrence plot generated by a normal bearing vibration signal without a fault is shown in The selection of this particular value of t ε=0.21 A; the ra ε=0.295 C. The grfunction . A propeA recurrence plot can be interpreted as a feature extraction algorithm from a time series. A scalar time series is mapped onto a 2D digital image through the recurrence relationship. That enables the use of machine learning algorithms for the classification of features  extracted from the original time series.A typical engineering application of recurrence plots is the bearing fault diagnosis. A standard dataset used for such purposes is the Case Western Reserve University Bearing Data Center database . The datThe main objective of this paper is to introduce the concept of the Color recurrence plot. Non-uniform embedding plays a major role in the algorithm generating the Color recurrence plot.Without loss of generality, let us consider a nce plot . The elee series .Let us consider a two-dimensional embedding of the time series into a planar phase plane. The algorithm for the construction of the standard recurrence plot could be extended in order to represent the process of two-dimensional embedding in several different ways. If the time lag used for time series embedding is However, the difference between indexes of data points in the modified recurrence plot generated by Algorithm A is not always equal to t at τ=6 . Note thd). It is important to keep particular values of time lags fixed during the embedding process. Therefore, we do introduce Algorithm B . Moreover, the proposed recurrence plot does not need to be a square matrix; there are no restrictions for the dimension of the generated plot (except the length of the time series).Let us denote the axes of the delay-coordinate space as X1,…,Xd . Then, ty matrix  is:(6)L=Let us define the size of the binary image representing the recurrence plot based on a fixed time delay as Note that the time lag nd Xl is :(7)δkl=τTherefore, the recurrence plot in the planar projection generated by d-dimensional space. The properties of the embedded attractor can be evaluated by assigning a measure function for the attractor’s planar projection. Then, the values of the measure function produced by all possible planar projections in the d-dimensional phase space can be averaged. The resulting value can be used as a numerical estimate of the properties of the embedded attractor [Let us consider that the dimension of the delay-coordinate space is ttractor . By the ttractor  is the ad-dimensional phase space. However, the measure function used to construct the proposed Color recurrence plot does not map the projection of the attractor into a single scalar value (as used in [k-th and the l-th columns of the trajectory matrix) into The proposed Color recurrence plot is constructed using the same principle of arithmetic averaging throughout all possible planar projections of the  used in ). The prThe number of different planar projections in the d-dimensional phase space is The maximal number of different colors in the Color recurrence plot is d. The classical FNN algorithm [Let us consider a normal ball-bearing vibration signal without a fault  are depicted in The Color recurrence plot is generated by computing the arithmetic average of all ten dichotomous recurrence plots based on a fixed time lag; the number of different colors is Color recurrence plots generated by vibration signals recorded on the normal bearing, the bearing with a ball fault, the bearing with an inner race fault, and the bearing with an outer race fault are depicted in The data set used in this work comes from the Case Western Reserve University School of Engineering . The datThe fault-bearing data set has faults ranging from 0.007 inches to 0.040 inches . The data corresponding to the 0.007-inch fault is used in our study. We use the least significant faults only to demonstrate the sensitivity of the proposed fault diagnosis approach. There are four different health states of the bearings depending on their position relative to the near or far end of the motor. These states are namely, the normal state with no fault, the inner race fault, the outer race fault, and the ball fault. The original data set has data available for varying speeds of the motor ranging from 0 to 3 HP. In our study we have focused on a single motor speed of 0 HP. Again, we are choosing the vibration signals with the least expressed fault sensitivity.Four sets of Color recurrence plots are generated for vibration signals corresponding to the normal state, the ball fault, the inner race fault, and the outer race fault. Non-overlapping windows are used for the time delays to create averaged recurrence plot for each data set resulting in a total of 221 images each for normal, ball fault, inner race, and outer race fault data sets.The transfer learning approach is used for training, testing, and validation of the machine learning approach used in this paper. Such an approach is used due to several reasons. First, the transfer learning approach allows for the testing of several well-established deep learning networks. Additionally, the transfer learning approach saves time as it eliminates the need for the development of a network from scratch, which is not an easy task and needs network designing expertise. Finally, the transfer learning approach is easy to implement and allows for faster simulation and better sensitivity which could be achieved in a relatively short amount of time in a real-world application scenario.++ or Java and expose him to programming in python. The person would be able to use the skills acquired in learning C++ or Java and would be able to learn python much faster compared to a person who has no previous programming knowledge.The basic idea of the transfer learning approach is to use a well-trained network and utilize the knowledge it has acquired for another task, which is similar in nature by exposing or training it on some additional set of parameters . A real-In this paper, since the focus is on image classification, several pretrained image classification networks exist, SqueezeNet  and AlexThe first task in transfer learning is to select the pretrained network to be used for the transfer learning approach. For this purpose, we draw upon a comparison of prediction time vs. prediction accuracy, see In the work presented in this paper, we wanted to perform many sensitivities; hence, we required pretrained networks that are fast for initial testing. Since the main aim of this paper is feature extraction and not network engineering, we made a choice of using SqueezeNet and AlexNet due to their fast computational speed.Once the pretrained networks are selected transfer learning approach is used to re-train the pretrained networks. In this section, some details of the two networks are provided along with the details of the procedure used for the retraining of the AlexNet and SqueezeNet networks is also provided.AlexNet is an image classification network comprising 25 layers and has been trained to classify up to 1000 images. Input image size for the network is 227 × 227 pixels resolution. For retraining of the AlexNet, the last three layers that are configured for 1000 classes must be fine-tuned for the new classification problem. These last three layers are extracted and replaced by a fully connected layer, a SoftMax layer and a classification layer. Some learning parameters are then adjusted to, e.g., Weightlearnfactor and Biaslearnfactor. The initial learning rate parameter is also adjusted to slow down the learning rate of the new network to increase its prediction capabilities. Now, the new network is retrained with a new data set of images.‘classificationLayer_preidction’ contain information on how to combine the features that the network uses for class probabilities. For retraining of the SqueezeNet the last two layers are replaced with a new set of layers to adapt to the new data set. In SqueezeNet, the last learnable layer is the final convolutional layer instead, which needs to be replaced by a new convolutional layer with a number of filters equal to 2 for the classification of the new data set with crack and without crack. Some learning parameters are then adjusted to, e.g., Weightlearnfactor and Biaslearnfactor. The initial learning rate parameter is also adjusted to slow down the learning rate of the new network to increase its prediction capabilities. Now, the new network is retrained with a new data set of images.SqueezeNet is an image classification convolutional neural network, which has 18 deep learning layers and a total of 68 neural network layers. The SqueezeNet is also trained to classify up to 1000 classes of images. Input image size for the network is 227 × 227 pixels resolution. The network is trained on a wide range of images and has a rich feature representation. The convolutional layer of the network extract features that the last learnable layer and the final classification layer use to classify the input image. The two layers ‘conv10’ and Identify the most impacting network parameter through a sensitivity analysis.For sensitivity analysis, a parameter range is decided and then prediction is performed using the set of network parameter impact on prediction accuracy is checked.Several combinations of different network parameters are tested.Finally, the network parameters giving the best prediction accuracy are selectedIn this paper, we have used an experimental design approach to test the impact of network parameters on output accuracy, to help identify, and then change the most impacting network parameters. A conceptual approach for the experimental design workflow is shown in For the network parameter optimization, we have taken a step-by-step approach described above. We first test a set of network parameters on AlexNet and SqueezeNet. Two sets of parameter optimization experiments are conducted. In the first test, the impact of the initial learning rate is tested on AlexNet and SqueezeNet using the half and the full data set of images. The experimental design approach runs several trial runs and tests the impact of each run on prediction accuracy, see In the next set of experiments, given the poor performance of the smaller data set, a full data set is used and the impact of two parameters, initial learning rate and network dropout probability, are tested simultaneously, on the validation accuracy of AlexNet and SqueezeNet. Again the experimental design approach runs several trial combinations and helps to suggest the best initial learning rate and the best network dropout probability, which will give the best accuracy, see For machine learning, one of the important steps is the preparation of data for training, testing and validation. For this purpose, the bearing fault data set described earlier in Initially, we used non-overlapping windows for creating averaged recurrence plots, which resulted in about 221 images for each category, but we realized that during the training and test that this data set was not adequate. Then to increase the number of averaged recurrence images we had to use overlapping windows on the data set with a window size of 550 data points, which results in 442 averaged images for each of the categories. The images are also converted into corresponding pixel resolution, 227 × 227, which would be suitable for AlexNet and SqueezeNet architecture.Data is divided into two bigger sets comprising fan end and drive end data, where each set is further subdivided into four classes comprising normal, inner race, outer race and ball data sets. For classification, two problems are solved, first, where the subsets are kept intact and tested with normal data without any fault for the fan end and drive end individually, which results in a classification problem with four classes. The second classification task involved combining sub-classes of drive end and fan end, which results in 10 classes each for the fan end and drive end data set and therefore, a more challenging classification task.As described earlier in For the first classification task, four subsets of the total data set were created for the drive end and fan end data set corresponding to data series any fault “normal”, inner race fault, outer race fault and ball bearing fault. Each subset comprised 442 images, which were divided into training, testing and validation using 80/20 ratios. Several sensitivities were carried out to achieve high accuracy by adjusting some of the network parameters and the number of images used for training and testing. Particularly, the use of overlapping time series windows helped, to improve the initially lower accuracy rates, in achieving high accuracy rates with an increase in the number of images. The output of the classification algorithm in the form of a confusion matrix is shown in For the second classification task, we use a larger data set for a combined classification problem with 10 classes each for the fan end and the drive end data sets. First, the results for the confusion matrix generated using AlexNet and SqueezeNet for the drive end data set are shown in In this paper, a detailed analysis of bearing fault diagnosis is presented with the help of Color recurrence plots analysis. Standard recurrence plots are based on uniform time lags and are black and white. Whereas, the algorithms proposed in this paper use non-uniform time lags combined with an image averaging method, which results in unique Color recurrence plots. The Color recurrence plots make the analysis more interesting as the difference between different bearing types is enhanced through the use of color plots.The recurrence plots are then analyzed with the help of an image classification approach using transfer learning, for which AlexNet and SqueezeNet are used. A large image database is created, from the data set using overlapping time series windows comprising 550 data points resulting in around 442 images for each class, which is used for training and testing of the networks using transfer learning. Network parameters are optimized based on an experimental design approach. The comparative results obtained using the image classification approach show a very high accuracy of around 99% accuracy for the two networks. The approach presented in this paper clearly demonstrates that recurrence analysis combined with machine learning forms a very powerful tool for early detection of bearing fault analysis using vibrations data.Moreover, in this paper, only a simple averaging method is used to generate Color recurrence plots. It is possible to further explore other averaging methods such as harmonic or power law averaging and perform a comparative analysis of image classification between the different averaging methods. One of the aspects of averaging is that information is reduced due to averaging it could also be explored if only some specific projections could be averaged, which would lead to the creation of multiple groups of Color recurrence plots. It is an idea that needs further exploration and testing.Additionally, in this paper, we have tested two extremes of the image classification task one with four classes, taking a subset of the data, and the other with 10 classes, taking a larger data set. It is possible to explore other intermediate groups of classes and further check the accuracy of the method proposed in this paper.Finally, the novelty of the bearing fault diagnosis approach presented in this paper comes from two aspects. First, the use of Color recurrence plots, which, first have never been presented before, and second enhance the image patterns and help to significantly improve the classification task even in the case of bigger data sets where 10 classes are used for fan end and drive end data sets. The second aspect of novelty comes from the use of transfer learning, which does not require the design of a network from scratch but takes advantage of the existing networks, which have already been trained on a large data set of images. Although the second aspect is not completely new, its use in bearing fault diagnosis is new .


Yet, many multivariate observations‐based analyses include implicit modeled subseasonal MLD variability. One analysis method is optimal interpolation of in situ data, but the interior analysis can be improved by leveraging surface data with regression or variational approaches. Here, we demonstrate how machine learning methods and satellite sea surface temperature, salinity, and height facilitate MLD estimation in a pilot study of two regions: the mid‐latitude southern Indian and the eastern equatorial Pacific Oceans. We construct multiple machine learning architectures to produce weekly 1/2° gridded MLD anomaly fields (relative to a monthly climatology) with uncertainty estimates. We test multiple traditional and probabilistic machine learning techniques to compare both accuracy and probabilistic calibration. We validate our methodology by applying it to ocean model simulations. We find that incorporating sea surface data through a machine learning model improves the performance of spatiotemporal MLD variability estimation compared to optimal interpolation of Argo observations alone. These preliminary results are a promising first step for the application of machine learning to MLD prediction.The ocean mixed layer plays an important role in the coupling between the upper ocean and atmosphere across a wide range of time scales. Estimation of the variability of the ocean mixed layer is therefore important for atmosphere‐ocean prediction and analysis. The increasing coverage of in situ Argo profile data allows for an increasingly accurate analysis of the mixed layer depth (MLD) variability associated with deviations from the seasonal climatology. However, sampling rates are not sufficient to fully resolve subseasonal ( Machine learning models using both ocean profile and surface data improve mixed layer depth variability estimates over models using profiles aloneModel performance is dependent on spatial location and strength of the sub‐seasonal varianceProbabilistic parametric techniques capture uncertainty better than sampling or ensemble approaches In this study, we take a preliminary step toward improved observational estimates of aseasonal MLD variability by identifying and leveraging relationships between the MLD and sea surface salinity (SSS), temperature (SST), and height anomalies (SSH) in a machine learning framework.The ocean surface mixed layer depth (MLD) is an important factor in atmospheric and oceanic dynamics. For example, the MLD modulates sea‐surface temperature dynamics  and mesoscale and smaller spatial scales (<500 km). Hence, work is required to fully understand the physical basis and create predictive models and historical analyses of MLD variability that optimally leverage all available observations. This study takes a step toward the latter end by using machine learning in an attempt to identify and leverage relationships between ocean surface variables and MLD for prediction and analysis.Our approach is predicated on the hypothesis that there are significant relationships to be learned between the MLD and the ocean surface variables, including SST, SSS, and SSH. This hypothesis is motivated by previous studies that have identified and leveraged ocean surface‐to‐interior relationships  scheme Brooks, , but thiDespite the numerous techniques to inject uncertainty estimates into machine learning, the performance of any approach is still underwhelming. Recent arguments have been made that ensembles of techniques outperform any one approach Dormann, . Due to >10 m subseasonal standard deviations), but the magnitudes of subseasonal variability, the climatological annual cycle, and interannual variability all differ substantially  the eastern equatorial Pacific Ocean from 10°S–10°N to 150°–120°W and (b) the southern Indian Ocean from 45°–35°S to 55°−115°E, over the 2011–2015 time period. As detailed in Section For our second goal, we focus on understanding the probability distribution of the MLD that is learned by the neural network. As a first step, we evaluate how well calibrated the neural network estimates are and what spatial and temporal patterns are revealed through sampling these distributions. We choose three probabilistic machine learning methods that cover two distinct types of uncertainty quantification: parameterization‐ and sampling‐based methods. By evaluating these methods, we aim to understand the appropriateness of a Gaussian distribution to the data and the ability for sampling machine learning methods in exploring the posterior distribution. Finally, we compare the machine learning uncertainty quantification against uncertainty estimates from the optimal‐interpolation approach. As before, this last comparison will reveal the extent to which the sea surface variables inform us about the uncertainty in the MLD.These methods are certainly not exhaustive and so this study is a first step to a better understanding of the predictability of the aseasonal MLD variability given the dynamics of some sea surface fields, and how machine learning can be used as a tool in this investigation. The outline of the body of the study is as follows: first, in Section 22.1For the ocean model set of experiments we utilize data from the CESM POP2 model in a hindcast forced by JRA55‐do , for each of the regions of interest, we down‐sample by linearly interpolating  onto a grid with 0.5° spacing in order to match the satellite observation grid used in the Argo experiments. In addition, we carefully split the data in an effort to avoid contamination of the validation results of the machine learning models because of the autocorrelation and non‐stationarity inherent in the data. By ensuring the training, testing, and validation data are sufficiently different we can also implement methods to minimize overfitting. Data starting from January 21, 1998 through the rest of 1998, which features strong positive and negative ENSO index values, is taken as validation data—a total of 70 5‐day periods  ‐ for which the machine learning model results will be presented. The training data and test data is taken randomly from 1995, 1996, 1997, up to and including January 16, 1998 for which 200 5‐day periods are reserved for training data and 30 5‐day periods are used for internal testing. To retain separation of the validation data from the training data, half of the test data comes from the last 15 5‐day periods of the train/test split timeline while the other 15 are randomly sampled from the remaining distribution. This split design creates a buffer of 70 days between the last training period and the first validation period. The results of the machine learning models on this data set are presented in Section 2.2In this study we consider the use of optimally interpolated satellite products of SSS, SST, and SSH. While the processing of these products from raw satellite data may introduce bias or uncertainty, the processing in these standard products includes important error corrections and calibrations in addition to interpolation and has been thoroughly vetted and validated. Validation of the gridded products suggest they accurately resolve wavelengths down to about 300 km on a weekly basis over most of the globe  monthly climatology. Then, to be able to compare to the salinity data set, we down‐sample from the daily values to weekly data and optimally interpolate onto a 12 degree grid. The SST anomalies from 2011 to 2015 are split into training, testing and validation subsets in exactly the same way as the SSS anomalies for consistency.SST data comes from the GHRSST Level 4 Global Foundation Sea Surface Temperature analysis data set Systems, . This da2.2.316 degree grid nominally as 5‐day averages spanning roughly 1992–2019. We do not calculate and remove climatologies from this data set. To be able to compare to the salinity data set, we down‐sample from 5‐ to 7‐day weekly averages and optimally interpolate onto a 12 degree grid. Finally, the SSH anomalies from 2011 to 2015 are split into training, testing and validation subsets in exactly the same way as the SSS and SST for consistency.SSH data comes from the MEaSUREs Gridded Sea Surface Height Anomalies data set . The choice of bin size is ad‐hoc but determined from the smallest bin size to ensure that there is sufficient data available, that is, at least 4 profiles per month, to calculate monthly statistics and climatologies for the areas of interest . Anomalies are created by taking each profile from the withheld 2011–2015 Argo data and subtracting the climatology according to the profile's bin and date. In addition, for each profile, we divide by the bin's corresponding monthly standard deviations to create standardized anomalies. Figure 2.4∼15 m), a small climatological annual cycle (∼20 m), and substantial interannual variability , a much larger climatological annual cycle (∼300 m), but relatively weak interannual variability. Both regions contain substantial subseasonal MLD variability to learn, but the absolute magnitudes of the subseasonal variability as well as the relative magnitudes of subseasonal, seasonal, and interannual variability differ dramatically.We are interested in understanding how the performance of the machine learning models are dependent upon the variability of the MLD. In order to evaluate this dependence, we explore two oceanic regions that exhibit different subseasonal and interannual MLD variability. First, we choose the equatorial Pacific Ocean (EPO) (10°S–10°N and 150°–120°W), which has modest subseasonal MLD standard deviations  weeks of training data, which are separated as described in Section On the remaining 50 weeks of testing and validation data the model predicts a dense grid of MLD estimates based solely on the sea surface information as input. From this dense grid, we interpolate the estimates onto the locations where in situ Argo profile observations of the MLD exist and compute error statistics between the interpolated estimates and the observations. The interpolation is done using a Gaussian process (see Appendix 3d),θ refers to the collection of function parameters . The surface variables exist on a pre‐specified grid, x, of total size M and the function f may generally couple surface variables from across this grid to produce d at a particular grid point. The difference between the mixed layer and the output of f, σ, is assumed to be a normally distributed random variable according to the covariance Σ that expresses the spatial uncertainties in this functional relationship. The exact structures and parameterizations of f that we use in this study are described in Section Σ are presented in section Appendix We consider a simple but general model for the relationship between the surface variables, salinity (SSS), temperature (SST), and height (SSH), and mixed layer depth model output  and informed via observations do. For the CESM POP2 ocean model experiments we have access to these “observations” at each grid point where we produce MLD estimates. For the Argo data set experiments, the observations do exist at arbitrary (ungridded) locations, xo where freely drifting Argo floats collect a profile. In order to couple the gridded surface variables with the ungridded in situ MLD observations, we define the relationship between our model and the observations to be a Gaussian process,L and V, the spatial projection and covariance matrices, are independent of the observation values and only depend on the observation locations, model grid locations, and model uncertainties. The Gaussian process relationship, in our study, is entirely a spatial relationship that accounts for spatial covariance between observations of the MLD. This implicitly means, however, that L and V change depending on the particular week the data is from, but only because the particular locations xo where estimation and validation occurs vary from week to week.Both the functional relationship ν and σ) is the objective function, that is, the conditional likelihood probability distribution, that will be maximized to fit the parameters of the nonlinear function f:V| is the matrix determinant of V and mo is the number of individual observations, or entries of do. For the CESM POP2 ocean model data set, there is no need for a Gaussian process regression interpolation model to translate between model and observation space and the corresponding likelihood is simplyM is the number of grid points.A further consequence of the chosen relations between the observations and model , is a function of the input variables SSS, SST, SSH, the architecture of the function f, and the parameters of f, θ.Details of this optimization procedure are given in Section f, f. This type of noise component is important if we expect the noise to be a nonlinear function of the surface variables. To account for this possibility, two of the probabilistic machine learning methods that we test in this study, Dropout and Variational Auto‐Encoders  and MLD. Without an a priori physics‐based model, one must choose a reasonably parameterized model to approximate this relationship. Traditionally this relationship is represented via some linear or simple nonlinear parameterization where one hopes that the true relationship lies in, or is not too far from, the output space of the model. For example, a basic linear model that we test in this study is of the form,Wi is a matrix of weights, bi is a bias term, and a(⋅) is what is referred to as an “activation function,” that applies a simple non‐linearity element‐wise to the affine transformation of the input, x. Common examples of activation functions include the sigmoid, softplus, and families of rectified linear functions. Based on the experiments in Gal , or artificial neural network (ANN)  are a specialized type of architectures that utilizes a convolution operator in some layers. This convolution operator introduces kernel matrices that perform a sliding weighted sum over the input image to produce corresponding filters. See Goodfellow et al.  for a co3.2θ^, and hence the model outputs d^, by approximately solving the optimization problem,g(θ) is a regularization function that is applied to both constrain the possible parameter values and stabilize the optimization procedure. As written, pj(do|d) refers to the joint probability distribution between the jth input and output data. The optimization procedure includes all training data but, in practice, subsetting is common . We onlroblem,θ^=arg mFor the Argo data set experiments, because our study is limited to only 150 training weeks, we implement a non‐standard training strategy to help reduce overfitting. For each epoch (a single run through the entire training data) we divide the 150 training weeks randomly into 6 batches of 25 weeks. The first batch is held out and the current loss on that batch is saved. For each subsequent batch, the loss for that batch is used to update the model parameters. To update the parameters, we use the Adam optimizer with initial learning parameter set to 0.001 , we would need to incorporate any and all uncertainties that exist in the inputs, observations, model parameters, and model framework and be able to sample from them effectively. Due to the high‐dimensionality of the problem, this is computationally infeasible and therefore we must rely on adequate approximations. Appendix Finally, since the (approximate) solution to Equation 4Table In the CESM POP2 Ocean Model experiments, the machine learning model estimates are compared directly against ocean model MLD (taken as “truth”) at each grid cell. In the Argo data set experiments, the machine learning models are compared in observation space, at the Argo profile locations . In the Argo experiments we also compare the machine learning approaches to kriging, in order to compare the results to a method that only utilizes the Argo profiles themselves. Specifically, we implement an Ordinary Kriging scheme, which we call “OI” for optimal interpolation, with a  spherical kernel chosen via cross‐validation and parameters optimized via maximum likelihood. The OI approach only uses the in situ MLD standard anomaly observations, with no sea surface information, to make gridded estimates. Therefore, even during the out‐of‐sample prediction experiments, the OI's error statistics for a given week are calculated using only that week's data. The OI is trained only on half of the available data for a particular week and then is asked to estimate the MLD at the withheld locations.n, the number of observation available at a given week. A lower MAE is more accurate.We use a variety of metrics in our testing, categorized into deterministic and probabilistic metrics. For deterministic metrics, we use the (relative) mean absolute error (MAE) and Pearson correlation coefficient. We use the typical definition of mean absolute error,overline¯ symbol represents the sample mean operation. A correlation coefficient closer to 1 is considered more skillful.MAE is a convenient metric in that it captures the mean prediction error, but it does not describe the relationship between the predictions and observations and it fails to capture information about the uncertainty of the predictions. To compensate for the first deficiency, we rely on the Pearson correlation coefficient (correlation) to provide insight into the existence of (linear) relationships between predictions and the data. For reference, correlation is defined asDKL) and Kolmogorov–Smirnov (KS) statistic. These metrics are useful in determining the distance between the predicted and observed probability distributions and measuring the calibration of each model.In addition to the deterministic metrics, we use the (relative) Continuous Ranked Probability Score (CRPS), to provide a probabilistic error metric analogous to MAE, and we analyze the error distributions using the Kullback–Leibler divergence (KL Divergence or ne represents the number of forecast estimates available per observation. The CRPS collapses to the MAE when the measurement is deterministic (ne = 1), but accounts for ensemble spread in probabilistic forecasts when ne > 1. The CRPS is the probabilistic equivalent of the Relative MAE.For forecast distributions with a finite second moment, the relative CRPS can be defined asp(x), defined assi is the estimate of the standard deviation for L(d)i and P[t] is the probability of the event t. We estimate p(x) through the use of a histogram. Theoretically, a “well‐calibrated” model produces an error distribution that is approximately normal, that is, p(x) should be approximately equal to q(x)=e−x2/2/2π. We calculate the KL Divergence and KS statistic to measure the discrepancy between the forecast error distribution and the theoretical error distribution. The KL Divergence is defined asWe estimate the discrepancy between the forecast and observed distributions using the KL Divergence and KS statistic. Both metrics make use of the error distribution, q, that is, outliers. We also consider the KS goodness of fit statistic because it is more sensitive to errors near the mode of q, rather than in the tails of q. The KS statistic is a norm on the cumulative distribution functions of p and q,The KL Divergence heavily weights errors in the tail of the theoretical distribution p(x) and q(x) and performing discrete integrals and maxima. A lower value of these error distribution metrics indicates a better calibrated forecast distribution.We calculate these statistics by estimating a histogram of 4.1Conclusions from the Argo experimental results are problematic on their own because of observational uncertainties and the limited availability of data to provide verification (50 out of 200 weeks are afforded for testing and verification). The CESM POP2 Ocean Model experiments are an idealized test environment to provide answers to three questions in a relatively data rich environment (when compared to the Argo data set) without observational uncertainty. First, to what extent is there a relationship between the sea surface input data  and MLD in the two regions being studied (and how does it depend on the region)? Second, what is the relative performance between machine learning models and, furthermore, which models perform “best”? Third, how do each of the input variables affect our machine learning model MLD predictions? The following ocean model results are calculated from the validation data set, see Section 4.1.1Our findings indicate that there is a moderately predictive relationship between the sea surface variables and MLD in the ocean model data in the equatorial Pacific (EPO) and, to a lesser extent, the southern Indian (SIO) ocean as tested on the validation data set . The deterministic results in Figure r = 0.83 and 0.65 for CNN, and r = 0.37 and 0.25 for Linear in the EPO and SIO, respectively. However, least squares linear regression (with intercept) of MLD on the CNN or Linear model predictions reveal steeper slopes in the Linear model than the CNN: 2.5 compared to 1.2 in the EPO and 1.5 compared to 0.7 in the SIO. That is, the Linear model is not even fitting the data as well as the correlation coefficient indicates in these examples. In combination with the deterministic results, these figures indicate that relative error and correlation coefficient do not necessarily capture all of the behavior we might want from a MLD model or the relative strengths of the CNN‐based machine learning models, which represent spatial structures well but do not always capture their location and extent.It is seemingly significant that the Linear model provides results seemingly competitive with the other machine learning models (possibly indicating that the majority of the relationship between input data and MLD is linear), but these statistics can also be somewhat misleading. A visual comparison of the model outputs sheds additional light on the quality of MLD predictions. Figures 4.1.2Our results also indicate that parametric variance methods outperform other sampling‐based techniques for estimating MLD uncertainty in the CESM experiments. The probabilistic results in Figure The probabilistic results indicate that some of the probabilistic machine learning algorithms are reasonably well‐calibrated. Figure 4.1.3f is the MLD model, x=, and x0 is some baseline initial condition for the line integral. This technique is sensitive to initial baseline and many choices are available depending on the context . For our study, we compute the integrated gradient corresponding to 50 random draws from a Gaussian distribution with σ2 = 2 and take an ensemble average. The results from this computation are shown in Figure As a means to understand the behavior of the machine learning models, we explore the sensitivity of the MLD outputs with respect to the input sea surface variables via a technique known as “Integrated Gradients” . First, correlations between CNN predictions and MLD are higher in Boreal Summer/Austral winter and lower in Boreal winter/Austral summer at both sites. This seasonal pattern in predictability is clearest in the SIO, where correlations between both model predictions and the MLD reach a consistent minimum in the Austral summer/Boreal winter, dropping below 0.25 near the new year in all 5 years when the climatological MLD is shallow but was recently deep , and to a lesser extent in the SIO (r ≈ 0.4). Using the parameters learned in the previous experiment as initial conditions, we take the leading machine learning models—the linear model, “VLinear,” and three CNN models, “VLCNN,” “VCNN,” and “Deep CNN”—and retrain to fit the optimally interpolated satellite sea surface data and Argo MLD profile data set. As opposed to the ocean model data, there are additional sources of model and reconstruction error that influence and complicate the ability for the machine learning models to learn a corresponding MLD relationship. Each of the inputs is subject to different reconstruction errors and biases while the calculation of the gridded climatology for the Argo data sets introduces further biases. Furthermore, the sparsity of the Argo data adds an additional difficulty when training data‐driven models, especially deep learning models with many parameters.The results from the CESM POP2 Ocean Model data suggest that there exists a moderately strong relationship between sea surface variables and the MLD in the EPO  to the Argo data alone to produce smooth MLD spatial maps (we label these results as OI). While OI is known to be a sub‐optimal process for obtaining gridded estimates of the MLD, as data assimilation methods that combine multiple data sources and ocean models are usually more accurate, the use of OI in our study is to compare strictly data‐driven methodologies and to have a direct comparison with a method that only has access to the Argo observations themselves to learn spatial variability and uncertainty. To estimate the corresponding error metrics for this methodology we randomly sample half of the available Argo profiles for a given week, 10 separate times, fit the OI and produce the corresponding map, and calculate a variety of metrics using the left out data (averaged over the 10 samples). It is important to remember that, in contrast to the machine learning models, the OI methodology has direct access to the MLD values and the errors represent spatial out‐of‐sample errors. These errors are not necessarily equivalent to the errors for the machine learning model, but serve as an important benchmark for potential practitioners.4.2.1Deterministic results for the Argo data experiment suggest that the machine learning models can produce MLD maps competitive with OI, as measured by relative MAE and correlation, especially in the EPO. Figure The comparison between the EPO and SIO reiterates the important result derived from the ocean model that the relationships between MLD and surface variables differ regionally. The performance metrics are worse on all algorithms in the SIO compared to the EPO. Although the ordering of the machine learning algorithms by MAE and correlation is similar between the SIO and EPO, the OI has a clear performance advantage, vis‐a‐vis the machine learning algorithms, in the SIO, having smaller median relative MAE and higher median correlation Figure . It appeFinally, the deterministic results of the Argo data set appear to be analogous to CESM POP2 data set errors in the EPO but noticeably worse in the SIO. While comparisons between Figures 4.2.2Calibration results for these models and the Argo data set show reasonably good predictability, even in the SIO. Error distribution histograms and quantile‐quantile (QQ) plots for this experiment are shown in Figure dm is the machine learning MLD estimate, do is the Argo observations, Σ is the machine learning covariance estimate, and L, V are the Gaussian Process mapping and covariance matrices.The visual, qualitative features of the machine learning MLD maps appear promising as they capture features smaller in scale than in typical OI maps and many of the features that appear in the inputs. Figures In both the EPO and SIO, each map provides an estimated map that roughly agrees with the Argo samples. The spatial effect of the SSH contours is evident in the machine learning outputs, and the fact that many of these features correlate with details in the Argo MLDs means that the machine learning models were able to learn these smaller scale relationships that hold out‐of‐sample from the training data. The OI, in comparison, does not visually capture small‐scale features apparent in the input data and presumed to exist in the MLD  variability and can influence the behavior of dominant modes of variability . The proliferation of Argo floats has dramatically increased the number of observations of the ocean over the last two decades but Argo profiles are still too sparse to resolve fine spatiotemporal features of the MLD that are apparent in state‐of‐the‐art global ocean models. Satellite data, however, is able to provide fine resolution gridded maps of sea surface variables, but cannot observe subsurface.r ≈ 0.4) to strong  correlation with MLD on the temporally out‐of‐sample data. Furthermore, we found that several of the machine learning models exhibit good predictability and calibration (Figure The first goal of this work was to analyze the extent to which satellite observations of sea surface variables can provide information useful for estimating the MLD. We built several machine learning models to learn such a relationship based on available data. In order to test this methodology on a self‐consistent system, while minimizing reconstruction and interpolation errors, we first trained machine learning models on CESM POP2 ocean model output. On this ocean model output we found that the relationships learned by the data‐driven models had a moderate (in the SIO, n Figure . The corn Figure .Following this experiment, we tested our methodology on the Argo data set. The number of weeks available for testing and validation data is not wholly sufficient to form conclusions on the source of MLD variability in this data set. However, we found that in terms of both deterministic Figure  probabilThe second goal of this work was to use sophisticated probabilistic learning approaches to better understand the probability distribution of the MLD. The primary modeling assumption in our machine learning methodology was the normality of the distribution of the errors between the model estimates and observations Equation . CalibraThis work is an initial step into machine learning modeling of the MLD and there are several avenues for continued methodological and oceanographic research. First, the results in this study are regional test cases chosen to reveal how the variability of the MLD impacts the ability of the machine learning methods to learn a functional relationship between the surface variables and the MLD. The machine learning models trained here, specific to each region, cannot immediately be applied to a different region, since the dynamics learned change from region to region. Future work will expand this regional approach to a global scale, but will necessitate additional computational resources. Second, further research and data is needed to derive better estimates of the conditional posterior probability distribution of the MLD. This research could include weight uncertainty, more sophisticated sampling strategies, covariance regularization, or other neural network architectures. Third, we do not account for model error in the input data. Incorporation of model error into machine learning models is not trivial but future work will attempt to account for these errors as well as dynamical uncertainty and lagged uncertainty. Fourth, the machine learning models presented in this study did not explicitly consider temporal relationships. We believe that incorporation of the temporal dynamics in the machine learning could help regularize the estimation procedure by coupling observations across time while simultaneously providing useful scientific information about the temporal dynamics of the MLD in relation to the surface variables. Fifth, future work can explore the sensitivity of the predictive models to other input observations. Perhaps the most promising variable to consider would be the near‐surface wind speed, which can be obtained from satellite scatterometer observations. Finally, given further advances in the previous action items, we hope that this methodology can be used in conjunction with, or compete with, ocean data assimilation reanalyses. In addition to the continued methodological research that follows from this study, we believe that, given additional data in the future, this methodology can be used to answer more detailed questions about the variability of the MLD and scientific oceanographic research questions that require fine resolution gridded MLD estimates. This future work should include efforts to fully explain and understand the physical basis for the relationships between SST, SSS, SSH, and MLD that are quantified and leveraged for MLD prediction but not fully explained in this study.