📄 wern93.m
字号:
function uk = wern93(e,x,T)% uk = wern93(e,x,T)% % Fuzzy-PID-Controller discribed in Wernstedt,J.;Kuhn,T.;Koch,M.:% Ein neues Entwurfskonzept fuer Fuzzy-Regelungen. (A new design strategy in% fuzzy control. In at - Automatisierungstechnik 41 (1993), 5, page 152-158% R.Oldenbourg Verlag.% For use with the FUZZY31.M S-function-file from the Fuzzy-Toolbox.% There are different ways for the realisation:% If the dynamic part (integration and differentiatio of the error e) is rea-% lized externally there are three inputs from the system. (e(1),e(2),e(3))% The approximations are the sum and difference in the discrete controller.% (only one system input for the controller but three in Simulink (DFLCS3)% needed). Both ways need three sets for the error (eset), the diffentition% of the error /difference (deset), the integration/sum of the error (seset) % and oset for the controller output. % x is the state vector with the last value of e(1)..e(3) and uk =x(1)..x(3)% and x(4).% T is the sampling period. % The Fuzzy-Sets must be defined outside this function. See the script file% WERNSET.M% Maybe there is a mistake in the publication above - a discrepancy beetween% the step response and the assignment to the output terms. %% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 23-April-1994 (Not tested)global eset seset deset oset% Fuzzification: % (discrete approximation of the dynamic elements. In Simulink three inputs% used - FUZZY31 - but only one is needed. )ek = fuzzifi(eset, e(1));sek = fuzzifi(seset,e(1)+x(1));dek = fuzzifi(deset,e(1)-x(1));% (analog realisation of the dynamic parts. Three inputs to the controller% in Simulink are needed)ek = fuzzifi(eset, e(1));sek = fuzzifi(seset,e(2));dek = fuzzifi(deset,e(3));neg=1; null=2; pos=3;rb(neg) = s3ma(s3ma(ek(pos) ,sek(pos)) ,dek(pos));rb(null)= t3mi(t3mi(ek(null),sek(null)),dek(null));rb(pos) = s3ma(s3ma(ek(neg) ,sek(neg)) ,dek(neg));% Defuzzification:% (Center of Gravity Method and MAX-MIN Inference)uk=defucoga(rb,oset,'min');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -