⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ladder.m

📁 用MATLAB的脚本语言M语言编写的
💻 M
字号:
function [alpha0,alpha,beta]=ladder(B,A)

%  Ladder Realization of a Transfer Function
%  Amir M. Sadri, Dynamics & Control Research Group
%  University of Manchester
%  10 May, 1997
%  Reference: Computer-Controlled Systems, Theory and Design
%  by  Karl J. Astrom and Bjorn Wittenmark
%
%  [alpha0,alpha,beta]=ladder(B,A) finds the ladder realization of
%  a transfer function to avoid the coefficient sensitivity in the
%  digital implementations by making a continued-fraction expansion
%  in the pulse-transfer operator in the following way:
%
%
%    B(z)                      1
%  ------- = a0 +  ----------------------------
%    A(z)                          1
%                   b1z  +  ------------------- 
%                                      1
%                           a1 +  -------------
%                                       :   
%                                       :
%                                          1
%                                  bnz + ------
%                                          an
%
% where deg(A)=deg(B)=n.
%
% Input  :  B & A, coefficients of the numerator and denominator.
% Output :  alpha0(a0), alpha(a1, a2, ...) & beta(b1, b2, ...)


n=length(B)-1;

[alpha0,B]=deconv(B,A);


for i=1:n
     for j=1:length(B)-1
          Bz(j)=B(j+1);
     end
           
     Bz(j+1)=0;   
     [beta(i),A]=deconv(A,Bz);
     Bz(i+1)=[];
     A(1)=[];B(1)=[];
     [alpha(i),B]=deconv(B,A);   
end    

⌨️ 快捷键说明

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