The Forecasting Methodology of water level of potamic tidewater
Technical field
The invention belongs to technical field of automation, relate to a kind of Forecasting Methodology of water level of potamic tidewater.
Background technology
The tidewater of some rivers spring tides is out of control, the underwater sound rumbles boundless, trend, tendency is risen steeply, and all will attract every year hundreds thousand of visitors two sides of stopping to see tides.Another side in contrast to this, the flow of water of these rivers spring tides and under water the undercurrent rapids become to survey and also the people, the visitor's lives and properties of living in two sides caused very big threat.According to data statistics, annual all someone will lost in this because of the flow of water life of not understanding the rivers spring tide.This shows, analyze and the tidal level of prediction rivers spring tide and spring tide arrive the Changing Pattern of time for just become very meaningful of the safety of protection visitor and people across the Straits' life and property.
Traditional time of tide forecasting procedure has time propagation method and isolates method retardation time, the tidal level Forecasting Methodology then is the tidal level high predicted tidal level height one day after according to the previous day, perhaps according to the height of water level of a website after the high predicted of previous hydrology website.The above-mentioned experimental method tidewater that to a certain degree weakened is subjected to the influence relation of multiple factors such as morning and evening tides, runoff, river topography and wind direction, the mapping relations of existing certain high dimensional nonlinear between them of having weakened.The BP artificial neural network theories that the present invention tries hard to use in recent years and grown up, utilize that it is highly fault-tolerant, parallel processing data and the ability that can approach any nonlinear function set up a model to tidal level and time of tide prediction, in the hope of making a prediction effect that approaches actual value.
Summary of the invention
Purpose of the present invention provides a kind of Forecasting Methodology of water level of potamic tidewater at the deficiencies in the prior art, and the inventive method utilizes historical data that the water level of tidewater is discerned automatically, monitored and follows the tracks of, and realizes forecast.
Concrete steps of the present invention are:
Step (1). with neural network function in the tool box function library of MATLAB 6.5 and the historical data of tidal level and time is the fundamental construction neural network model.Concrete grammar is:
1. obtain the continuous historical data N group of tidal level and time.Tidal level and time data normal condition had four groups of data in one day, were respectively the time and the water level value of time of time of day time of tidewater high tide level and water level value, day tidewater low tide and water level value, Evening Tide water high tide level and water level value, Evening Tide water low tide.These N group data are divided into two groups of front and back, and the data set of front is training sample data group N
iGroup, the data set of back is test sample book data set N
jGroup, wherein N=N
i+ N
j, N
i/ N
j=2~4.
2. the training pattern of determining neural network is three layers, and input layer is 4 nodes, and middle hidden layer is 50 nodes, and output layer is 1 node.With newff function creation BP neural network function, wherein network parameter is set to: the neuron transition function is selected tansig function (tanh S shape transition function) for use, the output layer transition function is selected purelin function (linear transmission function) for use, the network training method is selected the traingdx function for use, training step number 5000 times, training precision is 0.1.
Step (2). utilize the neural metwork training function train function in the MATLAB 6.5 tool box functions to carry out network training, utilize the emulation function sim function in the MATLAB 6.5 tool box functions to carry out network test then.Concrete grammar is:
3. the method for utilizing neural metwork training function train function in the MATLAB 6.5 tool box functions to carry out network training is: training sample data group is converted into 4 * (N
i-3) matrix is as the input parameter of train function, and operation train function is trained, and training process will be a stop condition to reach accuracy requirement or to reach the training step number.To generate a neural network model automatically by system after training finishes, each weights coefficient is implicit, can check in MATLAB 6.5 systems.
Training sample data group N
iBe converted into 4 * (N
iThe concrete grammar of matrix-3) is: with training sample data group N
iFirst data to the four data form first row, the secondary series of second data to the five data of training sample data group being formed matrix, the 3rd data to the six data of training sample data group are formed the 3rd of matrix be listed as, and the like, up to forming 4 * (N
i-3) matrix.
4. the method for utilizing emulation function sim function in the MATLAB 6.5 tool box functions to carry out network test is: the test sample book data set is converted into 4 * (N
j-3) matrix carries out network test as the input parameter of sim function.
The test sample book data set is converted into 4 * (N
jThe concrete grammar of matrix-3) is: first data to the four data of test sample book data set are formed first row, the secondary series of second data to the five data of test sample book data set being formed matrix, the 3rd row of the 3rd data to the six data of test sample book data set being formed matrix, and the like, up to forming 4 * (N
j-3) matrix.
Step (3). use the neural network model behind network training and network test and the sim function of MATLAB 6.5 tool box functions that next high tide level water level value or next low tide water level value are predicted.Concrete grammar is: import the input parameter of last four groups data as the sim function in the sim function, obtain the predicted value of next group data after the sim function calculation, this predicted value is next high tide level water level value or next low tide water level value.
The present invention adopts and the historical data of rivers tidewater is predicted by regular neural network training model its biggest advantage is only to use historical tidewater data short-term forecasting tidal level value comparatively accurately.Compare with the method for existing tradition forecast, this method can be ignored uncertain factor influences such as wind direction, rainfall, plumbing, riverbed variation fully, thereby realizes only relying on historical data to carry out the prediction of tidal level.Ignoring other tidal level factor affecting only relies on historical data to carry out tidal level prediction, this fundamental purpose of the present invention just and great advantage at low cost.
Embodiment
At certain hydrometric station tidal level prediction in the Qiantang River, concrete implementation step is as follows:
Step (1). with neural network function in the tool box function library of MATLAB 6.5 and the historical data of Qiantang River tidal level and time is the fundamental construction neural network model.Concrete grammar is:
1. obtain the hydrology data of hydrometric station, Qiantang River nineteen ninety 1410 groups of tidal levels.Tidal level and time data normal condition had four groups of data in one day, were respectively the time and the water level value of time of time of day time of tidewater high tide level and water level value, day tidewater low tide and water level value, Evening Tide water high tide level and water level value, Evening Tide water low tide.These N group data are divided into two groups of front and back, and the data set of front is 1000 groups of training sample data groups, and the data set of back is 410 groups of test sample book data sets;
2. the training pattern of determining neural network is three layers, and input layer is 4 nodes, and middle hidden layer is 50 nodes, and output layer is 1 node.With newff function creation BP neural network function, wherein network parameter is set to: the neuron transition function is selected tansig function (tanh S shape transition function) for use, the output layer transition function is selected purelin function (linear transmission function) for use, the network training method is selected the traingdx function for use, training step number 5000 times, training precision is 0.1.Specific as follows:
net=newff(minmax(p),[50?1],{’tansig’,’purelin’},’traingdx’,’learngdm’,’mse’);
Wherein, as above the network of parameter structure is represented with network title net.
It is 5000 times that training stops number of steps, and the training error precision is 0.1, specifically is provided with as follows:
net.trainParam.epochs=5000;
net.trainParam.goal=0.1;
Step (2). utilize the neural metwork training function train function in the MATLAB 6.5 tool box functions to carry out network training, utilize the emulation function sim function in the MATLAB 6.5 tool box functions to carry out network test then.Concrete grammar is:
3. the method for utilizing neural metwork training function train function in the MATLAB 6.5 tool box functions to carry out network training is: training sample data group is converted into 4 * 997 the matrix input parameter as the train function, operation train function is trained, be specially: net=train (net, p, t); Wherein, the net in the train function's parameter list represents that the primitive network that makes up, p represent the matrix of the training sample group imported, and t represents to be used for the authentic specimen of inverse modified weights.Training process will be a stop condition to reach accuracy requirement or to reach the training step number.To generate a neural network model automatically by system after training finishes, each weights coefficient is implicit, can check in MATLAB 6.5 systems.
4. the method for utilizing emulation function sim function in the MATLAB 6.5 tool box functions to carry out network test is: with test sample book data set N
jBe converted into 4 * 407 matrix and carry out network test as the input parameter of sim function.Be specially: a=sim (net, p); Wherein, the network that net finishes for training, p is the matrix of test sample book group, a is for using the simulation value of network output.
Step (3). use the neural network model behind network training and network test and the sim function of MATLAB 6.5 tool box functions that next high tide level water level value or next low tide water level value are predicted.Concrete grammar is: import the input parameter of last four groups data as the sim function in the sim function, obtain the predicted value of next group data after the sim function calculation, this predicted value is next high tide level water level value or next low tide water level value.
Adopt use neural network of the present invention to the tidewater Forecasting Methodology, show that by 1410 groups of data experiment using preceding hydrometric station, storehouse nineteen ninety the precision of water level forecast can reach 0.1 meter, its relative error rate is controlled at below 5%.