Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Chapters

Chapter Contents:

Search Introduction to Digital Filters

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Example of State-Space Diagonalization

For the example of Eq.$ \,$(G.7), we obtain the following results:

>> % Initial state space filter from example above:
>> A = [-1/2, -1/3; 1, 0]; % state transition matrix
>> B = [1; 0];
>> C = [2-1/2, 3-1/3];
>> D = 1;
>>
>> eig(A) % find eigenvalues of state transition matrix A

ans =
  -0.2500 + 0.5204i
  -0.2500 - 0.5204i

>> roots(den) % find poles of transfer function H(z)

ans =
  -0.2500 + 0.5204i
  -0.2500 - 0.5204i

>> abs(roots(den)) % check stability while we're here

ans =
    0.5774
    0.5774

% The system is stable since each pole has magnitude < 1.

Our second-order example is already in real $ 2\times 2$ form, because it is only second order. However, to illustrate the computations, let's obtain the eigenvectors and compute the complex modal representation:

>> [E,L] = eig(A)  % [Evects,Evals] = eig(A)

E =

  -0.4507 - 0.2165i  -0.4507 + 0.2165i
        0 + 0.8660i        0 - 0.8660i


L =

  -0.2500 + 0.5204i        0          
        0            -0.2500 - 0.5204i

>> A * E - E * L   % should be zero (A * evect = eval * evect)

ans =
  1.0e-016 *
        0 + 0.2776i        0 - 0.2776i
        0                  0          

% Now form the complete diagonalized state-space model (complex):

>> Ei = inv(E); % matrix inverse
>> Ab = Ei*A*E % new state transition matrix (diagonal)

Ab =
  -0.2500 + 0.5204i   0.0000 + 0.0000i
  -0.0000            -0.2500 - 0.5204i

>> Bb = Ei*B   % vector routing input signal to internal modes

Bb =
   -1.1094
   -1.1094

>> Cb = C*E    % vector taking mode linear combination to output

Cb =
  -0.6760 + 1.9846i  -0.6760 - 1.9846i

>> Db = D      % feed-through term unchanged

Db =
     1

% Verify that we still have the same transfer function:

>> [numb,denb] = ss2tf(Ab,Bb,Cb,Db)

numb =
   1.0000             2.0000 + 0.0000i   3.0000 + 0.0000i

denb =
   1.0000             0.5000 - 0.0000i   0.3333          

>> num = [1, 2, 3]; % original numerator
>> norm(num-numb)

ans =
  1.5543e-015

>> den = [1, 1/2, 1/3]; % original denominator
>> norm(den-denb)

ans =
  1.3597e-016


Order a Hardcopy of Introduction to Digital Filters

Previous: Finding the Eigenvalues of A in Practice
Next: Properties of the Modal Representation

written by Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )