Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

The matrix $Q$ with dimensions $n\times2*n*m$ is structured by $$Q=[B|AB|\cdots|A^{2*n-1}B]$$ where $Q$ is an augmented matrix built from a $3\times3$ matrix, $A$, and a $3\times2$ matrix, $B$.

I need $\DeclareMathOperator{\rank}{rank}\rank(Q)<n$ but I get $\rank(Q)=n$.

If I RowReduce matrices $A$ and $B$ before that calculation the $Q$ matrix has $\rank<n$ as I want, but its elements aren't the ones I need to continue, but 0's and 1's.

Any Idea on how to get the desired $Q$ matrix?

If I multiply $Q$ by $Q_\text{reduced}$ (with dimensions $2*n*m\times n$) I get an $n\times n$ matrix, $W$ with $\rank(W)=n$, so that's not what I want.

I've no Idea how to implement the Mathematica code here. Any suggestions would be helpful.

CellGroupData[{
  A0 = RandomInteger[{1, 10}, {4, 4}],
  B0 = RandomInteger[{1, 10}, {4, 3}],
  A1 = RowReduce[A0],
  B1 = RowReduce[B0],
  m = 3,
  n = 4,

  (*Original Matrices Proc *)
  Do[Lnn[j] = MatrixPower[A0, j - 1].B0, {j, 2*n}],
  Do[Flatten[Lnn[j][[i]], m], {i, n}, {j, 2*n}],    
  M222 = Table[Lnn[j][[i]], {i, n}, {j, 2*n}],
  R222 = Flatten[M222],
  Qnn = Partition[R222, 2*n*m],
  η1 = MatrixRank[Qnn],
  {p1, r1} = Dimensions[Qnn],
  QN11 = RowReduce[Qnn],

  (*RowReduced Matrices used now *)
  Do[Lnn1[j] = MatrixPower[A1, j - 1].B1, {j, 2*n}],
  Do[Flatten[Lnn1[j][[i]], m], {i, n}, {j, 2*n}],    
  M22 = Table[Lnn1[j][[i]], {i, n}, {j, 2*n}],
  R22 = Flatten[M22],
  Qn = Partition[R22, 2*n*m],
  η = MatrixRank[Qn],
  {p, r} = Dimensions[Qn],
  QN = RowReduce[Qn],

  Print[MatrixForm[Qnn], MatrixForm[QN11]],
  Print[MatrixForm[Qn], MatrixForm[QN]]}];
share|improve this question
1  
I was going to format your text for you, but I find I am confused by your notation. What does Q=[B|AB|---|A^(2*n-1).B] mean? The use of the unmatched vertical lines (|) is unfamiliar to me. Also, what do you intend by ---, subtraction? – rcollyer Jul 18 '12 at 19:15
@rcollyer Q is a matrix that consists of submatrices. since A(3x3), n=3. so Q would be [B AB A^2.B A^3.B A^4.B A^5.B], the Routine: { Do[Lnn[j] = MatrixPower[A0, j - 1].B0, {j, 2*n}], Do[Flatten[Lnn[j][[i]], m], {i, n}, {j, 2*n}], M222 = Table[Lnn[j][[i]], {i, n}, {j, 2*n}], R222 = Flatten[M222], Qnn = Partition[R222, 2*n*m]} Creates the Matrix Q in the form I want so don't bother for Q that much. If you want to check it though, excecute this 5 manipulations appart and join B,Man1,Man2 etc the same matrix will occur. the RowReduce is my point after the formation of the matrix. – Aristarchus Neokleous Jul 19 '12 at 4:19
RM explained it to me in the chat room. So, the vertical lines just indicate that $Q$ is an augmented matrix consisting of $B$, $AB$, $A^2B$, etc. – rcollyer Jul 19 '12 at 4:22
exactly, If I could post the .nb file it would be easier... though I can't get into chatroom yet! – Aristarchus Neokleous Jul 19 '12 at 4:27
The point is that this Augmented matrix has to have rank<3 since it's an augmentation of 2 matrices ranked 3&2 but RowReduce can't show it to me. Nevertheless If I RowReduce the A&B matrice before the construction of Q I get a Q with row nullity and elements 0,1, but that's not what I need to continue... I don't know if I multiply Q(n,2*n*m)xTranspose[Qred](2*n*mxk) [k=Rank(Qred)<n] if the new matrix lets say W (nxk) would have {kxk} rows linear indipendend and {kx(n-k)} linear dependend to the first ones. – Aristarchus Neokleous Jul 19 '12 at 4:36
show 3 more comments

2 Answers

The Answer is no it can't!

Random Integer sets as Linear Independent the Columns B and the first column of the product AB, and linear dependent among these three all the others.

If you're an engineer and want to test this augmented Controllability Crit your system HAS to be NOT Controllable and implement the Static Feedback that makes it controllable.

share|improve this answer

Whether the Q matrix has rank $<n$ or not depends on the specific A and B. For instance, if B is a matrix of all zeroes, then Q is a matrix of all zeroes and so has rank $< n$.

You can test for the rank of Q using the MatrixRank[ ] function.

You can build Q from A and B using the function ControllabilityMatrix[ ].

For example, if a={{-1, 1, 0}, {0, -1, 0}, {0, 0, 0}} and b={{1, 0}, {1, 1}, {0, 0}}, the Q matrix is

q = ControllabilityMatrix[StateSpaceModel[{a, b}]]

and the rank is

 MatrixRank[q]

which is 2.

Of course, Aristarchus is correct, if you build A and B from random integers (or random reals) then Q is full rank with probability one.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.