4. System Architecture
Analysis of modern wireless monitoring systems, in addition to their core requirements, indicates that the system architecture should be organized hierarchically. All elements and subsystems must be logically integrated into a single structure without affecting the overall system operation.
The system must ensure ease of deployment, allowing components to be replaced or reconfigured without interrupting the monitoring process. It should also be adaptable for installation on various monitored objects while maintaining reliable remote access and control. Direct access to the monitored object must be provided, and the sensors must be capable of accurately generating measurement data and transmitting them wirelessly.
The proposed system architecture was developed based on the following requirements:
- integration of hardware and software components in all subsystems;
- adaptation of hardware components to monitoring requirement;
- compliance with requirements for system functionality, fault tolerance, and scalability;
- ensuring the system’s security and long-term operational reliability;
The system architecture has a hierarchical structure, is logically divided, and consists of three functional levels:
1. Sensor level – responsible for collecting distributed measurement data;
2. The network level provides wireless routing and data aggregation;
3. The processing level performs centralized and partially distributed data analysis.
Figure 1.
General network architecture.
Figure 1.
General network architecture.
The main difference of the proposed system from traditional wireless sensor networks (WSNs) is the use of Wi-Fi (IEEE 802.11) instead of IEEE 802.15.4-based communication. This approach provides the following advantages:
- higher data transmission throughput;
- ability to transmit large data packets;
- support for the standard IP protocol stack;
- compatibility with existing network infrastructure.
Figure 2 illustrates the general functional diagram of the distributed monitoring system.
R1 – router on the transmitting side;
P1 – radio bridge on the transmitting side;
P2 – radio bridge on the receiving side;
R2 – router on the receiving side;
T/R Server – transceiver server;
DCU – data collection unit;
Wi-Fi – Wi-Fi transceiver operating in client mode;
SU – sensor unit;
MO – monitored object;
EMU – external monitoring interface.
The router on the transmitter side provides network connectivity, enabling the exchange of measurement data in remote or hard-to-access areas of the system via the P1 radio bridge.
The P1 radio bridge transmits the broadband data stream to the P2 receiving radio bridge, which then forwards the data to the R2 router on the receiving side.
The monitored object corresponds to the structure under study, i.e., the building. The sensor unit consists of numerous sensors that measure dynamically changing parameters describing the technical condition of the structure. These include a distance sensor for detecting cracks, temperature and humidity sensors for assessing environmental impact, and an inertial measurement unit (IMU) that includes an accelerometer, gyroscope, and magnetometer to measure spatial orientation and magnetic field.
The sensor node transmits the measured data to a Wi-Fi module operating in client mode (referred to as the “Wi-Fi” module). This module consists of an analog-to-digital converter (ADC), a microcontroller, and an antenna. The ADC converts the sensor’s analog signals (if any) into digital form and sends them to the microcontroller. The microcontroller processes the data according to the embedded algorithm and transmits the processed information to the router via the antenna.
The R1 router sends the received measurement data to the Transceiver Server (T/R Server), where the data is processed according to a specific algorithm. The processed results are then converted into processed data and transmitted through the T/R Server–R–Wi-Fi–Emu–MO sequence or directly through the EMU–MO channel.
Finally, the system performs data analysis to adjust and stabilize the parameters of the controlled process.
To store and process measurement results, the server transmits data via the HTTPS protocol to the data collection unit (DCU), which may include a personal computer, smartphone, laptop, embedded system, or tablet.
A functional diagram (
Figure 3) was created to illustrate the data collection and transmission process, which is implemented based on the proposed system architecture.
The following symbols are used in
Figure 3:
SS – signal source;
HC-SR04 – ultrasonic distance sensor;
MPU-9250 – inertial measurement unit (IMU) integrating an accelerometer, gyroscope, and magnetometer;
GY-521 – compact module with a 3-axis accelerometer and 3-axis gyroscope, controlled via the I2C protocol;
DHT – temperature and humidity sensor;
ADC – analog-to-digital converter;
MCU – microcontroller unit;
A – antenna;
ESP32 – Wi-Fi module;
ThingSpeak server – cloud server used in the study for data storage and visualization;
Router – network device that forwards data packets between network segments based on routing rules and tables;
Radio Bridge 1 – external access point forming a directional beam for data transmission;
Radio Bridge 2 – network device that receives a signal from a provider or another router and distributes it within a local network;
HTTPS – secure Hypertext Transfer Protocol (default port 443);
PC – personal computer.
The functional diagram of the system and the justification for the selection of its structural components are presented below. Signals corresponding to monitored parameters are generated and recorded by the sensor modules. The power supply is designed to provide a constant power supply to both the sensor modules and the Wi-Fi communication module.
In the experimental study, a total of 500 measurements were taken for each type of sensor used in the system.
The system includes several types of sensors. The distance sensor is used to measure the dynamics of crack propagation. For this purpose, the HC-SR04 ultrasonic distance sensor was chosen. This sensor was selected for its ability to provide precise digital measurements based on the principle of ultrasonic echolocation.
The sensor module emits an ultrasonic pulse and detects the reflected signal from the target object. By measuring the time interval between transmission and reception, the distance to the target object is calculated. Additionally, the HC-SR04 sensor is compatible with a wide range of microcontrollers, which makes it easy to integrate into various control systems.
Four sensors of this type were used in the experimental setup.
The MPU-9250 is a multi-sensor module that integrates an accelerometer, gyroscope, and magnetometer. This study used the MPU-6050 and MPU-9250 sensors. Inertial measurement units use microelectromechanical systems (MEMS) technology, which allows the integration of mechanical sensing elements and electronic circuits onto a single chip.
Each sensor provides measurement along three orthogonal axes (X, Y, and Z). The MPU-6050 offers a 6-degree-of-freedom (6-DoF) configuration by integrating a three-axis accelerometer and a three-axis gyroscope. In contrast, the MPU-9250 extends this functionality to a 9-degree-of-freedom (9-DoF) system, which includes an integrated ak8963 magnetometer that enables magnetic field measurement and functions as a digital compass. This allows for gyroscope drift compensation and determination of the device’s absolute orientation relative to the Earth’s magnetic field.
Both sensors are equipped with an integrated Digital Motion Processor (DMP) capable of sensor fusion and generating orientation results in the form of Quaternions or Euler angles. This significantly reduces the computational load on the main microcontroller.
Communication with the control board is carried out via the I2C protocol, while the MPU-9250 supports a higher-speed SPI interface. Both modules feature an integrated temperature sensor used not only for environmental monitoring but also to compensate for temperature errors in accelerometer and gyroscope measurements, thereby enhancing system stability under varying temperature conditions.
Thus, the MPU-9250 is an advanced solution that combines the functionality of the MPU-6050 (or its updated version, the MPU-6500) with an integrated magnetometer in a magnetometer form factor. The MPU-6050 is commonly used in modules like the GY-521. The GY-521 is a compact MPU-6050-based module that combines a 3-axis accelerometer and a 3-axis gyroscope, controlled via the I2C communication protocol. This is one of the most widely used MPU-6050 chip-based expansion boards, providing convenient interaction with microcontrollers.
In addition to the sensing element, the GY-521 module includes necessary ancillary components such as a voltage regulator (operating from 3.3 V to 5 V), I2C bus pull-up resistors, and an LED power indicator. These features make it a compact and practical solution for integrating inertial sensing capabilities into wireless monitoring systems.
The proposed distributed wireless system uses MPU-6050 (GY-521 module) and MPU-9250 sensors. Several sensor nodes are placed on the monitored structure at predetermined locations defined by its geometric dimensions (height and width). Each sensor node is connected to a separate Control Module with Wi-Fi connectivity.
To increase energy efficiency, the modules are designed to operate in a deep sleep mode along with energy-saving algorithms. Since data transmission is not continuous but periodic, power is supplied to the active components of the system only during measurement sessions.
Sensors installed in various locations record dynamic parameters along three orthogonal axes, which allows for the independent acquisition of data from the accelerometer, gyroscope, and (in the case of the MPU-9250) magnetometer along the X, Y, and Z axes.
The DHT11 temperature and humidity sensor is a digital device with a calibrated output signal, made with patented digital signal acquisition technology that ensures reliable operation and long-term stability. The sensor integrates a resistive element for measuring humidity and a thermistor for measuring temperature, both connected to an on-board 8-bit microcontroller.
The DHT22 is a more accurate alternative, each of which is factory-calibrated in a controlled environment. The calibration coefficients are stored in the controller’s one-time programmable (OTP) memory and are used during data collection to improve measurement accuracy and compensate for systematic errors.
Both sensors, with their small size, low power consumption, and single-wire communication interface, are suitable for a wide range of operating conditions. Their standard pin configuration simplifies integration into control systems.
The DHT11 sensor is suitable for indoor use due to its cost-effectiveness and operating range (0 °C to +50 °C, relative humidity 20% to 80%). However, the DHT22 sensor is better suited for outdoor use or harsh environmental conditions. It provides improved metrological performance, including an approximate 2-5% humidity measurement accuracy across the full 0-100% range, as well as an extended operating temperature range of -40 °C to +80 °C.
The hardware and software compatibility of these sensors ensures their seamless interchangeability within the proposed system, allowing for flexible adaptation to specific technical requirements and environmental conditions without degradation in performance.
Comprehensive analysis allows for the detection of potential communication errors and transmission delays within the system. Ensuring the reliability of measurement results is crucial for accurately assessing the technical condition of structures and for supporting decision-making in remote monitoring applications.
Measured values are transmitted from the main sensor elements to the Wi-Fi module, which must ensure flexibility in network deployment and support scalable distributed system topologies. The ability to simultaneously record data and transmit packets is a key requirement for the communication network.
The ESP32 System on a Chip (SoC), manufactured using 40nm TSMC technology, meets these requirements. It is characterized by low power consumption and supports advanced power dynamic management features. Wi-Fi transmit power control allows for finding the optimal trade-off between range, data rate, and energy efficiency, depending on the operating conditions.
The ESP32 computing core is a dual-core 32-bit xtensa LX6 microprocessor with a clock speed of up to 240 MHz and a performance of up to 600 DMIPS. The platform also includes a wide range of peripherals, including 18 channels of a 12-bit analog-to-digital converter (ADC).
For prototyping and experimental testing, the Arduino IDE is a suitable development environment thanks to its simplicity and extensive library support. However, to implement complex energy-saving strategies and optimize system resources, the ESP-IDF framework is preferable. Its main advantage is the menuconfig utility, which allows for low-level configuration of the system’s parameters, including Boot Options, SDK optimization and adjusting the processor clock speed, which is crucial for reducing power consumption in distributed monitoring nodes.
The measured data from the ESP32-based sensor node is digitized (in the case of analog sensors) and processed by the embedded microcontroller. The firmware manages the core functions, including setting up the Timer, establishing a wireless connection with the receiving party, and transmitting data to the server.
The wireless communication is established through a router that connects the transmitting and receiving network segments via Wi-Fi. A standard Wi-Fi router can be used for this purpose, as it is easy to place in the controlled area, supports multiple antenna configurations, and provides sufficient resistance to interference.
The server is responsible for storing and processing measurement data received from the sensor nodes. To ensure operational reliability and data security, it is generally recommended to use a specially protected server with limited access. However, for the purposes of this study, which includes experimental testing and system verification, the ThingSpeak cloud platform (
www.thingspeak.com) was chosen due to its accessibility and suitability for rapid prototyping and visualization of data.
The final stage in the system’s functional diagram involves transmitting the measurement results from the server to the end-user’s device. Since the proposed system is wireless and autonomous, the data exchange is implemented in accordance with the widely accepted OSI reference model.
The connection between the server and the end device is established using the HTTPS protocol, which enhances security compared to the widely used HTTP protocol and guarantees data integrity and confidentiality during transmission.
Based on the processes and operations described above, an algorithm for the distributed control system is developed, as shown in
Figure 4. The proposed algorithm describes the operation of a single communication channel in the building monitoring system.
The algorithm is organized into four columns. The left column represents the interaction between the routers and the radio bridges on the transmitting and receiving sides. The second column depicts the data transmission between the receiving radio bridge and the router. The third column describes the operation of the sensor node, including the transmission of collected data and measurement results to the server. The rightmost column represents the reception, processing, and visualization of data on the end-user’s device.
After initializing the sensors and the Wi-Fi module, an IP address is assigned. Then the Wi-Fi module periodically requests measurement data from the sensors. In case of an error, the request is repeated until reliable data is received.
After receiving data from the sensors, the Wi-Fi module establishes a connection with the router. If the connection is successful, the measurement results are sent to the router and then to the remote server. If the connection attempt fails, the process repeats until a stable connection is established.
The router transmits the collected data to the server via Wi-Fi, where it is logged and stored. At this point, the data becomes available to the end user. After each measurement cycle, the system enters a standby mode for a predefined time interval, after which the data collection process is repeated according to the described algorithm.
The end-user’s device initializes operation after establishing a connection with the server. After a successful HTTPS connection, the device retrieves the stored data and converts it into a visualization-compatible format.
Structural condition assessment is based on the analysis of threshold values. If the measured values remain below a given maximum threshold, the structure’s condition is considered normal. If the measured values exceed the threshold and this condition persists in subsequent measurements, the structural condition is classified as critical, requiring intervention by maintenance personnel.
For structures such as bridges and engineering facilities, the collected data is continuously analyzed to detect dynamic changes. This enables informed decision-making and supports early detection of structural degradation and reduces the risk of critical failures.
The proposed algorithm supports periodic asynchronous data acquisition and fault-tolerant wireless transmission between distributed sensing nodes.