Summary of the invention
The present invention has designed and developed a kind of Agricultural Information collection based on GPRS monitoring system, uses GPRS technology to pass
The transmission of sensor data, the trouble of the on-the-spot cable wiring saved and inconvenience.
A further object of the invention is to use what cordless communication network carried out data to upload Surveillance center, can arrive state
Anywhere, breaching data can not the restriction of long-distance transmissions in family.
Another object of the present invention is to gather the multiple parameter affecting plant growth, and computing environment affect because of
Son, carries it into fuzzy controller, is precisely controlled crop fertilization amount, it is ensured that crop benign growths.
A kind of Agricultural Information collection based on GPRS monitoring system, including:
GPRS wireless transport module;
Microcontroller, it connects described GPRS wireless transport module, it is possible to the duty and effectively of monitoring system
The operation of control system;
Information acquisition terminal, including information acquisition module and function executing module, is used for gathering multiple perception amount and execution
Various control amount;
Wherein, connected by GPRS wireless transport module between microcontroller and information acquisition terminal;
Cloud Server, it is connected with described GPRS wireless transport module by communication network, is used for storing record information and adopts
The signal that collection terminal collects.
Preferably, described microcontroller includes electronic control unit, crystal oscillating circuit and reset circuit;
Wherein, described electronic control unit is used for running program, and described crystal oscillating circuit divides with described reset circuit outfan
Do not connect the input of described electronic control unit.
Preferably, described GPRS wireless transport module uses wireless communication module and described electronic control unit by string
Mouth carries out intersection physical connection.
Preferably, described information acquisition terminal includes:
Humidity sensor, it is buried in field different depth, is used for gathering soil moisture;
Temperature sensor, it is buried in inside soil, is used for detecting the soil moisture;
Intensity of illumination sensor, it is arranged on field crops top, is used for gathering Foliage Absorption light conditions.
A kind of Agricultural Information based on GPRS monitors system ambiguous control method, comprises the following steps:
Gather ambient temperature T, ambient humidity RH, gas concentration lwevel ρ2, oxygen concentration ρ0, intensity of illumination Il, ultraviolet is strong
Degree Ig, wind speed v;
Computing environment assessment factorAnd it is made comparisons obtain environment factor deviation signal with presetting assessment factor, will
Uitraviolet intensity is made comparisons with average intensity outside and is obtained UV intensity deviation signal;
Environment factor deviation signal is obtained environment factor rate of change signal through differential calculation;UV intensity deviation is believed
Number after differential calculation, obtain UV intensity rate of change signal;
Environment factor rate of change signal and UV intensity rate of change signal are inputted fuzzy controller, is output as soil application
Amount.
Preferably, the computing formula of described environmental assessment factor is:
Preferably, the fuzzy set of described environment factor rate of change signal and UV intensity rate of change be NB, NM, NS,
ZR, PS, PM, PB}, PB represent honest, and PM represents that center, PS represent the least, and ZR represents that zero, NS represent negative little, NM represent negative in,
NB represents negative big, and their domain is: {-6 ,-5 ,-4 ,-3 ,-2 ,-1,0,1,2,3,4,5,6}.
Preferably, the input of described fuzzy controller and the membership function of output variable all select triangle degree of membership
Function.
Beneficial effects of the present invention
1. wireless penetration: the present invention uses GPRS technology to carry out the transmission of sensing data, the on-the-spot cable wiring saved
Trouble and inconvenience;
2. long-range: the present invention uses what China Mobile's cordless communication network carried out data to upload Surveillance center, can arrive
Reaching country anywhere, breaching data can not the restriction of long-distance transmissions.
3. the Agricultural Information detecting system fuzzy control method based on GPRS that the present invention provides, can gather multiple impact
The parameter of plant growth, and computing environment factor of influence, carry it into fuzzy controller, is precisely controlled crop fertilization amount, it is ensured that
Crop benign growths, has had substantial progress with traditional crop growth collection monitoring system.
Detailed description of the invention
The present invention is described in further detail below in conjunction with the accompanying drawings, to make those skilled in the art with reference to description literary composition
Word can be implemented according to this.
As shown in Figure 1, 2, Agricultural Information collection based on the GPRS monitoring system that the present invention provides, including: GPRS is wireless
Transport module 100, microcontroller 200, information acquisition terminal 300 and Cloud Server 400.
Wherein, as it is shown on figure 3, GPRS wireless transport module 100, GPRS communication module (P7) uses SIMCOM company
The SIM900 module produced, it connects single-chip microcomputer (U2) by serial ports.GPRS communication module (P7) pin 6 connects single-chip microcomputer (U2)
Pin (PA9), be used for receiving the data that single-chip microcomputer (U2) is sent;GPRS communication module (P7) pin 5 connects single-chip microcomputer (U2)
Pin (PA10), for single-chip microcomputer (U2) send data;GPRS communication module (P7) pin 3 connects drawing of single-chip microcomputer (U2)
Foot (PC9), resets when GPRS communication module (P7) crashes again;GPRS communication module (P7) pin 1 connects 4V power supply, uses
In powering for GPRS communication module (P7);GPRS communication module (P7) pin 2 and pin 7 connect ground wire, are used for and single-chip microcomputer
(U2) altogether.
Microcontroller 200, it connects described GPRS wireless transport module, it is possible to the duty of monitoring system and effectively
The operation of ground control system, for singlechip minimum system circuit, including: single-chip microcomputer (U2), crystal oscillator start-up circuit, system reset electricity
Road, the 32STM32F103RBT6 type microcontroller that single-chip microcomputer (U2) uses, this single-chip microcomputer include 128K flash memory space and 20K with
Machine memory space, its electric capacity C15, C16, crystal oscillator Y2 constitute the crystal oscillating circuit of single-chip microcomputer (U2), run for single-chip microcomputer (U2) and carry
For clock base, resistance R1, electric capacity C3 constitute the reset circuit of single-chip microcomputer (U2), for the reset of single-chip microcomputer (U2), make list
Sheet machine (U2) can normally work, and electronic control unit is used for running program, and crystal oscillating circuit is connected respectively with reset circuit outfan
The input of electronic control unit.
As shown in Figure 4, power circuit principle figure, turn DC Module (P01) including exchange, input connects outside 220V and hands over
Stream civil power, outfan output direct current 12V voltage;Electric fuse (FUSE) is that way circuit is carried out electric current restriction;Varistor (MOV)
It is used for protecting electronic circuit from due to voltage spikes and the impact of current surge;Electric capacity C1, C2 carry out high frequency for 12V output voltage
Filtering.
DC-DC module (P02), input connects exchange and turns the direct current 12V voltage that DC Module (P01) exports, defeated
Go out end output direct current 5V voltage;Electric capacity C3 carries out High frequency filter for input terminal voltage, and electric capacity C4 is carried out for output end voltage
High frequency filter.
4V voltage stabilizing chip (P03), uses MIC29302 chip, and input connects what DC-DC module (P02) exported
Direct current 5V voltage, outfan output 4V DC voltage, provide working power for GPRS communication module;Electric capacity C5, C6 are used for voltage
Filtering, resistance R8, R9 series connection makes 4V voltage stabilizing chip (P03) pin 4 export direct current 4V voltage for dividing potential drop.
3.3V voltage stabilizing chip (P04), uses AMS1117-3.3 chip, and it is defeated that input connects DC-DC module (P02)
The direct current 5V voltage gone out, outfan output 3.3V DC voltage, electric capacity C7 is filtered for input terminal voltage, electric capacity C8 and C9
High frequency filter is carried out for output end voltage.
Information acquisition terminal 300, includes information acquisition module and function executing module, is used for gathering multiple perception amount and execution
Various control amount;Including: such as lower sensor:
As shown in Figure 6, being interface circuit of temperature sensor schematic diagram, temperature sensor (P1) uses DS18B20 number
Word temperature sensor, is connected with single-chip microcomputer (U2) by monobus.Temperature sensor (P1) pin 1 connects ground wire, is used for and list
Sheet machine (U2) is altogether;Temperature sensor (P1) pin 2 connects the pin (PA0) of single-chip microcomputer (U2);For the temperature number that will gather
Word amount is sent to single-chip microcomputer (U2);Temperature sensor (P1) pin 3 connects 3.3V power supply, for supplying to temperature sensor (P1)
Electricity.Wherein resistance R7 is pull-up resistor, for being pulled upward to high level with the PA0 pin of single-chip microcomputer (U2).
Its operation principle: single-chip microcomputer (U2) passed through temperature sensor (P1) pin 2 actively every 3 seconds in main circulating program
Sending the order of the temperature data reading agricultural site environment, temperature sensor (P1) returns again by its foot 2 after receiving
It is accurate to the temperature digital amount of decimal place.
As it is shown in fig. 7, be humidity sensor interface circuit schematic diagram, humidity sensor (P2) uses DHT11 numeral
Humidity sensor, is connected with single-chip microcomputer (U2) by monobus.Humidity sensor (P2) pin 1 connects ground wire, is used for and monolithic
Machine (U2) is altogether;Humidity sensor (P2) pin 2 connects the pin (PA4) of single-chip microcomputer (U2);For the humidity numeral that will gather
Amount is sent to single-chip microcomputer (U2);Humidity sensor (P2) pin 3 connects 5V power supply, for powering to humidity sensor (P2).
Its operation principle: single-chip microcomputer (U2) is actively sent out by humidity sensor (P2) pin 2 every 2 in main circulating program
Sending the order of the humidity data reading agricultural site environment, humidity sensor (P2) returns again by its pin 2 after receiving
Humidity digital quantity with integer part and fractional part.
As shown in Figure 8, being CO2 sensor interface circuitry schematic diagram, CO2 sensor (P3) uses the S100H of Korea S's import
Type digital sensor, it uses electrical modulation NDIR (NDIR) technology to carry out the concentration of CO2 in high-acruracy survey air.CO2
Sensor (P3) is connected with single-chip microcomputer (U2) by serial ports, and CO2 sensor (P3) pin 1 connects 12V power supply, for CO2 sensor
(P3) power supply;CO2 sensor (P3) pin 2 connects single-chip microcomputer (U2) pin (PA15), and resetted when CO2 sensor crashes weight
New work;CO2 sensor (P3) pin 3 connects ground wire, for single-chip microcomputer (U2) altogether;CO2 sensor (P3) pin 4 connects
Single-chip microcomputer (U2) pin (PA3), for the CO2 concentration data gathered to single-chip microcomputer (U2) transmission;CO2 sensor (P3) pin 5
Connect single-chip microcomputer (U2) pin (PA2), be used for receiving the data that single-chip microcomputer (U2) is sent.
Its operation principle: CO2 sensor (P3) sends pin by serial ports, sent once to single-chip microcomputer (U2) every 3 seconds
Gathering the digital quantity after converting, single-chip microcomputer (U2) produces serial ports interrupt event, now by serial ports interrupt service routine by CO2 number
According to receiving local buffer, in order to carry out calculating below and process.
As it is shown in figure 9, be O2 sensor interface circuitry schematic diagram, O2 sensor (P5) uses ZE03-O2 type digital sensing
Device, it uses three-electrode electro Chemical gas sensor to carry out the degree of O2 in high-acruracy survey air.O2 sensor (P5)
Being connected with single-chip microcomputer (U2) by serial ports, O2 sensor (P5) pin 1 connects 5V power supply, powers for O2 sensor (P5);O2 passes
Sensor (P5) pin 2 connects single-chip microcomputer (U2) pin (PC11), for the O2 degree gathered to single-chip microcomputer (U2) transmission;
O2 sensor (P5) pin 3 connects single-chip microcomputer (U2) pin (PC10), is used for receiving the data that single-chip microcomputer (U2) is sent;O2 senses
Device (P5) pin 4 connects ground wire, for single-chip microcomputer (U2) altogether.
Its operation principle: O2 sensor (P5) sends pin by serial ports, once adopted to single-chip microcomputer (U2) transmission every 4 seconds
Numerical percentage content after collection conversion, single-chip microcomputer (U2) produces serial ports interrupt event, now by serial ports interrupt service routine
By O2 data receiver to local buffer, in order to carry out calculating below and process.
As shown in Figure 10, being intensity of illumination sensor interface circuitry schematic diagram, intensity of illumination sensor (P6) uses
BH1750 digital environment optical sensor, it is connected with single-chip microcomputer by iic bus.Intensity of illumination sensor (P6) pin
1 connects 3.3V power supply, powers for intensity of illumination sensor (P6);Intensity of illumination sensor (P6) pin 2 connects single-chip microcomputer (U2)
Pin (PB10), provides clock signal for iic bus transmission;Intensity of illumination sensor (P6) pin 3 connects single-chip microcomputer (U2) and draws
Foot (PB11), provides data signal for iic bus transmission;Intensity of illumination sensor (P6) pin 4 connects ground wire, is used for and monolithic
Machine (U2) is altogether.
Its operation principle: single-chip microcomputer (U2) is main by intensity of illumination sensor (P6) pin 2 every 3 in main circulating program
The dynamic order sending the intensity of illumination data reading agricultural site environment, intensity of illumination sensor (P6) passes through after receiving order
Its pin 3 returns the illumination intensity value digital quantity of short type.
As shown in figure 11, being UV sensor interface circuit schematic diagram, UV sensor (P9) uses UVM-
30 simulation UV sensors, its detection ultraviolet wavelength is 200-370 nanometer, has linear voltage output.Ultraviolet
Sensor (P9) pin 1 connects 3.3V power supply, powers for UV sensor (P9);UV sensor (P9) pin 2 connects
Single-chip microcomputer (U2) AD gathers pin (PA7), for transmitting uitraviolet intensity analog voltage signal to single-chip microcomputer;UV sensor
(P9) pin 3 connects ground wire, for single-chip microcomputer (U2) altogether.
Its operation principle: single-chip microcomputer (U2) gathers ultraviolet every 2 by its AD conversion pin (PA7) in main circulating program
The analog electrical signal of line, the AD conversion then carrying out 12 precision becomes short digital quantity, finally according to UV sensor
(P9) digital quantity is converted into uitraviolet intensity grade (0-11 level) according to normalized form by description.
As shown in figure 12, being air velocity transducer interface circuit schematic diagram, air velocity transducer (P8) uses YGC-FS type
Three vane digital sensorses, its detection wind speed range is 0-45m/s, and resolution is 0.1m/s, has serial digital signals defeated
Going out, therefore air velocity transducer (P8) is connected with single-chip microcomputer (U2) by serial ports.Air velocity transducer (P8) pin 1 connects 5V power supply,
Power for air velocity transducer (P8);Air velocity transducer (P8) pin 2 connects single-chip microcomputer (U2) pin (PC11), for single-chip microcomputer
(U2) the wind speed digital quantity that transmission gathers;Air velocity transducer (P8) pin 3 connects single-chip microcomputer (U2) pin (PC10), is used for receiving
The data that single-chip microcomputer (U2) is sent;Air velocity transducer (P8) pin 4 connects ground wire, for single-chip microcomputer (U2) altogether.Due to list
The serial ports number of sheet machine (U2) is limited, and air velocity transducer (P8) has been all connected to single-chip microcomputer with the O2 sensor in right 9 here
(U2) pin (PC10 and PC11), carries out time-sharing multiplex collection.
Its operation principle: when O2 sensor (P5) sends pin by serial ports, sent once to single-chip microcomputer (U2) every 2 seconds
After gathering the numerical percentage content after converting, 2S time second then arrives, and air velocity transducer (P8) sends pin by serial ports,
Sending to single-chip microcomputer (U2) and once gather the air speed value after converting, single-chip microcomputer (U2) now produces serial ports interrupt event, by string
Air speed data is received local buffer by mouth interrupt service routine.So on software program, O2 sensor (P5) passes with wind speed
Sensor (P8) achieves acquisition time and process.
Its operation principle: when after single-chip microcomputer (U2) operation programmed acquisition to all of sensing data, to sensing data
Package, then start GPRS communication module (P7), based on 115200bps, no parity check position, 1 stopping position, 8 bit data positions
Serial communication protocol to Agricultural Monitoring center upper computer software send data, single-chip microcomputer (U2) by pin (PA9) send AT
Instruction, to GPRS communication module (P7), drives this module to work;Single-chip microcomputer (U2) is received in Agricultural Monitoring by pin (PA10)
The status information that heart host computer returns, it is judged that whether data successfully arrive at.
Cloud Server 400, it is connected with GPRS wireless transport module 400 by communication network, is used for storing record information
The signal that acquisition terminal 300 collects.
As shown in figure 13, it is system embedment formula software program flow chart.Real-time Collection Agricultural Information, it is saved in system
In SD card, carry out the inquiry of historical data and big data analysis, simultaneously composition protocol package are sent to by GPRS radio transmitting method
Monitoring center software, show in real time in monitoring center software and be saved in data base.It implements step:
Singlechip clock, various peripheral sensor carry out initialization operation;
CO2 and O2 concentration, intensity of illumination, purple in aerial temperature and humidity in Real-time Collection agricultural greenhouse or booth, air
The crop growth environment factors such as outer line strength, soil oxygen content, wind speed;
Judge whether to be complete the collection of all the sensors data, if having gathered, the data write that will have gathered
In system SD card, carry out data preservation, data set bag be sent to monitoring center software display up by GPRS simultaneously and protect
It is stored to data base;
If not gathered, then proceed to gather, until completing the collection of all the sensors data.
A kind of Agricultural Information based on GPRS monitors system ambiguous control method, comprises the following steps:
Gather ambient temperature T, ambient humidity RH, gas concentration lwevel ρ2, oxygen concentration ρ0, intensity of illumination Il, ultraviolet is strong
Degree Ig, wind speed v;
Computing environment assessment factor
Environmental assessment coefficient is assessed factor with presettingMake comparisons and obtain environment factor deviation signal, by purple
Outer line strength and average UV intensity I0=60 make comparisons obtains UV intensity deviation signal;
Environment factor deviation signal is obtained environment factor rate of change signal through differential calculation;UV intensity deviation is believed
Number after differential calculation, obtain UV intensity rate of change signal;
Environment factor rate of change signal and UV intensity rate of change signal are inputted fuzzy controller, is output as soil application
Amount.
By environment factor rate of change signal e1With UV intensity rate of change signal e2Input the first fuzzy controller, Fuzzy Control
Device processed is output as soil applying fertilizer amount q;
Wherein, e1、e2, q actual change scope be respectively [-1,1], [-1,1], [0,40];E1、E2, discrete domain
It is that {-6 ,-5 ,-4 ,-3 ,-2 ,-1, the discrete domain of 0,1,2,3,4,5,6}, Q is { 0,1,2,3,4,5,6,7,8,9,10}
Then quantizing factor k1=6/1, k2=6/1, scale factor k3=10/60
Ambiguity in definition subset and membership function:
Environment factor rate of change signal is divided into 7 fringe: PB (honest), and PM (hits exactly), PS (the least), ZR
(zero), NS (negative little), NM (in Fu), NB (negative big), incorporate experience into and draw environment factor rate of change signal e1Membership function
Table, as shown in table 1.
Table 1 environment factor rate of change signal e1Membership function table
e1 |
-6 |
-5 |
-4 |
-3 |
-2 |
-1 |
-0 |
+0 |
+1 |
+2 |
+3 |
+4 |
+5 |
+6 |
PB |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.2 |
0.7 |
1.0 |
PM |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.2 |
0.7 |
1.0 |
0.7 |
0.2 |
PS |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.1 |
0.7 |
1.0 |
0.7 |
0.1 |
0 |
0 |
ZR |
0 |
0 |
0 |
0 |
0.1 |
0.7 |
1.0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NB |
0 |
0 |
0.1 |
0.7 |
1.0 |
0.7 |
0.1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NM |
0.2 |
0.7 |
1.0 |
0.7 |
0.2 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NS |
1.0 |
0.7 |
0.2 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
UV intensity rate of change signal e2Being divided into 7 fringe: PB (honest), PM (hits exactly), PS (the least), ZR
(zero), NS (negative little), NM (in Fu), NB (negative big), incorporate experience into and draw UV intensity rate of change signal e2Membership function
Table, as shown in table 2.
Table 2 UV intensity rate of change signal e2Membership function table
e2 |
-6 |
-5 |
-4 |
-3 |
-2 |
-1 |
-0 |
+0 |
+1 |
+2 |
+3 |
+4 |
+5 |
+6 |
PB |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.2 |
0.7 |
1.0 |
PM |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.2 |
0.7 |
1.0 |
0.7 |
0.2 |
PS |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0.1 |
0.7 |
1.0 |
0.7 |
0.1 |
0 |
0 |
ZR |
0 |
0 |
0 |
0 |
0.1 |
0.7 |
1.0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NB |
0 |
0 |
0.1 |
0.7 |
1.0 |
0.7 |
0.1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NM |
0.2 |
0.7 |
1.0 |
0.7 |
0.2 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
NS |
1.0 |
0.7 |
0.2 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
Spray unit are crop required for soil applying fertilizer amount q be divided into seven fringe: PB (honest), PM is (just
In), PS (the least), ZR (zero), NS (negative little), NM (in Fu), NB (negative big), incorporate experience into and draw the crop spraying unit are
The function table being subordinate to of required soil applying fertilizer amount q, as shown in table 3.
The membership function table of medicinal liquid flow velocity signal q required for the crop that table 3 sprays unit are
Fuzzy reasoning process has to carry out the matrix operations of complexity, and amount of calculation is very big, and on-line implement reasoning is difficult to meet
The requirement of control system real-time, the present invention uses look-up table to carry out fuzzy reasoning computing, and Fuzzy inferential decision uses dual input
The mode of single output, controls rule and is made up of following reasoning language:
If e is Ai and ec is Bi then ΔKj is Ci
Wherein, Ai, Bi, Ci are respectively ec1、ec2With q fuzzy subset.
Tentatively controlling rule by what experience can sum up fuzzy controller, wherein parameter q controls rule and is shown in Table 4.
Table 4 is fuzzy control rule table
Fuzzy controller carries out defuzzification according to the fuzzy value drawn to output signal, obtains spraying crop medicinal liquid stream
Speed, seeks fuzzy polling list, owing to domain is discrete, and a fuzzy control rule and fuzzy matrix can be expressed as, adopt
Use single-point obfuscation, obtain fuzzy polling list, be shown in Table 5
Table 5 fuzzy polling list
Although embodiment of the present invention are disclosed as above, but it is not restricted in description and embodiment listed
Using, it can be applied to various applicable the field of the invention completely, for those skilled in the art, and can be easily
Realizing other amendment, therefore under the general concept limited without departing substantially from claim and equivalency range, the present invention does not limit
In specific details with shown here as the legend with description.