当前位置:网站首页>[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
2022-07-03 19:02:00 【Poseidon light】
One 、 Introduction to fuzzy neural network water quality prediction
1 Fuzzy neural network
From the perspective of the overall structural framework , Two inputs and one output , It is like a neural network ; In terms of function , It is a fuzzy system . The structure of fuzzy neural network is shown in the figure 1 Shown , This network structure is divided into 5 A hierarchical , It is a fuzzy inference system constructed by neural network , Based on the working process of fuzzy system . First , The input layer inputs two signals ; Next, blur the layer , Blur the input signal ; Thirdly, the fuzzy rule calculation layer ; Then there is the fuzzy decision-making level , Classify the quantities that meet the conditions and convert the fuzzy quantities into clear results ; Finally, the fifth layer is the output layer , Output the final operation result .
2 Water quality evaluation
So far, there are many methods of water quality monitoring and evaluation , But there are limitations . Our country has been using nutrients 、 Inorganic matter 、 Microorganisms and heavy metal ions are the main water quality parameters . Traditional biological or chemical water quality evaluation methods , We can only get whether it is polluted and the main components of sewage , It cannot reflect the real potential problems of water quality . Integrated water pollution system with online automatic continuous monitoring , Compared with the continuous automatic monitoring system of air pollution , Water quality monitoring is much more difficult . Of course , All these problems can be solved , But it is particularly important to find a suitable water quality evaluation method .
chart 2 General steps of fuzzy neural network water quality evaluation
2.1 Main parameters of water quality evaluation
There are six commonly used parameters in water quality evaluation : (1) Conventional water quality parameters ; (2) Oxygen balance parameters ; (3) Heavy metal parameters ; (4) Parameters of organic pollutants ; (5) Parameters of inorganic pollutants , ; (6) Biological parameters .
2.2 General steps of water quality evaluation
The main steps of the fuzzy neural network water quality evaluation algorithm experiment are shown in the figure 2 Shown , It is mainly divided into six steps .
3 be based on T-S Fuzzy neural network modeling
3.1 T-S Fuzzy model
T-S Fuzzy system can not only automatically update the membership function of fuzzy subset , And can constantly update the membership function . It belongs to a growing self-learning system . This model , T-S Fuzzy system is defined in the following “if-then” In the rules . According to rules Ri in , Fuzzy reasoning is as follows :
among , Aij Is the fuzzy set of fuzzy system ;pij (j=1, 2, …, k) Is the parameter of fuzzy system ;yi Is the output obtained according to fuzzy rules , Input part ( namely if part ) It's fuzzy , Output part ( namely then part ) Is to determine the , The fuzzy inference represents that the output is a linear combination of inputs .
Suppose the input quantity x=[x1, x2, …xk], First, calculate each input variable according to fuzzy rules , xj Membership of .
among , cji, bji They are the center and width of the membership function ;k For input parameters ;n Is the number of fuzzy subsets . Fuzzy calculation of each membership degree , Apply fuzzy operator as a continued multiplication operator .
Calculate the output value of the fuzzy model according to the fuzzy calculation results yi.
3.2 T-S Fuzzy neural network
T-S Fuzzy neural network consists of four layers : Input layer 、 Fuzzification layer 、 Fuzzy rule calculation layer and output layer . The learning algorithm of fuzzy neural network is as follows :
(1) Error calculation 
In style , yd Is the expected output of the network ;yc Network actual output ;e Error between expected output and actual output .
(2) Coefficient correction 
In style , pji Is the neural network coefficient , α For the efficiency of online learning , xj Enter parameters for the network ;ωi Is the product of the membership degree of the input parameter .
(3) Parameter correction 
In style , cji, bji They are the center and width of the membership function .
3.3 Model building
Fuzzy neural network takes the dimension of training samples as the basic premise , The basic elements of constructing fuzzy neural network : Input 、 Number of output nodes 、 Number of fuzzy membership functions . Finally, the input data is selected as 6 individual ( Including ammonia nitrogen content 、 Dissolved oxygen content 、 Chemical oxygen demand 、 Permanganate index 、 Six indicators of total phosphorus and total nitrogen ) , The water quality grade is divided into five categories , Use numbers 1—5 Indicates the water quality grade I—V class , So the output node number is 1, To form the 6-12-1 Network structure .
Two 、 Partial source code
%---------------------------------------------%
%
%---------------------------------------------%
%% Clear environment variables
clc
clear
%% Parameter initialization
xite=0.001;
alfa=0.05;
% Network nodes
I=6; % Enter the number of nodes
M=12; % Number of hidden nodes
O=1; % Number of output nodes
% Coefficient initialization
p0=0.3*ones(M,1);p0_1=p0;p0_2=p0_1;
p1=0.3*ones(M,1);p1_1=p1;p1_2=p1_1;
p2=0.3*ones(M,1);p2_1=p2;p2_2=p2_1;
p3=0.3*ones(M,1);p3_1=p3;p3_2=p3_1;
p4=0.3*ones(M,1);p4_1=p4;p4_2=p4_1;
p5=0.3*ones(M,1);p5_1=p5;p5_2=p5_1;
p6=0.3*ones(M,1);p6_1=p6;p6_2=p6_1;
% Parameter initialization
c=1+rands(M,I);c_1=c;c_2=c_1;
b=1+rands(M,I);b_1=b;b_2=b_1;
maxgen=100; % Number of evolutions
% Network test data , And normalize the data
load data1 input_train output_train input_test output_test
% Select and connect the sample input and output data
[inputn,inputps]=mapminmax(input_train);
[outputn,outputps]=mapminmax(output_train);
[n,m]=size(input_train);
%% Network training
% Loop start , Evolutionary networks
for iii=1:maxgen
iii
for k=1:m
x=inputn(:,k);
% Output layer settlement
for i=1:I
for j=1:M
u(i,j)=exp(-(x(i)-c(j,i))^2/b(j,i));
end
end
3、 ... and 、 Running results



Four 、matlab Edition and references
1 matlab edition
2014a
2 reference
[1] Kang Caili . Application of fuzzy neural network in water quality evaluation [J]. Journal of Xinzhou Normal University . 2019,35(02)
3 remarks
This part of the introduction is taken from the Internet , For reference only , If infringement , Contact deletion
边栏推荐
- DriveSeg:动态驾驶场景分割数据集
- 我們做了一個智能零售結算平臺
- 【光学】基于matlab涡旋光产生【含Matlab源码 1927期】
- Torch learning notes (5) -- autograd
- [new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
- Introduction to SSH Remote execution command
- 235. 二叉搜索树的最近公共祖先【lca模板 + 找路径相同】
- “google is not defined” when using Google Maps V3 in Firefox remotely
- Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
- Max of PHP FPM_ Some misunderstandings of children
猜你喜欢
知其然,而知其所以然,JS 对象创建与继承【汇总梳理】

EGO Planner代码解析bspline_optimizer部分(3)
![[leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难](/img/8d/0e515af6c17971ddf461e3f3b87c30.png)
[leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难

User identity used by startup script and login script in group policy

DriveSeg:动态驾驶场景分割数据集
![How to read the source code [debug and observe the source code]](/img/87/3cb25eb0301dc8046e39b997411e59.jpg)
How to read the source code [debug and observe the source code]

ActiveMQ的基础

We have built an intelligent retail settlement platform

KINGS
![[leetcode weekly race] game 300 - 6110 Number of incremental paths in the grid graph - difficult](/img/8d/0e515af6c17971ddf461e3f3b87c30.png)
[leetcode weekly race] game 300 - 6110 Number of incremental paths in the grid graph - difficult
随机推荐
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
Okaleido, a multimedia NFT aggregation platform, is about to go online, and a new NFT era may come
[leetcode] [SQL] notes
EGO Planner代码解析bspline_optimizer部分(1)
Differential constrained SPFA
Driveseg: dynamic driving scene segmentation data set
[Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University
Smart wax therapy machine based on STM32 and smart cloud
【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
What does a really excellent CTO look like in my eyes
042. (2.11) do it when it's time to do it
Real time split network (continuous update)
ActiveMQ的基础
Help change the socket position of PCB part
leetcode:556. 下一个更大元素 III【模拟 + 尽可能少变更】
leetcode:556. Next larger element III [simulation + change as little as possible]
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
application
Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)