Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline cos_phi  
#1 Posted : 22 April 2010 03:56:46(UTC)
cos_phi


Rank: Advanced Member

Groups: Registered
Joined: 20/04/2010(UTC)
Posts: 33

I know I did post here but I don't know what I did, it never showed up...

Searching the forums didn't reveal anything, so here is my big list: complex roots. For example, I could implement a Bessel polynomial very easy, "expand" for a 4th order resulted in this:

Code:
105+s*(105+s*(45+s*(10+s)))


which doesn't bother me, but I'm interested in finding the roots for a transfer function with variable order (Bessel filter). The wiki page also says "solve" only works for real numbers. I could try Bairstow's method, but that would complicate things a bit. I'll do it, though tomorrow, now my eyes are fighting the light...

So, if time allows and interest fuels, could you consider a future function similar to Maxima's "allroots"?


Regards,
Vlad.

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 22 April 2010 13:12:27(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Vlad,

As far as I know, you can get all the roots of a polynomial by "polyroots" function
p←105+105*x+45*x^2+10*x^3+1
polyroots(mat(105;105;45;10;1;5;1))=mat(-2,8962+0,8672*i;-2,8962-0,8672*i;-2,1038+2,6574*i;-2,1038-2,6574*i;4;1)
You need the polynomial coefficients here. I think that SMath, at the moment, does not have the ability to extract coefficients from a polynomial expression or to expand it in order to get the polynomial (not sure).

Regards,
Radovan

Edited by user 22 April 2010 13:17:15(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline cos_phi  
#3 Posted : 22 April 2010 15:17:03(UTC)
cos_phi


Rank: Advanced Member

Groups: Registered
Joined: 20/04/2010(UTC)
Posts: 33

Thank you for the solution! With a little work I can get the terms of the polynomial by recursion and then use polyroots. I'm working on it now.


Happy regards,
Vlad. Good
Offline omorr  
#4 Posted : 22 April 2010 15:51:13(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
You are welcome Good

I hope you would not mind sharing your SMath files with us or adding them to the Examples on the Wiki, when you get them ready.

Regards,
Radovan

Edited by user 22 April 2010 17:52:00(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#5 Posted : 22 April 2010 18:51:47(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
omorr wrote:
I think that SMath, at the moment, does not have the ability to extract coefficients from a polynomial expression or to expand it in order to get the polynomial (not sure).

You are right.
Offline cos_phi  
#6 Posted : 22 April 2010 19:13:33(UTC)
cos_phi


Rank: Advanced Member

Groups: Registered
Joined: 20/04/2010(UTC)
Posts: 33

Of course I will, I meant to say it but I didn't know how it will end up, so I chose safety first Good



This is the basis, a crude version. a(n) was a left-over from the previous version, now reused. Lots of room for improvement. Since this is for calculating a Bessel filter, H(s) is made just to see how the transfer function would look like, a feast of the success for the eyes, if you want Wink
Next steps are printing real and imaginary parts of the poles and converting them to parameters for LTspice. Then transformations from low-pass (these ones) to high-pass, band-pass and band-reject. Then Butterworth, Chebyshev type I and II and Cauer.
All these are assisting me in making a universal filter; it will be ready (it is half-ready now) on LTspice Yahoo groups. The files already exist in wxMaxima, about 90% finished, but with SMath... it's a pleasure Biggrinirol:
I'm not working all of the time, but when they are ready I'll post them here.

Regards,
Vlad.
Offline omorr  
#7 Posted : 22 April 2010 19:53:31(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you, the contribution to Wiki will be very welcome Good

BTW if I understood you well - you are using Ubuntu, are'nt you?
This screenshot is very interesting. I think I've never seen the screenshot like this one. I suppose you've chosen some Custom background color for regions (near white - some grayish). If you define background color as white from the Basic colors palette, the regions will be transparent (at least on my computer). Is there any option in the "Interface" I am not aware of, or something else? Maybe Ubuntu?

Regards,
Radovan

EDIT: Sorry, it seems I was wrong. Regions are not white.

Edited by user 22 April 2010 19:55:59(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline cos_phi  
#8 Posted : 22 April 2010 21:46:33(UTC)
cos_phi


Rank: Advanced Member

Groups: Registered
Joined: 20/04/2010(UTC)
Posts: 33

(255 251 240) is the color, it's not that much but it lessens the contrast a bit. Maybe in a future version there will be an option to set the whole background color? Ah, wishes, wishes... Good One at a time.


Regards,
Vlad.

[EDIT]
I forgot, Ubuntu Karmic, yes Good
[/EDIT]
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.