Communication port construction method, time synchronized side based on smart mobile phone WLAN
Method and structure health monitoring method
Technical field
The present invention relates to monitoring structural health conditions field, and in particular to the communication port structure based on smart mobile phone WLAN
Construction method, method for synchronizing time and structure health monitoring method.
Background technology
Skyscraper and bridge are the important infrastructure of modern society, and the normal operation to entire society plays important
Supporting role.The structure safe condition of these buildings is not only directly connected to the security of the lives and property of people, also contributes to its people
Economic normal operation.During long-term use, due to environmental attack, material aging, load long-term effect and component defect
Etc. factor collective effect, structure inevitably will gradually produce damage accumulation, cause its depression of bearing force, or even jeopardize structure
Safe handling.In the last few years, great personnel were caused there occurs the major accident of a lot of engineering structure unstabilitys all over the world
Injures and deaths and property loss, and ill effect is generated to society.These tragedies remind people, by efficient configuration health monitoring
Technology, monitoring of structures state, identified in time after damage occurs in structure, to ensureing that service structure is most important safely.
Traditional structural healthy monitoring system uses sensor special, because sensor special cost is high, causes to install number
Measure it is limited, for construction is complicated, the free degree is numerous actual building structure itself, it is difficult to obtain lesion size and portion exactly
Position.In the last few years, powerful smart mobile phone was widely available.Smart mobile phone is not only integrated with acceleration transducer, gyroscope
Etc. a variety of high-performance sensors and GPS module, powerful data sampling and processing, storage and transmittability are also equipped with, for using intelligence
Energy mobile phone carries out monitoring structural health conditions and provides possibility.What is used in smart mobile phone is typically all piezoelectric transducer, has pressure
The advantages that accuracy that electric-type sensor has is high, linear behavior is good, and wherein it is integrated with the module of a large amount of advanced technology
System, in that context it may be convenient to be called so as to serve every field, facility is provided for people.At present its application aspect compared with
To be extensive, such as the health monitoring of human body, car crass, home wiring control, library management, motion identification etc..Meanwhile intelligent hand
Application study of the machine in terms of monitoring structural health conditions also starts to walk gradually, and Dalian University of Technology's Zhao's snowy peak et al. have developed Orion cloud
Cell (Orion CC) smart mobile phone structural health cloud monitoring system.The program realizes adopts to intelligent mobile phone sensor data
Collection, analysis and the function such as upload, and bridge cable Suo Li test has been carried out by Han Ruicong et al. with this program, demonstrate data
Availability.
And research and application of the current smart mobile phone in terms of structure monitoring, the data acquisition of single-point can only be realized and divided
Analysis, does not realize the collaborative work between mobile phone, and the result that this obtains Analysis on monitoring data is relatively limited, obtained mode inspection
Survey and the analysis result reliability of non-destructive tests is not high.
The content of the invention
It can only realize that the data of single-point are adopted in terms of the invention aims to solve existing smart mobile phone structure detection
Collection and analysis, do not realize the time synchronized between mobile phone, and then cause Monitoring Data to carry out Cooperative Analysis, obtained knot
The shortcomings that fruit is relatively limited, and obtained Modal detection and the analysis result reliability of non-destructive tests be not high, and propose one kind and be based on
Communication port construction method, method for synchronizing time and the structure health monitoring method of smart mobile phone WLAN.
A kind of communication port construction method based on smart mobile phone WLAN, including:
Step 1: preparing the smart mobile phone of predetermined quantity, select wherein one to be used as control terminal, build WLAN
Network, other connect the WLAN as collection terminal;
Step 2: collection terminal opens particular port, Socket Client are waited to be connected with Socket Server identity
Connect;
Step 3: reading linux kernel/proc/net/arp catalogues, acquisition, which is connected to control terminal WLAN, owns
The IP address of collection terminal, and build the Socket Client of corresponding number, respectively with the Socket in each collection terminal
Server connections, build complete Socket communication ports.
A kind of method for synchronizing time based on smart mobile phone WLAN, including:
Step 1: using foregoing communication port construction method, the communication built between control terminal and each collection terminal is led to
Road;
Step 2: control terminal receive start synchronizing signal after, by communication channel to all collection terminals send itself when
Between label t1[1];
Step 3: all collection terminals receive the time tag t of control terminal1When [1], an its temporal label t is produced2
[1], and to control terminal t is returned1[1], t2[1];
Step 4: control terminal records t1[1] and t2[1], control terminal when and record receives collection terminal turn around time label
Time tag t3[1];
Step 5: repeat step two to four n times, obtains array t1[n], t2[n], t3[n];
Step 6: to array t1[n]、t2[n]、t3[n] carries out data cleansing, rejecting abnormalities value;
Step 7: seek the average t of each array after cleaning1, t2, t3;
Step 8: the difference DELTA t=(t of each collection terminal and control terminal time shaft are tried to achieve respectively2-t1)-(t3-t1)/2;
Step 9: each collection terminal according to difference DELTA t by local system time-triggered protocol into the time synchronous with control terminal.
A kind of structure health monitoring method based on smart mobile phone, including:
Step 1: using foregoing method for synchronizing time using as the mobile phone of control terminal and several as collection terminal
Mobile phone carries out time synchronized;
Step 2: the mobile phone as collection terminal is positioned on civil structure to be measured;
Step 3: control terminal sends data acquisition signal to collection terminal, makes collection according to the start recording order received
End gathers the acceleration transducer data of itself, and on the basis of control terminal time shaft, is passed every unit interval record acceleration
Sensor data, form data file;
Step 4: after default timing terminates or stopped manually, terminate collection;
Step 5: after terminating collection, respective data file is sent to control terminal by all collection terminals.
Beneficial effects of the present invention are:1st, the IP that itself wireless local area network (WLAN) system distributes to collection terminal is read by control terminal
Location, the Socket Server of the corresponding multiple Socket Client active call collection terminals of structure, establishes Socket connections, changes
One multiple Socket Client of Socket Server connections of tradition AD HOC;2nd, non-real time operating system is being carried
Smart mobile phone between realize high-precision time synchronized so that the obtained result of monitoring analysis is more accurate, obtained mode inspection
Survey and the analysis result reliability of non-destructive tests is higher;3rd, transmitted between control terminal and collection terminal by Socket connections mutual
Time tag, obtain each equipment time shaft, this process is carried out it is multiple, and time tag is carried out normal approach, data cleansing,
The specific algorithm process such as error concealment, makes whole network possess high-precision unified time.
Brief description of the drawings
Fig. 1 is the flow chart of the method for synchronizing time based on smart mobile phone of the present invention;
Fig. 2 is the time tag t of the present invention1、t2Collection and delay Analysis schematic diagram;
Fig. 3 is the time tag t of the present invention3Collection and delay Analysis schematic diagram;
Fig. 4 is the flow chart of the structure health monitoring method based on smart mobile phone of the present invention;
Fig. 5 is the surface chart of the one embodiment for the data file that control terminal receives.
Embodiment
Embodiment one:The communication port construction method based on smart mobile phone WLAN of present embodiment,
Including:
If Step 1: preparing cadre's smart mobile phone, one builds WLAN, other are used as and adopted as control terminal
Collect end, connect the WLAN;
Step 2: collection terminal opens particular port, Socket Client are waited to be connected with Socket Server identity
Connect;
Step 3: reading linux kernel/proc/net/arp catalogues, acquisition, which is connected to control terminal WLAN, owns
The IP address of collection terminal, and build the Socket Client of corresponding number, respectively with the Socket in each collection terminal
Server connections, build complete Socket communication ports.
Embodiment two:Present embodiment is unlike embodiment one:In step 3, if control terminal
All-network connection is actively disconnected, then repeats step 3 and re-establishes connection;If collection terminal loses the company with control terminal
Connect, repeat step two and step 3 re-establish the connection with control terminal.
Other steps and parameter are identical with embodiment one.
Embodiment three:The method for synchronizing time based on smart mobile phone WLAN of present embodiment, such as Fig. 1
It is shown, including:
Step 1: built using the method as described in embodiment one or two between control terminal and each collection terminal
Communication port;
Step 2: control terminal receive start synchronizing signal after, by communication channel to all collection terminals send itself when
Between label t1[1]。
Step 3: collection terminal receives the time tag t of control terminal1When [1], an its temporal label t is produced2[1]。
Step 4: control terminal records t1[1] and t2[1], control terminal when and record receives collection terminal turn around time label
Time tag t3[1]。
Step 5: repeat step two to four n times, obtains array t1[n], t2[n], t3[n]。
Step 6: to array t1[n]、t2[n]、t3[n] carries out data cleansing, rejecting abnormalities value.
Step 7: seek the average t of each array after cleaning1, t2, t3。
Step 8: the difference DELTA t=(t of each collection terminal and control terminal time shaft are tried to achieve respectively2-t1)-(t3-t1)/2。
Step 9: each collection terminal according to difference DELTA t by local system time-triggered protocol into the time synchronous with control terminal.
The Computing Principle of client and service end time shaft difference is specifically described below:
Time tag is sent to the process of collection terminal as illustrated in fig. 2, it is assumed that when control terminal is with a certain collection terminal from control terminal
The true difference of countershaft is Δ t, and it sends its temporal label t to this collection terminal after receiving lock in time order1, in time tag
In transmission process, the delay of control terminal signal from handling to sending is Δ t1, network delay is Δ t2, collection terminal is from receiving signal
It is Δ t to the delay handled3, then collection terminal is by its temporal t at that moment after processing2The time sent with control terminal
Label relatively obtains Δ t ' afterwards, has
Δ t '=t2-t1 (2-1)
Δ t '=Δ t1+Δt2+Δt3+Δt (2-2)
After the completion of collection terminal processing, to control terminal turnaround time label information, in time tag information Recovery Process, adopt
Integrate the delay of end signal from handling to sending as Δ t4, network delay is Δ t5, control terminal prolongs from signal is received to what is handled
When be Δ t6, then control terminal is by its temporal t at that moment after processing3With t1Δ t " can be obtained by comparing, and be had
Δ t "=t3-t1 (2-3)
Δ t "=Δ t1+Δt2+Δt3+Δt4+Δt5+Δt6 (2-4)
Information two-way process, path is identical, therefore can consider
Δt1+Δt2+Δt3=Δ t4+Δt5+Δt6 (2-5)
It can be obtained by formula 2-4 and formula 2-5
(the Δ t of Δ t "=21+Δt2+Δt3) (2-6)
Δ t can be eliminated by formula 2-1,2-2,2-3,2-61+Δt2+Δt3, Δ t ', Δ t ", obtain
Δ t=(t2-t1)-(t3-t1)/2 (2-7)
Embodiment four:Present embodiment is unlike embodiment three:Step 6 is specially:
Step 6 one, seek array t1The average value of [n]Wherein N is array t1The time marks in [n]
The number of label;t1iRepresent array t1I-th of time tag in [n].
Step 6 two, seek array t1The standard deviation sigma of [n]:
Step 6 three, judged, ifThen retain t1i;Otherwise by t1iFrom array t1
Rejected in [n].
Step 6 four, to array t1Each time tag in [n] performs step 6 three, the array t after being cleaned1
[n]。
Step 6 five, to array t2[n]、t3[n] performs step 6 one to step 6 four, the array t after being cleaned2[n]
With array t3[n]。
Other steps and parameter are identical with embodiment three.
Embodiment five:Present embodiment provides a kind of structure health monitoring method based on smart mobile phone, such as Fig. 4
It is shown, including:
Step 1: method as described in any one in embodiment three or four is used using as the mobile phone of control terminal
And several carry out time synchronized as the mobile phone of collection terminal;
Step 2: the mobile phone as collection terminal is positioned on civil structure to be monitored;
Step 3: control terminal sends data acquisition signal to collection terminal, makes collection according to the start recording order received
End gathers the acceleration transducer data of itself, and on the basis of control terminal time shaft, is passed every unit interval record acceleration
Sensor data, form data file;
Step 4: after default timing terminates or stopped manually, terminate collection;
Step 5: after terminating collection, respective data file is sent to control terminal by all collection terminals.
For example, operating personnel first synchronize the time of each mobile phone, i.e., on the basis of control terminal mobile phone, remaining is made
Synchronized for the mobile phone of collection terminal.Then the mobile phone as collection terminal is positioned in structure to be monitored, and operational control
End, makes control terminal send signal to collection terminal, and collection terminal sets collection acceleration sensing according to control terminal upon receipt of the signals
Device data.Data acquisition is terminated using timer timing or terminates to be used as end point manually.After collection terminates, collection terminal will be adopted
The data collected are sent to control terminal.After control terminal receives data, data are arranged and shown, specific interface is as schemed
Shown in 5.Wherein data file shares 4 row, and A is classified as the time-histories information on the basis of control terminal time shaft, and B, C, D row are respectively this
Acceleration information on this each axial direction of collection terminal acceleration transducer of moment.
The present invention can also have other various embodiments, in the case of without departing substantially from spirit of the invention and its essence, this area
Technical staff works as can make various corresponding changes and deformation according to the present invention, but these corresponding changes and deformation should all belong to
The protection domain of appended claims of the invention.