CN114757096B - Bridge temperature prediction method, device, equipment and medium based on NARX neural network - Google Patents

Bridge temperature prediction method, device, equipment and medium based on NARX neural network Download PDF

Info

Publication number
CN114757096B
CN114757096B CN202210340870.8A CN202210340870A CN114757096B CN 114757096 B CN114757096 B CN 114757096B CN 202210340870 A CN202210340870 A CN 202210340870A CN 114757096 B CN114757096 B CN 114757096B
Authority
CN
China
Prior art keywords
data
model
bridge temperature
meteorological
training
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.)
Active
Application number
CN202210340870.8A
Other languages
Chinese (zh)
Other versions
CN114757096A (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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202210340870.8A priority Critical patent/CN114757096B/en
Publication of CN114757096A publication Critical patent/CN114757096A/en
Application granted granted Critical
Publication of CN114757096B publication Critical patent/CN114757096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/08Construction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/08Thermal analysis or thermal optimisation
    • 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
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Human Resources & Organizations (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Biomedical Technology (AREA)
  • Operations Research (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Geometry (AREA)
  • Development Economics (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a bridge temperature prediction method, a device, computer equipment and a storage medium based on NARX neural network, wherein the method comprises the following steps: performing sequential interpolation or extraction on the obtained bridge temperature data and the corresponding meteorological data, adjusting the bridge temperature data and the corresponding meteorological data to time sequence data with the same sampling rate, and taking the adjusted meteorological data as an alternative parameter; selecting weather parameters with high correlation with bridge temperature from the alternative parameters through the maximum information coefficient, and preprocessing the selected weather parameters and the corresponding bridge temperature data to obtain sample data; the sample data is divided into training data and test data; training the open-loop architecture model by using training data, converting the open-loop architecture in the trained model into a closed-loop structure, and evaluating the prediction performance of the closed-loop structure model by using test data; and if the prediction performance is good, predicting the data value of the bridge temperature by using the closed-loop structure model. The method provided by the invention has high prediction precision and good engineering practicability.

Description

基于NARX神经网络的桥梁温度预测方法、装置、设备和介质Bridge temperature prediction method, device, equipment and medium based on NARX neural network

技术领域Technical field

本发明涉及桥梁结构健康监测技术领域,特别是一种基于NARX神经网络的桥梁温度预测方法、装置、计算机设备和存储介质。The invention relates to the technical field of bridge structure health monitoring, in particular to a bridge temperature prediction method, device, computer equipment and storage medium based on NARX neural network.

背景技术Background technique

桥梁结构是重要的基础设施,是交通大动脉上的关键节点,数以百万计的桥梁为我国社会和经济的发展做出了重大贡献。温度荷载是重要的荷载形式,温度变化可引起桥梁材料属性的变化和体积的热胀冷缩,在边界和构件之间的连接约束下将会导致结构变形、应力、应变、支座反力等温度效应,引起桥梁温度病害的发生。为确保桥梁结构建设和运营的安全性,获取桥梁温度场数据是非常有必要的。Bridge structures are important infrastructure and key nodes on transportation arteries. Millions of bridges have made significant contributions to the development of our country's society and economy. Temperature load is an important form of load. Temperature changes can cause changes in the material properties of the bridge and thermal expansion and contraction of the volume. Under the connection constraints between the boundaries and components, it will lead to structural deformation, stress, strain, support reaction force, etc. Temperature effect causes the occurrence of bridge temperature diseases. In order to ensure the safety of bridge structure construction and operation, it is very necessary to obtain bridge temperature field data.

目前桥梁温度场数据的获取严重依赖现场实测,而基于结构健康监测系统的桥梁温度实时监测又具有成本高、耗时长、分析效率低的特点,且使用年限内传感器可能出现故障、损坏、丢失等情况,不能满足大多数桥梁的工程分析需求及数据长期稳定获取的要求。另外,以往通过有限元热分析方法进行桥梁温度场的获取也存在热边界条件计算方法复杂、软件编写难度较大、运行耗时、内存占用较大的缺点,使用存在较多的局限性。At present, the acquisition of bridge temperature field data relies heavily on on-site measurements, and real-time monitoring of bridge temperature based on structural health monitoring systems has the characteristics of high cost, long time consumption, and low analysis efficiency, and the sensors may malfunction, be damaged, or be lost during their service life. situation, it cannot meet the engineering analysis needs of most bridges and the requirements for long-term stable data acquisition. In addition, in the past, the finite element thermal analysis method was used to obtain the bridge temperature field, which also had the disadvantages of complex thermal boundary condition calculation methods, difficulty in software writing, time-consuming operation, large memory usage, and many limitations in use.

近些年来,神经网络技术由于其优越的非线性拟合能力在工程领域得到广泛应用。有外部输入的非线性自回归模型(Nonlinear Auto-Regressive with ExogenousInputs Model,NARX)是一种递归动态神经网络,它是在BP神经网络的基础上将神经网络的输出作为外部的反馈引入神经网络的输入层,并在输入中增加s个单位延迟。相比于静态的神经网络,它的输出同时考虑了从t-s开始到t时时间步的信息,可以看作是具有输入延迟及短期记忆能力的多层感知器,能够更好的学习时序数据复杂动态系统输入与输出间的关系。应用该模型可考虑桥梁温度与外界气象因素的高度非线性以及时序特性,输出气象时序数据对应的桥梁测点温度的预测值。In recent years, neural network technology has been widely used in the engineering field due to its superior nonlinear fitting capabilities. Nonlinear Auto-Regressive with ExogenousInputs Model (NARX) is a recursive dynamic neural network. It is based on the BP neural network and introduces the output of the neural network into the neural network as external feedback. input layer and add s units of delay to the input. Compared with static neural networks, its output also considers the information from the time step from t-s to time t. It can be regarded as a multi-layer perceptron with input delay and short-term memory capabilities, which can better learn complex time series data. The relationship between input and output of a dynamic system. Applying this model can consider the highly nonlinear and time series characteristics of bridge temperature and external meteorological factors, and output the predicted value of the temperature of the bridge measuring point corresponding to the meteorological time series data.

发明内容Contents of the invention

为了解决上述现有技术的不足,本发明提供了一种基于NARX神经网络的桥梁温度预测方法、装置、计算机设备和存储介质,该方法利用NARX神经网络处理非线性数据关系及短期记忆能力的优势,输入场地气象参数,即可实现快速获取对应桥梁温度数据的目的,是深度学习技术在桥梁温度预测方向的首次应用。该方法预测精度高,具有较好的工程实用性,可缩短计算时间。In order to solve the above-mentioned deficiencies in the prior art, the present invention provides a bridge temperature prediction method, device, computer equipment and storage medium based on NARX neural network. This method utilizes the advantages of NARX neural network in processing non-linear data relationships and short-term memory capabilities. By inputting the site meteorological parameters, the corresponding bridge temperature data can be quickly obtained. This is the first application of deep learning technology in the direction of bridge temperature prediction. This method has high prediction accuracy, good engineering practicability, and can shorten calculation time.

本发明的第一个目的在于提供一种基于NARX神经网络的桥梁温度预测方法。The first object of the present invention is to provide a bridge temperature prediction method based on NARX neural network.

本发明的第二个目的在于提供一种基于NARX神经网络的桥梁温度预测装置。The second object of the present invention is to provide a bridge temperature prediction device based on NARX neural network.

本发明的第三个目的在于提供一种计算机设备。A third object of the present invention is to provide a computer device.

本发明的第四个目的在于提供一种存储介质。The fourth object of the present invention is to provide a storage medium.

本发明的第一个目的可以通过采取如下技术方案达到:The first object of the present invention can be achieved by adopting the following technical solutions:

一种基于NARX神经网络的桥梁温度预测方法,所述方法包括:A bridge temperature prediction method based on NARX neural network, the method includes:

对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;Perform sequence interpolation or extraction on the obtained bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein the meteorological data includes multiple meteorological parameters;

通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;Meteorological parameters with high correlation with bridge temperature are selected from the alternative parameters through the maximum information coefficient as input features of the model; the selected meteorological parameters and the corresponding bridge temperature data are preprocessed respectively to obtain sample data; where , the sample data is divided into training data and test data;

利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;Use the training data to train the model to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input;

将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;Convert the open-loop architecture in the trained model to a closed-loop structure, use the test data, and use the absolute error average index to evaluate the prediction performance of the closed-loop structure model;

若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。If the prediction result is within the preset range, the closed-loop structural model obtains the predicted value of the bridge temperature based on the input meteorological data.

进一步的,所述利用所述训练数据对模型进行训练,得到训练好的模型,具体包括:Further, using the training data to train the model to obtain a trained model specifically includes:

利用所述训练数据对模型进行训练,包括对所述模型进行超参数学习和优化;Using the training data to train the model, including hyperparameter learning and optimization of the model;

对于训练后的模型,利用所述训练数据,采用拟合优度量化预测值与目标值之间的关系强度,若关系强度不够高,则重新训练模型或优化模型的拓扑结构,进而得到训练好的模型;For the trained model, the training data is used to quantify the relationship strength between the predicted value and the target value using fitting optimization. If the relationship strength is not high enough, the model is retrained or the topology of the model is optimized to obtain a well-trained model. model;

所述训练数据包括气象数据xi和对应的桥梁温度数据yi,yi作为目标值;所述气象数据xi输入模型后输出的值为预测值 The training data includes meteorological data xi and corresponding bridge temperature data yi , with yi as the target value; the value output after the meteorological data xi is input into the model is the predicted value

所述利用所述训练数据,采用拟合优度量化预测值与目标值之间的关系强度,具体为:Using the training data, fitting optimization is used to quantify the relationship strength between the predicted value and the target value, specifically:

拟合优度公式如下:The goodness of fit formula is as follows:

式中,R2表示预测值与目标值之间的关系强度,为目标值的均值,n为输入模型的样本个数。In the formula, R 2 represents the strength of the relationship between the predicted value and the target value, is the mean of the target value, and n is the number of samples input to the model.

进一步的,所述利用所述训练数据对模型进行训练,具体包括:Further, using the training data to train the model specifically includes:

将所述训练数据分成三个子集,利用三个子集进行交叉验证,其中:Divide the training data into three subsets, and use the three subsets for cross-validation, where:

第一个子集是训练集,用于计算梯度和更新网络权重和偏差,以最小化网络损失函数;The first subset is the training set, which is used to calculate gradients and update network weights and biases to minimize the network loss function;

第二个子集是验证集,在训练过程中监控验证错误,使网络权重和偏差以最小验证集误差保存;The second subset is the validation set, which monitors validation errors during the training process so that network weights and biases are saved with the minimum validation set error;

第三个子集是测试集,在训练和验证后用于最终测试,输出模型训练完成后的性能指标;The third subset is the test set, which is used for final testing after training and verification, and outputs the performance indicators after the model training is completed;

选取贝叶斯正则化算法或量化共轭梯度算法优化网络权重和偏置,并通过引入Dropout技术来避免欠拟合和过拟合的发生;Choose Bayesian regularization algorithm or quantified conjugate gradient algorithm to optimize network weights and biases, and introduce Dropout technology to avoid under-fitting and over-fitting;

在所述模型的训练过程中,选用trainscg量化共轭梯度算法,将所述训练数据输入模型进行神经网络的参数学习优化,若验证误差不降低,则停止迭代,否则进行迭代的次数为设定的次数。During the training process of the model, the trainscg quantified conjugate gradient algorithm is selected, and the training data is input into the model for parameter learning and optimization of the neural network. If the verification error does not decrease, the iteration is stopped, otherwise the number of iterations is set. number of times.

进一步的,所述测试数据包括气象数据和对应的桥梁温度;Further, the test data includes meteorological data and corresponding bridge temperature;

所述利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能,具体包括:The use of the test data and the use of the absolute error average index to evaluate the prediction performance of the closed-loop structural model include:

将所述测试数据中任一气象数据xj输入闭环结构模型,得到闭环结构模型输出的值,将输出的值反标准化后得到桥梁温度的预测值 Input any meteorological data x j in the test data into the closed-loop structural model to obtain the value output by the closed-loop structural model. After de-normalizing the output value, the predicted value of the bridge temperature is obtained.

将测试数据中气象数据xj对应的桥梁温度反标准化后作为桥梁温度的目标值yjThe bridge temperature corresponding to the meteorological data x j in the test data is de-standardized and used as the target value y j of the bridge temperature;

采用绝对误差平均值指标反映桥梁温度预测值与目标值间的误差,绝对误差平均值计算如下:The absolute error average index is used to reflect the error between the bridge temperature prediction value and the target value. The absolute error average is calculated as follows:

其中,n为输入模型的样本个数;Among them, n is the number of samples input to the model;

若绝对误差平均值在预设值附近,则表示预测性能好,能满足工程精度要求。If the average absolute error is near the preset value, it means that the prediction performance is good and can meet the engineering accuracy requirements.

进一步的,设桥梁温度为x,对应的备选参数中任一气象参数为y;Further, let the bridge temperature be x, and any corresponding meteorological parameter among the alternative parameters be y;

所述通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征,具体包括:The meteorological parameters that are highly correlated with the bridge temperature are selected from the alternative parameters through the maximum information coefficient as the input features of the model, specifically including:

采用最大信息系数的计算公式如下:The calculation formula using the maximum information coefficient is as follows:

其中,I(x;y)为互信息系数,p(x,y)为变量x和y之间的联合概率,a、b表示二维空间在x、y方向上划分格子的个数,B的大小设置满足a*b<B;Among them, I(x;y) is the mutual information coefficient, p(x,y) is the joint probability between variables x and y, a and b represent the number of grids divided into two-dimensional space in the x and y directions, B The size setting satisfies a*b<B;

MIC(x;y)的值越大,则表示x、y的相关性越高;若x、y的相关性高,则y被选为模型的输入特征。The larger the value of MIC(x;y), the higher the correlation between x and y; if the correlation between x and y is high, then y is selected as the input feature of the model.

进一步的,对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据,具体包括:Further, the selected meteorological parameters and corresponding bridge temperature data are preprocessed respectively to obtain sample data, which specifically includes:

对选出的气象参数分别进行Z-Score标准化处理,得到处理后气象数据,作为模型的输入数据;Perform Z-Score standardization processing on the selected meteorological parameters respectively to obtain processed meteorological data as input data for the model;

对桥梁温度数据进行Z-Score标准化处理,得到处理后桥梁温度数据,作为模型输出的值;Perform Z-Score normalization processing on the bridge temperature data to obtain the processed bridge temperature data as the model output value;

所述处理后气象数据和对应的所述处理后桥梁温度数据构成样本数据。The processed meteorological data and the corresponding processed bridge temperature data constitute sample data.

进一步的,所述NARX神经网络模型采用具有输出延迟反馈的网络结构,包括输入层、隐藏层和输出层;Further, the NARX neural network model adopts a network structure with output delayed feedback, including an input layer, a hidden layer and an output layer;

初始化NARX神经网络模型的节点个数和反馈延迟数,NARX神经网络模型的输入输出关系为:Initialize the number of nodes and the number of feedback delays of the NARX neural network model. The input-output relationship of the NARX neural network model is:

y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1))y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1))

