在线客服

咨询热线

PSO-SVM+BP神经网络组合预测供水系统余氯的方法

作者:未知

  摘 要:针对余氯量在供水系统内非线性变化特性,建立了PSO-SVM+BP神经网络组合模型对管网末端余氯进行预测分析。该模型通过粒子群优化算法(PSO),对SVM的特性参数进行优化;采用BP神经网络对模型进行残差修正。本文通过对比BP和SVM单一预测、对组合模型预测精度进行分析。结果表明:组合模型预测比BP和SVM单一预测均方误差分别降低了62.30%、75.29%,平均相对误差降低了55.03%、54.27%。综上所述,该模型具有强大的非线性拟合能力,预测精度高,运行稳定性强,对供水企业控制余氯的投加量和设置二次加氯点有一定的指导性作用。
  关键词:余氯;支持向量机;粒子群算法;神经网络;组合模型
  中图分类号:TU991.33   文献标识码:A   文章编号:
  Abstract: Due to the nonlinearity of residual chlorine in the pipe network, we established a PSO-SVM and BP neural network combined model to prediction of residual chlorine.This model through particle swarm optimization algorithm (PSO) to optimization the characteristics parameter of the SVM, and use the BP neural network model to residual error correction. In this paper , we analyzed the prediction precision of combined model by comparing the single prediction model of BP and SVM. The results show that compared with the single prediction of BP and SVM, the mean square error of the combined model decreased by 62.30% and 75.29% respectively, but the average relative error decreased by 55.03% and 54.27% respectively. In a conclusion, the combined model had strong nonlinear fitting capability, high prediction accuracy, and strong operation stability. This model plays an important role in controlling the residual chlorine dosing and setting the secondary chlorination point for water supply enterprise
  Keywords: residual chlorine; Support vector machines; Particle swarm optimization; neural networks; combined model;
  0.引言
  氯是供水處理中使用最广泛的一种消毒剂,余氯作为衡量管网水质的一项重要指标,对控制水中的细菌滋生,保证管网水质安全十分重要。《生活饮用水卫生标准》(GB 5749—2006)中规定,出厂水余氯应大于0.3mg/L,管网末梢余氯量不应小于0.05mg/L[1]。但由于氯是一种非稳定性物质,受到管网中各种因素的影响,其浓度随时间的推移而发生削减,消毒能力下降,使得水质发生恶化,水质保障的中心已逐渐由水厂向管网转移[2-4]。所以探究余氯预测方法,为供水企业对氯的投加提供参考十分重要[5]。
  由于余氯浓度在管网中的削减是非线性变化,且管网内影响余氯的因素众多,若采用机理性模型进行预测,其准确性差,建立难度大,求解困难[6-7]。目前已有研究多采用单一网络或复合网络对余氯进行预测,加之分析样本有限,预测后没有对结果进行误差修正,且随着样本量的增加预测精度也随之下降,网络的精确性、收敛性及稳定性不好,难以获得理想的预测结果[5,,8-9]。本文通过PSO-SVM+BP神经网络余氯预测模型,建立多个影响因素与管网末端余氯映射关系,以了解余氯的衰减规律,实现对余氯浓度的动态预测。
  1 PSO-SVM+BP神经网络组合模型
  支持向量机(Support Vector Machine)是基于统计学理论发展起来的机器学习算法[5]。它以结构风险最小化原则为理论基础,引入核函数方法,将原始问题映射到高维空间,把待求解问题转换为二次优化问题,使SVM收敛于问题的全局最优解。它适能较好地解决小样本、非线性、高维数和局部极小点等实际问题,具有良好的泛化能力[10-12]。但SVM中关键参数(核函数参数、惩罚因子C)的选取多依靠经验或实验,而这些参数对预测的结果有至关重要的影响[13]。
  所以,针对SVM参数选取的盲目性,采用粒子群算法(PSO)对SVM进行参数优化,以SVM输出的均方误差为适应度函数,粒子通过跟踪个体极值和全局极值在空间内不断更新自己的位置信息、迁移方向和速度值,以寻找出空间内的最优解,即输出SVM最小均方误差时带入的参数粒子[14],消除SVM参数选取的盲目性,但PSO算法后期收敛到一定的程度时就无法继续优化,所以精度不高。所以为提高精度利用BP神经网路较高的可靠性和良好的容错性,获得输入变量与优化模型预测误差之间的映射关系,建立BP神经网络残差修正模型[15-17]。最终通过两个模型的组合进行优势互补,深度挖掘数据信息,以获得更理想的预测结果,提高预测精度。   2 组合算法模型的建立
  3结论
  本文通过PSO算法优化SVM模型参数,并使用BP神经网络对模型结果进行残差修正,建立了PSO-SVM+BP神经网络余氯预测模型,找到多个因素与管网末端余氯的关系,通过不同模型产生的误差进行模型性能的对比分析。发现该模型可以实现对管网末端余氯量的预测,有效的简化了余氯在管网中衰减变化的复杂非线性关系,克服了SVM模型参数选择的盲目性,利用BP网络对结果进行优化,进一步提升了预测的精度和模型运行的稳健性。结果表明该模型具有良好的预测性能,能够使供水企业更早的发现水质恶化的趋势,及时采取相关措施,在控制末端水水质的前提下,降低消毒副产物的产生,并为二次消毒点的选取提供参考。
  参考文献:
  [1] 卫生部. 生活饮用水卫生标准[J]. 经济管理文摘, 2006(11):36-38.Ministry of Health. Standards for drinking water quality[J].Economic management digest, 2006(11):36-38.
  [2] 周广宇, 莫罹, 赵新华, 等. 基于多组分水质模型的供水管网细菌风险研究[J]. 中国给水排水, 2016, 32(5): 64-69,73.ZHOU G Y, MO L, ZHAO X H, et al. Assessment of bacteria risk in water distribution system based on multispecies water quality model[J]. China Water & Wastewater, 2016, 32(5): 64-69,73.(in Chinese)[知网]
  [3] 杨航, 李敏, 俞国平. 基于人工神经网络的市政管网水质模型研究[J]. 给水排水, 2012, 48(S1): 471-475.YANG H, LI M, YU G P. Water quality model of municipal network based on artificial neural network[J]. Water & Wastewater Engineering, 2012, 48(S1): 471-475.(in Chinese
  [4] 戴舒, 郭姣. 南方某市供水管网水质模型的建立与校核[J]. 供水技术, 2017, 11(4):29-32.DAI S,GUO J.Establishment and calibration of water quality model for water distribution system in a city of South China[J]. Water Technology, 2017, 11(4):29-32.
  [5] 刘国红, 廖玉学, 黄广文, 等. 深圳市2016年生活饮用水水质影响因素[J]. 中国热带医学, 2018, 18(1): 72-75.LIU G H, LIAO Y X, HUANG G W, et al. Factors influencing drinking water quality in Shenzhen, 2016[J]. China Tropical Medicine, 2018, 18(1): 72-75.(in Chinese)[
  [6] 謝昕, 郭鹏飞, 詹小丽, 等. 基于RBF神经网络的余氯浓度预测模型研究[J]. 传感器与微系统, 2012, 31(8): 64-65,68.XIE X, GUO P F, ZHAN X L, et al. Research on prediction model of residual chlorine concentration based on RBF neural network[J]. Transducer and Microsystem Technologies, 2012, 31(8): 64-65,68.(in Chinese)
  [7] BOWDEN G J, NIXON J B, DANDY G C, et al. Forecasting chlorine residuals in a water distribution system using a general regression neural network[J]. Mathematical and Computer Modelling, 2006, 44(5/6): 469-484.[LinkOut]
  [8] 何自立, 王云霏, 马孝义, 等. 基于改进PSO-WNN模型的管网余氯预测研究[J]. 中国农村水利水电, 2015(2): 86-88,92.HE Z L, WANG Y F, MA X Y, et al. Residual chlorine prediction in water supply system based on improved PSO-WNN model[J]. China Rural Water and Hydropower, 2015(2): 86-88,92.(in Chinese)
  [9] 何自立, 郭占娟, 杨建国, 等. 基于 PSO-SVR 模型的供水系统余氯预测研究[J]. 长江科学院院报, 2015, 32(10): 6-10.HE Z L, GUO Z J, YANG J G, et al. Residual chlorine prediction in water supply system based on support vector machine regression model optimized by PSO method[J]. Journal of Yangtze River Scientific Research Institute, 2015, 32(10): 6-10.(in Chinese)   [10] 谢芳, 唐德善. 农业灌溉用水量的LS-SVM预测模型研究[J]. 安徽农业科学, 2010, 38(19): 10273-10275,10288.XIE F, TANG D S. Forecasting irrigation water requirement based on least squares support vector machine[J]. Journal of Anhui Agricultural Sciences, 2010, 38(19): 10273-10275,10288.(in Chinese)
  [11] ABHISEK U. Support Vector Machine[J]. Computer Science, 2002, 1(4):1-28.
  [12] SUN L F, ZHANG Y Y, SAQI R N. Research on the fouling prediction of heat exchanger based on Support Vector Machine optimized by Particle Swarm Optimization algorithm[C]//2009 International Conference on Mechatronics and Automation, 9-12 Aug. 2009, Changchun, China, 2009: 2002-2007
  [13] EBERHART R C, SHI Y H. Comparison between genetic algorithms and particle swarm optimization[M]//EBERHART R C, SHI Y H. eds. Lecture Notes in Computer Science. Berlin, Heidelberg: Springer Berlin Heidelberg, 1998: 611-616. DOI:10.1007/bfb0040812[
  [14] LIU J, LIU Z, XIONG Y. Method of Parameters Optimization in SVM based on PSO[J]. Transactions on Computer Science & Technology, 2013, 2(1):9-16.
  DANG A P, LIU Z F, ZHU Y L, et al .The Detection of Engine Cylinder Wall Clearance Based on BP and Elman
  [15] 党安朋, 刘占峰, 朱延玲, 等. 基于BP与Elman神经网络的发动机缸壁间隙检测[J]. 山东交通学院学报, 2015, 23(1): 1-5.DANG A P, LIU Z F, ZHU Y L, et al. The detection of engine cylinder wall clearance based on BP and elman neural network[J]. Journal of Shandong Jiaotong University, 2015, 23(1): 1-5.(in Chinese)
  [16] 陈明, ◆◆◆. MATLAB神经网络原理与实例精解[M]. 北京: 清华大学出版社, 2013
  [17] WANG J J, SHI P, JIANG P, et al. Application of BP neural network algorithm in traditional hydrological model for flood forecasting[J]. Water, 2017, 9(1): 48
  [18] LI C, YU J, ZHANG T, et al. The effect of factors on chlorine decay and trihalomethane formation in a pilot-scale distribution system[J]. Fresenius Environmental Bulletin, 2014, 23(1):223-227.
  [19] POWELL J C, HALLAM N B, West J R, et al. Factors which control bulk chlorine decay rates[J]. Water Research, 2000, 34(1):117-126.
  [20] 钟丹, 袁一星, 马文成, 等. 供水管网内生物膜与余氯衰减交互作用[J]. 哈爾滨工业大学学报, 2017, 49(8): 49-54.ZHONG D, YUAN Y X, MA W C, et al. Interaction effects between biofilm and chlorine decay in water distribution network[J]. Journal of Harbin Institute of Technology, 2017, 49(8): 49-54.(in Chinese)
  [21] 郝艳萍. 余氯衰减一级模型参数确定方法试验研究[D]. 哈尔滨: 哈尔滨工业大学, 2016.HAO Y P. Study on method of the first order chlorine decay model parameters determination[D]. Harbin: Harbin Institute of Technology, 2016.(in Chinese)
  [22] 黄锐, 李翠梅, 罗贤达,等. 影响供水管网中余氯与浊度的因素及相关性分析[J]. 给水排水, 2015,51(5):147-151.HUANG R, LI C M, LUO X D, et al . Factors and correlation analysis of residual chlorine and turbidity in water supply pipe network [J].Water & Wastewater Engineering, 2015,51(5):147-151.
  [23] 田一梅, 吴迷芳, 王阳, 等. 基于SVR的城市供水管网余氯预测分析[J]. 重庆建筑大学学报, 2006, 28(2): 74-78.TIAN Y M, WU M F, WANG Y, et al. Prediction and analyses of residual chlorine based on support vector regression in urban water distribution system[J]. Journal of Chongqing Jianzhu University, 2006, 28(2): 74-78.(in Chinese)
  (编辑:胡玲)
转载注明来源:https://www.xzbu.com/8/view-15016276.htm