|
From: Bhupendra Singh on 8 Feb 2005 02:59 Hi all, Can anyone help me with the following: I have an equation of the form: K * (a*s^4 + b*s^3 + c*s^2 + d*s + e) A(s) = -------------------------------------------------- p*s^6 + q*s^5 + r*s^4 + t*s^3 + u*s^2 + v*s + w and I want to convert it to the form: K1 * (s + a1)(s + a2)(s + a3)(s + a4) A(s) = ------------------------------------------------------ (s + b1)(s + b2)(s + b3)(s + b4)(s + b5)(s + b6) .... where a,b,c,d,e,f,p,q,r,s,t,u,v,w are symbolic functions and so r ai's and bi's. Is it possible to find poles and zeros of a transfer function using the Symbolic Math Toolbox ?? I basically want to factorize the numerator and denominator seperately and find out the zeros and poles respectively. The 'factor' command works with constant coefficients but here we have symbolic coefficients. Can such a conversion be done on MATLAB ?? (or any other tool for that matter?) I desperately need help on this .. expecting co-opetation .. regards, Bhupendra
From: Roger Stafford on 8 Feb 2005 04:20 In article <eefb193.-1(a)webx.raydaftYaTP>, "Bhupendra Singh" <get2bhoops(a)gmail.com> wrote: > Hi all, > > Can anyone help me with the following: > > I have an equation of the form: > > K * (a*s^4 + b*s^3 + c*s^2 + d*s + e) > A(s) = -------------------------------------------------- > p*s^6 + q*s^5 + r*s^4 + t*s^3 + u*s^2 + v*s + w > > and I want to convert it to the form: > > K1 * (s + a1)(s + a2)(s + a3)(s + a4) > A(s) = ------------------------------------------------------ > (s + b1)(s + b2)(s + b3)(s + b4)(s + b5)(s + b6) > > ... where a,b,c,d,e,f,p,q,r,s,t,u,v,w are symbolic functions and so r > ai's and bi's. > > Is it possible to find poles and zeros of a transfer function using > the Symbolic Math Toolbox ?? > > I basically want to factorize the numerator and denominator > seperately and find out the zeros and poles respectively. > > The 'factor' command works with constant coefficients but here we > have symbolic coefficients. Can such a conversion be done on MATLAB > ?? (or any other tool for that matter?) > > I desperately need help on this .. > > expecting co-opetation .. > > regards, > Bhupendra ------ Hello Bhupendra, I am afraid you are in for a disappointment. Factoring the above denonimator, a sixth degree polynomial in s, is equivalent to solving the general sextic equation, and it has been proved by mathematicians, Ruffini 1799, Abel 1826, and Galois 1832, that the general solution of a quintic or higher degree cannot be written as a finite formula involving only the four arithmetic operations and the extraction of roots. See http://library.wolfram.com/examples/quintic/main.html. There does exist a general formula of some considerable complexity for a quartic equation however, which would allow you to factor the numerator, if that is of any help. I don't know whether it is implemented in the symbolic math toolbox or Maple. -- (Remove "xyzzy" and ".invalid" to send me email.) Roger Stafford
From: Bhupendra Singh on 8 Feb 2005 09:15 Hi, Thanks for ur response , what I did was following: for zeros: solve(Av,s) for poles: solve(1/Av,s) I don't have to deal with orders more than four .. so I guess we can be sure that MATLAB can find the roots. But the problem is that once I have the roots (which r of the type 'sym') .. I need to plot them .. but for that we have to convert their data type to double .. this will result in only the real part of the roots .. the imaginary part wud be ignored. Can I plot the roots in sym form .. without losing the imaginary part. I have to plot the real part on x-axis and imaginary part on y-axis. And see the movement if poles with respect to one parameter. But I am stuck at the point where I have to convert my sym type roots to numaric roots without loosing the imaginary part. Okay here is what I eactly want: say I have a sym type equation: eq = a*s^3 + b*s^2 + c*s + d where a, b, c and d are real nos in 'sym' form. I need to solve for 's'. This will give me two complex conjugate roots and one real root. I will solve this with solve(eq,s). The results wud be in the 'sym' form only. Now what do I do?? Is there any way I can get the coeffcients a,b,c,d in the double form .. then I can use the roots command to find the root . Plz help. regards, Bhupendra
From: Roger Stafford on 8 Feb 2005 13:22 In article <eefb193.1(a)webx.raydaftYaTP>, "Bhupendra Singh" <get2bhoops(a)gmail.com> wrote: > Hi, > > Thanks for ur response , what I did was following: > > for zeros: solve(Av,s) > for poles: solve(1/Av,s) > > I don't have to deal with orders more than four .. so I guess we can > be sure that MATLAB can find the roots. > > But the problem is that once I have the roots (which r of the type > 'sym') .. I need to plot them .. but for that we have to convert > their data type to double .. this will result in only the real part > of the roots .. the imaginary part wud be ignored. > > Can I plot the roots in sym form .. without losing the imaginary > part. > I have to plot the real part on x-axis and imaginary part on y-axis. > And see the movement if poles with respect to one parameter. > > But I am stuck at the point where I have to convert my sym type roots > to numaric roots without loosing the imaginary part. > > Okay here is what I eactly want: > > say I have a sym type equation: > > eq = a*s^3 + b*s^2 + c*s + d > > where a, b, c and d are real nos in 'sym' form. > > I need to solve for 's'. This will give me two complex conjugate > roots and one real root. I will solve this with solve(eq,s). The > results wud be in the 'sym' form only. > > Now what do I do?? Is there any way I can get the coeffcients a,b,c,d > in the double form .. then I can use the roots command to find the > root . > > Plz help. > > regards, > Bhupendra ------ Hello again Bhupendra Singh, You have said, "I have to plot the real part on x-axis and imaginary part on y-axis. And see the movement if poles with respect to one parameter." If that is really your problem, I don't see why you are using the Symbolic Math Toolbox at all. Your 'zeros' and 'poles' are simply roots of polynomial equations that vary with some parameter or other. It seems to me this puts you in the numerical domain where matlab can calculate specific roots for specific values of a parameter. Just use the 'roots' command to develop arrays of the roots as compared with arrays of corresponding parameter values to whatever amount of resolution is needed. The real and imaginary parts of the roots can be separated with the 'real' and 'imag' commands for plotting. Also this way you avoid the problem of not being able to find formulas for the quintic and higher degree cases. The nonexistence of such formulas doesn't mean that the roots can't be found - only that they can't be expressed in terms of straightforward arithmetic and root extraction operations. Consider the 'roots' command as a higher level type of formula for your poles and zeros. -- (Remove "xyzzy" and ".invalid" to send me email.) Roger Stafford
|
Pages: 1 Prev: How to multiply an image with a matrix? Next: class: not a known object type |