当前位置:网站首页>[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
边栏推荐
- 【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
- 多媒体NFT聚合平台OKALEIDO即将上线,全新的NFT时代或将来临
- Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
- Succession of flutter
- 【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
- 12、 Service management
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- 【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
- Record the errors reported when running fluent in the simulator
- Simulation scheduling problem of SystemVerilog (1)
猜你喜欢
平淡的生活里除了有扎破皮肤的刺,还有那些原本让你魂牵梦绕的诗与远方
记录在模拟器中运行flutter时报的错
Simulation scheduling problem of SystemVerilog (1)
SQL custom collation
Flutter网络和数据存储框架搭建 -b1
CV in transformer learning notes (continuously updated)
leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]
组策略中开机脚本与登录脚本所使用的用户身份
There are several levels of personal income tax
The online customer service system developed by PHP is fully open source without encryption, and supports wechat customer service docking
随机推荐
简述服务量化分析体系
leetcode:11. 盛最多水的容器【雙指針 + 貪心 + 去除最短板】
22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc
Add control at the top of compose lazycolumn
CV in transformer learning notes (continuously updated)
math_泰勒公式
VLAN experiment
Day-27 database
my. INI file not found
JS_ Array_ sort
Getting started with JDBC
为什么要做特征的归一化/标准化?
Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
__ Weak and__ The difference between blocks
Caddy server agent
FBI 警告:有人利用 AI 换脸冒充他人身份进行远程面试
php-fpm的max_chindren的一些误区
Ping problem between virtual machine and development board
Torch learning notes (4) -- torch's dynamic calculation diagram
12、 Service management