Physical and software bases of the device operation for remote measurement of human body temperature

A method of automated control of human temperature in public places is proposed, which allows determining people with elevated temperature immediately at the control point. To develop the technique, an experimental stand was designed and implemented in a rack with six built-in infrared sensors. To recognize a person with an elevated temperature, an artificial neural network was used in the form of a multilayer perceptron, at the input of which there were IR sensor data. The conducted experiments showed that the trained model based on the F1-metric efficiency of 0.89 to 0.94 determines a person with an elevated temperature.


Introduction
With the spread of COVID-19 worldwide, scientists and engineers are faced with new tasks that recently seemed not so important. For example, recently, problems related to the physical principles of operation of devices and devices for universal software radio transmitters, digital computing synthesizers, broadband multiphase signals, virtual and augmented reality, information security, and others have been very relevant [1][2][3][4][5][6]. Currently, the tasks of developing automated information collection devices that ensure people's health are relevant.
With the spread of COVID-19 worldwide, scientists and engineers are faced with new tasks that recently seemed not so important. For example, recently, the physical principles of operation of devices for universal software radio transmitters, digital computing synthesizers, broadband multiphase signals, virtual and augmented reality, information security, and others were relevant [1][2][3][4][5][6]. Currently, the tasks of developing automated information collection devices that ensure people's health are relevant.
Measuring the temperature of people in public places is an urgent task. However, the operation of measuring human temperature, which is well studied and has many engineering solutions, still also requires further research and development.
Most often, the temperature of people in public places is measured using infrared thermometers, devices for non-contact measurement of body temperature. The principle of operation of this device is based on measuring the power of thermal radiation of an object in the infrared range. However, these Second, the distance from the device to the body that is being measured should be clear and small (a few centimeters). Third, it takes time for the device to make a measurement.
Then there is the problem of measuring the temperature of a person in places where many people pass. In this case, this procedure will lead to congestion of people at the entrance, which is bad for all types of security. Thermal imaging devices also use IR sensors, based on which the thermal image is built. Therefore, they have the same limitations as the IR sensors themselves.
Thus, the study aimed to develop a technique for automated measurement of the temperature of a person who, in the normal mode, without stopping, passes to a place of a large crowd of people. This goal was complicated by the fact that many difficult-to-determine factors will influence the readings of infrared sensors. For example, the accuracy of temperature measurement is influenced by: passage speed, height of a person, distance to sensors, ambient temperature. All of these factors will cause the infrared thermometer to display the wrong temperature.
The use of infrared thermometers for measuring the temperature of people is now recognized as a convenient means with the advantage that it is a non-contact method. The authors of [8] in their study have shown that the measurement error of IR thermometers is not more than 0.2 0 C. In contrast, the time required for measurement is 4 seconds, making the method unsuitable for measuring temperature in places where the fast passage of people is needed. At the same time, it is noted that this method of measuring the temperature has an error in some works. In work [9], it is said that an IR thermometer is a non-invasive device, quick to use, hygienic, but at the same time, it has an error in measurements. The devices are incredibly inaccurate when measuring temperatures over 37.5 ° C. It is concluded that they may not be the most accurate devices for mass screening of elevated temperatures during a pandemic. In [9], studies have shown good accuracy of IR thermometers, but the authors found differentiations in accuracy. Measurement of forehead temperature shows a good measurement accuracy, and the size of wrist temperature shows a significant error. The work [10] did not directly set the task of measuring the temperature of the human body. The functions of the study included human recognition by the system of IR sensors. However, the study's conclusions [10] are still interesting: recognition of a person using IR sensors is better if the speed of movement of the person is higher and the person is closer to the sensors. One of [11] tasks was to measure the temperature of monkeys using an IR video camera during the natural life of animals. Of course, one cannot compare an IR video camera and several IR sensors since a video camera is much more informative. Still, the result of the study [11] was that they found a method for high accuracy of temperature measurement. In [12], an IR thermometer based on the MLX90614 sensor was developed, as in our work. In this work, the accuracy of measurements was not investigated. However, the authors noted that the required distance for size is 2-4 cm to the object.
The review of the possibilities and prospects for the development of thermal imaging studies [13] speaks of the diagnostic value of measuring the temperature field but does not discuss under what conditions these studies should be carried out and how this affects the measurement accuracy. The article [14] presented the results of research, the tasks of which included the development of an automated, integrated system for temperature control and analysis of the spread of ARVI. However, the authors presented only a schematic diagram of such system; the work's measurement results were not presented. Thus, many studies are devoted to measuring human body temperature using an IR thermometer, but almost all of them are devoted to measuring temperature in laboratory conditions.