其中,t表示当前时刻,d表示反馈延迟数,y(t)、y(t-1)表示当前时刻和前一时刻网络模型的输出,x(t)、x(t-d)表示当前时刻和前d时刻网络模型的输入数据。Among them, t represents the current moment, d represents the number of feedback delays, y(t) and y(t-1) represent the output of the network model at the current moment and the previous moment, x(t) and x(t-d) represent the current moment and the previous moment. The input data of the network model at time d.

进一步的,获取的气象数据包括的气象参数为天顶角、气温、相对湿度、风速、降雨量、总云层覆盖率。Further, the meteorological data obtained include meteorological parameters such as zenith angle, temperature, relative humidity, wind speed, rainfall, and total cloud coverage.

本发明的第二个目的可以通过采取如下技术方案达到:The second object of the present invention can be achieved by adopting the following technical solutions:

一种基于NARX神经网络的桥梁温度预测装置,所述装置包括:A bridge temperature prediction device based on NARX neural network, the device includes:

备选参数获取模块,用于对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;The alternative parameter acquisition module is used to perform sequence interpolation or extraction on the acquired bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein, the meteorological data The data include multiple meteorological parameters;

样本数据获取模块,用于通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;The sample data acquisition module is used to select meteorological parameters that are highly correlated with the bridge temperature from the alternative parameters through the maximum information coefficient as the input features of the model; and predict the selected meteorological parameters and the corresponding bridge temperature data respectively. Process to obtain sample data; wherein the sample data is divided into training data and test data;

模型训练模块,用于利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;A model training module, used to train the model using the training data to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input;

模型预测性能评估模块,用于将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;The model prediction performance evaluation module is used to convert the open-loop architecture in the trained model into a closed-loop structure, and uses the test data to evaluate the prediction performance of the closed-loop structure model using the absolute error average index;

桥梁温度预测模块,用于若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。The bridge temperature prediction module is used to use the closed-loop structural model to obtain the predicted value of the bridge temperature based on the input meteorological data if the prediction result is within the preset range.

本发明的第三个目的可以通过采取如下技术方案达到:The third object of the present invention can be achieved by adopting the following technical solutions:

一种计算机设备,包括处理器以及用于存储处理器可执行程序的存储器,所述处理器执行存储器存储的程序时,实现上述的桥梁温度预测方法。A computer device includes a processor and a memory for storing an executable program of the processor. When the processor executes the program stored in the memory, the above bridge temperature prediction method is implemented.

