📄 tp_dem_c.m
字号:
function do = tp_dem_c(e,x,Ts)% do = tp_dem_c(e,x,Ts)%% Temperature control demo with the fuzzy toolbox.%% This controller relates to the fuzdemo3 of the fuzzy-toolbox.% The corresponding Simulink block diagram: tp_dem_s.m%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 22-April-1994 global E ERROR R RATE P MOMENTS AREAS% Fuzzification: (e(1)=error e(2)=rate of changeAe = match(E,e(1),ERROR);Ade = match(R,e(2),RATE);% Ae is a row vector containing fit-values to which e(1) fits to the sets.NB=1; NM=2; NS=3; ZE=4; PS=5; PM=6; PB=7;% e -> NB NM NS ZE PS PM PBFAMbank= [0 0 0 PB 0 0 0 ; % NB | rate of error 0 0 0 PM 0 0 0 ; % NM v 0 0 0 PS 0 0 0 ; % NS PB PM PS ZE NS NM NB ; % ZE 0 0 0 NS 0 0 0 ; % PS 0 0 0 NM 0 0 0 ; % PM 0 0 0 NB 0 0 0 ]; % PBaggop='t2ap'; % algebraic-productA=aggregat(Ae,Ade,FAMbank,aggop);% A = [a1, a2,...,aj,...,am] with aj=aggop(aj1,aj2,...,aji,...,ajn).% At this stage each rule could be weighted by a certainty factor cj between% 0 and 1. This is realized by a multiplication or aj*=min(aj,cj). % An adaptive fuzzy system could use this factor to change the structure.% Using the algebraic-product for the inference and a summation of the % outputs. Center Of Gravity method:do = apsumcog(FAMbank,A,MOMENTS,AREAS);% Alternative - Height Method:% do=apsumhei(FAMbank,A,MOMENTS,AREAS);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -