Artificial intelligence enhanced environmental detection system

Research Article
Open access

Artificial intelligence enhanced environmental detection system

Xiaoyin Wang 1*
  • 1 Teradyne (Shanghai) Co., Ltd.    
  • *corresponding author yorkwilliam@163.com
ACE Vol.66
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-443-9
ISBN (Online): 978-1-83558-444-6

Abstract

This paper presents a novel approach to improve the accuracy of environmental detection and prediction by incorporating artificial intelligence (AI) technology into existing detection systems. At the heart of our approach lies the combination of a complex AI model with the hardware and software components of the inspection system. This combined approach can significantly improve the accuracy of detection systems through greater ability to predict environmental changes and events, underscoring the superior performance of hardware and software combined with AI technology. This paper delves into the details of hardware and software design, and discusses measurement implementation methods using a build-down machine. We also explore the practical application of AI models within the framework described above. In addition, this paper also describes the implementation of communication protocols to ensure the effective data exchange between the system network and the artificial intelligence model. These protocols are essential for the real-time processing and analysis of environmental data, enabling systems to respond quickly to detected changes.

Keywords:

Artificial Intelligence, Environmental Detection System, Network Interface Chip

Wang,X. (2024). Artificial intelligence enhanced environmental detection system. Applied and Computational Engineering,66,156-159.
Export citation

1 Introduction

It is necessary to develop an efficient and accurate Environmental Detection System. The system proposed in this paper not only adopts efficient hardware design, but also greatly enhances the ability of data processing and prediction by integrating artificial intelligence technology, which provides a new solution for environmental detection and controlling

The importance of Environmental numerical index is crucial to the development of industry and environmental sustainability. Especially in the field of industrial buildings, the regulation of temperature and humidity not only affects the process of industrial projects, but also greatly determines the total amount of environmental energy consumption. For example, heating, ventilation, and air conditioning (HVAC) are extremely energy consuming, accounting for 40% of total building energy consumption [1]. It is crucial to design some energy-efficient building thermal comfort control strategy which can reduce the energy consumption of the HVAC while maintaining the comfort of the occupants.

2 System composition and working principle

The STM32 family of 32-bit microcontrollers based on the Arm Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers products combining very high performance, real-time capabilities, digital signal processing, low-power / low-voltage operation, and connectivity, while maintaining full integration and ease of development [2]. STM32 can be combined with artificial intelligence. This embedded machine learning can improve many applications in a simple, fast, and cost-effective way [3].

W5100 as a network interface chip. The W5100 chip is a Hardwired TCP/IP embedded Ethernet controller that enables easier Internet connection for embedded systems. W5100 suits users in need of stable Internet connectivity best, using a single chip to implement TCP/IP Stack, 10/100 Ethernet MAC and PHY. Hardwired TCP/IP stack supports TCP, UDP, IPv4, ICMP, ARP, IGMP, and PPPoE, …, which has been proven through various applications over many years. W5100 uses a 16ytes internal buffer as its data communication memory [4]. By using W5100, users can implement the Ethernet application they need by using a simple socket program instead of handling a complex Ethernet Controller.

At the same time, we can use deep learning algorithms to analyze collected temperature and humidity data to predict future changes in the environment, including:

1. Anomaly detection: Machine learning models are used to identify anomalies in data in real time, such as sudden changes in temperature or humidity, to respond in time.

2. Automatic adjustment system: According to the analysis and prediction results, automatically adjust the operation of environmental control equipment, such as air conditioners and humidifiers, to maintain the ideal temperature and humidity conditions.

The system workflow is as follows: After receiving the measurement command issued by the main control terminal (main control PC), STM32 on the node starts the measurement operation of SHT11, processes the returned temperature and humidity value according to the agreed packet format, and feeds it back to the Ethernet through the W5100 network interface. After receiving the measurement data, the main control terminal executes real-time display and recording of values, as well as timely analysis, prediction, and adjustment of external control devices through deep learning algorithms.

3 Hardware components

3.1 System constructure

The system mainly consists of a DC-DC power supply module, an STM32 control unit, an SHT11 measurement module, a W5100 network module, and a host computer.

3.2 Environmental data detection module

The SHT11 integrates temperature and humidity detection with a fully calibrated output for easy interchangeability. The typical temperature measurement accuracy is ±0.4℃, and the humidity measurement accuracy is ±3.0%RH. It uses a two-wire digital interface (CLK clock line and DATA line) to communicate with the single chip microcomputer, the peripheral circuit is simple, is currently used in the market more products. Note that the interface timing does not follow the I2C protocol, so the STM32 hardware I2C peripherals cannot be used directly. In addition, the connected DATA line must be connected to a pull-up resistor, otherwise a data transmission error may occur.

3.3 Network communication interface modules

The W5100 is a multifunctional monolithic network interface chip that integrates the TCP/IP protocol stack, Ethernet Media Transport Layer (MAC), and physical layer (PHY). This makes it easy and convenient for microcontroller to carry out network communication.

W5100 and MCU have three connection modes: direct parallel, indirect parallel and SPI mode. The direct parallel mode has the most connections, but the fastest speed. The SPI mode has fewer connections, but the slowest speed. Because the amount of data transmitted within a single node is not too large, the SPI connection mode is chosen here, that is, the device is connected to the SPI port of STM32. It is then connected to the network via a network transformer and RJ-45 interface.

4 Software design

4.1 Environmental data detection module

Although the SHT11 uses a two-wire digital interface, it is not an I2C interface, so it requires an I/O interface to simulate the timing of commands, data reception, and so on.

At the beginning of the program, the initialization of data transmission is represented by a set of “start transfer” timing. It consists of DATA flipping to low when the SCK clock is on high power, followed by SCK switching to low, followed by DATA flipping to high when the SCK clock is on high power.

Then send the measurement command, “00000011” to measure the temperature, “00000101” to measure the relative humidity. Control of the DATA line is then transferred to SHT11, which indicates that it has correctly received the control command by pulling DATA down to low after the falling edge of the 8th SCK clock; After the ninth SCK clock drop edge, the DATA is released, returning it to high.

The time of SHT11 a measurement varies according to the measurement accuracy, at this temperature, the highest measurement accuracy of 14bit is used, about 210ms time (the highest measurement accuracy of humidity is 12bit, corresponding to 55ms time). This means that the MCU can only read the measurement results after at least 210ms or 55ms. SHT11 indicates this “DATA ready” signal by pulling the data line down to a low level. After that, SHT11 successively transmits 2 bytes of measurement data and 1 byte of CRC parity. The MCU needs to confirm each byte by pulling DATA down to a low level. Finally, the CRC data’s acknowledgement bit is used to abort the communication. After the measurement and communication is complete, the SHT11 automatically goes to sleep mode.

It should be noted that in the process of temperature and humidity collection, the program is forbidden to interrupt, and no other operations can be interspersed in the middle to ensure that the operation of SHT11 can be correctly completed. After the received data is verified by CRC, the temperature follows the formula,

\( Temperature=-39.6+0.01*SO_{T} \)

Where \( SO_{T} \) is a temperature measurement.

Humidity according to the formula,

\( RH=-4+0.0405*SO_{RH}-2.8*10^{-6}*SO_{RH} \)

Where \( SO_{RH} \) is a humidity measurement.

4.2 Network communication interface module

The TCP/IP stack of the W5100 supports TCP, UDP, IPv4, ICMP, ARP, IGMP, and PPPoE, which makes the use of the W5100 do not need to consider the control of Ethernet, only need to perform simple Socket programming. The steps to establish a network connection are roughly as follows:

The first step, initialization, set the network information, etc. For example, select the working mode, configure the gateway address, physical address, subnet mask, and port cache capacity. The W5100 can communicate data through TCP, UDP, IP_RAW, and MAC_RAW. TCP is a connection-based communication mode. It must first establish a connection, and then use the IP address and port number of the connection for data transmission. Here we choose TCP this more reliable connection mode;

The second step, open the port, send the connection request to the server;

The third step is to formally establish the connection after the detection control side responds and further completes the mutual confirmation.

W5100 of this system is connected to MCU through SPI interface. The SPI protocol defines four modes of operation, each of which differs in the polarity and phase of the SCK clock, with the W5100 operating in mode 0 of the SPI slave device and being the most commonly used mode of operation. The packet size for communication with the MCU is 4 bytes, among which the operation code is 1 byte, indicating the read operation (0x0F) or the write operation (0xF0), the address is 2 bytes, and the data is 1 byte.

4.3 Communication protocol design between nodes and hosts

The software and hardware mentioned above only constitute a node, and the entire monitoring network is composed of dozens or even hundreds of such nodes. The data signal is transmitted through the network through the communication packet between the host and each node.

4.4 Perform AI-driven predictive control on hardware components