本发明的第四个目的可以通过采取如下技术方案达到:The fourth object of the present invention can be achieved by adopting the following technical solutions:

一种存储介质,存储有程序,所述程序被处理器执行时,实现上述的桥梁温度预测方法。A storage medium stores a program. When the program is executed by a processor, the above bridge temperature prediction method is implemented.

本发明相对于现有技术具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:

1、本发明提供了一种基于NARX神经网络的桥梁温度预测方法,是深度学习技术在桥梁温度预测方向的首次应用。该方法构建了与桥梁温度成强相关的气象特征作为模型的输入,并通过神经网络考虑了气象数据时间维度的周期特性、与结构温度之间的非线性组合关系、短期时序依赖关系;并通过递归方法对网络神经元权值和阈值实时更新,可完成所需时间步内桥梁多测点温度的多步预测,且预测精确度较高。1. The present invention provides a bridge temperature prediction method based on NARX neural network, which is the first application of deep learning technology in the direction of bridge temperature prediction. This method constructs meteorological characteristics that are strongly related to the bridge temperature as the input of the model, and considers the periodic characteristics of the time dimension of meteorological data, the nonlinear combination relationship with the structural temperature, and the short-term temporal dependence through the neural network; and through the neural network The recursive method updates the network neuron weights and thresholds in real time, which can complete multi-step prediction of the temperature of multiple measuring points on the bridge within the required time step, and the prediction accuracy is high.

2、本发明采用神经网络进行桥梁温度的计算,较传统的基于SHM监测系统获取测点温度的方法,可弥补健康监测设备存在一定使用年限限制、数据可能缺失的缺陷,实现桥梁测点温度长期稳定获取。2. The present invention uses a neural network to calculate the temperature of the bridge. The more traditional method of obtaining the temperature of the measuring point based on the SHM monitoring system can make up for the shortcomings of health monitoring equipment that has a certain service life limit and possible lack of data, and achieve long-term measurement of the temperature of the bridge measuring point. Stable acquisition.

3、本发明提供的方法较传统的基于有限元及编程软件交互程序计算温度场的方法,可缩短计算时间、减少内存占用空间,提高计算效率,具有很好的工程实用性。3. Compared with the traditional method of calculating the temperature field based on finite elements and programming software interactive programs, the method provided by the present invention can shorten the calculation time, reduce the memory occupied space, improve the calculation efficiency, and has good engineering practicality.

附图说明Description of the drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the structures shown in these drawings without exerting creative efforts.

图1为本发明实施例1的基于NARX神经网络的桥梁温度预测方法的流程图。Figure 1 is a flow chart of a bridge temperature prediction method based on NARX neural network in Embodiment 1 of the present invention.

图2为本发明实施例1的NARX神经网络模型开环拓扑结构示意图。Figure 2 is a schematic diagram of the open-loop topology of the NARX neural network model in Embodiment 1 of the present invention.

图3为本发明实施例1的NARX模型拟合优度(R2)指标示意图。Figure 3 is a schematic diagram of the NARX model fitting goodness (R 2 ) index in Embodiment 1 of the present invention.

图4为本发明实施例1的NARX神经网络模型闭环拓扑结构示意图。Figure 4 is a schematic diagram of the closed-loop topology structure of the NARX neural network model in Embodiment 1 of the present invention.

图5为本发明实施例1的箱型桥梁截面及测点位置示意图。Figure 5 is a schematic diagram of the box-shaped bridge section and measuring point locations in Embodiment 1 of the present invention.

图6为本发明实施例1的NARX模型预测结果绝对误差平均值(MAE)指标示意图。Figure 6 is a schematic diagram of the mean absolute error (MAE) index of the NARX model prediction results in Embodiment 1 of the present invention.

图7为本发明实施例1的顶板中部点温度预测值与目标值对比示意图。Figure 7 is a schematic diagram comparing the predicted value and the target value of the temperature at the middle point of the roof in Embodiment 1 of the present invention.

图8为本发明实施例1的底板中部点温度预测值与目标值对比示意图。Figure 8 is a schematic diagram comparing the predicted value and the target value of the temperature at the middle point of the base plate in Embodiment 1 of the present invention.

图9为本发明实施例1的东腹板中部点温度预测值与目标值对比示意图。Figure 9 is a schematic diagram comparing the predicted value and the target value of the temperature at the middle point of the east web in Embodiment 1 of the present invention.

图10为本发明实施例1的西腹板中部点温度预测值与目标值对比示意图。Figure 10 is a schematic diagram comparing the predicted value and the target value of the temperature at the middle point of the west web in Embodiment 1 of the present invention.

图11为本发明实施例2的基于NARX神经网络的桥梁温度预测装置的结构框图。Figure 11 is a structural block diagram of a bridge temperature prediction device based on NARX neural network according to Embodiment 2 of the present invention.

图12为本发明实施例3的计算机设备的结构框图。Figure 12 is a structural block diagram of a computer device according to Embodiment 3 of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。应当理解,描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention. . It should be understood that the specific embodiments described are only used to explain the present application and are not used to limit the present application.

实施例1:Example 1:

如图1所示,本实施例提供了一种基于NARX神经网络的桥梁温度预测方法,包括以下步骤:As shown in Figure 1, this embodiment provides a bridge temperature prediction method based on NARX neural network, including the following steps:

S101、对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数。S101. Perform sequence interpolation or extraction on the acquired bridge temperature data and corresponding meteorological data, adjust them to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters.

其中,气象数据包括多个气象参数。Among them, meteorological data includes multiple meteorological parameters.

(1)获取桥梁温度数据及对应的气象数据。(1) Obtain bridge temperature data and corresponding meteorological data.

用于模型训练的桥梁温度数据来自健康监测系统实际观测或有限元计算,气象数据来自气象网站共享数据下载或桥梁场地实际观测。The bridge temperature data used for model training comes from actual observations from the health monitoring system or finite element calculations, and the meteorological data comes from shared data downloads from meteorological websites or actual observations at the bridge site.

本实施例中训练预采用的桥梁温度数据通过在实体桥梁结构布置温度测点,利用温度采集仪器获取。In this embodiment, the bridge temperature data used in pre-training is obtained by arranging temperature measurement points on the physical bridge structure and using temperature acquisition instruments.

本实施例中气象数据包括天顶角、气温、相对湿度、风速、降雨量、总云层覆盖率6个参数。其中,气温、相对湿度、风速、降雨量、总云层覆盖率的数据来自瑞士气象平台Meteoblue提供的气象站数据,下载自www.meteoblue.com网站。In this embodiment, the meteorological data includes six parameters: zenith angle, temperature, relative humidity, wind speed, rainfall, and total cloud coverage. Among them, the data on temperature, relative humidity, wind speed, rainfall, and total cloud coverage come from weather station data provided by the Swiss meteorological platform Meteoblue and downloaded from the www.meteoblue.com website.

由于该气象站点距离桥梁场地距离较近仅500m,可近似利用气象站环境代替桥梁场地气象环境,根据该桥梁场地的相关数据,如太阳高度角、太阳赤纬、太阳时角、当地时间及所在地点纬度,通过如下公式计算天顶角γ:Since the meteorological station is only 500m away from the bridge site, the weather station environment can be approximately used to replace the bridge site meteorological environment. According to the relevant data of the bridge site, such as solar altitude angle, solar declination, solar hour angle, local time and location Point latitude, calculate the zenith angle γ through the following formula:

sinδ=0.39795cos[0.98563(N-173)/180*pi]sinδ=0.39795cos[0.98563(N-173)/180*pi]

ω=15×(ST-12)ω=15×(ST-12)

γ=90°-arcsin(sinhs)γ=90°-arcsin(sinh s )

其中,hs为太阳高度角;δ为太阳赤纬,表示太阳光线与地球赤道面的夹角;N为日序数,即距离当年1月1日的天数;ω为太阳时角;ST为当地时间;为观测地点纬度。Among them, h s is the solar altitude angle; δ is the solar declination, indicating the angle between the sun's rays and the earth's equatorial plane; N is the day number, that is, the number of days from January 1 of that year; ω is the solar hour angle; ST is the local time; is the latitude of the observation location.

(2)对桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数。(2) Perform sequence interpolation or extraction on the bridge temperature data and corresponding meteorological data, adjust them to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters.

将实际观测获得的测点温度数据及得到的对应气象数据,进行线性插值或抽取,调整为采样率相同的时间序列数据,样本时间间隔为1h,将调整后气象数据作为训练模型的备选参数。Perform linear interpolation or extraction on the temperature data of measuring points obtained from actual observations and the corresponding meteorological data, and adjust them to time series data with the same sampling rate. The sample time interval is 1 hour. The adjusted meteorological data will be used as alternative parameters for the training model. .

S102、通过最大信息系数从备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征。S102. Select the meteorological parameters that are highly correlated with the bridge temperature from the candidate parameters through the maximum information coefficient as the input features of the model.

