Current location - Education and Training Encyclopedia - Graduation thesis - Design of bridge health monitoring system based on Ethernet?
Design of bridge health monitoring system based on Ethernet?
In recent years, with the increasing number of bridge safety accidents, bridge health monitoring technology has gradually become a research hotspot in academic and engineering circles. At the same time, many software of bridge health monitoring system have been developed. At present, there are two main ways to develop the software of bridge health monitoring system. One is to use high-level language programming tools, mainly VB, VC and Delphi;; The other is to use a special graphical programming language Lab-VIEW. Using high-level language programming, not limited by development tools, can develop friendly and beautiful interface programs according to the developer's own design, but it requires higher software personnel; Using LabVIEW for secondary development, practical software can be developed in a short time, but software development is easily limited by development tools. These two development methods have their own advantages and disadvantages, and should be chosen according to the actual situation. In this paper, the object-oriented visual programming language VC++ 6.0 is used for software programming, and the MFC class library of VC++ is fully used to develop the bridge health monitoring system software with friendly and beautiful interface.

1, Overview of Bridge Health Monitoring System Based on Ethernet

Bridge health monitoring technology is to install some sensing devices in key parts of the bridge body, monitor the changes of structural parameters collected by these monitoring points in the process of bridge operation in real time, and comprehensively evaluate the safe use state of the bridge through the analysis and processing of these structural parameters. Therefore, the bridge health monitoring system should basically include the following functions:

(1) Collection and processing of various sensor signals;

(2) transmitting the collected data to the upper computer control unit;

(3) Monitoring, analyzing and processing the real-time signals of the upper computer;

(4) Preservation and reference of historical materials.

With the development of communication technology, network technology is gradually applied to many large-scale bridge monitoring systems at home and abroad. Connecting the monitor to the central controller through Ethernet can realize the remote transmission and sharing of collected data, so as to monitor the structural parameters of the bridge in real time in the monitoring center.

The frame structure of bridge health monitoring system based on Ethernet is shown in figure 1. Among them, the monitor mainly completes data acquisition and transmission. Because of the large amount of data collected and processed by bridge monitoring system, the embedded system realized by single chip microcomputer is difficult to meet the requirements. In this design, the main board of the monitor makes full use of the powerful data processing ability of DSP and the sequential logic function of FPGA, which can meet the system requirements of large data volume and real-time monitoring.

The central control computer can display all the performance indicators monitored at present in real time, and at the same time can analyze whether the bridge is in a safe state. When the bridge is damaged or its safety performance declines under unexpected circumstances, it can prompt a safety alarm to avoid serious bad habits and safety accidents.

2. Software design of bridge health monitoring system based on Ethernet.

2. 1 software design requirements analysis

The field monitor transmits the collected signals to the upper computer through Ethernet, and displays, saves and analyzes the collected data information in real time in the upper computer, which not only makes full use of the ability of DSP to collect and process data at high speed in the field, but also makes full use of the advantages of the upper computer in drawing images and saving data. Therefore, a complete bridge health monitoring system should complete the following functions in the central monitoring part:

(1) setting of network address information such as IP address, MAC address and Port of each monitor, operation mode and system sampling time;

(2) Set the sampling frequency, magnification, sampling and storage time of eight channels of the monitor, and select the sensor type corresponding to each channel;

(3) Dynamic real-time display of data curve. The data can be displayed in raw data and FFT format, and the sampling time can be adjusted to set the size of a frame of collected data.

(4) The length and time of data collected by eight channels can be displayed on the central control computer in real time;

(5) Over-limit alarm. When the collected data is abnormal and beyond the normal data range, it can give an alarm to the central control unit, which is convenient for staff to find faults and damage in time;

(6) The collected data can be analyzed in real time.

2.2 Overall design and process of software system

The software design has two core parts, one is that the central control unit sends command parameters to the monitor, and the other is that the central control unit receives the collected data information sent back by the monitor. After the PC receives the collected data information, it needs to draw a data map according to the system requirements, so as to analyze the collected data. At the same time, in order to consult the historical data information, the collected data must be saved in an Excel file, and its flow chart is shown in Figure 2. According to the overall design and process of software design, four threads are adopted:

Thread1:uint send cmdtodsp (lpvoid iparam) to send the command parameters set in the main program to dsp;

Thread 2: uint, recursive data (lpvoid iparam), which finishes receiving the collected data information;

Thread 3: uint draw curve (lpvoid iparam), which draws the collected data into a curve image;

Thread 4: uint store to Excel (lpvoid iparam), which saves the collected data into an excel file for reference and analysis of historical data.

Among them, because the PC passively receives the data collected by the monitor, in order to ensure that there is no data loss when receiving the data, the priority of the RecieveData thread should be set to the highest.

