CN101369149A - Livestock and poultry facility cultivation surroundings monitoring method - Google Patents

Livestock and poultry facility cultivation surroundings monitoring method Download PDF

Info

Publication number
CN101369149A
CN101369149A CNA2008101966080A CN200810196608A CN101369149A CN 101369149 A CN101369149 A CN 101369149A CN A2008101966080 A CNA2008101966080 A CN A2008101966080A CN 200810196608 A CN200810196608 A CN 200810196608A CN 101369149 A CN101369149 A CN 101369149A
Authority
CN
China
Prior art keywords
data
node
packet
network
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2008101966080A
Other languages
Chinese (zh)
Other versions
CN101369149B (en
Inventor
陈俊杰
郝永志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN2008101966080A priority Critical patent/CN101369149B/en
Publication of CN101369149A publication Critical patent/CN101369149A/en
Application granted granted Critical
Publication of CN101369149B publication Critical patent/CN101369149B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed is a culture environment monitoring method of a livestock facility, comprising the following steps: sensing nodes collect environmental parameter information in real time, control nodes collect running state information of a controlled device, and the information is transmitted through other sensing nodes or control nodes by a multi-hop mode, and monitoring data are processed by a plurality of nodes in the transmitting process and are routed to a base station and a monitoring site by the multi-hop mode; and the base station receives the environmental parameter information and the running state information of the controlled device transmitted by the sensing nodes and the control nodes through a communication module, a computation module is in serial communication with the communication module to obtain physical quantity data of various parameters. The base station transmits the physical quantity data to the monitoring site through serial ports on the one hand, and a user interface displays environmental data and the state of the controlled device; and on the other hand, the base station obtains a control command through the physical quantity data of the parameters and a control algorithm, and the control command is transmitted to the control nodes for controlling the controlled device by the multi-hop mode, so as to reach the purpose of environment monitoring.

Description

A kind of livestock and poultry facility cultivation surroundings monitoring method
Technical field
The present invention relates to a kind of environment control method, belong to livestock and poultry facility cultivation surroundings monitoring field, particularly a kind of method that realizes the wireless sensor network monitoring based on wireless communication mode.
Background technology
At present, domestic monitoring means to livestock and poultry facility cultivation environment mainly is to carry out artificial observation by breed personnel's experience, adopts Hygrothermograph to carry out manual measurement once in a while, thereby lacks due science.2004, domestic the equipment that first employing has line method monitoring plant facilities to breed and growing environment appearred, obtained certain effect, but this equipment lacks control function.Within the specific limits and can be used for the monitoring of livestock and poultry facility cultivation environment to a certain extent but from application value and development in future widely, mainly there is the problem of following several aspects in it:
(1) system's investment is big, cost is high, the ratio of performance to price is low.
(2) the cable reusability of system is low, complicacy is high, thereby the failure rate height of system, is not easy to safeguard.
(3) extendability of system is poor, makes the monitoring capacity less relatively, and particularly needing after its monitoring system has installed increases under the situation of monitored area, not only needs software, and need do bigger change to hardware, even need re-design.
Thereby, the existing method and apparatus that can be used for the environmental monitoring of livestock and poultry facility cultivation can not adapt to the present situation requirement, is not easy to large-area applying, and more can not satisfy the development in future demand, and on the purpose of livestock and poultry facility cultivation environmental monitoring, system does not possess automatic control function.Therefore, the present invention proposes to adopt wireless sensor network that livestock and poultry facility cultivation environment is monitored and controlled, and effective monitoring and reliable control by the method for software control realizes monitoring environment can overcome the problem that exists in this respect at present.
Summary of the invention,
Technical matters:
The purpose of this invention is to provide a kind of livestock and poultry facility cultivation surroundings monitoring method that adopts wireless sensor network technology.Lay a large amount of cables when it need not in the monitored area greatly, system's cost of investment and operating cost are low, and node is convenient for installation and maintenance, and extendability is strong, and the scene of using is not had special requirement, thereby the system performance price is than high.Owing to adopt wireless transmission method, based on specific operating system and reliable software design, system failure rate is low, reliability is high.
Technical scheme:
A kind of method for supervising of livestock and poultry facility cultivation environment comprises sensing node, Control Node, base station and monitoring station in the supervisory system of its realization, the function of each several part mainly is:
The parameter information of the acquisition monitoring environment that sensing node is real-time transmits by other sensing node or Control Node multi-hop ground, and Monitoring Data is arrived the base station by a plurality of node processing through the multi-hop route in transmission course, arrives monitoring station at last.
Control Node obtains the control data bag of base station by the mode of network multi-hop, drives the start and stop of controlled device, and again with the state of the controlled device of its acquisition, the mode by multi-hop passes back to the base station, finally shows at monitoring station;
The parameter information of the monitoring environment that sensing node and Control Node transmit is received by communication module in the base station, and computing module is handled the raw data that network node is gathered, and obtains the physical quantity data of various parameters.
The base station is on the one hand mail to PC as monitoring station, user interface display environment data in the PC and controlled device state to the physical quantity data by serial ports; Physical quantity data and the control algolithm controlled order of base station by parameter on the other hand, the mode by multi-hop mails to Control Node controls controlled device, reaches the purpose of monitoring environment.
This method for supervising comprises the following steps:
1.1. network node (comprising sensing node and Control Node) power-up initializing;
1.2. system's pretrigger packet is sent in the base station, and open system starts timer;
1.3. network node is received system's pretrigger packet, carries out in two kinds of situation thereafter:
1.3.1. sensing node is transmitted this packet, going on the air and receive the route bag in dormancy identification position 0, sets up dynamic routing;
1.3.2. Control Node is transmitted this packet, goes on the air and receives the route bag, sets up dynamic routing;
1.4. if system start-up timer setting-up time arrives, the system start-up packet is sent in the base station, opens the Network Synchronization timer;
If system start-up timer setting-up time does not arrive, this timer setting-up time is continued to wait in the base station;
1.5. network node is received the log-on data bag, carries out in two kinds of situation thereafter:
1.5.1. the zero clearing of sensing node data transmitting counter, dormancy identification position 1, dormancy after the expression data send and finish according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.5.2. Control Node according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.6. the network node starting condition is set and is finished, and divides four kinds of situations to carry out thereafter:
1.6.1. if sensing node Network Synchronization timer setting-up time does not arrive, sensing node is waited for Network Synchronization timer setting-up time;
1.6.2. if sensing node Network Synchronization timer setting-up time arrives, sensing node is gathered environmental parameter information on the one hand, selects best route, sends data; Open the Network Synchronization timer on the other hand once more;
1.6.3., wait for Network Synchronization timer setting-up time if Control Node Network Synchronization timer setting-up time does not arrive;
1.6.4. if Control Node Network Synchronization timer setting-up time arrives, Control Node is the status data of acquisition controlling equipment on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
1.7. if the network node data transmission is received reply, data send number of times and add 1, upgrade route;
If the network node data transmission is received do not reply, it is inferior that data re-transmitting surpasses k (3≤k≤10), sends failure, and data send number of times and add 1, the renewal route, and sensing node carries out 1.8 downwards, and Control Node forwards 1.10 to;
1.8. if the sensing node data send number of times less than q (30≤q≤720), then start dormancy and prepare timer, carry out 1.9 downwards;
Surpass q if the sensing node data send number of times, waiting system pretrigger packet forwards 1.3 to;
Arrive 1.9. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
1.9.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0 forwards 1.4 to;
1.9.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1, at this moment, set handling device unit is a dormant state, wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, and sensing node is waited for Network Synchronization timer setting-up time, forwards 1.6.2 to;
1.10. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
1.10.1. if Control Node is received system's pretrigger packet, transmit this packet, forward 1.4 to;
1.10.2., forward 1.6.4 to if Control Node is not received system's pretrigger packet;
1.11 the base station receives data, if the Network Synchronization timer time does not arrive, continues to receive data; If the Network Synchronization timer time arrives, the beginning deal with data is also opened the Network Synchronization timer once more; Thereafter, on the one hand data result is sent to monitoring station, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, Control Node is received this packet, and its controlled device is done corresponding start stop operation;
If the base station data number of processes greater than q, then forwards 1.2 to, otherwise, this step still carried out.
Described sensing node comprises the 1st processor unit and the 1st wireless transmit/receive units that is connected with the 1st processor unit, the 1st memory cell, the 1st debugging and communication interface, the 1st power supply unit, sensor unit and sensor electrical source unit, and sensor unit is connected by the I2C bus with the 1st processor unit.Described sensing node is equipped with sensors such as temperature, humidity, illumination, ammonia, is used for the parameter information of real-time acquisition monitoring environment.
Described Control Node comprises the 2nd processor unit and the 2nd wireless transmit/receive units that is connected with the 2nd processor unit, the 2nd memory cell, the 2nd debugging and communication interface, the 2nd power supply unit, controller unit and controller power source unit.
Described base station comprises communication module and computing module.Be provided with the 3rd processor unit and the 3rd wireless transmit/receive units that is connected with the 3rd processor unit, the 3rd memory cell, the 3rd debugging and communication interface and the 3rd power supply unit in the described communication module.Be provided with the 4th processor unit and the 4th debugging that is connected with the 4th processor unit and communication interface, the 4th memory cell, PC interface unit and the 4th power supply unit in the described computing module.Communication module is connected by serial ports with computing module.
Described controlled device is meant that air exhauster, daylight lamp and the cascade installed in the livestock and poultry facility cultivation environment are with equipment relevant with breeding environment such as water pumps.
In the above-mentioned method for supervising, the workflow of described sensing node more specifically comprises the following steps:
2.1. its wireless transmit/receive units of sensing node power-up initializing, its sensor unit of power-up initializing, waiting system pretrigger packet;
2.2. sensing node is received system's pretrigger packet, transmits this packet, dormancy identification position 0 sends the route bag, sets up dynamic routing;
2.3. sensing node is received the system start-up packet, transmits this packet, and stops to send the route bag, dormancy identification position 1, and promptly send to finish can dormancy for data;
2.4. sensing node is according to system start-up packet setting network synchronous condition;
2.5. sensing node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (being 5~10 milliseconds);
2.6. sensing node starts the Network Synchronization timer;
2.7. sensing node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
2.7.1., wait for Network Synchronization timer setting-up time if sensing node Network Synchronization timer setting-up time does not arrive;
2.7.2. if sensing node Network Synchronization timer setting-up time arrives, its sensor acquisition environmental data is opened the Network Synchronization timer on the other hand once more on the one hand;
2.8. after environmental data collecting was finished, the sensing node log-on data sent task, selected best route to send data;
2.9. if the transmission of sensing node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of sensing node data is received do not reply, data re-transmitting surpasses k time, sends failure, and data send number of times and add 1, the renewal route;
2.10., then start dormancy and prepare timer if the sensing node data send number of times less than q, carry out 2.11 downwards,
Surpass q if the sensing node data send number of times, waiting system pretrigger packet forwards 2.2 to,
Arrive 2.11. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
2.11.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0, waiting system log-on data bag sends the route bag, sets up dynamic routing, forwards 2.3 to;
2.11.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1.At this moment, set handling device unit is a dormant state, and wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, and sensing node wait Network Synchronization timer setting-up time, forwards 2.7.2 to.
In the above-mentioned steps, the packet that in running order sensing node, its wireless transmit/receive units can other network nodes of interrupt response, asynchronous receiving after the packet selected best routing forwarding data.
In the above-mentioned method for supervising, the workflow of Control Node more specifically comprises the following steps:
3.1. its wireless transmit/receive units of Control Node power-up initializing, power-up initializing controller unit, waiting system pretrigger packet;
3.2. Control Node is received system's pretrigger packet, transmits this packet, sends the route bag, sets up dynamic routing, and waiting system log-on data bag;
3.3. Control Node is received the system start-up packet, transmits this packet, and stops to send the route bag;
3.4. Control Node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (5~10 milliseconds);
3.5. Control Node starts the Network Synchronization timer;
3.6. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
3.6.1. if Control Node Network Synchronization timer setting-up time does not arrive, Control Node is waited for Network Synchronization timer setting-up time;
3.6.2. if Network Synchronization timer setting-up time arrives, Control Node is gathered the status data of controlled device on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
3.7. if the transmission of Control Node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of Control Node data is received do not reply, data re-transmitting surpasses k time, sends failure, and data send number of times and add 1, the renewal route;
3.8. Control Node is waited for Network Synchronization timer setting-up time, therebetween:
If Control Node is received system's pretrigger packet, transmit this packet, and send the route bag, set up dynamic routing, waiting system log-on data bag forwards 3.3 to;
If Control Node is not received system's pretrigger packet, forward 3.6 to;
Control Node is cable power power supply, and is in running order always after initial work is finished, the packet that its wireless transmit/receive units can other network nodes of interrupt response, and asynchronous receiving after the packet selects best number of routes to transmit certificate.If receive the control data bag of broadcasting, according to the start and stop of packet control controlled device.
Above-mentioned set up dynamic routing or upgrade the step of route as follows:
4.1. it is infinitely great that the initial value of the minimum hop count that arrives the base station is set in network node data initialization, network node, the minimum hop count that the base station arrives the base station is 0, and route set and candidate collection are empty, and the priority number of route set is 1;
4.2. network node is received the route bag, upgrades the minimum hop count n of local node to the base station, update rule is: if receive that the minimum hop count of route bag is m, then local node is m+1 to the minimum hop count of base station;
4.3. network node is set route set and candidate collection, it is all nodes of n-1 that route set is included in the base station jumping figure, and candidate collection is all nodes of n-2 for being included in the base station jumping figure, and the n local node is to the minimum hop count of base station;
4.4. if route set is not empty, network node is chosen the node of priority number minimum as best routing nodes;
If route set is empty, it is route set that network node is set candidate collection, and the node of choosing the priority number minimum is as best routing nodes, and the emissive power of increase wireless transmit/receive units;
4.5. network node is adjusted route set interior nodes priority: reply if the data transmission is received, the priority number of this node adds 1, if data send do not receive reply, the data re-transmitting number of times surpasses k time, then this node is deleted from set, do not surpass k time, then the priority number of this node adds 1.
The transmission of described base station data and reception more specifically comprise the following steps:
5.1. computing module sends the pretrigger packet;
5.2. communication module is replied, and broadcast system pretrigger packet, computing module is opened the network startup timer, and sends the route bag;
5.3. route data packets is replied and broadcasted to communication module;
5.4. the network startup timer setting-up time of computing module arrives, transmitting system log-on data bag, and computing module starts Network Synchronization timer, the zero clearing of data processing number of times;
5.5. communication module is replied and broadcast system log-on data bag, waits for receiving data, and starts the serial data transmission timer;
5.6. communication module is received sensing data bag or supervision packet, inserts the Data Receiving linear list;
5.7. if serial data transmission timer setting-up time arrives, communication module sends data to computing module on the one hand, is empty up to linear list, opens the serial data transmission timer on the other hand once more, carries out 5.8 downwards;
If serial data transmission timer setting-up time arrives, communication module continues to carry out 5.6;
5.8. computing module is replied packet, communication module deletes corresponding packet to be sent according to replying from the Data Receiving linear list, is empty up to linear list;
5.9. Network Synchronization timer setting-up time arrives, computing module sends to monitoring station with data result on the one hand, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, communication module produces and replys, and open the Network Synchronization timer once more, carry out 5.10 downwards;
5.10. computing module judges whether the Network Synchronization condition satisfies: if the data processing number of times greater than 60, forwards 5.1 to, otherwise wait for the serial data of communication module, forward 5.8 to.
The data that network node sends to the base station are called upstream data, and the data that the base station sends to network node are called downlink data.Upstream data adopts the routing forwarding pattern, and downlink data adopts broadcast mode.
Communication module and computing module operation identical operations system or different operating system.
Above-mentioned control algolithm comprises the following steps:
6.1. the base station obtains the sensor node number that temperature, humidity, intensity of illumination, ammonia concentration value and the actual reception of network node arrive, and obtains extraction fan, the daylight lamp state of unlatching;
6.2. arithmetic mean is asked with the temperature, humidity, intensity of illumination and the ammonia concentration value that obtain in the base station;
6.3., carry out 6.4 downwards, otherwise forward 6.6 to if all fans all are in closed condition;
6.4. if medial temperature is less than T 5℃, and medial humidity greater than b% (50≤b≤95) or ammonia concentration greater than c (10≤c≤40) ppm, carry out 6.5 downwards, otherwise forward 6.8 to;
6.5. if medial temperature is less than T 1℃, n 1(n 1Being positive integer) the fan opening time is p 1Minute, forward 6.9 to;
If medial temperature T 2~T 3℃, n 1The fan opening time is p 2Minute, forward 6.9 to;
If medial temperature T 4~T 5℃, n 1The fan opening time is p 3Minute, forward 6.9 to;
6.6. if n 1Individual fan is in opening and the opening time is 0, carries out 6.7 downwards, if the opening time is not 0, forwards 6.8 to;
If it is n that fan is opened number 2Or n 3Or n 4, forward 6.8 to;
6.7. if timing equals the opening time, then close fan, the opening time puts 0, forwards 6.9 to; Otherwise directly forward 6.9 to;
6.8. if medial temperature is less than T 5℃, then close all fans;
If medial temperature T 6~T 7℃, then open n 1Individual fan;
If medial temperature T 8~T 9℃, then open n 2(n 2Be positive integer) individual fan;
If medial temperature T 10~T 11℃, then open n 3(n 3Be positive integer) individual fan;
If medial temperature is greater than T 12℃, then open n 4(n 4Be positive integer) individual fan;
6.9. if the time is less than t 1Or greater than t 4, close all daylight lamps, forward 6.1 to;
If time t 1To t 2Or t 3To t 4, open all daylight lamps, forward 6.1 to;
If other carry out 6.10 downwards;
6.10. if daylight lamp leaves and average intensity of illumination greater than a 1(50≤a 1≤ 80) Lux closes all daylight lamps, forwards 6.1 to;
If daylight lamp leaves and average intensity of illumination less than a 2(10≤a 2≤ 40) Lux opens all daylight lamps, forwards 6.1 to.
Beneficial effect:
1. used time synchronized mechanism among the present invention, time synchronized mechanism is as a kind of support technology of network,, TDMA energy-conservation for the dormancy of network node and CSMA strides layer design and collaborative work provides prerequisite.The time synchronized mechanism of using among the present invention realizes simply effectively processor not being had specific (special) requirements, is fit to very much the low wireless sensor network node of processing power.
2. sensing node miniature embedded system normally, its processing power, storage capacity and communication capacity relative a little less than, by carrying the powered battery of finite energy, its certain applications zone even personnel can not arrive, therefore to come makeup energy by the mode of changing battery be unpractical to sensing node, and how efficiently using energy to come maximization network life cycle is the overriding challenge that sensor network faces.We know most energy consumptions of sensing node in radio communication, and data transmission, Data Receiving and data are intercepted process lot of energy consumption.The present invention is provided with the dormancy mechanism based on time synchronized, under the prerequisite that can guarantee the network node collaborative work, and the energy loss of greatly possible saving network node.
3. the MAC agreement of using among the present invention is based on the carrier sense multiple access protocol (CSMA) of competition, though the appearance that the design of CSMA agreement avoids conflict as far as possible, but in real world applications, the wireless signal conflict is inevitably, and the data re-transmitting that will carry out owing to the wireless signal conflict also consumes lot of energy.This paper has designed based on the TDMA of time synchronized and CSMA co-design, by choosing the rational Network Synchronization factor, can be good at avoiding the conflict of wireless signal, from concrete enforcement hereinafter also as can be seen, the realization of this mechanism can be good at solving to the Network Packet Loss problem.
4. be provided with effective acknowledgement mechanism among the present invention, realize reliable wireless communication.From saving the angle of energy and the operating load that reduces network node, acknowledgement mechanism is more reasonable effectively from bottom layer realization.For communicating by letter of communication module in the base station and computing module, be provided with asynchronous acknowledgement mechanism.Generally, the performance of communication module and computing module has difference, also may move different operating system, be provided with asynchronous acknowledgement mechanism can simple and effective realization the two reliable communication.The acknowledgement mechanism of this paper except having realized reliable network service, and realizes providing the foundation for method for routing.The realization of routing mechanism depends on the realization of acknowledgement mechanism, and its realization mechanism comprises the deletion of route set element, and the renewal of route set.
5. the routing mechanism of using among the present invention has very strong application correlativity, and principle of design meets the application oriented characteristics of wireless sensor network.The transmission of data has designed two kinds of patterns: routing forwarding pattern and broadcast mode.According to data flow, be divided into upstream data and downlink data.The data that network node mails to the base station direction are called upstream data, and the data that the network node direction is mail in the base station are called downlink data.Upstream data transmission frequency and data volume are bigger, from the angle that energy consumption is saved, select the routing forwarding pattern.Downlink data comprises log-on data bag and control data bag, and the reliability requirement of downlink data is very high usually, and transmission frequency is less, applying broadcasting pattern in invention.Routing algorithm of the present invention is provided with repeatedly the mechanism that route sends, and can effectively guarantee the reliable transmission of data, even under the situation that individual nodes lost efficacy, still can guarantee the reliable transmission of packet.Under a few cases, because its routing algorithm is provided with alternative route set, even the node around its network node had all lost efficacy, the transmitted power of the wireless signal of its node scalable own still can guarantee the reliable transmission of data.
6. the design of network double starting realizes.
Because it is asynchronous with the base station power-on time that network node powers on, the Initiated Mechanism of system need be set, this is the prerequisite that sensing node dormancy mechanism and network node collaborative work realize.Secondly, because objective factor or human factor may cause power-off of base station, this moment, battery-powered sensing node still moved, and base station and network node are no longer synchronous like this, and the double starting mechanism that network is set among the present invention can address this problem effectively.
7. the real-time setting of parameter.
The base station is provided with the Network Synchronization timer, status information that can tracker, the i.e. in running order still dormant state of sensing node in the system.By status tracking, can determine to send the best time of command packet, therefore can realize the more new settings of network node parameter easily.
Description of drawings
Fig. 1 is based on the livestock and poultry facility cultivation surroundings monitoring system chart of WSN
Fig. 2 is the sensing node structural drawing
Fig. 3 is the Control Node structural drawing
Fig. 4 is architecture of base station figure
Fig. 5 is the sensor network protocol stack
Fig. 6 is the main program flow chart of method for supervising of the present invention
Fig. 7 is base station communication module and computing module signal procedure process flow diagram
Fig. 8 is the program flow diagram of sensing node
Fig. 9 is the program flow diagram of Control Node
Figure 10 is that dynamic routing is set up or the renewal process flow diagram
Figure 11 is the control algolithm process flow diagram
Embodiment
As shown in Figure 1, the livestock and poultry facility cultivation surroundings monitoring system based on WSN comprises sensing node 1, Control Node 2, base station 3 and monitoring station 4.Sensing node 1 passes through the periodically parameter information of acquisition monitoring environment of sensor unit; Control Node 2 is monitored the controlled device state by the control data bag that wireless transmit/receive units 2-1 receives the base station in real time by controller unit 2-2; Base station 3 is by the data message of wireless transmit/receive units 3-1 reception sensing node 1 and Control Node 2 transmission environment, and the computing module 3-2 of base station handles data, and the result is mail to monitoring station 4 and demonstration.The base station is according to The results of data processing and control algolithm, by the network route send the control data bag to Control Node to reach the purpose of monitoring environment.
As shown in Figure 2, sensing node is mainly under the control of the 1st processor unit, periodically gather the parameter information of environment by sensor unit, realize the asynchronous receiving-transmitting of data by the 1st wireless transmit/receive units, ephemeral data is stored in the 1st memory cell, the 1st debugging and communication interface make things convenient for the debugging of program, and the sensor electrical source unit provides power supply for sensor unit, and the 1st power supply unit provides power supply for the sensor node except that sensor unit.
As shown in Figure 3, Control Node is mainly under the control of the 2nd processor unit, periodically gather the parameter information of controlled device by controller unit, realize the asynchronous receiving-transmitting of data by the 2nd wireless transmit/receive units, ephemeral data is stored in the 2nd memory cell, the 2nd debugging and communication interface make things convenient for the debugging of program, and the 2nd power supply unit provides power supply for this Control Node, and the controller power source unit provides power supply for controller unit.
As shown in Figure 4, communication module and computing module are realized comprising in the base station.Communication module is made up of the 3rd processor unit, the 3rd wireless transmit/receive units, the 3rd memory cell, the 3rd debugging and communication interface and the 3rd power supply unit.Computing module is made up of the 4th processor unit, the 4th memory cell, PC interface unit, the 4th debugging and communication interface and the 4th power supply unit.Communication module is connected by serial ports with computing module.The 3rd processor is a communication processor, and under the control of the 3rd processor, the asynchronous reception of the 3rd wireless transmit/receive units sends data, and the 3rd power supply unit provides power supply for communication module.The 4th processor is an arithmetic processor, be responsible for that operation of data is handled and with the communicating by letter of monitoring station, the 4th processor unit is realized control algolithm, and sends the control data bag.The 4th debugging and communication interface make things convenient for the debugging of program, and the 4th power supply unit provides power supply for computing module.
As shown in Figure 5, the sensor network protocol stack mainly comprises Physical layer, data link layer, network layer (mainly realizing routing function) and application layer.The data that time synchronized depends on data link layer to be provided insert and the data framing service.Time synchronized provides service for the application of whole network.Based on time synchronized, the various application services such as collaborative work that the real-time setting of parameter, the dormancy of sensing node are energy-conservation, TDMA and CSMA stride layer design and network node can effectively realize.
Embodiment 1
All nodes (comprising sensing node, Control Node and base station) of livestock and poultry facility cultivation surroundings monitoring system as shown in Figure 1 power on and carry out initialization.Its wireless transmit/receive units of sensing node initialization makes it be in the message pick-up state; The initialization sensing unit, the preparation for acquiring data.Its wireless transmit/receive units of Control Node initialization makes it be in the message pick-up state, initialization controller, the start and stop of the status data of preparation for acquiring controlled device and control controlled device.Initialization its wireless transmit/receive units in base station is prepared start-up system.
As shown in Figure 6, this method for supervising comprises the following steps:
1.1. network node power-up initializing;
1.2. system's pretrigger packet is sent in the base station, and open system starts timer;
1.3. network node is received system's pretrigger packet, carries out in two kinds of situation thereafter:
1.3.1. sensing node is transmitted this packet, going on the air and receive the route bag in dormancy identification position 0, sets up dynamic route;
1.3.2. Control Node is transmitted this packet, goes on the air and receives the route bag, sets up dynamic route;
1.4. if system start-up timer setting-up time arrives, the system start-up packet is sent in the base station, opens the Network Synchronization timer;
If system start-up timer setting-up time does not arrive, this timer setting-up time is continued to wait in the base station;
1.5. network node is received the log-on data bag, carries out in two kinds of situation thereafter:
1.5.1. the zero clearing of sensing node data transmitting counter, dormancy identification position 1, dormancy after the expression data send and finish according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.5.2. Control Node according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.6. the network node starting condition is set and is finished, and divides four kinds of situations to carry out thereafter:
1.6.1. if sensing node Network Synchronization timer setting-up time does not arrive, sensing node is waited for Network Synchronization timer setting-up time;
1.6.2. if sensing node Network Synchronization timer setting-up time arrives, sensing node is the parameter information of acquisition monitoring environment on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
1.6.3., wait for Network Synchronization timer setting-up time if Control Node Network Synchronization timer setting-up time does not arrive;
1.6.4. if Control Node Network Synchronization timer setting-up time arrives, Control Node is the status data of acquisition controlling equipment on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
1.7. if the network node data transmission is received reply, data send number of times and add 1, upgrade route;
If the network node data transmission is received do not reply, data re-transmitting surpasses 3 times, sends failure, and data send number of times and add 1, the renewal route, and sensing node carries out 1.8 downwards, and Control Node forwards 1.10 to;
1.8. if the sensing node data send number of times less than 60, then start dormancy and prepare timer, carry out 1.9 downwards;
Surpass 60 if the sensing node data send number of times, waiting system pretrigger packet forwards 1.3 to;
Arrive 1.9. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
1.9.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0 forwards 1.4 to;
1.9.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1, at this moment, set handling device unit is a dormant state, the closure sensor module is closed radio receiving transmitting module, makes sensing node be in low power consumpting state, and sensing node is waited for Network Synchronization timer setting-up time, forwards 1.6.2 to;
1.10. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
1.10.1. if Control Node is received system's pretrigger packet, transmit this packet, forward 1.4 to;
1.10.2., forward 1.6.4 to if Control Node is not received system's pretrigger packet;
1.11. the base station receives data, if the Network Synchronization timer time does not arrive, continues to receive data; If the Network Synchronization timer time arrives, the beginning deal with data is also opened the Network Synchronization timer once more, on the one hand data result sent to monitoring station thereafter, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, Control Node is received this packet, and its controlled device is done corresponding start stop operation;
If the base station data number of processes greater than 60, then forwards 1.2 to, otherwise, this step still carried out.
Send the data that arrive the base station and be called upstream data, the data that the base station sends are called downlink data.Upstream data adopts the routing forwarding pattern, and downlink data adopts broadcast mode.
The cycle that the system start-up timer is set usually should be the maximal value of Network Synchronization timer cycle, because the computing module of base station sends system's pretrigger packet earlier, open system starts timer then, and system start-up timer setting-up time arrives, and computing module sends the system start-up packet.Make Network Synchronization, node cooperative work, therefore the state that must all nodes all receives in ready preparation sets this timer cycle calcaneus rete network synchro timer cycle unanimity.Communication module is received system's pretrigger packet and the system start-up packet that computing module sends, and produces the reply data bag, and broadcasts this two kinds of packets.Table 1 is system's pretrigger packet, system start-up packet and route data packet format: wherein type of data packet is that 0x01 represents system's pretrigger packet, and 0x02 represents the log-on data bag, and 0x03 represents route data packets.
The form of table 1 system pretrigger packet, system start-up packet and route bag
Sequence number Field name Field length Explanation
1 Source address 2?byte Identification data sending node id
2 Destination address 2?byte 0xFFFF represents broadcast address
3 The bag type 1?byte Sign bag type (0x01,0x02,0x03)
4 Jumping figure 1?byte 0x00
5 Lifetime 1?byte Produce a random number
6 CRC check 2?byte 1,2,3,4,5 field data verifications
Sensing node and control node are received after the pretrigger packet zero clearing of sensing node data transmitting counter, and the route data packets of going on the air, the dormancy identification position 0 of sensing node.The list item of packet mainly comprises source node that sends data and the jumping figure information that arrives the base station.Route data packets is mainly used in the initialization of route implementing, sets up dynamic routing table, prepares for sending data.
In total system, the every packet that will broadcast all has a field, is exactly the lifetime.Lifetime guarantees that each packet only is broadcasted once, and adjacent a period of time, node receives that the packet of identical lifetime will ignore.So just can not cause broadcast storm, the energy of waste system.
Embodiment 2:
Sensing node is received after the log-on data bag of base station transmission setting network synchro timer cycle and Network Synchronization condition according to the parameter information of cycle regular hour acquisition monitoring environment.The Network Synchronization timer is used for the time synchronized of network, and each node all is provided with a Network Synchronization timer, conveniently realizes the synchronous of whole network, effectively realizes the collaborative work of node.Network Synchronization timer setting-up time arrives, and opens the Network Synchronization timer once more and begins image data, after data acquisition is finished, selects best route to send data, and new routing information more.After data sent, it was dormant state that sensing node is provided with its processor unit, and its wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, the saving sensing node energy of maximum possible.The Network Synchronization timer is used to wake up sensing node, synchronous whole wireless sensor network, make the collaborative work effectively of whole network, forwarding comprising sensing data and controlled device status data, sensing node is received the Monitoring Data of other nodes, selects best route to finish the forwarding of data task.
Sensor data packet: mainly comprise the various information of monitoring environment, as temperature, humidity, intensity of illumination and ammonia concentration, concrete form is by shown in the table 2:
Table 2 sensing data packet format
Sequence number Field name Field length Explanation
1 Source address 2?byte Identification data acquisition node id
2 Destination address 2?byte Identification data receiving node id
3 The bag type 1?byte 0x04
4 Data length 1?byte Valid data length
5 Valid data / Length is determined by data length
6 CRC check 2?byte 1,2,3,4,5 field data verifications
As shown in Figure 8, the workflow of sensing node is as follows:
2.1. its wireless transmit/receive units of sensing node power-up initializing, initialization sensor unit, waiting system pretrigger packet;
2.2. sensing node is received system's pretrigger packet, transmits this packet, dormancy identification position 0 sends the route bag, sets up dynamic routing;
2.3. sensing node is received the system start-up packet, transmits this packet, and stops to send the route bag, dormancy identification position 1, and promptly data send and finish to carry out dormancy;
2.4. sensing node is according to system start-up packet setting network synchronous condition;
2.5. sensing node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (being 5~10 milliseconds);
2.6. sensing node starts the Network Synchronization timer;
2.7. sensing node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
2.7.1., wait for Network Synchronization timer setting-up time if sensing node Network Synchronization timer setting-up time does not arrive;
2.7.2. if sensing node Network Synchronization timer setting-up time arrives, its sensor acquisition environmental data is opened the Network Synchronization timer on the other hand once more on the one hand;
2.8. after environmental data collecting was finished, the sensing node log-on data sent task, selected best route to send data;
2.9. if the transmission of sensing node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of sensing node data is received do not reply, data re-transmitting surpasses 3 times, sends failure, and data send number of times and add 1, the renewal route;
2.10., then start dormancy and prepare timer if the sensing node data send number of times less than 60, carry out 2.11 downwards,
Surpass 60 if the sensing node data send number of times, waiting system pretrigger packet forwards 2.2 to,
Arrive 2.11. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
2.11.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0, waiting system log-on data bag sends the route bag, sets up dynamic routing, forwards 2.3 to;
2.11.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1, at this moment, set handling device unit is a dormant state, wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, and sensing node is waited for Network Synchronization timer setting-up time, forwards 2.7.2 to.
In the above-mentioned steps, the packet that in running order sensing node, its wireless transmit/receive units can other network nodes of interrupt response, asynchronous receiving after the packet selected best routing forwarding data.
Embodiment 3:
Control Node is received the log-on data bag that the base station sends, the setting network synchro timer cycle, start the Network Synchronization timer, if Network Synchronization timer setting-up time arrives, begin to gather the status data of controlled device, data acquisition is finished, and selects best route, log-on data sends task, realizes the monitoring to equipment.Data send and finish more new routing information, safeguard dynamic routing.Control Node is powered by cable power, and whole node does not need dormancy.The monitoring of equipment bag mainly comprises the status information of controlled device, and its bag type is 0x05.The control data bag mainly identifies controlled device name and controlled device state, and wherein source address identifies the node i d of controlled device, the node i d of next jumping of destination address mark, and its bag type is 0x06.
Table 3 monitoring of equipment bag, control data packet format
Sequence number Field name Field length Explanation
1 Source address 2?byte Sign controlled device node i d
2 Destination address 2?byte Identify the node i d of next jumping
3 The bag type 1?byte 0x05/0x06
4 The controlled device flag 1?byte 0 representative is closed, and 1 representative is opened
5 CRC check 2?byte 1,2,3,4 field data verifications
As shown in Figure 9, the workflow of Control Node is as follows:
3.1. its wireless transmit/receive units of Control Node power-up initializing, power-up initializing controller unit, waiting system pretrigger packet;
3.2. Control Node is received system's pretrigger packet, transmits this packet, sends the route bag, sets up dynamic routing, and waiting system log-on data bag;
3.3. Control Node is received the system start-up packet, transmits this packet, and stops to send the route bag;
3.4. Control Node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (being 5~10 milliseconds);
3.5. Control Node starts the Network Synchronization timer;
3.6. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
3.6.1. if Control Node Network Synchronization timer setting-up time does not arrive, Control Node is waited for Network Synchronization timer setting-up time;
3.6.2. if Network Synchronization timer setting-up time arrives, Control Node is the status data of acquisition controlling equipment on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
3.7. if the transmission of Control Node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of Control Node data is received do not reply, data re-transmitting surpasses 3 times, sends failure, and data send number of times and add 1, the renewal route;
3.8. Control Node is waited for Network Synchronization timer setting-up time, therebetween:
If Control Node is received system's pretrigger packet, transmit this packet, and send the route bag, set up dynamic routing, waiting system log-on data bag forwards 3.3 to;
If Control Node is not received system's pretrigger packet, forward 3.6 to;
Control Node is cable power power supply, and is in running order always after initial work is finished, the packet that its wireless transmit/receive units can other network nodes of interrupt response, and asynchronous receiving after the packet selects best number of routes to transmit certificate.If receive the control data bag of broadcasting, according to the start and stop of packet control controlled device.
As shown in figure 10, the foundation of dynamic routing or step of updating are as follows:
4.1. it is infinitely great that the initial value of the minimum hop count that arrives the base station is set in network node data initialization, network node, the minimum hop count that the base station arrives the base station is 0, and route set and candidate collection are empty, and the priority number of route set is 1;
4.2. network node is received the route bag, upgrades the minimum hop count n of local node to the base station, update rule is: if receive that the minimum hop count of route bag is m, then local node is m+1 to the minimum hop count of base station;
4.3. network node is set route set and candidate collection, it is all nodes of n-1 that route set is included in the base station jumping figure, and candidate collection is all nodes of n-2 for being included in the base station jumping figure, and the n local node is to the minimum hop count of base station;
4.4. if route set is not empty, network node is chosen the node of priority number minimum as best routing nodes;
If route set is empty, it is route set that network node is set candidate collection, and the node of choosing the priority number minimum is as best routing nodes, and the emissive power of increase wireless transmit/receive units;
4.5. network node is adjusted route set interior nodes priority: if the data transmission is received reply, the priority number of this node adds 1, if the data transmission is received does not reply, if the data re-transmitting number of times is above 3 times, then this node is deleted from set, do not surpassed 3 times, then the priority number of this node does not add 1.
Embodiment 4
The communication module of base station is received the environmental parameter information that sensing node and Control Node transmit by wireless mode, and computing module is handled data, and result is mail to monitoring station and passes through interface display by serial ports.The base station is sent control command by the mode of network multi-hop to network control node according to data processed result and control algolithm, reaches the purpose of monitoring environment.Communication module is connected by the UART serial ports with computing module.Communication module operation Tinyos operating system, computing module operation (SuSE) Linux OS.Two intermodules are provided with asynchronous acknowledgement mechanism, have realized its reliable serial communication.Asynchronous acknowledgement mechanism is that serial sent to computing module after communication module was received data by wireless mode.Here set the serial transmission timer; because the processing power of wireless sensing node usually can be more weak; the multi-task carries out causing the paralysis of computing module simultaneously; be provided with this timer; the cycle of this timer is N * m, and numerical value is the maximum offset of Network Synchronization, and wherein N is the network node sum; m is the side-play amount factor, can be set at 5~10 milliseconds.By the time serial transmission timer setting-up time arrives, and communication module just begins to send data to computing module, receives task and cable data transmission task conflict to avoid wireless data, helps system's work reliably and with long-term.To have defined in the base station communication module and computing module serially-transmitted data packet format as shown in table 4 for this reason.Except effective data packets, this packet comprises a reply data value, the auxiliary deletion that realizes packet corresponding in the communication module of this reply data value.
Table 4 communication module and computing module serially-transmitted data packet format
Sequence number Field name Field length Explanation
1 The origin identification symbol 1?byte 0x7f
2 Source address 2?byte Identification data sending node id
3 Destination address 2?byte 0x00FF sign computing module id
4 The bag type 1?byte The identification data packet type
5 Data length 1?byte Valid data length+1 (comprising the reply data value)
6 Valid data / Length is determined by data length
7 The reply data value 1?byte This data value is that communication module is treated the deleted data bag
8 CRC check 2?byte 2~7 field data verifications
9 End identifier 1?byte 0x7f
Corresponding communication module and computing module serial data response packet comprise a reply data value, and this data value is set by communication module, and corresponding with some packets to be deleted, its data packet format is as shown in table 5.
Table 5 communication module and computing module serial data response packet form
Sequence number Field name Field length Explanation
1 The origin identification symbol 1?byte 0x7f
2 The bag type 1?byte The identification data packet type
3 The reply data value 1?byte This data value is a communication module deleted data bag
4 CRC check 2?byte Be 2,3 field data verifications
5 End identifier 1?byte 0x7f
As shown in Figure 7, the transmission of base station data and receiving step are as follows:
5.1. computing module sends the pretrigger packet;
5.2. communication module is replied, and broadcast system pretrigger packet, computing module is opened the network startup timer, and sends the route bag;
5.3. route data packets is replied and broadcasted to communication module;
5.4. the network startup timer setting-up time of computing module arrives, transmitting system log-on data bag, and computing module starts Network Synchronization timer, the zero clearing of data processing number of times;
5.5. communication module is replied and broadcast system log-on data bag, waits for receiving data, and starts the serial data transmission timer;
5.6. communication module is received sensing data bag or supervision packet, inserts the Data Receiving linear list;
5.7. if serial data transmission timer setting-up time arrives, communication module sends data to computing module on the one hand, is empty up to linear list, opens the serial data transmission timer on the other hand once more, carries out 5.8 downwards;
If serial data transmission timer setting-up time arrives, communication module continues to carry out 5.6;
5.8. computing module is replied packet, communication module deletes corresponding packet to be sent according to replying from the Data Receiving linear list, is empty up to linear list;
5.9. Network Synchronization timer setting-up time arrives, computing module sends to monitoring station with data result on the one hand, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, communication module produces and replys, and open the Network Synchronization timer once more, carry out 5.10 downwards;
5.10. computing module judges whether the Network Synchronization condition satisfies: if the data processing number of times greater than 60, forwards 5.1 to, otherwise wait for the serial data of communication module, forward 5.8 to.
As shown in figure 11, the control algolithm of base station comprises the following steps:
6.1. the base station obtains the sensor node number that temperature, humidity, intensity of illumination, ammonia concentration value and the actual reception of network node arrive, and obtains the extraction fan state and the daylight lamp state of unlatching;
6.2. arithmetic mean is asked with the temperature, humidity, intensity of illumination and the ammonia concentration value that obtain in the base station;
6.3., carry out 6.4 downwards, otherwise forward 6.6 to if all fans all are in closed condition;
6.4. if medial temperature is less than 17 ℃, and medial humidity greater than 85% or ammonia concentration greater than 20ppm, carry out 6.5 downwards, otherwise forward 6.8 to;
6.5. less than 9 ℃, 1 fan opening time was 10 minutes, forwarded 6.9 to as if medial temperature;
If 10~13 ℃ of medial temperatures, 1 fan opening time was 20 minutes, forwarded 6.9 to;
If 14~17 ℃ of medial temperatures, 1 fan opening time was 30 minutes, forwarded 6.9 to;
6.6. if 1 fan is in opening and the opening time is 0, carry out 7 downwards,, forward 6.8 to if the opening time is not 0;
If it is 2 or 3 or 6 that fan is opened number, forward 6.8 to;
6.7. if timing equals the opening time, then close fan, the opening time puts 0, forwards 6.9 to, otherwise directly forwards 6.9 to;
6.8. if medial temperature less than 17 ℃, is then closed all fans;
If 18~21 ℃ of medial temperatures are then opened 1 fan;
If 22~24 ℃ of medial temperatures are then opened 2 fans;
If 25~29 ℃ of medial temperatures are then opened 3 fans;
If medial temperature greater than 30 ℃, is then opened 6 fans;
6.9., forward 6.1 to if the time less than 4:30 or greater than 20:30, is closed all daylight lamps;
If time 4:30 to 20:30, opens all daylight lamps to 8:00 or 17:00, forward 6.1 to;
If other carry out 6.10 downwards;
6.10. if daylight lamp leaves and average intensity of illumination greater than 60lux, close all daylight lamps, forward 6.1 to;
If daylight lamp leaves and average intensity of illumination less than 30lux, open all daylight lamps, forward 6.1 to.

Claims (6)

1. livestock and poultry facility cultivation surroundings monitoring method, the supervisory system of its realization comprises sensing node, Control Node, base station and monitoring station, the function of each several part mainly is:
Sensing node is gathered the parameter information of environment in real time, transmits by other sensing node or Control Node multi-hop ground, and Monitoring Data is routed to the base station by a plurality of node processing through multi-hop in transmission course, arrives monitoring station at last;
Control Node obtains the control data bag of base station by the mode of network multi-hop, drives the start and stop of controlled device, again with the controlled device state of its acquisition, by the base station that passes back to of other sensing node or Control Node multi-hop;
Environmental parameter information and the controlled device running state information that sensing node and Control Node transmit received by communication module in the base station, and computing module and communication module serial communication obtain the physical quantity data of various parameters.The base station is mail to monitoring station to the physical quantity data by serial ports, user interface display environment data and controlled device state on the one hand; Physical quantity data and the control algolithm controlled order of base station by parameter on the other hand, the mode by multi-hop mails to Control Node controls controlled device, reaches the purpose of monitoring environment; It is characterized in that this method for supervising comprises the following steps:
1.1. network node (comprising sensing node and Control Node) power-up initializing;
1.2. system's pretrigger packet is sent in the base station, and open system starts timer;
1.3. network node is received system's pretrigger packet, carries out in two kinds of situation thereafter:
1.3.1. sensing node is transmitted this packet, going on the air and receive the route bag in dormancy identification position 0, sets up dynamic route;
1.3.2. Control Node is transmitted this packet, goes on the air and receives the route bag, sets up dynamic route;
1.4. if system start-up timer setting-up time arrives, the system start-up packet is sent in the base station, opens the Network Synchronization timer;
If system start-up timer setting-up time does not arrive, this timer setting-up time is continued to wait in the base station;
1.5. network node is received the log-on data bag, carries out in two kinds of situation thereafter:
1.5.1. the zero clearing of sensing node data transmitting counter, dormancy identification position 1, dormancy after the expression data send and finish according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.5.2. Control Node according to the time cycle of system start-up packet setting network synchro timer, starts the Network Synchronization timer, setting network synchronous condition;
1.6. the network node starting condition is set and is finished, and divides four kinds of situations to carry out thereafter:
1.6.1. if sensing node Network Synchronization timer setting-up time does not arrive, sensing node is waited for Network Synchronization timer setting-up time;
1.6.2. if sensing node Network Synchronization timer setting-up time arrives, sensing node is gathered environmental parameter information on the one hand, selects best route, sends data; Open the Network Synchronization timer on the other hand once more;
1.6.3., wait for Network Synchronization timer setting-up time if Control Node Network Synchronization timer setting-up time does not arrive;
1.6.4. if Control Node Network Synchronization timer setting-up time arrives, Control Node is the status data of acquisition controlling equipment on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
1.7. if the network node data transmission is received reply, data send number of times and add 1, upgrade route;
If the network node data transmission is received do not reply, it is inferior that data re-transmitting surpasses k (3≤k≤10), sends failure, and data send number of times and add 1, the renewal route, and sensing node carries out 1.8 downwards, and Control Node forwards 1.10 to;
1.8. if the sensing node data send number of times less than q (30≤q≤720), then start dormancy and prepare timer, carry out 1.9 downwards;
Surpass q if the sensing node data send number of times, waiting system pretrigger packet forwards 1.3 to;
Arrive 1.9. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
1.9.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0 forwards 1.4 to;
1.9.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1, at this moment, set handling device unit is a dormant state, wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, and sensing node is waited for Network Synchronization timer setting-up time, forwards 1.6.2 to;
1.10. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
1.10.1. if Control Node is received system's pretrigger packet, transmit this packet, forward 1.4 to;
1.10.2., forward 1.6.4 to if Control Node is not received system's pretrigger packet;
1.11. the base station receives data, if the Network Synchronization timer time does not arrive, continues to receive data; If the Network Synchronization timer time arrives, the beginning deal with data is also opened the Network Synchronization timer once more; Thereafter, on the one hand data result is sent to monitoring station, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, Control Node is received this packet, and its controlled device is done corresponding start stop operation;
If the base station data number of processes greater than q, then forwards 1.2 to, otherwise, this step still carried out.
2. method for supervising according to claim 1 is characterized in that the workflow of described sensing node further comprises the following steps:
2.1. its wireless transmit/receive units of sensing node power-up initializing, its sensor unit of power-up initializing, waiting system pretrigger packet;
2.2. sensing node is received system's pretrigger packet, transmits this packet, dormancy identification position 0 sends the route bag, sets up dynamic routing;
2.3. sensing node is received the system start-up packet, transmits this packet, and stops to send the route bag, dormancy identification position 1, and promptly send to finish can dormancy for data;
2.4. sensing node is according to system start-up packet setting network synchronous condition;
2.5. sensing node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (being 5~10 milliseconds);
2.6. sensing node starts the Network Synchronization timer;
2.7. sensing node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
2.7.1., wait for Network Synchronization timer setting-up time if sensing node Network Synchronization timer setting-up time does not arrive;
2.7.2. if sensing node Network Synchronization timer setting-up time arrives, its sensor acquisition environmental data is opened the Network Synchronization timer on the other hand once more on the one hand;
2.8. after environmental data collecting was finished, the sensing node log-on data sent task, selected best route to send data;
2.9. if the transmission of sensing node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of sensing node data is received do not reply, data re-transmitting surpasses k time, sends failure, and data send number of times and add 1, the renewal route;
2.10., then start dormancy and prepare timer if the sensing node data send number of times less than q, carry out 2.11 downwards,
Surpass q if the sensing node data send number of times, waiting system pretrigger packet forwards 2.2 to,
Arrive 2.11. the timer setting-up time is prepared in dormancy, carry out in two kinds of situation thereafter:
2.11.1. if sensing node is received system's pretrigger packet, transmit this packet, dormancy identification position 0, waiting system log-on data bag sends the route bag, sets up dynamic routing, forwards 2.3 to;
2.11.2. if sensing node is not received system's pretrigger packet, the dormancy identification position is 1, at this moment, set handling device unit is a dormant state, wireless transmit/receive units is closed in the closure sensor unit, makes sensing node be in low power consumpting state, and sensing node is waited for Network Synchronization timer setting-up time, forwards 2.7.2 to;
3. method for supervising according to claim 1 is characterized in that the workflow of described Control Node further comprises the following steps:
3.1. its wireless transmit/receive units of Control Node power-up initializing, power-up initializing controller unit, waiting system pretrigger packet;
3.2. Control Node is received system's pretrigger packet, transmits this packet, sends the route bag, sets up dynamic routing, and waiting system log-on data bag;
3.3. Control Node is received the system start-up packet, transmits this packet, and stops to send the route bag;
3.4. Control Node is determined the Network Synchronization timer time cycle according to the system start-up packet: read Network Synchronization parameter n from packet, cycle S=n+ (1) -c* ((id+c) %N) * m, wherein id is a node number, and c is that data send number of times, and N is the network node sum, and m is the side-play amount factor (being 5~10 milliseconds);
3.5. Control Node starts the Network Synchronization timer;
3.6. Control Node is waited for Network Synchronization timer setting-up time, carries out in two kinds of situation thereafter:
3.6.1. if Control Node Network Synchronization timer setting-up time does not arrive, Control Node is waited for Network Synchronization timer setting-up time;
3.6.2. if Network Synchronization timer setting-up time arrives, Control Node is gathered the status data of controlled device on the one hand, selects best route, sends data, opens the Network Synchronization timer on the other hand once more;
3.7. if the transmission of Control Node data is received reply, data send number of times and add 1, upgrade route;
If the transmission of Control Node data is received do not reply, data re-transmitting surpasses k time, sends failure, and data send number of times and add 1, the renewal route;
3.8. Control Node is waited for Network Synchronization timer setting-up time, therebetween:
If Control Node is received system's pretrigger packet, transmit this packet, and send the route bag, set up dynamic routing, waiting system log-on data bag forwards 3.3 to;
If Control Node is not received system's pretrigger packet, forward 3.6 to;
4. according to claim 2 or 3 described method for supervising, it is characterized in that the foundation or the renewal of described dynamic routing comprise the following steps:
4.1. it is infinitely great that the initial value of the minimum hop count that arrives the base station is set in network node data initialization, network node, the minimum hop count that the base station arrives the base station is 0, and route set and candidate collection are empty, and the priority number of route set is 1;
4.2. network node is received the route bag, upgrades the minimum hop count n of local node to the base station, update rule is: if receive that the minimum hop count of route bag is m, then local node is m+1 to the minimum hop count of base station;
4.3. network node is set route set and candidate collection, it is all nodes of n-1 that route set is included in the base station jumping figure, and candidate collection is all nodes of n-2 for being included in the base station jumping figure, and the n local node is to the minimum hop count of base station;
4.4. if route set is not empty, network node is chosen the node of priority number minimum as best routing nodes;
If route set is empty, it is route set that network node is set candidate collection, and the node of choosing the priority number minimum is as best routing nodes, and the emissive power of increase wireless transmit/receive units;
4.5. network node is adjusted route set interior nodes priority: reply if the data transmission is received, the priority number of this node adds 1, if data send do not receive reply, the data re-transmitting number of times surpasses k time, then this node is deleted from set, do not surpass k time, then the priority number of this node adds 1.
5. method for supervising according to claim 1 is characterized in that, the data of described base station send and reception comprises the following steps:
5.1. computing module sends the pretrigger packet;
5.2. communication module is replied, and broadcast system pretrigger packet, computing module is opened the network startup timer, and sends the route bag;
5.3. route data packets is replied and broadcasted to communication module;
5.4. the network startup timer setting-up time of computing module arrives, transmitting system log-on data bag, and computing module starts Network Synchronization timer, the zero clearing of data processing number of times;
5.5. communication module is replied and broadcast system log-on data bag, waits for receiving data, and starts the serial data transmission timer;
5.6. communication module is received sensing data bag or supervision packet, inserts the Data Receiving linear list;
5.7. if serial data transmission timer setting-up time arrives, communication module sends data to computing module on the one hand, is empty up to linear list, opens the serial data transmission timer on the other hand once more, carries out 5.8 downwards;
If serial data transmission timer setting-up time arrives, communication module continues to carry out 5.6;
5.8. computing module is replied packet, communication module deletes corresponding packet to be sent according to replying from the Data Receiving linear list, is empty up to linear list;
5.9. Network Synchronization timer setting-up time arrives, computing module sends to monitoring station with data result on the one hand, on the other hand according to data processed result and control algolithm, send the control data bag by broadcast mode to network node, communication module produces and replys, and open the Network Synchronization timer once more, carry out 5.10 downwards;
5.10. computing module judges whether the Network Synchronization condition satisfies: if the data processing number of times greater than q, forwards 5.1 to, otherwise wait for the serial data of communication module, forward 5.8 to.
6. method for supervising according to claim 1 is characterized in that the control algolithm of described base station comprises the following steps:
6.1. the base station obtains the sensor node number that temperature, humidity, intensity of illumination, ammonia concentration value and the actual reception of network node arrive, and obtains extraction fan, the daylight lamp state of unlatching;
6.2. arithmetic mean is asked with the temperature, humidity, intensity of illumination and the ammonia concentration value that obtain in the base station;
6.3., carry out 6.4 downwards, otherwise forward 6.6 to if all fans all are in closed condition;
6.4. if medial temperature is less than T 5℃, and medial humidity greater than b% (50≤b≤95) or ammonia concentration greater than c (10≤c≤40) ppm, carry out 6.5 downwards, otherwise forward 6.8 to;
6.5. if medial temperature is less than T 1℃, n 1(n 1Being positive integer) the fan opening time is p 1Minute, forward 6.9 to;
If medial temperature T 2~T 3℃, n 1The fan opening time is p 2Minute, forward 6.9 to;
If medial temperature T 4~T 5℃, n 1The fan opening time is p 3Minute, forward 6.9 to;
6.6. if n 1Individual fan is in opening and the opening time is 0, carries out 6.7 downwards, if the opening time is not 0, forwards 6.8 to;
If it is n that fan is opened number 2Or n 3Or n 4, forward 6.8 to;
6.7. if timing equals the opening time, then close fan, the opening time puts 0, forwards 6.9 to; Otherwise directly forward 6.9 to;
6.8. if medial temperature is less than T 5℃, then close all fans;
If medial temperature T 6~T 7℃, then open n 1Individual fan;
If medial temperature T 8~T 9℃, then open n 2(n 2Be positive integer) individual fan;
If medial temperature T 10~T 11℃, then open n 3(n 3Be positive integer) individual fan;
If medial temperature is greater than T 12℃, then open n 4(n 4Be positive integer) individual fan;
6.9. if the time is less than t 1Or greater than t 4, close all daylight lamps, forward 6.1 to;
If time t 1To t 2Or t 3To t 4, open all daylight lamps, forward 6.1 to;
If other carry out 6.10 downwards;
6.10. if daylight lamp leaves and average intensity of illumination greater than a 1(50≤a 1≤ 80) Lux closes all daylight lamps, forwards 6.1 to;
If daylight lamp leaves and average intensity of illumination less than a 2(10≤a 2≤ 40) Lux opens all daylight lamps, forwards 6.1 to.
CN2008101966080A 2008-09-27 2008-09-27 Livestock and poultry facility cultivation surroundings monitoring method Expired - Fee Related CN101369149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101966080A CN101369149B (en) 2008-09-27 2008-09-27 Livestock and poultry facility cultivation surroundings monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101966080A CN101369149B (en) 2008-09-27 2008-09-27 Livestock and poultry facility cultivation surroundings monitoring method

Publications (2)

Publication Number Publication Date
CN101369149A true CN101369149A (en) 2009-02-18
CN101369149B CN101369149B (en) 2010-07-07

Family

ID=40412999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101966080A Expired - Fee Related CN101369149B (en) 2008-09-27 2008-09-27 Livestock and poultry facility cultivation surroundings monitoring method

Country Status (1)

Country Link
CN (1) CN101369149B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064365A (en) * 2012-12-11 2013-04-24 南京理工大学 Agriculture comprehensive information remote wireless monitoring and pre-warning system
CN103631219A (en) * 2013-11-05 2014-03-12 台州云门工业设计有限公司 Plant conservation device
CN104035397A (en) * 2014-04-22 2014-09-10 宿州市新联禽业有限责任公司 Breeding factory remote monitoring system
CN104330181A (en) * 2014-10-21 2015-02-04 苏州德鲁森自动化系统有限公司 Temperature measurement method by adopting multiple sensors to overcome errors
CN105375584A (en) * 2015-12-15 2016-03-02 青海民族大学 Timing low-power consumption energy-saving apparatus
CN106411514A (en) * 2016-12-02 2017-02-15 四川世纪景程环保科技有限公司 Communication control method for smart sewage treatment system
CN106502950A (en) * 2016-09-30 2017-03-15 株洲太昌电子信息技术股份有限公司 A kind of method and system by Serial Port Transmission file
CN107613456A (en) * 2017-07-19 2018-01-19 深圳市盛路物联通讯技术有限公司 Based on Internet of Things approaches to IM and equipment
CN107885087A (en) * 2017-11-21 2018-04-06 安徽云维信息科技有限公司 A kind of multi objective environment conditioning method and system preferential based on energy consumption
CN109581975A (en) * 2017-09-28 2019-04-05 黄宇 A kind of pig farm intelligent management system
CN116649251A (en) * 2023-08-01 2023-08-29 山东华邦农牧机械股份有限公司 Intelligent control system and method for poultry breeding environment

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064365A (en) * 2012-12-11 2013-04-24 南京理工大学 Agriculture comprehensive information remote wireless monitoring and pre-warning system
CN103631219A (en) * 2013-11-05 2014-03-12 台州云门工业设计有限公司 Plant conservation device
CN104035397A (en) * 2014-04-22 2014-09-10 宿州市新联禽业有限责任公司 Breeding factory remote monitoring system
CN104330181A (en) * 2014-10-21 2015-02-04 苏州德鲁森自动化系统有限公司 Temperature measurement method by adopting multiple sensors to overcome errors
CN105375584A (en) * 2015-12-15 2016-03-02 青海民族大学 Timing low-power consumption energy-saving apparatus
CN106502950A (en) * 2016-09-30 2017-03-15 株洲太昌电子信息技术股份有限公司 A kind of method and system by Serial Port Transmission file
CN106502950B (en) * 2016-09-30 2019-10-01 株洲太昌电子信息技术股份有限公司 A kind of method and system for transmitting file by serial ports
CN106411514A (en) * 2016-12-02 2017-02-15 四川世纪景程环保科技有限公司 Communication control method for smart sewage treatment system
CN106411514B (en) * 2016-12-02 2019-11-29 四川世纪景程环保科技有限公司 A kind of communication control method of Intellectualized sewage water processing system
CN107613456A (en) * 2017-07-19 2018-01-19 深圳市盛路物联通讯技术有限公司 Based on Internet of Things approaches to IM and equipment
CN109581975A (en) * 2017-09-28 2019-04-05 黄宇 A kind of pig farm intelligent management system
CN107885087A (en) * 2017-11-21 2018-04-06 安徽云维信息科技有限公司 A kind of multi objective environment conditioning method and system preferential based on energy consumption
CN116649251A (en) * 2023-08-01 2023-08-29 山东华邦农牧机械股份有限公司 Intelligent control system and method for poultry breeding environment
CN116649251B (en) * 2023-08-01 2023-09-29 山东华邦农牧机械股份有限公司 Intelligent control system and method for poultry breeding environment

Also Published As

Publication number Publication date
CN101369149B (en) 2010-07-07

Similar Documents

Publication Publication Date Title
CN101369149B (en) Livestock and poultry facility cultivation surroundings monitoring method
CN102761941B (en) A kind of method utilizing ultra-low power consumption wireless smart sensor's network protocol transmission
CN101883455B (en) Lighting power-saving measurement and control system based on wireless sensor network
Gulec et al. A novel distributed CDS algorithm for extending lifetime of WSNs with solar energy harvester nodes for smart agriculture applications
CN104378812B (en) Farmland self-organizing network regenerative resource node difference topology control method
CN106686686A (en) Wireless sensor network ad hoc network method for crop greenhouse cultivation
CN101854762B (en) Plant tissue culture LED light source control system based on wireless network
CN104184786A (en) Wireless sensor cloud gateway system for forest environment
CN202600467U (en) Stored grain condition monitoring system based on cloud
CN102707688A (en) Cloud-based grain monitoring system and grain monitoring method
JP5830411B2 (en) Radio management system and transmission management method
CN104507134A (en) Wireless data information acquisition system based on Internet of things
CN110419066A (en) Sensor device and sensor network system
CN101848240A (en) System and method for monitoring parameters of watermelon seedling raising environment
CN109104704B (en) Application of environment regulation and control system for aquaculture Internet of things and regulation and control method
Liu et al. The design of greenhouse monitoring system based on ZigBee WSNs
CN105119726B (en) A kind of wireless sensing net node fast wake-up method and device thereof
CN104507076A (en) Practical Internet of things application platform based on Contiki system and 61br system
CN102393701A (en) Automatic building air-conditioning monitoring system
Yun-feng Greenhouse environment monitoring system design based on WSN and GPRS networks
CN102393771A (en) Energy-saving environment monitoring system
CN106060156A (en) Pig house environment monitoring system based on wireless mesh network
Song et al. Design of greenhouse control system based on wireless sensor networks and AVR microcontroller
CN102547938A (en) Router, wireless sensor network and method for monitoring terminal nodes
CN102147961A (en) Wireless network based wireless transmission equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100707

Termination date: 20140927

EXPY Termination of patent right or utility model