I'm working on a problem that involves a CUK converter. In control theory, a system is marginally stable if the real part of all eigenvalues are equal to zero. Actually, the eigenvalues of a matrix $A$ in a thing called the space-state model. Okay, so I have this matrix $A$ that depends of another matrices. Okay, when a system is unstable we would like to fix it using a controller. So I'm trying to figure out a gain $k_c$ that makes the system marginally stable. The code to do that is the following:
kst = 1/10;
ka = 1/20;
A = {{-64.383, 0, -22.35, 0}, {0, 0, 27.65, -50}, {1788, -2212, 0,
0}, {0, 4000, 0, -333.333}};
B = {3619.3, 3619.3, -29800, 0} ;
Cc = {0, 0, 0, 1} ;
NSolve[Re[Eigenvalues[A - Outer[Times, B ka kst kc, Cc]]] == 0, kc]
FindInstance[
Re[Eigenvalues[A - Outer[Times, B ka kst kc, Cc]]] < 0, kc, Reals]
(The part about FindInstace is to know what values of kc makes the system stable).
Okay, the output for NSolve is a huge matrix. Since it is pretty large I will write a few elements of it.
{{Re[Root[System`ReduceDump`P$77107[1], 3]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 4]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 2]] ->
0}, {Re[Root[System`ReduceDump`P$77107[1], 3]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 4]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 2]] ->
0}, {Re[Root[System`ReduceDump`P$77107[1], 3]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 4]] -> 0,
Re[Root[System`ReduceDump`P$77107[1], 2]] -> 0},
That is the output for NSolve.Here is where the first question comes up: What does it mean that output? Mathematica was unable to solve the equation or the equation just hasn't any solutions?
The output for FindInstance says kc->0. But that isn't correct. Actually If I set kc=0.8 I get the real parts of the eigenvalues negative.
NRoots
. Also some of the functions specifically for Control theory calculations in guide/ControlSystems might be useful for your problem. $\endgroup$