?? pi_siyi.m
字號:
function unT = pi_siyi(e,x,T)% unT = PI_SIYI(e,x,T)% % Fuzzy-PI-Controller discribed in H.Ying, W.Siler, J.Buckley : Fuzzy Control:% A Nonlinear Case. Automatica Vol.26, No.3, pp. 513-520 1990.% For use with the DFLCS1.M S-function-file from the Fuzzy-Toolbox.% There ist only one input e (error e(nT)) from the system. The second % controller input (rate r(nT)) is calculated in this file. The fuzzy-set % deset is not used (set it as a dummy operator: [0] - no empty matrix)% x is the state vector with x(1)=e(nT-T) and x(2)=u(nT-T).% They employ the following notation:% e(nT)=y(nT)-setpoint and e~(nT)=F[GE*e(nT)] (different to usual notation!)% r(nT)=[e(nT)-e(nT-T)]/T and r~(nT)=F[GR*r(nT)] (y(nT)=process output)% u(nT)=du(nT)+u(nT-T) and u~(nT)=GU*du(nT)+u(nT-T) u(nT)=output of the fuzzy% controller. GE,GR and GU are scaler (gain for error,rate and controller output)% where n is a positive integer and T is a sampling period. % F[] means fuzzification and du(nT) designates the incremental output of the fuzzy% controller (to process input) at the sampling time nT.% eset=[-L L]; fuzzy-set "error". (equal to the set for "rate")% oset=[-L 0 L]; (deset=not used dummy matrix [0])% The Fuzzy-Sets must be defined outside this function.% The sample period in the simulation results is T=0.1 and L=16%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 10-August 1993 global eset oset% By adjusting the input scalers GE and/or GR, we can change the degree of% the nonlinearity of the fuzzy controller employing the nonlinear defuzzi-% fikation dNL. The larger the GE (GR) is, the more nonlinear the fuzzy con-% troller will be.GE=0.6;GR=0.06;GU=2;% Fuzzification and scaling :enT=fuzzsiyi(eset,GE*e);rnT=fuzzsiyi(eset,GR*((e-x(1))/T));% The ruletable describes the four rules:% r(1): if error=e.p and rate=r.p then output=o.n% r(2): if error=e.p and rate=r.n then output=o.z% r(3): if error=e.n and rate=r.p then output=o.z% r(4): if error=e.n and rate=r.n then output=o.p% first row for rate=e.n, second row for rate=e.p, first column for error=e.n% second column for error=e.pon=1; oz=2; op=3;rt=[op oz ; oz on ];% Using of Zadeh AND-Minimum operator and the Lukasiewicz OR=bounded sum:rb=rtinf(rt,enT,rnT,'t3mi','s1bs'); % Defuzzification:% Linear defuzzification: (As shown in 1988 by Ying the resulting fuzzy% controller is precisly equivalent to linear nonfuzzy controller)% dL=oset*rb; % Nonlinear defuzzification procedure: (equivalent to a nonfuzzy nonlinear% PI controller)dNL=(oset*rb)/sum(rb);unT=GU*dNL+x(2); % unT means u~(nT) in the notation of Siler & Ying
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -