Control Subspace of LTI System X = Ax + Bu: Nonzero Parameter Analysis

  • Thread starter Thread starter ayham87
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the controllability of a linear time-invariant (LTI) system represented by the equation X = Ax + Bu. Participants are exploring whether the system is completely controllable given specific nonzero parameters in matrices A and B, and they are attempting to find the controllable subspace if it is not.

Discussion Character

  • Homework-related
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant presents a MATLAB approach using symbolic variables for parameters a1, a2, a3, a4, b1, and b2 to determine controllability.
  • Another participant suggests that A and B should be declared as double floats rather than symbolic variables, claiming this worked for them.
  • A later reply clarifies that "syms" is used for the parameters, while A and B are indeed declared as double floats, but an error occurs when trying to convert a struct to double.
  • Another participant advises against using the ctrb function with symbolic variables and recommends performing the controllability analysis manually in MATLAB, offering to share their code for this process.

Areas of Agreement / Disagreement

Participants express differing views on the use of symbolic versus numeric representations in MATLAB for the matrices A and B. There is no consensus on the best approach to resolve the error encountered during the analysis.

Contextual Notes

Participants have not reached a conclusion regarding the controllability of the system, and the discussion includes unresolved technical issues related to MATLAB functionality and the handling of symbolic variables.

ayham87
Messages
3
Reaction score
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
 
Physics news on Phys.org
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.
 
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
 
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.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
6K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K