pen_ang.m
来自「FISMAT accommodates different arithmetic」· M 代码 · 共 41 行
M
41 行
function yk = pen_ang(e,x,Ts)% yk = pen_ang(e,x,Ts)%% Fuzzy controller for the inverted pendulum, to control the angle.%%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 24-April-1994 global E ERROR R RATE MOMENTS AREAS% Fuzzification:Ae =match(E,e(1),ERROR);Ade =match(R,e(2),RATE);N=1; Z=2; P=3;% The following nine rules desribing the controller:% R1:(N,N;P) R2:(N,Z;P) R3:(N,P;Z) % R4:(Z,N;P) R5:(Z,Z;Z) R6:(Z,P;N)% R7:(P,N;Z) R8:(P,Z;N) R9:(P,P;N)% can be ordered in a matrix:% e -> N Z P FAMbank=[N N Z ; % N | rate N Z P ; % Z V Z P P]; % Paggop='t2ap'; % algebraic-productA=aggregat(Ae,Ade,FAMbank,aggop);% A = [a1, a2,...,aj,...,am] with aj=aggop(aj1,aj2,...,aji,...,ajn).% Using the algebraic-product for the inference and a summation of the % outputs. Center Of Gravity method:yk = apsumcog(FAMbank,A,MOMENTS,AREAS);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?