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

📄 sos2ss.m

📁 有关matlab的电子书籍有一定的帮助希望有用
💻 M
字号:
function [a,b,c,d] = sos2ss(sos)
%SOS2SS Second-order sections to state space linear system model conversion
%   [A,B,C,D] = SOS2SS(SOS) returns the state space matrices A, B, C and D
%   of the discrete-time system given by SOS in second-order sections form.
%   SOS is an L by 6 matrix which contains the coefficients of each 
%   second-order section in its rows:
%       SOS = [ b01 b11 b21  a01 a11 a21 
%               b02 b12 b22  a02 a12 a22
%               ...
%               b0L b1L b2L  a0L a1L a2L ]
%   The system transfer function is the product of the second-order transfer
%   functions of the sections.  Each row of the SOS matrix describes
%   a 2nd order transfer function as
%       b0k +  b1k z^-1 +  b2k  z^-2
%       ----------------------------
%       a0k +  a1k z^-1 +  a2k  z^-2
%   where k is the row index.
%
%   See also SS2SOS, ZP2SOS, SOS2ZP, SOS2TF 

%   Author: T. Krauss, 1993 
%   Copyright (c) 1988-98 by The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 1997/11/26 20:13:12 $
 
if nargin ~= 1,
    error('Requires one input argument.')
end

L = size(sos,1);
z = []; p = [];
for i=1:L,
    z = [z; roots(sos(i,[1 2 3]))];
    p = [p; roots(sos(i,[4 5 6]))];
end

k = prod(sos(:,1)./sos(:,4));

[a,b,c,d]=zp2ss(z,p,k);

⌨️ 快捷键说明

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