本实施例中备选参数包括气象数据中的天顶角、气温、相对湿度、风速、降雨量、总云层覆盖率6个参数。In this embodiment, the candidate parameters include six parameters in the meteorological data: zenith angle, temperature, relative humidity, wind speed, rainfall, and total cloud coverage.

对6个备选参数实现降维,定量选择与桥梁温度具有强相关性的气象因子。采用最大信息系数(MIC)衡量备选参数中每个参数与桥梁温度的相关性。Implement dimensionality reduction for six alternative parameters, and quantitatively select meteorological factors that have a strong correlation with bridge temperature. The maximum information coefficient (MIC) is used to measure the correlation between each parameter in the candidate parameters and the bridge temperature.

MIC是两个随机变量的联合分布和边缘分布之间相对熵的量化,用于衡量两个变量x、y之间线性或非线性的关联程度。其基本思想是把两个变量离散在二维空间中并用散点图表示,然后将该二维空间在x、y方向分别分割成一定的方格数,观察散点在各方格中的落散点情况,进行联合概率的计算,以简化计算互信息系数,这样就解决了在互信息中联合概率难以求解的问题;最后进行归一化,得到MIC的值。在x、y方向分别分割成一定的方格可以有多种不同方式,取计算出最大MIC值作为最终结果。MIC计算公式如下:MIC is a quantification of the relative entropy between the joint distribution and the marginal distribution of two random variables. It is used to measure the degree of linear or nonlinear correlation between two variables x and y. The basic idea is to discretize two variables in a two-dimensional space and use a scatter diagram to represent it, then divide the two-dimensional space into a certain number of squares in the x and y directions, and observe the placement of the scatter points in each square. In the case of scattered points, the joint probability is calculated to simplify the calculation of the mutual information coefficient, which solves the problem that the joint probability is difficult to solve in mutual information; finally, normalization is performed to obtain the value of MIC. There are many different ways to divide it into certain squares in the x and y directions, and the maximum MIC value is calculated as the final result. The MIC calculation formula is as follows:

式中,I(x,y)为互信息系数,p(x,y)为变量x和y之间的联合概率,a、b表示二维空间在x、y方向上划分格子的个数,设置a*b<B,B的大小设置为数据样本数的0.6次方左右。In the formula, I(x,y) is the mutual information coefficient, p(x,y) is the joint probability between variables x and y, a and b represent the number of grids divided into two-dimensional space in the x and y directions, Set a*b<B, and the size of B is set to about 0.6 power of the number of data samples.

通过最大信息系数(MIC)选出与桥梁温度相关性高的气象参数作为模型的输入特征,即MIC的值越大,则x、y的相关性越高。Meteorological parameters with high correlation with bridge temperature are selected as input features of the model through the maximum information coefficient (MIC). That is, the larger the value of MIC, the higher the correlation between x and y.

本实施例中通过MIC选取的气象参数包括天顶角、气温、相对湿度、风速、总云层覆盖率5个参数,作为模型的输入特征。In this embodiment, the meteorological parameters selected through MIC include five parameters: zenith angle, temperature, relative humidity, wind speed, and total cloud coverage, which are used as input features of the model.

S103、对选出的气象参数及对应环境条件下的桥梁温度数据分别进行预处理,得到样本数据,将样本数据分为训练数据和测试数据。S103. Preprocess the selected meteorological parameters and the bridge temperature data under corresponding environmental conditions respectively to obtain sample data, and divide the sample data into training data and test data.

(1)对选出的气象参数进行Z-Score标准化处理,得到处理后气象数据。(1) Perform Z-Score standardization processing on the selected meteorological parameters to obtain processed meteorological data.

选出的气象参数作为模型的输入特征,将输入特征的数据输入模型前,进行Z-Score标准化处理,可以消除数据量纲及不同特征数据极差差异的影响,在神经网络训练中极大地提高数据表现。将处理后的气象参数的数据称为处理后气象数据,作为模型的输入数据。The selected meteorological parameters are used as input features of the model. Before inputting the data of the input features into the model, Z-Score standardization processing can be performed to eliminate the impact of data dimensions and data range differences of different features, which greatly improves neural network training. Data performance. The processed meteorological parameter data is called processed meteorological data and is used as the input data of the model.

处理后数据转化为均值为0,方差为1的无量纲数据,且符合标准正态分布。该方法可将不同量级数据统一转化为相同量级,以保证数据之间的可比性及提高神经网络的稳定性。Z-Score标准化公式如下:After processing, the data is transformed into dimensionless data with a mean of 0 and a variance of 1, and conforms to the standard normal distribution. This method can uniformly transform data of different magnitudes into the same magnitude to ensure comparability between data and improve the stability of the neural network. The Z-Score normalization formula is as follows:

式中:x为处理前数据,x’为处理后数据,μ为所有处理前数据的均值,σ为所有处理前数据的标准差。In the formula: x is the pre-processed data, x’ is the post-processed data, μ is the mean of all pre-processed data, and σ is the standard deviation of all pre-processed data.

(2)对桥梁温度数据进行Z-Score标准化处理,得到处理后桥梁温度数据。(2) Perform Z-Score standardization processing on the bridge temperature data to obtain the processed bridge temperature data.

根据选出的气象参数,从桥梁温度数据中选出对应环境条件下的桥梁温度数据,同样对选出的桥梁温度数据进行Z-Score标准化处理,得到处理后桥梁温度数据,作为模型输出的值。According to the selected meteorological parameters, bridge temperature data under corresponding environmental conditions are selected from the bridge temperature data. Z-Score standardization is also performed on the selected bridge temperature data to obtain the processed bridge temperature data as the value of the model output. .

(3)根据处理后气象数据和处理后桥梁温度数据,得到样本数据。(3) Obtain sample data based on the processed meteorological data and processed bridge temperature data.

处理后气象数据和处理后桥梁温度数据构成样本数据。The processed meteorological data and the processed bridge temperature data constitute the sample data.

(4)将样本数据分为训练数据和测试数据。(4) Divide the sample data into training data and test data.

总体时序数据样本在不乱序的条件下,将样本数据中80%作为训练数据,20%作为测试数据。Under the condition that the overall time series data samples are not out of order, 80% of the sample data is used as training data and 20% is used as test data.

S104、利用训练数据对NARX神经网络模型进行训练。S104. Use the training data to train the NARX neural network model.

(1)搭建带外部输入的开环NARX神经网络模型。(1) Build an open-loop NARX neural network model with external input.

如图2所示,本实例提供的开环NARX神经网络模型包含一个输入层、一个隐藏层和一个输出层。As shown in Figure 2, the open-loop NARX neural network model provided in this example includes an input layer, a hidden layer and an output layer.

初始化NARX神经网络模型的节点个数和反馈延迟数,NARX神经网络模型输入输出关系为:Initialize the number of nodes and the number of feedback delays of the NARX neural network model. The input-output relationship of the NARX neural network model is:

y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1))y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1))

其中t表示当前时刻,d表示反馈延迟数。Where t represents the current moment and d represents the number of feedback delays.

f(x,y)为关于x,y的非线性映射函数,y(t)、y(t-1)表示当前时刻和前一时刻网络输出,x(t)、x(t-d)表示当前时刻和前d时刻网络输入。隐藏层中包含h个神经元,隐含层最佳神经元数可根据经验公式选择:f(x,y) is a nonlinear mapping function about x,y, y(t), y(t-1) represents the network output at the current moment and the previous moment, x(t), x(t-d) represents the current moment and network input at the first d moments. The hidden layer contains h neurons, and the optimal number of neurons in the hidden layer can be selected based on the empirical formula:

其中,h为隐含层神经元数,m是输入神经元数,n是输出神经元数,a为1~10之间任意常数。Among them, h is the number of hidden layer neurons, m is the number of input neurons, n is the number of output neurons, and a is any constant between 1 and 10.

本实施例中隐藏层包含10个神经元,隐藏层激活函数为tansig,输出层激活函数为linear线性函数,反馈延迟数d设置为3。In this embodiment, the hidden layer contains 10 neurons, the hidden layer activation function is tansig, the output layer activation function is linear linear function, and the feedback delay number d is set to 3.

(2)利用训练数据对开环NARX神经网络模型进行超参数学习和优化。(2) Use training data to perform hyperparameter learning and optimization of the open-loop NARX neural network model.

训练数据被分成三个子集,进行交叉验证,其中:The training data was divided into three subsets for cross-validation, where:

第一个子集是训练集,用于计算梯度和更新网络权重和偏差,以最小化网络损失函数MSE;The first subset is the training set, which is used to calculate gradients and update network weights and biases to minimize the network loss function MSE;

第二个子集是验证集,在训练过程中监控验证错误,使网络权重和偏差以最小验证集误差保存;The second subset is the validation set, which monitors validation errors during the training process so that network weights and biases are saved with the minimum validation set error;