Materials and methods
The design of the experimental stand for the study of automatic measurement of the temperature of the human body during the passage was developed in the form of a stand with six mounted IR sensors (Fig.  1). The location of the sensors is such that it is possible to measure the temperature of people of any height. That is, the first sensor is located about 1 meter from the floor. If the system recognizes a person with a high temperature, then the signal lamp turns on so that the security service can start additional actions with this person. Also, each event is transmitted to server 5 via wireless communication channel 4. In the schematic diagram of the device (Fig. 2), you can see an IR sensor that transmits data to the microcontroller board. The microcontroller performs sensor polling and data processing. The Stm32F407 microcontroller was used in the experimental stand. A frozen model of an artificial neural network was introduced into the microcontroller using the X-CUBE-AI package, which is part of the STM32CubeMX code generator. Let us suppose that the temperature exceeds the permissible threshold (this is determined when processing data by a neural network). In that case, the warning light turns on, and data is sent to the server via a radio channel. The MLX90614 IR sensor was used in the stand, which had the following characteristics: temperature range --40...+125 0 C; accuracy -0.5 0 C; digital SMBus interface; resolution -0.02 0 C; two digital filters for processing FIR (Finite Impulse Response), IIR (Infinite Impulse Response) data.
The development of an analytical model for the task set in the study may face many intractable problems since this model must consider all the significant factors affecting the measurement of the temperature of a person who quickly passes by IR sensors. Therefore, an artificial neural network in the form of a multilayer perceptron was used to determine the threshold value of the temperature.
When building a neural network model, data were collected for analysis at the first stage. The model's input parameters are human temperature, ambient air temperature in the room, the speed of human movement (more precisely, the time from the detection of a person by a temperature sensor until the temperature returns to the initial values).
At the second stage, the obtained data were marked since the neural network training had to occur in the presence of a teacher. The temperature was used as input parameters, which was recorded by IR sensors every second. The recording of IR sensor data began when the average temperature of all sensors increased by 0.5 0 C, and ended after 10 seconds. Also, the ambient temperature was recorded every second, which was also included in the input layer of the artificial neural network. Thus, the input layer was 10 times the measured 6 temperatures from the IR sensors and 1 ambient temperature, a total of 70 nodes. The developed neural network had the following parameters (Fig. 3): input layer -70 nodes; 3 hidden layers -(128, 64, 8 nodes); output layer -2 nodes (binary classification).  The temperature of the person who passed near the sensors was the same and was 36.5 0 C. The speed of passage was also the same (this can be seen from the same area under the graphs). From the analysis of the charts in Figs. 4 and 5, it is easy to see that the maximum human temperatures at the ambient temperature of tamb = 24 0C are about 1-1. 5 0 C less than the ambient temperature of tamb = 27 0 C.
Also, the analysis of graphs allows us to conclude that if an artificial neural network is not used for data processing, then sensors would have to be calibrated to develop a model. Moreover, calibration would have to be done constantly during the operation of the sensors since, over time, the sensors wear out, there are changes in the electrical parameters of the components.
The binary classification was carried out by temperatures before (category 1) and after (category 2) the temperature of 38 0 C.
To simulate the increased temperature, a polyethylene container with a water temperature of 38-39.5 0 C was transported near the sensors. The learning process was carried out over 300 epochs. Datasets were collected when the following factors changed: the speed of passing sensors, ambient temperature, human height, human temperature. During the training process, at 40 epochs, the accuracy became equal to 1.
After training, the selected optimal model was saved to a file with the h5 extension, using the Keras API, and the network architecture and weights were saved together in one file. Then the model from the file was converted into the code of the Stm32f407 microcontroller using the X-CUBE-AI code generator (Fig. 6)

Figure 6. Model conversion scheme
The code generator converts the values of weights, offsets, and associated activations from the format of 32-bit floating-point numbers to the format of 8-bit fixed-point numbers (Fig. 6). They are implemented in an optimized and specialized implementation in the C language. Porting the model to the microcontroller was performed to speed up the system's operation as a whole. Unfortunately, although data processing was initially performed on a computer, there was no decrease in inaccuracy after transferring the model to the microcontroller.
The level of recognition of elevated temperature for all cases is high, except for those cases when the ambient temperature was the influencing factor. It is possible that the influence was not even the temperature itself, but the air flows, which gave an error in the measurements, which is possible for these sensors. There is almost no data with which the obtained results could be directly compared since the tasks of the study did not include accurate measurement of human body temperature. Nevertheless, the conducted studies allow us to develop a methodology for determining the temperature above or below a certain threshold.

Conclusion
Using an artificial neural network in the form of a multilayer perceptron with a binary classification allowed us to develop a method for automated recognition of a person with an elevated temperature.