?? ladder.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 + -