第三个子集是测试集,在训练和验证后用于最终测试,输出模型训练完成后的性能指标。The third subset is the test set, which is used for final testing after training and validation, and outputs performance indicators after the model training is completed.

NARX模型训练过程中采用断开输出延迟反馈的开环网络结构进行训练,根据神经网络性能选取贝叶斯正则化算法或量化共轭梯度算法优化网络权重和偏置,并通过引入Dropout技术来避免欠拟合和过拟合的发生。During the training process of the NARX model, an open-loop network structure with output delayed feedback is used for training. Bayesian regularization algorithm or quantified conjugate gradient algorithm is selected according to the performance of the neural network to optimize network weights and biases, and Dropout technology is introduced to avoid The occurrence of underfitting and overfitting.

在本实施例的模型训练过程中,训练集占训练数据总批量的70%,验证集和测试集均占训练数据总批量的15%。设置迭代次数epochs=150,学习率lr=0.01,训练选用量化共轭梯度算法(trainscg),将训练数据输入模型进行神经网络的参数学习优化。During the model training process in this embodiment, the training set accounts for 70% of the total batch of training data, and the verification set and the test set both account for 15% of the total batch of training data. Set the number of iterations epochs=150, the learning rate lr=0.01, select the quantized conjugate gradient algorithm (trainscg) for training, and input the training data into the model for parameter learning and optimization of the neural network.

在神经网络的训练过程中,若验证误差六次迭代内不下降,则停止迭代,否则进行迭代至上述epochs次。During the training process of the neural network, if the verification error does not decrease within six iterations, the iteration will be stopped, otherwise it will be iterated to the above epochs.

S105、对于训练后的NARX神经网络模型,利用训练数据采用拟合优度量化NARX神经网络模型输出的预测值与目标值之间的关系强度,进而得到训练好的模型。S105. For the trained NARX neural network model, use the training data and use fitting optimization to quantify the relationship strength between the predicted value output by the NARX neural network model and the target value, and then obtain the trained model.

模型训练完毕后,利用训练数据,采用拟合优度(R2)量化模型输入及输出之间的关系强度。其中,训练数据包括气象数据xi和对应的桥梁温度数据yi,yi作为目标值,气象数据xi输入模型后输出的值为预测值 After the model is trained, the training data is used to quantify the strength of the relationship between the model input and output using the goodness of fit (R 2 ). Among them, the training data includes meteorological data xi and the corresponding bridge temperature data yi , yi is the target value, and the value output after the meteorological data xi is input into the model is the predicted value.

拟合优度公式如下:The goodness of fit formula is as follows:

其中,为目标值的均值,n为输入模型的样本个数。in, is the mean of the target value, and n is the number of samples input to the model.

本实施例在训练集、验证集、测试集上的拟合优度如图3所示,各数据集的拟合优度(R2)均达到0.975以上,关系强度大则模型精度高,证明输入特征选取合理。The goodness of fit of this embodiment on the training set, validation set, and test set is shown in Figure 3. The goodness of fit (R 2 ) of each data set reaches above 0.975. The greater the relationship strength, the higher the accuracy of the model, which proves Input feature selection is reasonable.

拟合优度达到满意程度后,需进一步查看其在训练集与测试集上的损失函数L(y,f(x)),用以衡量真实值y和预测值f(x)之间的差异程度。需防止测试集损失函数与训练集差距过大,避免过拟合;否则随机初始权值和阈值重新训练NARX神经网络模型,或者调整隐藏层神经元个数优化其拓扑结构。网络损失函数采用均方误差(MSE)计算。After the goodness of fit reaches a satisfactory level, you need to further check its loss function L(y,f(x)) on the training set and test set to measure the difference between the real value y and the predicted value f(x) degree. It is necessary to prevent the gap between the test set loss function and the training set from being too large to avoid overfitting; otherwise, retrain the NARX neural network model with random initial weights and thresholds, or adjust the number of hidden layer neurons to optimize its topology. The network loss function is calculated using mean square error (MSE).

S106、将训练好的模型中的开环架构转换为闭环结构,利用测试数据评估闭环结构模型的预测性能;若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。S106. Convert the open-loop architecture in the trained model to a closed-loop structure, and use test data to evaluate the prediction performance of the closed-loop structural model; if the prediction results are within the preset range, the closed-loop structural model obtains the bridge temperature based on the input meteorological data. predicted value.

经过步骤S105后,将NARX神经网络模型的开环架构转换为闭环结构,闭环结构的NARX神经网络模型如图4所示。After step S105, the open-loop structure of the NARX neural network model is converted into a closed-loop structure. The NARX neural network model of the closed-loop structure is shown in Figure 4.

为了测试NARX神经网络模型的泛化能力,评估NARX神经网络模型的预测性能,将测试数据中连续240时间步(对应240小时,10天)的气象数据xj输入闭环NARX神经网络模型,得到NARX神经网络模型输出的值,将输出的值反标准化后得到桥梁温度的预测值将测试数据中气象数据xj对应的桥梁温度反标准化后作为桥梁温度的目标值yj,该桥梁温度的目标值与步骤S101中原始桥梁温度数据相同;将桥梁温度的预测值与桥梁温度的目标值进行对比。In order to test the generalization ability of the NARX neural network model and evaluate the prediction performance of the NARX neural network model, the meteorological data x j of 240 consecutive time steps (corresponding to 240 hours and 10 days) in the test data are input into the closed-loop NARX neural network model to obtain NARX The value output by the neural network model is denormalized to obtain the predicted value of the bridge temperature. The bridge temperature corresponding to the meteorological data x j in the test data is denormalized and used as the target value y j of the bridge temperature. The target value of the bridge temperature is the same as the original bridge temperature data in step S101; the predicted value of the bridge temperature is compared with the bridge temperature Compare with target value.

对NARX神经网络模型性能的评估,采用绝对误差平均值(MAE)指标以反映预测值与目标值间的误差,绝对误差平均值(MAE)计算如下:To evaluate the performance of the NARX neural network model, the mean absolute error (MAE) index is used to reflect the error between the predicted value and the target value. The mean absolute error (MAE) is calculated as follows:

其中,n为输入模型的样本个数。Among them, n is the number of samples input to the model.

本实施例中算例桥梁截面形式及测点位置如图5所示,计算亚热带某场地夏季气象条件下10天内结构温度值。对于神经网络模型预测性能的评估,绝对误差平均值(MAE)指标如图6所示,各测点桥梁温度的预测值与目标值对比如图7~10所示。结果表明,桥梁温度的预测结果的绝对误差平均值(MAE)在2.0左右,即预测值与目标值吻合度较高,满足工程精度要求,具有较好的适用性。The cross-sectional form and measuring point locations of the bridge in the calculation example in this embodiment are shown in Figure 5. The structural temperature value within 10 days under summer meteorological conditions in a subtropical site is calculated. For the evaluation of the prediction performance of the neural network model, the mean absolute error (MAE) index is shown in Figure 6, and the comparison between the predicted value and the target value of the bridge temperature at each measuring point is shown in Figures 7 to 10. The results show that the mean absolute error (MAE) of the bridge temperature prediction results is around 2.0, that is, the predicted value is consistent with the target value, meets the engineering accuracy requirements, and has good applicability.

对于具有较好的适用性闭环结构模型,根据输入的一组或多组气象数据,输出一个或多个预测值,对预测值进行反标准化后得到桥梁温度的预测值。For a closed-loop structural model with good applicability, one or more predicted values are output based on one or more sets of input meteorological data, and the predicted values of the bridge temperature are obtained by de-standardizing the predicted values.

本领域技术人员可以理解,实现上述实施例的方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,相应的程序可以存储于计算机可读存储介质中。Those skilled in the art can understand that all or part of the steps in the method of implementing the above embodiments can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium.

应当注意,尽管在附图中以特定顺序描述了上述实施例的方法操作,但是这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。相反,描绘的步骤可以改变执行顺序。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。It should be noted that although the method operations of the above embodiments are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all illustrated operations must be performed to achieve desired results. . Instead, the steps depicted can be executed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be broken down into multiple steps for execution.

实施例2:Example 2:

如图11所示,本实施例提供了一种基于NARX神经网络的桥梁温度预测装置,该装置包括备选参数获取模块1101、样本数据获取模块1102、模型训练模块1103、模型预测性能评估模块1104和桥梁温度预测模块1105,其中:As shown in Figure 11, this embodiment provides a bridge temperature prediction device based on NARX neural network. The device includes an alternative parameter acquisition module 1101, a sample data acquisition module 1102, a model training module 1103, and a model prediction performance evaluation module 1104. and the Bridge Temperature Prediction Module 1105, which:

备选参数获取模块1101,用于对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;The alternative parameter acquisition module 1101 is used to perform sequence interpolation or extraction on the acquired bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein, the Meteorological data includes multiple meteorological parameters;

样本数据获取模块1102,用于通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;The sample data acquisition module 1102 is used to select meteorological parameters that are highly correlated with the bridge temperature from the alternative parameters through the maximum information coefficient as the input features of the model; perform separate operations on the selected meteorological parameters and the corresponding bridge temperature data. Preprocess to obtain sample data; wherein the sample data is divided into training data and test data;

模型训练模块1103,用于利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;The model training module 1103 is used to train the model using the training data to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input;

模型预测性能评估模块1104,用于将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;The model prediction performance evaluation module 1104 is used to convert the open-loop architecture in the trained model into a closed-loop structure, use the test data, and use the absolute error average index to evaluate the prediction performance of the closed-loop structure model;

桥梁温度预测模块1105,用于若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。The bridge temperature prediction module 1105 is used to obtain the predicted value of the bridge temperature based on the input meteorological data by the closed-loop structural model if the prediction result is within a preset range.

本实施例中各个模块的具体实现可以参见上述实施例1,在此不再一一赘述;需要说明的是,本实施例提供的装置仅以上述各功能模块的划分进行举例说明,在实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。The specific implementation of each module in this embodiment can be referred to the above-mentioned Embodiment 1, which will not be described one by one here. It should be noted that the device provided in this embodiment is only exemplified by the division of the above-mentioned functional modules. In practical applications, , the above functions can be allocated to different functional modules as needed, that is, the internal structure is divided into different functional modules to complete all or part of the functions described above.

实施例3:Example 3:

本实施例提供了一种计算机设备,该计算机设备可以为计算机,如图12所示,其通过系统总线1201连接的处理器1202、存储器、输入装置1203、显示器1204和网络接口1205,该处理器用于提供计算和控制能力,该存储器包括非易失性存储介质1206和内存储器1207,该非易失性存储介质1206存储有操作系统、计算机程序和数据库,该内存储器1207为非易失性存储介质中的操作系统和计算机程序的运行提供环境,处理器1202执行存储器存储的计算机程序时,实现上述实施例1的桥梁温度预测方法,如下:This embodiment provides a computer device. The computer device can be a computer. As shown in Figure 12, it has a processor 1202, a memory, an input device 1203, a display 1204 and a network interface 1205 connected through a system bus 1201. The processor uses In order to provide computing and control capabilities, the memory includes a non-volatile storage medium 1206 and an internal memory 1207. The non-volatile storage medium 1206 stores an operating system, computer programs and databases. The internal memory 1207 is a non-volatile storage medium. The operating system and computer program in the medium provide an environment for running. When the processor 1202 executes the computer program stored in the memory, the bridge temperature prediction method of the above-mentioned Embodiment 1 is implemented, as follows:

对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;Perform sequence interpolation or extraction on the obtained bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein the meteorological data includes multiple meteorological parameters;

通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;Meteorological parameters with high correlation with bridge temperature are selected from the alternative parameters through the maximum information coefficient as input features of the model; the selected meteorological parameters and the corresponding bridge temperature data are preprocessed respectively to obtain sample data; where , the sample data is divided into training data and test data;

利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;Use the training data to train the model to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input;

将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;Convert the open-loop architecture in the trained model to a closed-loop structure, use the test data, and use the absolute error average index to evaluate the prediction performance of the closed-loop structure model;

若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。If the prediction result is within the preset range, the closed-loop structural model obtains the predicted value of the bridge temperature based on the input meteorological data.

实施例4:Example 4:

本实施例提供了一种存储介质,该存储介质为计算机可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时,实现上述实施例1的桥梁温度预测方法,如下:This embodiment provides a storage medium, which is a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, the bridge temperature prediction method of the above-mentioned Embodiment 1 is implemented, as follows:

对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;Perform sequence interpolation or extraction on the obtained bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein the meteorological data includes multiple meteorological parameters;

通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;Meteorological parameters with high correlation with bridge temperature are selected from the alternative parameters through the maximum information coefficient as input features of the model; the selected meteorological parameters and the corresponding bridge temperature data are preprocessed respectively to obtain sample data; where , the sample data is divided into training data and test data;

利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;Use the training data to train the model to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input;

将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;Convert the open-loop architecture in the trained model to a closed-loop structure, use the test data, and use the absolute error average index to evaluate the prediction performance of the closed-loop structure model;

若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值。If the prediction result is within the preset range, the closed-loop structural model obtains the predicted value of the bridge temperature based on the input meteorological data.

需要说明的是,本实施例的计算机可读存储介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。It should be noted that the computer-readable storage medium in this embodiment may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmed read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.

综上所述,本发明首先将桥梁测点温度数据及对应的气象数据,进行序列插值或抽取,调整为采样率相同的时间序列数据;再通过最大信息系数计算选出与桥梁温度相关性高的气象参数作为模型的输入数特征;构建带外部输入的开环NARX神经网络模型,采用训练数据进行NARX神经网络模型的超参数学习和优化;最后将训练好的NARX神经网络模型中的开环架构转换为闭环结构,实时更新网络神经元权值及阈值,进而递归完成所需时间步内桥梁温度的预测。通过本发明提供的方法,能够实现输入场地气象参数的数据到闭环结构的模型,能够快速获取桥梁温度数据,且预测精度高,具有较强的工程实用性。To sum up, the present invention first performs sequence interpolation or extraction on the bridge measuring point temperature data and the corresponding meteorological data, and adjusts them to time series data with the same sampling rate; then, the maximum information coefficient calculation is used to select the temperature data with high correlation with the bridge temperature. Meteorological parameters are used as input features of the model; an open-loop NARX neural network model with external input is constructed, and the training data is used to learn and optimize the hyperparameters of the NARX neural network model; finally, the open-loop NARX neural network model in the trained NARX neural network model is The architecture is converted into a closed-loop structure, the network neuron weights and thresholds are updated in real time, and the prediction of the bridge temperature within the required time step is recursively completed. Through the method provided by the invention, the data of the site meteorological parameters can be input into the model of the closed-loop structure, the bridge temperature data can be quickly obtained, and the prediction accuracy is high, which has strong engineering practicability.

以上所述,仅为本发明专利较佳的实施例,但本发明专利的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明专利所公开的范围内,根据本发明专利的技术方案及其发明构思加以等同替换或改变,都属于本发明专利的保护范围。The above are only preferred embodiments of the patent of the present invention, but the scope of protection of the patent of the present invention is not limited thereto. Any person familiar with the technical field can, within the scope disclosed by the patent of the present invention, proceed according to the patent of the present invention. Any equivalent substitution or change of the technical solution and its inventive concept shall fall within the scope of protection of the patent of the present invention.

Claims (6)

