dfod2.m

来自「高等引用数学的matlab求解的配套程序」· M 代码 · 共 29 行

M
29
字号
function sysdfod=dfod2(n,T,r)
% sysdfod=dfod2(n,T,r): digital fractional order differentiator
%                       and integrator    
%
% Output: 
% Discrete system in the form of the FIR filter of the order n
% obtained by power series expansion of the backward difference.
%
% Inputs: ---
% n: order of truncation (min n=100 is recommended)
% T: sampling period in [sec]
% r: approximated fractional order (s^r), r is generally real number
%
% Author: Dr. Ivo Petras (ivo.petras@mail.com)
% URL: http://ivopetras.tripod.com/
%
% Note: differentiator  -> nonrecusrive approximation 
%       integrator      -> recursive approximation
%
% Copyright (c), 2003.
%
if r>0
   bc=cumprod([1,1-((r+1)./[1:n])]);   
   sysdfod=filt(bc,[T^r],T);
elseif r<0
   bc=cumprod([1,1-((-r+1)./[1:n])]);
   sysdfod=filt([T^-r],bc,T);
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?