论文(设计)基于神经网络理论的系统安全评价模型.doc
基于神经网络理论的系统安全评价模型王三明 蒋军成(南京化工大学,南京,210009)摘 要 本文阐述了人工神经网络基本原理,研究分析了BP神经网络模型的缺陷并提出了优化策略。在此基础上,将神经网络理论应用于系统安全评价之中,提出了基于此理论的系统安全评价模型、实现方法和优点;评价实例证明此方法的可行性。关键词 神经网络 网络优化 安全评价1. 引 言 人工神经网络模拟人的大脑活动,具有极强的非线形逼近、大规模并行处理、自训练学习、自组织和容错能力等优点,将神经网络理论应用于系统安全评价之中,能克服传统安全评价方法的一些缺陷,能快速、准确地得到安全评价结果。这将为企业安全生产管理与控制提供快捷和科学的决策信息,从而及时预测、控制事故,减少事故损失。2. 神经网络理论及其典型网络模型 人工神经网络是由大量简单的基本元件-神经元相互联结,模拟人的大脑神经处理信息的方式,进行信息并行处理和非线形转换的复杂网络系统。人工神经网络处理信息是通过信息样本对神经网络的训练,使其具有人的大脑的记忆、辨识能力,完成各种信息处理功能。人工神经网络具有良好的自学习、自适应、联想记忆、并行处理和非线形转换的能力,避免了复杂数学推导,在样本缺损和参数漂移的情况下,仍能保证稳定的输出。人工神经网络这种模拟人脑智力的特性,受到学术界的高度重视和广泛研究,已经成功地应用于众多领域,如模式识别、图象处理、语音识别、智能控制、虚拟现实、优化计算、人工智能等领域。 按照网络的拓扑结构和运行方式,神经网络模型分为前馈多层式网络模型、反馈递归式网络模型、随机型网络模型等。目前在模式识别中应用成熟较多的模型是前馈多层式网络中的BP反向传播模型,其模型结构如图1。2.1 BP神经网络基本原理 BP网络模型处理信息的基本原理是:输入信号Xi通过中间节点(隐层点)作用于输出节点,经过非线形变换,产生输出信号Yk,网络训练的每个样本包括输入向量X和期望输出量t,网络输出值Y与期望输出值t之间的偏差,通过调整输入节点与隐层节点的联接强度取值Wij和隐层节点与输出节点之间的联接强度Tjk以及阈值,使误差沿梯度方向下降,经过反复学习训练,确定与最小误差相对应的网络参数(权值和阈值),训练即告停止。此时经过训练的神经网络即能对类似样本的输入信息,自行处理输出误差最小的经过非线形转换的信息。2.2 BP神经网络模型BP网络模型包括其输入输出模型、作用函数模型、误差计算模型和自学习模型。(1)节点输出模型隐节点输出模型:Oj=f(Wij×Xi-q j) (1)输出节点输出模型:Yk=f(Tjk×Oj-q k) (2)f-非线形作用函数;q -神经单元阈值。图1 典型BP网络结构模型(2)作用函数模型作用函数是反映下层输入对上层节点刺激脉冲强度的函数又称刺激函数,一般取为(0,1)内连续取值Sigmoid函数: f(x)=1/(1+e-x) (3)(3)误差计算模型误差计算模型是反映神经网络期望输出与计算输出之间误差大小的函数: Ep=1/2×(tpi-Opi)2 (4)tpi- i节点的期望输出值;Opi-i节点计算输出值。(4)自学习模型 神经网络的学习过程,即连接下层节点和上层节点之间的权重拒阵Wij的设定和误差修正过程。BP网络有师学习方式-需要设定期望值和无师学习方式-只需输入模式之分。自学习模型为 Wij(n+1)= h ×i×Oj+a×Wij(n) (5)h -学习因子;i-输出节点i的计算误差;Oj-输出节点j的计算输出;a-动量因子。2.3 BP网络模型的缺陷分析及优化策略(1)学习因子h 的优化采用变步长法根据输出误差大小自动调整学习因子,来减少迭代次数和加快收敛速度。 h =h +a×(Ep(n)- Ep(n-1)/ Ep(n) a为调整步长,01之间取值 (6)(2)隐层节点数的优化 隐节点数的多少对网络性能的影响较大,当隐节点数太多时,会导致网络学习时间过长,甚至不能收敛;而当隐节点数过小时,网络的容错能力差。利用逐步回归分析法并进行参数的显著性检验来动态删除一些线形相关的隐节点,节点删除标准:当由该节点出发指向下一层节点的所有权值和阈值均落于死区(通常取±0.1、±0.05等区间)之中,则该节点可删除。最佳隐节点数L可参考下面公式计算:L=(m+n)1/2+c (7)m-输入节点数;n-输出节点数;c-介于110的常数。(3)输入和输出神经元的确定利用多元回归分析法对神经网络的输入参数进行处理,删除相关性强的输入参数,来减少输入节点数。(4)算法优化由于BP算法采用的是剃度下降法,因而易陷于局部最小并且训练时间较长。用基于生物免疫机制地既能全局搜索又能避免未成熟收敛的免疫遗传算法IGA取代传统BP算法来克服此缺点。3. 优化BP神经网络在系统安全评价中的应用 系统安全评价包括系统固有危险性评价、系统安全管理现状评价和系统现实危险性评价三方面内容。其中固有危险性评价指标有物质火灾爆炸危险性、工艺危险性、设备装置危险性、环境危险性以及人的不可靠性。3.1 基于优化BP神经网络的系统安全评价模型图-2 基于优化BP神经网络的系统安全评价模型3.2 BP神经网络在系统安全评价中的应用实现(1)确定网络的拓扑结构,包括中间隐层的层数,输入层、输出层和隐层的节点数。(2)确定被评价系统的指标体系包括特征参数和状态参数 运用神经网络进行安全评价时,首先必须确定评价系统的内部构成和外部环境,确定能够正确反映被评价对象安全状态的主要特征参数(输入节点数,各节点实际含义及其表达形式等),以及这些参数下系统的状态(输出节点数,各节点实际含义及其表达方式等)。(3)选择学习样本,供神经网络学习 选取多组对应系统不同状态参数值时的特征参数值作为学习样本,供网络系统学习。这些样本应尽可能地反映各种安全状态。其中对系统特征参数进行(-,)区间地预处理,对系统参数应进行(0,1)区间地预处理。神经网络的学习过程即根据样本确定网络的联接权值和误差反复修正的过程。(4)确定作用函数,通常选择非线形S型函数(5) 建立系统安全评价知识库 通过网络学习确认的网络结构包括:输入、输出和隐节点数以及反映其间关联度的网络权值的组合;即为具有推理机制的被评价系统的安全评价知识库。(6) 进行实际系统的安全评价 经过训练的神经网络将实际评价系统的特征值转换后输入到已具有推理功能的神经网络中,运用系统安全评价知识库处理后得到评价实际系统的安全状态的评价结果。实际系统的评价结果又作为新的学习样本输入神经网络,使系统安全评价知识库进一步充实。3.3 BP神经网络理论应用于系统安全评价中的优点(1)利用神经网络并行结构和并行处理的特征,通过适当选择评价项目,能克服安全评价的片面性,可以全面评价系统的安全状况和多因数共同作用下的安全状态。(2)运用神经网络知识存储和自适应特征,通过适应补充学习样本,可以实现历史经验与新知识完满结合,在发展过程中动态地评价系统的安全状态。(3)利用神经网络理论的容错特征,通过选取适当的作用函数和数据结构,可以处理各种非数值性指标,实现对系统安全状态的模糊评价。4. 安全评价实例(1)安全评价参数的确定(略)(2)网络学习样本的选择选择了5个企业的反映企业安全状态和安全条件的6个安全评价参数作为学习样本,见表1表1 企业安全评价学习样本 网络学习样本企业1企业2企业3企业4企业51.安全投入-1.50.5-0.50.52.危险源状况-0.5-1.50.51.53.生产时间-0.50.50.5-0.54.事故概率-1.5-0.5-0.50.55.防灾能力0.50.51.5-1.56.安全记录-0.5-0.50.51.5-1.5-0.50.50.51.5差可接受好好非常好(3)评价结果 当学习因子h =4.07,动量因子a=0.2,预设误差为0.00001,单隐层,其隐节点数为L=9,模型迭代29254次,所得到的网络评价的结果见表2表2 企业神经网络安全评价结果 网络安全评价结果企业1企业2企业3企业4企业51-0.5-1.50.51.52-1.50.5-0.50.53-0.50.50.5-0.54-1.5-0.5-0.50.550.50.51.5-1.56-0.5-0.50.51.5-1.5-0.50.50.51.5差可接受好好非常好表中结果表明基于优化BP神经网络的系统安全评价模型的可行性。5. 总 结 本文将优化后的BP神经网络应用于系统安全评价中,能对系统进行准确、动态的安全评价。同时由于优化后的BP网络还存在一些缺陷,比如对矛盾样本的处理问题等,因而将其应用于系统安全评价时应与模糊数学相结合更佳,这方面将有待进一步探讨和研究。参考文献1. 王俊普.智能控制.中国科学技术大学出版社.1996 135-177.2. 丛爽,赵何.反向转播网络的不足与改进.自动化博览.1999.No1 25-26.3. 陆系群,余英林.前馈神经网络隐节点的动态删除.控制理论及应用.1997.Vol14.No1 101-104. 4. 周伟良等.基于一种免疫遗传算法的BP网络设计.安徽大学学报.1999.Vol23.No1. 5. 施式亮,刘宝琛.基于神经网络的煤矿安全性预测模型及应用.中国安全科学学报.1999.Vol9.No3. SAFETY ASSESSMENT OF THE SYSTEM BASED ON THE ARTIFICAL NEURAL NETWORKWang Sanming Jiang JunchengAbstract In the article the theory of ANN has been introduced. At the same time some limitations of BP neural network have been analyzed and optimized methods have been supposed. Based on that, BP neural network is implied in the safety assessment of the system. Safety assessment model and its merits based on BP neural network have been put forward. The assessment example proves that the way is workable and right .Key words Neural Network Network Optimization Safety AssessmentEditor's note: Judson Jones is a meteorologist, journalist and photographer. He has freelanced with CNN for four years, covering severe weather from tornadoes to typhoons. Follow him on Twitter: jnjonesjr (CNN) - I will always wonder what it was like to huddle around a shortwave radio and through the crackling static from space hear the faint beeps of the world's first satellite - Sputnik. I also missed watching Neil Armstrong step foot on the moon and the first space shuttle take off for the stars. Those events were way before my time.As a kid, I was fascinated with what goes on in the sky, and when NASA pulled the plug on the shuttle program I was heartbroken. Yet the privatized space race has renewed my childhood dreams to reach for the stars.As a meteorologist, I've still seen many important weather and space events, but right now, if you were sitting next to me, you'd hear my foot tapping rapidly under my desk. I'm anxious for the next one: a space capsule hanging from a crane in the New Mexico desert.It's like the set for a George Lucas movie floating to the edge of space.You and I will have the chance to watch a man take a leap into an unimaginable free fall from the edge of space - live.The (lack of) air up there Watch man jump from 96,000 feet Tuesday, I sat at work glued to the live stream of the Red Bull Stratos Mission. I watched the balloons positioned at different altitudes in the sky to test the winds, knowing that if they would just line up in a vertical straight line "we" would be go for launch.I feel this mission was created for me because I am also a journalist and a photographer, but above all I live for taking a leap of faith - the feeling of pushing the envelope into uncharted territory.The guy who is going to do this, Felix Baumgartner, must have that same feeling, at a level I will never reach. However, it did not stop me from feeling his pain when a gust of swirling wind kicked up and twisted the partially filled balloon that would take him to the upper end of our atmosphere. As soon as the 40-acre balloon, with skin no thicker than a dry cleaning bag, scraped the ground I knew it was over.How claustrophobia almost grounded supersonic skydiverWith each twist, you could see the wrinkles of disappointment on the face of the current record holder and "capcom" (capsule communications), Col. Joe Kittinger. He hung his head low in mission control as he told Baumgartner the disappointing news: Mission aborted.The supersonic descent could happen as early as Sunday.The weather plays an important role in this mission. Starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our day-to-day weather lives. It will climb higher than the tip of Mount Everest (5.5 miles/8.85 kilometers), drifting even higher than the cruising altitude of commercial airliners (5.6 miles/9.17 kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause), he can expect a lot of turbulence.The balloon will slowly drift to the edge of space at 120,000 feet (22.7 miles/36.53 kilometers). Here, "Fearless Felix" will unclip. He will roll back the door.Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.Below, the Earth becomes the concrete bottom of a swimming pool that he wants to land on, but not too hard. Still, he'll be traveling fast, so despite the distance, it will not be like diving into the deep end of a pool. It will be like he is diving into the shallow end.Skydiver preps for the big jumpWhen he jumps, he is expected to reach the speed of sound - 690 mph (1,110 kph) - in less than 40 seconds. Like hitting the top of the water, he will begin to slow as he approaches the more dense air closer to Earth. But this will not be enough to stop him completely.If he goes too fast or spins out of control, he has a stabilization parachute that can be deployed to slow him down. His team hopes it's not needed. Instead, he plans to deploy his 270-square-foot (25-square-meter) main chute at an altitude of around 5,000 feet (1,524 meters).In order to deploy this chute successfully, he will have to slow to 172 mph (277 kph). He will have a reserve parachute that will open automatically if he loses consciousness at mach speeds.Even if everything goes as planned, it won't. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work higher than 25,000 feet (7,620 meters).It might not be the moon, but Kittinger free fell from 102,800 feet in 1960 - at the dawn of an infamous space race that captured the hearts of many. Baumgartner will attempt to break that record, a feat that boggles the mind. This is one of those monumental moments I will always remember, because there is no way I'd miss this.