1.一种基于NARX神经网络的桥梁温度预测方法,其特征在于,所述方法包括:1. A bridge temperature prediction method based on NARX neural network, characterized in that the method includes: 对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;Perform sequence interpolation or extraction on the obtained bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein the meteorological data includes multiple meteorological parameters; 通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;Meteorological parameters with high correlation with bridge temperature are selected from the alternative parameters through the maximum information coefficient as input features of the model; the selected meteorological parameters and the corresponding bridge temperature data are preprocessed respectively to obtain sample data; where , the sample data is divided into training data and test data; 利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;Use the training data to train the model to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input; 将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;Convert the open-loop architecture in the trained model to a closed-loop structure, use the test data, and use the absolute error average index to evaluate the prediction performance of the closed-loop structure model; 若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值;If the prediction result is within the preset range, the closed-loop structural model will obtain the predicted value of the bridge temperature based on the input meteorological data; 其中,所述通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征,具体包括:Among them, the meteorological parameters with high correlation with the bridge temperature are selected from the alternative parameters through the maximum information coefficient as the input features of the model, specifically including: 设桥梁温度为x,对应的备选参数中任一气象参数为y;Assume the bridge temperature is x, and any corresponding meteorological parameter among the alternative parameters is y; 采用最大信息系数的计算公式如下:The calculation formula using the maximum information coefficient is as follows: 式中,I(x;y)为互信息系数,p(x,y)为变量x和y之间的联合概率,a、b表示二维空间在x、y方向上划分格子的个数,B的大小设置满足a*b<B;In the formula, I(x;y) is the mutual information coefficient, p(x,y) is the joint probability between variables x and y, a and b represent the number of grids divided into two-dimensional space in the x and y directions, The size setting of B satisfies a*b<B; MIC(x;y)的值越大,则表示x、y的相关性越高;若x、y的相关性高,则y被选为模型的输入特征;The larger the value of MIC(x;y), the higher the correlation between x and y; if the correlation between x and y is high, then y is selected as the input feature of the model; 所述利用所述训练数据对模型进行训练,得到训练好的模型,具体包括:The method of using the training data to train the model to obtain a trained model specifically includes: 将所述训练数据分成三个子集,利用三个子集进行交叉验证,其中,第一个子集是训练集,用于计算梯度和更新网络权重和偏差,以最小化网络损失函数;第二个子集是验证集,在训练过程中监控验证错误,使网络权重和偏差以最小验证集误差保存;第三个子集是测试集,在训练和验证后用于最终测试,输出模型训练完成后的性能指标;选取贝叶斯正则化算法或量化共轭梯度算法优化网络权重和偏置,并通过引入Dropout技术来避免欠拟合和过拟合的发生;Divide the training data into three subsets, and use the three subsets for cross-validation. The first subset is the training set, which is used to calculate gradients and update network weights and biases to minimize the network loss function; the second subset is The set is the validation set, which monitors validation errors during the training process so that the network weights and biases are saved with the minimum validation set error; the third subset is the test set, which is used for final testing after training and validation, and outputs the performance of the model after completion of training Indicators; select Bayesian regularization algorithm or quantified conjugate gradient algorithm to optimize network weights and biases, and introduce Dropout technology to avoid under-fitting and over-fitting; 在所述模型的训练过程中,选用trainscg量化共轭梯度算法,将所述训练数据输入模型进行神经网络的参数学习优化,若验证误差不降低,则停止迭代,否则进行迭代的次数为设定的次数;During the training process of the model, the trainscg quantified conjugate gradient algorithm is selected, and the training data is input into the model for parameter learning and optimization of the neural network. If the verification error does not decrease, the iteration is stopped, otherwise the number of iterations is set. number of times; 对于训练后的模型,利用所述训练数据,采用拟合优度量化预测值与目标值之间的关系强度,若关系强度不够高,则重新训练模型或优化模型的拓扑结构,进而得到训练好的模型;其中,拟合优度公式如下:For the trained model, the training data is used to quantify the relationship strength between the predicted value and the target value using fitting optimization. If the relationship strength is not high enough, the model is retrained or the topology of the model is optimized to obtain a well-trained model. model; among them, the goodness-of-fit formula is as follows: 式中,yi为训练数据中气象数据xi对应的桥梁温度数据,作为目标值;为气象数据xi输入模型后输出的预测值;R2表示预测值与目标值之间的关系强度,/>为目标值的均值,n为输入模型的样本个数;In the formula, yi is the bridge temperature data corresponding to the meteorological data xi in the training data, as the target value; The predicted value output after inputting the meteorological data x i into the model; R 2 represents the strength of the relationship between the predicted value and the target value,/> is the mean of the target value, n is the number of samples input to the model; 所述利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能,具体包括:The use of the test data and the use of the absolute error average index to evaluate the prediction performance of the closed-loop structural model include: 将所述测试数据中任一气象数据xj输入闭环结构模型,得到闭环结构模型输出的值,将输出的值反标准化后得到桥梁温度的预测值 Input any meteorological data x j in the test data into the closed-loop structural model to obtain the value output by the closed-loop structural model. After de-normalizing the output value, the predicted value of the bridge temperature is obtained. 将测试数据中气象数据xj对应的桥梁温度反标准化后作为桥梁温度的目标值yjThe bridge temperature corresponding to the meteorological data x j in the test data is de-standardized and used as the target value y j of the bridge temperature; 采用绝对误差平均值指标反映桥梁温度预测值与目标值间的误差,绝对误差平均值计算如下:The absolute error average index is used to reflect the error between the bridge temperature prediction value and the target value. The absolute error average is calculated as follows: 若绝对误差平均值在预设值附近,则表示预测性能好,能满足工程精度要求。If the average absolute error is near the preset value, it means that the prediction performance is good and can meet the engineering accuracy requirements. 2.根据权利要求1所述的桥梁温度预测方法,其特征在于,对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据,具体包括:2. The bridge temperature prediction method according to claim 1, characterized in that the selected meteorological parameters and corresponding bridge temperature data are separately preprocessed to obtain sample data, which specifically includes: 对选出的气象参数分别进行Z-Score标准化处理,得到处理后气象数据,作为模型的输入数据;Perform Z-Score standardization processing on the selected meteorological parameters respectively to obtain processed meteorological data as input data for the model; 对桥梁温度数据进行Z-Score标准化处理,得到处理后桥梁温度数据,作为模型输出的值;Perform Z-Score normalization processing on the bridge temperature data to obtain the processed bridge temperature data as the model output value; 所述处理后气象数据和对应的所述处理后桥梁温度数据构成样本数据。The processed meteorological data and the corresponding processed bridge temperature data constitute sample data. 3.根据权利要求1~2任一项所述的桥梁温度预测方法,其特征在于,所述NARX神经网络模型采用具有输出延迟反馈的网络结构,包括输入层、隐藏层和输出层;3. The bridge temperature prediction method according to any one of claims 1 to 2, characterized in that the NARX neural network model adopts a network structure with output delayed feedback, including an input layer, a hidden layer and an output layer; 初始化NARX神经网络模型的节点个数和反馈延迟数,NARX神经网络模型的输入输出关系为:Initialize the number of nodes and the number of feedback delays of the NARX neural network model. The input-output relationship of the NARX neural network model is: y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1))y(t)=f(x(t),x(t-1),…,x(t-d),y(t-1)) 其中,t表示当前时刻,d表示反馈延迟数,y(t)、y(t-1)表示当前时刻和前一时刻网络模型的输出,x(t)、x(t-d)表示当前时刻和前d时刻网络模型的输入数据。Among them, t represents the current moment, d represents the number of feedback delays, y(t) and y(t-1) represent the output of the network model at the current moment and the previous moment, x(t) and x(t-d) represent the current moment and the previous moment. The input data of the network model at time d. 4.根据权利要求1~2任一项所述的桥梁温度预测方法,其特征在于,获取的气象数据包括的气象参数为天顶角、气温、相对湿度、风速、降雨量、总云层覆盖率。4. The bridge temperature prediction method according to any one of claims 1 to 2, characterized in that the obtained meteorological data includes meteorological parameters such as zenith angle, temperature, relative humidity, wind speed, rainfall, and total cloud coverage. . 5.一种基于NARX神经网络的桥梁温度预测装置,其特征在于,所述装置包括:5. A bridge temperature prediction device based on NARX neural network, characterized in that the device includes: 备选参数获取模块,用于对获取的桥梁温度数据及对应的气象数据进行序列插值或抽取,调整为采样率相同的时间序列数据,将调整后气象数据作为备选参数;其中,所述气象数据包括多个气象参数;The alternative parameter acquisition module is used to perform sequence interpolation or extraction on the acquired bridge temperature data and corresponding meteorological data, adjust it to time series data with the same sampling rate, and use the adjusted meteorological data as alternative parameters; wherein, the meteorological data The data include multiple meteorological parameters; 样本数据获取模块,用于通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征;对选出的气象参数及对应的桥梁温度数据分别进行预处理,得到样本数据;其中,所述样本数据分为训练数据和测试数据;The sample data acquisition module is used to select meteorological parameters that are highly correlated with the bridge temperature from the alternative parameters through the maximum information coefficient as the input features of the model; and predict the selected meteorological parameters and the corresponding bridge temperature data respectively. Process to obtain sample data; wherein the sample data is divided into training data and test data; 模型训练模块,用于利用所述训练数据对模型进行训练,得到训练好的模型;所述模型为带外部输入的开环架构的NARX神经网络模型;A model training module, used to train the model using the training data to obtain a trained model; the model is a NARX neural network model with an open-loop architecture with external input; 模型预测性能评估模块,用于将训练好的模型中的开环架构转换为闭环结构,利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能;The model prediction performance evaluation module is used to convert the open-loop architecture in the trained model into a closed-loop structure, and uses the test data to evaluate the prediction performance of the closed-loop structure model using the absolute error average index; 桥梁温度预测模块,用于若预测结果在预设范围内,则闭环结构模型根据输入的气象数据,得到桥梁温度的预测值;The bridge temperature prediction module is used to use the closed-loop structural model to obtain the predicted value of the bridge temperature based on the input meteorological data if the prediction result is within the preset range; 其中,所述通过最大信息系数从所述备选参数中选出与桥梁温度相关性高的气象参数作为模型的输入特征,具体包括:Among them, the meteorological parameters with high correlation with the bridge temperature are selected from the alternative parameters through the maximum information coefficient as the input features of the model, specifically including: 设桥梁温度为x,对应的备选参数中任一气象参数为y;Assume the bridge temperature is x, and any corresponding meteorological parameter among the alternative parameters is y; 采用最大信息系数的计算公式如下:The calculation formula using the maximum information coefficient is as follows: 式中,I(x;y)为互信息系数,p(x,y)为变量x和y之间的联合概率,a、b表示二维空间在x、y方向上划分格子的个数,B的大小设置满足a*b<B;In the formula, I(x;y) is the mutual information coefficient, p(x,y) is the joint probability between variables x and y, a and b represent the number of grids divided into two-dimensional space in the x and y directions, The size setting of B satisfies a*b<B; MIC(x;y)的值越大,则表示x、y的相关性越高;若x、y的相关性高,则y被选为模型的输入特征;The larger the value of MIC(x;y), the higher the correlation between x and y; if the correlation between x and y is high, then y is selected as the input feature of the model; 所述利用所述训练数据对模型进行训练,得到训练好的模型,具体包括:The method of using the training data to train the model to obtain a trained model specifically includes: 将所述训练数据分成三个子集,利用三个子集进行交叉验证,其中,第一个子集是训练集,用于计算梯度和更新网络权重和偏差,以最小化网络损失函数;第二个子集是验证集,在训练过程中监控验证错误,使网络权重和偏差以最小验证集误差保存;第三个子集是测试集,在训练和验证后用于最终测试,输出模型训练完成后的性能指标;选取贝叶斯正则化算法或量化共轭梯度算法优化网络权重和偏置,并通过引入Dropout技术来避免欠拟合和过拟合的发生;Divide the training data into three subsets, and use the three subsets for cross-validation. The first subset is the training set, which is used to calculate gradients and update network weights and biases to minimize the network loss function; the second subset is The set is the validation set, which monitors validation errors during the training process so that the network weights and biases are saved with the minimum validation set error; the third subset is the test set, which is used for final testing after training and validation, and outputs the performance of the model after completion of training Indicators; select Bayesian regularization algorithm or quantified conjugate gradient algorithm to optimize network weights and biases, and introduce Dropout technology to avoid under-fitting and over-fitting; 在所述模型的训练过程中,选用trainscg量化共轭梯度算法,将所述训练数据输入模型进行神经网络的参数学习优化,若验证误差不降低,则停止迭代,否则进行迭代的次数为设定的次数;During the training process of the model, the trainscg quantified conjugate gradient algorithm is selected, and the training data is input into the model for parameter learning and optimization of the neural network. If the verification error does not decrease, the iteration is stopped, otherwise the number of iterations is set. number of times; 对于训练后的模型,利用所述训练数据,采用拟合优度量化预测值与目标值之间的关系强度,若关系强度不够高,则重新训练模型或优化模型的拓扑结构,进而得到训练好的模型;其中,拟合优度公式如下:For the trained model, the training data is used to quantify the relationship strength between the predicted value and the target value using fitting optimization. If the relationship strength is not high enough, the model is retrained or the topology of the model is optimized to obtain a well-trained model. model; among them, the goodness-of-fit formula is as follows: 式中,yi为训练数据中气象数据xi对应的桥梁温度数据,作为目标值;为气象数据xi输入模型后输出的预测值;R2表示预测值与目标值之间的关系强度,/>为目标值的均值,n为输入模型的样本个数;In the formula, yi is the bridge temperature data corresponding to the meteorological data xi in the training data, as the target value; The predicted value output after inputting the meteorological data x i into the model; R 2 represents the strength of the relationship between the predicted value and the target value,/> is the mean of the target value, n is the number of samples input to the model; 所述利用所述测试数据,采用绝对误差平均值指标评估闭环结构模型的预测性能,具体包括:The use of the test data and the use of the absolute error average index to evaluate the prediction performance of the closed-loop structural model include: 将所述测试数据中任一气象数据xj输入闭环结构模型,得到闭环结构模型输出的值,将输出的值反标准化后得到桥梁温度的预测值 Input any meteorological data x j in the test data into the closed-loop structural model to obtain the value output by the closed-loop structural model. After de-normalizing the output value, the predicted value of the bridge temperature is obtained. 将测试数据中气象数据xj对应的桥梁温度反标准化后作为桥梁温度的目标值yjThe bridge temperature corresponding to the meteorological data x j in the test data is de-standardized and used as the target value y j of the bridge temperature; 采用绝对误差平均值指标反映桥梁温度预测值与目标值间的误差,绝对误差平均值计算如下:The absolute error average index is used to reflect the error between the bridge temperature prediction value and the target value. The absolute error average is calculated as follows: 若绝对误差平均值在预设值附近,则表示预测性能好,能满足工程精度要求。If the average absolute error is near the preset value, it means that the prediction performance is good and can meet the engineering accuracy requirements. 6.一种存储介质,存储有程序,其特征在于,所述程序被处理器执行时,实现权利要求1~4任一项所述的桥梁温度预测方法。6. A storage medium storing a program, characterized in that when the program is executed by a processor, the bridge temperature prediction method according to any one of claims 1 to 4 is implemented.
CN202210340870.8A 2022-04-02 2022-04-02 Bridge temperature prediction method, device, equipment and medium based on NARX neural network Active CN114757096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210340870.8A CN114757096B (en) 2022-04-02 2022-04-02 Bridge temperature prediction method, device, equipment and medium based on NARX neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210340870.8A CN114757096B (en) 2022-04-02 2022-04-02 Bridge temperature prediction method, device, equipment and medium based on NARX neural network