Machine learning stands as the cornerstone of artificial intelligence, with the cadence of algorithms serving as a pivotal force in its incremental ascent. Despite the continual evolution of increasingly sophisticated algorithms, the overarching emphasis remains on embracing straightforward and effective approaches. Consequently, machine learning finds extensive application across computer science domains, including Predictive Maintenance (PdM) for industrial equipment, which represents a prime arena for data-driven methodologies.

When we need to deal with many markup features and have strict requirements on the complexity of the model, we can consider the use of logistic regression (LR) model is a suitable choice. Logistic regression model (LR) is one of the most well-known classification models in the field of machine learning and has the lowest algorithmic complexity. It belongs to supervised learning, therefore, the collected data must have corresponding labels to be fed into the model. In addition, the LR model takes a linear combination of features as its input and applies a nonlinear function to conduct mapping, so that each output will fall within the range of (0, 1) and a probabilistic interpretation can be obtained.

The prediction function of the LR model is as follows [5]:

\( h_{θ}(x)=g_{θ}(θ^{T}x)=\frac{1}{1+e^{-θ^{T}x}} \)

Where \( θ^{T}x=\sum_{i=0}^{n}θ_{i}x_{i}=θ_{0}+θ_{1}x_{1}+…+θ_{i}x_{i} \) ,x the input feature of this model, θ the internal parameter, which consists of wights and biases, and \( g(∙) \) a nonlinear transformation of x, named logistic function.

Logistic regression models are used in the host to analyze observational data, predict anomalies, and make timely adjustments to external control equipment if necessary.

5 Conclusion

In the field of modern technology, the integration of artificial intelligence (AI) with traditional systems opens new areas, such as the advanced detection temperature and humidity monitoring system detailed in this article. By harnessing the power of artificial intelligence, particularly deep learning algorithms and machine learning models, the system goes beyond traditional monitoring methods. This intelligent integration not only improves the efficiency and accuracy of environmental monitoring, but also illustrates the transformative potential of AI in elevating systems to meet future demands. As we continue to innovate, synergies between AI and Iot devices, such as our monitoring systems, will become increasingly important in developing sustainable, intelligent solutions for environmental management.


References

[1]. Guanyu Gao, Jie Li, Yonggang Wen (2020). DeepComfort: Energy-Efficient Thermal Comfort Control in Buildings Via Reinforcement Learning. IEEE Internet of Things Journal Volume: 7.

[2]. STMicroelectronics. (n.d.). 32-bit Arm Cortex MCUs. Retrieved March 9, 2024, from https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html.

[3]. STMicroelectronics. (n.d.). Artificial intelligence ecology. Retrieved March 9, 2024, from https://www.stmcu.com.cn/ecosystem/app/ai

[4]. WIZnet. (n.d.). W5100. WIZnet. Retrieved March 9, 2024, from https://www.wiznet.io/product-item/w5100/

[5]. Weiting Zhang, Dong Yang, Hongchao Wang (2019). Data-Driven Methods for Predictive Maintenance of Industrial Equipment: A Survey. IEEE Systems Journal Volume: 13.


Cite this article

Wang,X. (2024). Artificial intelligence enhanced environmental detection system. Applied and Computational Engineering,66,156-159.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 2nd International Conference on Functional Materials and Civil Engineering

ISBN:978-1-83558-443-9(Print) / 978-1-83558-444-6(Online)
Editor:Ömer Burak İSTANBULLU
Conference website: https://www.conffmce.org/
Conference date: 23 August 2024
Series: Applied and Computational Engineering
Volume number: Vol.66
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Guanyu Gao, Jie Li, Yonggang Wen (2020). DeepComfort: Energy-Efficient Thermal Comfort Control in Buildings Via Reinforcement Learning. IEEE Internet of Things Journal Volume: 7.

[2]. STMicroelectronics. (n.d.). 32-bit Arm Cortex MCUs. Retrieved March 9, 2024, from https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html.

[3]. STMicroelectronics. (n.d.). Artificial intelligence ecology. Retrieved March 9, 2024, from https://www.stmcu.com.cn/ecosystem/app/ai

[4]. WIZnet. (n.d.). W5100. WIZnet. Retrieved March 9, 2024, from https://www.wiznet.io/product-item/w5100/

[5]. Weiting Zhang, Dong Yang, Hongchao Wang (2019). Data-Driven Methods for Predictive Maintenance of Industrial Equipment: A Survey. IEEE Systems Journal Volume: 13.