Windows itself adopts message-driven mechanism. When a thread sends a message, the operating system first receives the message and then forwards it to the target thread. So you can customize the message, and then realize that one thread sends a message to another thread through the operating system.

First, the SendCMDToDSP thread sends parameter commands to the DSP, the core device of the display motherboard. After receiving the parameter command, DSP sends data to PC according to the requirements of the parameter command, and the receive data thread starts to receive data after hearing the DSP start to send the collected data. Because the Recie-veData thread has higher priority than the SendCMDToDSP thread, it sends command parameters when receiving data, and the SendCMDToDSP thread needs to wait for the receive data thread to receive data before sending command parameters, so that the command parameters will not be overwritten. Open a buffer in the storage area of PC for receiving data, and receive data starts to receive data. When the memory buffer is full, the ReciveData thread PostThreadMessage sends a message to the DrawCurve thread, passing the buffer pointer and size as message parameters, and then releasing the buffer to wait for receiving data; After receiving the message, the DrawCurve thread allocates another memory to store data. After drawing the curve image of the collected data, the DrawCurve thread PostThreadMessage sends a message to the StoreToExcel thread, passing the new memory pointer and size as message parameters, then releasing the data buffer and waiting for the message. After the StoreToExcel thread gets the message, it will also allocate another memory to save the data, save the collected data in the Excel file, and then release the buffer to continue waiting for the message.

2.3 Ethernet communication module design

The data communication between PC and DSP adopts Ethernet communication. The upper computer sends the set command parameters to DSP, and DSP collects data according to the received command parameters, and then sends the collected data to the upper computer. The Ethernet communication part is programmed with windows sockets, which provides many functions. Using these functions, programmers can realize Ethernet communication between DSP and PC.

2.3. 1 Send command module

When the host computer sends command parameters such as IP address and MAC address to the display, the display acts as a server and the host computer acts as a client. Create a windows Sockets socket on the server side and a Windows Sockets socket on the client side. After the system is powered on, the monitor will be in listening state. When monitoring the connection request of PC, the monitoring server will create a new windows sockets stcpctive to establish the connection with PC. After the monitor is connected to the PC, the PC can send command parameters to the monitor. In this process, the PC sends the 100 B command parameter to the monitor every time, in which the first byte is a sign to distinguish different command parameters. After receiving the command parameters, the monitor uses this flag to set various parameters. In this way, the sampling frequency, storage time, PGA, sampling threshold, FFT enable, IP address, MAC address, runtime mode and system time of each channel of the monitor are set in turn.

Data receiving module

When the monitor sends the collected data to the upper computer through Ethernet, the upper computer acts as a server and the monitor acts as a client. Similarly, create a windows sockets socket on the PC server and a Windows Sockets socket on the monitor client. When the application on the PC starts running, the PC will be in listening state. When the monitor terminal is monitored for connection request, a new windows sockets stcpctive will be created to establish the connection with the monitor. After the PC is connected to the monitor, the monitor sends the sampling time, channel number, data length and sampling data to the PC in turn. The sampling time represents the sampling result of the transmission data object. In order to receive the data information sent by the monitors, a buffer with the capacity of 16 384×4 needs to be opened in the memory buffer. Each monitor has 8 channels, so eight buffers are opened to store the data received by 8 channels. The process is shown in Figure 4.

3 simulation test

The development of bridge health monitoring technology is still in the laboratory research stage. Therefore, data acquisition and testing is to simulate the actual field sensor signal by using the triangular wave signal generated by the waveform generator in the laboratory environment. Set the command parameters such as channel number, sampling time, sampling frequency and magnification, and run the program to see the triangular wave waveform as shown in Figure 5. The abscissa represents the number of data collected in the set sampling time, that is, 5 1 2 data were collected in1second, and the ordinate represents the amplitude of the collected signal. Since the signal voltage of the sensor is -2.5 ~ 2.5 V and the sampling resolution of ADC is 24 b, the 24th bit is removed, and the middle value is 222, that is, 0 V, as shown in Figure 5. The collected data has no leakage point and complete waveform, which meets the basic requirements of bridge health monitoring system.

4. Conclusion

In this paper, the software design of bridge health monitoring system based on Ethernet is completed, and the signals of various sensors in the bridge health monitoring system are collected. At the same time, the collected data signals are transmitted to PC through Ethernet, and the output waveforms of the collected signals are displayed in real time, and the collected data are saved in Excel files for historical reference and analysis. The software has a friendly interface and can complete the general bridge health monitoring task.

For more information about project/service/procurement bidding, and to improve the winning rate, please click on the bottom of official website Customer Service for free consultation:/#/? source=bdzd