Publications (2)

Publication Number Publication Date
CN114757096A CN114757096A (en) 2022-07-15
CN114757096B true CN114757096B (en) 2024-03-15

Family

ID=82329658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210340870.8A Active CN114757096B (en) 2022-04-02 2022-04-02 Bridge temperature prediction method, device, equipment and medium based on NARX neural network

Country Status (1)

Country Link
CN (1) CN114757096B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221791A (en) * 2022-07-27 2022-10-21 浙江大学 A method and system for online prediction of wall temperature of supercritical boiler

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020014773A1 (en) * 2018-07-16 2020-01-23 Vineland Research And Innovation Centre Automated monitoring and irrigation of plants in a controlled growing environment
CN111339482A (en) * 2020-03-17 2020-06-26 南昌工程学院 A method for identification of outlier distribution transformers based on maximum mutual information
WO2021007812A1 (en) * 2019-07-17 2021-01-21 深圳大学 Deep neural network hyperparameter optimization method, electronic device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020014773A1 (en) * 2018-07-16 2020-01-23 Vineland Research And Innovation Centre Automated monitoring and irrigation of plants in a controlled growing environment
WO2021007812A1 (en) * 2019-07-17 2021-01-21 深圳大学 Deep neural network hyperparameter optimization method, electronic device and storage medium
CN111339482A (en) * 2020-03-17 2020-06-26 南昌工程学院 A method for identification of outlier distribution transformers based on maximum mutual information

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
北京北站站台大跨度张弦桁架雨棚设计研究;罗尧治;余佳亮;;中国铁道科学;20130115(第01期);全文 *
基于相空间重构的CRTSⅡ型轨道板温度梯度预测分析;申建康;何越磊;李再帏;路宏遥;;华东交通大学学报;20190615(第03期);全文 *

Also Published As

Publication number Publication date
CN114757096A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
Zhu et al. Gaussian mixture model coupled recurrent neural networks for wind speed interval forecast
Jiang Computation of monthly mean daily global solar radiation in China using artificial neural networks and comparison with other empirical models
Dumitru et al. Solar photovoltaic energy production forecast using neural networks
CN110766212B (en) Ultra-short-term photovoltaic power prediction method for historical data missing electric field
CN112949902B (en) Runoff prediction method based on LSTM multi-state vector sequence-to-sequence model
Ren et al. Improving monthly streamflow prediction in alpine regions: integrating HBV model with Bayesian neural network
CN111144644B (en) Short-term wind speed prediction method based on variation variance Gaussian process regression
Ren et al. A hybrid approach for interval prediction of concrete dam displacements under uncertain conditions
CN110689183B (en) A method, system, medium and electronic device for probabilistic prediction of cluster photovoltaic power
CN115081269B (en) Bridge thermal boundary condition prediction method, device and medium based on mixed input neural network model
Pan et al. Convolutional neural network-based spatiotemporal prediction for deformation behavior of arch dams
CN113139605A (en) Power load prediction method based on principal component analysis and LSTM neural network
Li et al. An integrated method for evaluating and predicting long-term operation safety of concrete dams considering lag effect
CN114065653A (en) Construction method of power load prediction model and power load prediction method
CN117526274A (en) New energy power prediction method, electronic equipment and storage medium in extreme climate
Li et al. Long-term structural health monitoring for bridge based on back propagation neural network and long and short-term memory
Yu et al. Application of time series prediction techniques for coastal bridge engineering
Zhang et al. AF-OS-ELM-MVE: A new online sequential extreme learning machine of dam safety monitoring model for structure deformation estimation
CN115169742A (en) A short-term wind power prediction method
CN114757096B (en) Bridge temperature prediction method, device, equipment and medium based on NARX neural network
Saha et al. Prediction of the ENSO and EQUINOO indices during June–September using a deep learning method
CN113408183A (en) Vehicle base short-term composite prediction method based on prediction model
Chen et al. Unsupervised anomaly detection for long-span bridges combining response forecasting by deep learning with Td-MPCA
Wen et al. An APPSO–SVM approach building the monitoring model of dam safety
Tian et al. Deep learning model for the deformation prediction of concrete dams under multistep and multifeature inputs based on an improved autoformer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant