Controllability Problem

  • Thread starter ayham87
  • Start date
  • #1
3
0

Homework Statement



Given the LTI system X =Ax+Bu where

A =[ 0 1 0 0 0 0; a1 0 0 a2 0 0;0 0 0 1 0 0;0 a3 0 0 0 0; 0 0 0 0 0 1;0 0 0 0 a4 0];
B = [0 0 0 ;b1 0 0 ; 0 0 0 ;0 b2 0 ;0 0 0 ;0 0 b2];


and the parameters a1; a2; a3; a4; b1; b2 are all nonzero. Determine whether the system is completely controllable. If not, find the controllable subspace of the state space.






The Attempt at a Solution



I tried systematically but it seems to long so i try by matlab by the following code

syms a1 a2 a3 a4 b1 b2
A =[ 0 1 0 0 0 0; a1 0 0 a2 0 0;0 0 0 1 0 0;0 a3 0 0 0 0; 0 0 0 0 0 1;0 0 0 0 a4 0];
B = [0 0 0 ;b1 0 0 ; 0 0 0 ;0 b2 0 ;0 0 0 ;0 0 b2];

Co = ctrb(A,B)


Thanks in advanced
 

Answers and Replies

  • #2
245
0
The variables A and B need not be symbolic variables. Just declare A and B as double floats and use ctrb function. It worked for me.
 
  • #3
3
0
Thanks for your response

actually "syms" not for A & B, its for the variables (a1 a2 b1 b2 a3 a4), I declare A & B as double float :

syms a1 b1 a2 a3 a4 b2
A =[ 0 1 0 0 0 0; a1 0 0 a2 0 0;0 0 0 1 0 0;0 a3 0 0 0 0; 0 0 0 0 0 1;0 0 0 0 a4 0];
B = [0 0 0 ;b1 0 0 ; 0 0 0 ;0 b2 0 ;0 0 0 ;0 0 b2];
A = float('double');
B = float('double');
Co = ctrb(A,B);


but i get the following error:

The following error occurred converting from struct to double:
Error using ==> double
Conversion to double from struct is not possible.

Error in ==> ctrb at 32
co(:,1:nu) = b;


can u help me again....thanks in advanced
 
  • #4
272
0
the ctrb function doesn't handle symbolics. Just do the steps to find out controllability "by hand" via matlab. Its not that long, I've done it already, just create a few loops and such. I can provide the code I used to do it before I figured out MATLAB had the functionality, if you'd like.
 

Related Threads on Controllability Problem

Replies
2
Views
774
Replies
1
Views
2K
  • Last Post
Replies
9
Views
773
  • Last Post
Replies
12
Views
4K
  • Last Post
Replies
14
Views
2K
Replies
1
Views
2K
Replies
0
Views
2K
Replies
1
Views
823
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
2
Views
4K
Top