Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5a5f4ee4abd2d7662a1434ecf6a8f6cf |
User & Date: | gawthrop@users.sourceforge.net on 1996-08-19 15:34:29 |
Other Links: | branch diff | manifest | tags |
Context
1996-08-19
| ||
15:38:31 | Removed bug work round. check-in: ab90856182 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
15:34:29 | Initial revision check-in: 5a5f4ee4ab user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
15:34:14 | Now based on state - not descriptor matrices. check-in: ecc37a4f9c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/m/sm2sr.m version [db002505d6].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | function [Y,X] = sm2sr(A,B,C,D,T,u0,x0); % [Y,X] = sm2sr(A,B,C,D,T,u0,x0); % Constrained-state matrix to impulse response. % A,B,C,D,E - (constrained) state matrices % T vector of time points % u0 input gain vector: u = u0*unit step. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [Ny,Nu] = size(D); [Ny,Nx] = size(C); if nargin<7 u0 = zeros(Nu,1); u0(1) = 1; end; if nargin<8 x0 = zeros(Nx,1); end; [N,M] = size(T); if M>N T = T'; N = M; end; one = eye(Nx); Y = zeros(N,Ny); X = zeros(N,Nx); i = 0; for t = T' i=i+1; if Nx>0 expAt = expm(A*t); x = ( A\(expAt-one) )*B*u0 + expAt*x0; X(i,:) = x'; if Ny>0 y = C*x + D*u0; Y(i,:) = y'; end; elseif Ny>0 y = D*u0; Y(i,:) = y'; end; end; |