I have an equation

q(s) = s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K

The answer I have indicated is 0.5361 < K < 0.9326.

Can this be done in Matlab, and if so how?

My apologies I am still feeling my way through Matlab.

Regards.

Printable View

- Feb 3rd 2011, 02:00 AMpaulbk108Finding roots of a polynomial of 5th order in Matlab.
I have an equation

q(s) = s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K

The answer I have indicated is 0.5361 < K < 0.9326.

Can this be done in Matlab, and if so how?

My apologies I am still feeling my way through Matlab.

Regards. - Feb 3rd 2011, 12:23 PMpickslides
Try this

Code:`syms s K;`

solve('s^5 + s^4 + 4*s^3 + 4*K*s^2 + 2*K*s + K','K')

- Feb 3rd 2011, 12:38 PMAckbeet
I'm not an expert in MATLAB, but are you sure you want to use the symbolic toolbox? You've got a quintic polynomial there, which likely doesn't have an analytical solution. In fact, the OP specified a root in a particular interval.

- Feb 3rd 2011, 03:09 PMpaulbk108
Using your code pickslides I get

ans =

-(s^5 + s^4 + 4*s^3)/(4*s^2 + 2*s + 1)

To me that has not solved for K. The other way to my thinking is to go through the Routh array but for such a complex function this seems daunting and time consuming...and that's assuming it is even possible that way.

Regards. - Feb 3rd 2011, 07:30 PMCaptainBlack
Solve what, this is not an equation for solving? State clearly exactly what you want to find and what you have to start with. In other words tell us what the real question is.

For example do you mean find $\displaystyle $$K$ such that:

$\displaystyle s^5 + s^4 + 4s^3 + 4Ks^2 + 2Ks + K=0$ ?

(which is verging on the trivial, so not likely to be what you mean)

CB - Feb 4th 2011, 12:03 AMpaulbk108
s^5 + s^4 + 4s^3 + 2Ks + K = 0 is the denominator of a given transfer function.

The question asks to find out whether the system is stable using the Routh Hurwitz criterion, then determine its range of stability for K > 0. I thought it may be possible to be done on Matlab... - Feb 4th 2011, 02:17 AMCaptainBlack
- Feb 4th 2011, 04:44 AMchisigma
People without Mathlab may try to solve the problem searching the value of k for which the roots of...

$\displaystyle \displaystyle q(s)=s^{5} + s^{4} + 4\ s^{3} + 4\ k\ s^{2} + 2\ k\ s + k$ (1)

... have all negative real part use the following approach. Let's suppose to search the values of k for which $\displaystyle q(s)$ has a factor $\displaystyle s^{2}+ \alpha$ with $\displaystyle \alpha>0$, such that is...

$\displaystyle q(s)= (s^{2}+ \alpha)\ (s^{3} + \beta_{2} s^{2} + \beta_{1}\ s + \beta_{0})$ (2)

Comparing (1) and (2) we arrive to the following system of equation...

$\displaystyle \beta_{2}=1$

$\displaystyle \alpha + \beta_{1}=4$

$\displaystyle \beta_{0} + \alpha\ \beta_{2}=4\ k$

$\displaystyle \alpha\ \beta_{1}= 2\ k$

$\displaystyle \alpha\ \beta_{0}=k$

... which leads to the pair of equations...

$\displaystyle \alpha^{2} - 4\ \alpha + 2\ k=0$

$\displaystyle \alpha^{2} - 4\ k\ \alpha + k=0$ (3)

... the solutions of which are...

$\displaystyle \alpha=0\ ,\ k=0$

$\displaystyle \alpha=3.461072192556...\ ,\ k=.932634024069...$

$\displaystyle \alpha=.2889278074438...\ ,\ k=.53611597593...$

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$ - Feb 7th 2011, 12:45 AMpaulbk108
Thanks so much for this solution. Could you please explain it with some greater detail?

By the way - the Matlab script I was referred to is a great piece of script - but does not accept terms such as "k"...

Regards. - Feb 7th 2011, 12:54 AMCaptainBlack