Summary of the invention
Technical matters to be solved by this invention is for industrial control field and energy industry higher real-time weather data of precision and prediction weather data to be provided.
For solving the problems of the technologies described above; The present invention provides a kind of intelligent weather station system of measurable weather data; Comprise sensor assembly; It is characterized in that: sensor assembly links to each other with control computer in the intelligent weather station, in control computer, is provided with the SD card, and control computer links to each other with the GPRS communication module through the SD card.
The intelligent weather station system of aforesaid measurable weather data, it is characterized in that: also comprise power module, said power module links to each other with sensor assembly, control computer, GPRS communication module respectively.
The intelligent weather station system of aforesaid measurable weather data, it is characterized in that: sensor assembly comprises wind speed wind direction sensor, temperature sensor, humidity sensor, baroceptor, light intensity sensor and rain sensor.
The intelligent weather station system of aforesaid measurable weather data, it is characterized in that: said control computer comprises data processing module, be used to receive and real-time weather data that processes sensor is gathered, and the data after will handling is sent to the SD card.
The intelligent weather station system of aforesaid measurable weather data; It is characterized in that: said control computer comprises the weather data prediction module; According to historical weather data; Utilize adaptive logic network A LN method training prediction algorithm model, and according to surveying weather data and having trained the model of completion to obtain predicting weather data.
The intelligent weather station system of aforesaid measurable weather data; It is characterized in that: said control computer comprises main control module; Be used to control the operation of sensor assembly, weather data prediction module, GPRS communication module, comprise that control data flows to, monitors each process ruuning situation.
The beneficial effect that the present invention reached:
The present invention uses a kind of intelligent weather station system of measurable weather data; For industrial control field and energy industry provide higher real-time weather data of precision and prediction weather data, these weather datas comprise: wind speed and direction, temperature, relative humidity, air pressure, light intensity, rainfall amount etc.The present invention predicts that weather data is that method through the adaptive logic network (ALN) in the intelligent algorithm realizes.This method prediction accuracy is high, and modeling process is simple relatively, and Model Calculation speed is fast, is easy in embedded system, realize.Through statistical study, set up the prediction algorithm model to trimestral at least historical data.Only need can obtain the initial conditions of actual measurement weather data fast weather data and predict the outcome in the time of the prediction weather data as the prediction algorithm model.
Embodiment
The present invention is further specified with implementing below in conjunction with accompanying drawing.
The present invention obtains current weather information through sensor in real time; In the SD card in data processing module is stored in intelligent weather station; The intelligence weather station is set up weather data prediction algorithm model through the artificial intelligence prediction algorithm according to geography information in the configuration file and historical weather data; In general behind the generation forecast algorithm model, need not to revise again this prediction algorithm model from now on.In prediction during weather data,, can obtain to predict the weather data result fast with the weather data of current collection initial conditions as the prediction algorithm model.
The intelligent weather station system of a kind of measurable weather data of the present invention comprises: sensor assembly, data processing module, SD card, weather data prediction module, GPRS communication module and power module.
Sensor assembly comprises: wind speed wind direction sensor, temperature sensor, humidity sensor, baroceptor, light intensity sensor, rain sensor.The sampling period of each sensor all is 5 seconds.
Data processing module is used for the real-time weather data after the processes sensor sampling.Data processing module is mainly added up maximal value, minimum value, the mean value of per 5 minutes, 10 minutes, 15 minutes, 1 hour, 1 day all kinds of weather datas.
The content of SD card storage comprises four parts: the weather data of historical weather data, prediction, weather data prediction algorithm model file, intelligent weather station configuration information.Historical weather data is through the result of sensor in real time collection, the output of data processing module statistics, comprises per 5 minutes, 10 minutes, 15 minutes, 1 hour, 1 day maximal value, minimum value, mean value, and these data keep more than 2 years.The weather data of prediction comprises following 4 hours, 24 hours, 48 hours, 72 hours weather data.Intelligence weather station configuration information has comprised the geography information of this location, weather station, like longitude, latitude, height above sea level, geopotential unit; The configuration information of intelligence weather station collection, forecast is as gathering weather data interval, the forecast weather data time interval; The intelligence weather station information etc. of dispatching from the factory.
The weather data prediction module has two functions, at first is that another function is according to the actual measurement weather data and has trained the model of completion to obtain predicting weather data according to historical weather data training prediction algorithm model.Training prediction algorithm model needs trimestral at least historical weather data.After the prediction algorithm model training is accomplished, generate the dtr file, exist in the SD card.Prediction is at first read and has been trained the measured data of accomplishing model (dtr file) and just having collected during weather data, draws through intelligent algorithm to predict the outcome and store in the SD card.
The GPRS communication module is supported 4 frequency range: 850/900/1800/1900MHZ, supports GSM standard AT order, supports GSM/GPRS Phase2/2+ agreement, embedded ICP/IP protocol.The GPRS module interface comprises: serial line interface (maximum serial ports speed can reach 115200bit/s) is used to obtain the weather data after the acquisition process; Standard SIM card (1.8V or 3V) is used to insert the SIM that operator provides.If use the GPRS private-line mode to carry out data transmission, need to use the SIM of operator's specific customization.
Main control module is used to control the operation of other functional module, flows to, monitors each process ruuning situation like control data.
Power module is the power supply support to whole miniature weather station to be provided.Total system adopts solar powered.Power module comprises sun power electroplax, accumulator, DC/DC direct current change device.
As shown in Figure 1, intelligent weather station is to obtain outside weather data through sensor.Sensor comprises: wind speed wind direction sensor, temperature sensor, humidity sensor, baroceptor, light intensity sensor, rain sensor.Sensor acquisition to data carry out statistical calculation by data processing module, count per 5 minutes, 10 minutes, 15 minutes, 1 hour, 1 day maximal value, minimum value, mean value respectively.The result of statistics output is stored in the SD card.Prediction module obtains historical data through training generation forecast algorithm model from the SD card, prediction algorithm model and real time data generation forecast data that prediction module can also basis have been trained completion, and predicted data is stored in the SD card.Main control module is responsible for controlling collection, processing, storage, the forecasting process of weather data.Power module is that whole intelligent weather station provides electric flux, guarantees intelligent weather station steady operation.
As shown in Figure 2, the weather data forecast function is mainly accomplished training pattern and two functions of predicted data.Before predicted data, needing a prediction algorithm model that has trained, is exactly a dtr file that is stored on the SD card specifically.In general a model can be the predicted data service for a long time, does not need regeneration prediction algorithm model in the forecasting process.When the root-mean-square error of finding predicted data and real data is bigger, online retraining can be set, improve the precision of prediction of prediction algorithm model.
Training pattern generates model through reading historical weather data and configuration file, and historical weather data must be trimestral at least historical weather data, and configuration file has comprised local geographic information data.Model training is accomplished and is generated the dtr file storage in the SD card.During predicted data, need read dtr file and real time data, can fast prediction go out to predict weather data.
Carry out following explanation for adaptive logic network A LN method:
1.ALN basic structure
Can include any a plurality of linear logic relational expressions between any a plurality of independently input variables and variable in the adaptive logic network.The linear equation form is following:
ALN is through changing the weight w in its system of linear equations
IjProduce the result of expectation.Usually, for the generality of model representation, regulation X
0≡ 1, promptly representes the constant term of equation.
In neural network model, X is input, and Y is the output of network, to X
0Constraint information can be understood that neuronic amount of bias.
Make L
j=0.Formula (1) has defined straight line (n=1), a plane (n=2) or lineoid (n>2), therefore obtains following system of equations expression formula:
ALN will have the node of the linear relation (LTU, Linear Threshold Unit) of threshold value judge as network.Threshold value is 0 if make, and then each similar node all will be to L
jWhether>=0 set up and pass judgment on.Its result non-" very " (1, do not reach threshold value) i.e. is " vacation " (0, reach threshold value).Therefore (2) are converted into the linear inequality group:
And the father node of these linear relation nodes is logical operator " AND " and " OR " among the ALN.
Fig. 3 has described one three layers ALN structure (only statistics contains the layer of LTU and logical operator).Can write a Chinese character in simplified form OR (AND (2), AND (2)) to this ALN structure.
The size of ALN structure is a bounded, has determined that the LTU number of ALN is limited owing to be used for the finite data sample of parameter estimation, if n independent variable arranged, the weight vector that then needs among the LTU to estimate is the n+1 dimension.In addition, the shape of ALN structure also is limited.It is different that many ALN body structure surfaces look, but actual be equivalent.For example AND (LTU, AND (2)) and AND (3) are equivalent.So just significantly reduced the structure kind that needs to consider ALN.
2. based on the modeling method of ALN
ALN had both kept the simplicity of tradition based on the Principle of Statistics modeling, also had its incomparable superiority.Because a continuous function can approach with arbitrary accuracy by one group of straight-line segment, so ALN can construct logical relation between linear function and linear unit according to accuracy requirement, comes the match arbitrary continuous function.Fig. 4 has described the two-dimentional output region of ALN among Fig. 3.(X, when Y) dropping on this zone, network is output as " very " (1) to corresponding all sample points of dash area among the figure.
When and if only if all sample points drop on two straight line L1 and L2 was following, the AND of top was output as " very " among Fig. 4.L1 and L2 have taken out the shape of " pinnacle tent ", and its connection mode AND also is equivalent to the minimum value (MIN) of getting two straight lines.In like manner, second AND provided " flat-top tent " shape half.
And if only if when sample point drops in the shadow region, and OR is output as " very ", is equivalent to two " tents " are got maximal value (MAX).
Can sum up the principle of LTU being used the logical operator computing: AND is equivalent to and gets minimum (MIN), and OR is equivalent to and gets maximum (MAX).
The final mask of ALN match is the broken line of the handing-over in " 0 " space and " 1 " space, and the result is a continuous function, but non-dullness, convex function that neither be simple or concave function.At higher dimensional space more, ALN output is the splicing of one group of lineoid.Its shape can be through revising tree structure or LTU weights and threshold value change.For example, concavity can change through logical operator.AND (4) obtains a convex surface, and obtains a concave surface with OR (4).Monotonicity can be through revising positive and negative the obtaining of weight coefficient of LTU.ALN allows these characteristics are forced as constraint condition.
In certain straight-line segment scope, the variation of its output valve is directly proportional with input value, and the weight coefficient of LTU has been represented rate of change.And in the neural network structure of standard, output and the input relation can't learn, only if every other input variable is endowed fixed value, otherwise the tiny variation of other input variables all can cause output quantity than about-face.
3.ALN prediction algorithm
This process of ALN algorithm predicts is called as parameter estimation, and this method is to extract with the test through planning is arranged, periodic observation or through pattern, and the ALN algorithm uses least square method to carry out the estimation of LTU weight coefficient.
At the study initial phase, all LTU are assigned with weight coefficient at random among the ALN, if having priori or constraint condition, can have other distribution method.
According to the order of sample, training sample (X
t, Y
t) as the input of ALN, the logical operation value is exported end value along the tree network transmission.
Below disclose the present invention with preferred embodiment, so it is not in order to restriction the present invention, and all employings are equal to replacement or the technical scheme that obtained of equivalent transformation mode, all drop within protection scope of the present invention.