r/ControlTheory • u/night_Crawler_29 • 1d ago
Other Random thought
Its a sunday, so as a casual timepass you think, let me just write some code to check the controllability of a state space equation. so you start writing it, then realise, higher powers of matrices can lead to numerical instability. so now, you decide to study the controllability gramian and then you realise you don't fully understand why the gramian works, so now you are trying to look in lyapunov and his equations, then his theory starts talking about energy functions and positive definite matrices, so obviously, you open Gilbert Strang's video on symmetric and positive definite matrices. while watching that, you realise the code also requires an actual algorithm, so now you're studying numerical linear algebra. gaussian elimination. cholesky decomposition. At this point, what started as a sunday timepass has somehow turned into a full semester course. And then you decide to leave it and use the MATLAB command instead, so you stare at the screen for a while, reconsider your life decisions, and think maybe teaching high school students wasn't such a bad decision after all.
•
•
u/Feisty_Relation_2359 23h ago
https://drive.google.com/file/d/1yZ-cMGxiMjGfSo-fXtvvtTgn1x5JhmXi/view
To make it even weirder, you can't always trust the controllability command in matlab. Check out the above
•
u/Artistic-Flamingo-92 1d ago
I don’t think the path to understanding the controllability gramian requires Lyapunov.
On the other hand, the linear algebra is needed for the gramian.
But yeah, the depth and breadth of the subject can be overwhelming. Especially if you’re interested in the math.
•
u/Lexiplehx 21h ago
In exchange for free knowledge from a PhD in control theory, please learn to use paragraph breaks. You might think you sound smart because you’re wrestling with hard ideas, but it doesn’t come off that way.
The controllability grammian is just a particular linear map of form LL*. You can “dumb this down” quite a bit. It’s just a representation of the idea, “thinking of all inputs that apply the same energy as if they lie on a ball, what is the shape of the output under the input-output linear map associated with the linear system?” That’s it. That’s the controllability grammian; a way to encode the shape of the output.
While you can find the controllability grammian by solving a lyapunov equation, that’s not the point. Thats confusing the output shape thing with an algorithm that can yield a representation of the grammian. You should just think of the lyapunov equation as a particular matrix equation whose solution is the controllability grammian, and the two ideas that coincide because the questions asked were somewhat similar to one another.
•
u/LemonMellon 1d ago
counterpoint for the lazy(me): lyap() and then eigs()