PDA

View Full Version : Scilab and DSP


Andreas Vaerge
11-21-2007, 09:50 PM
In an attempt to study DSP (interest not immidiate use) I have bought
"Digital Signal Processing 3rd edition" by Proakis and Manolakis and
the self study guide also by Proakis. However it is assumed that I
have MatLab available which I cannot quite afford :-(. I have found
SciLab which (according to info on the net) should be able of doing
most of what MatLab can, just differently.
Now, I suppose I will have to convert the samples to SciLab format
and thus I was wondering if there is any guide from which I can
learn what is what in the two programs.
Alternately, is there any good (beginners) DSP book or high quality
website which uses SciLab for the samples? I do not seem to find
anything on google.

Randy Yates
11-21-2007, 09:59 PM
Andreas Vaerge <[email protected]> writes:

> In an attempt to study DSP (interest not immidiate use) I have bought
> "Digital Signal Processing 3rd edition" by Proakis and Manolakis and
> the self study guide also by Proakis. However it is assumed that I
> have MatLab available which I cannot quite afford :-(. I have found
> SciLab which (according to info on the net) should be able of doing
> most of what MatLab can, just differently.
> Now, I suppose I will have to convert the samples to SciLab format
> and thus I was wondering if there is any guide from which I can
> learn what is what in the two programs.
> Alternately, is there any good (beginners) DSP book or high quality
> website which uses SciLab for the samples? I do not seem to find
> anything on google.

I don't mean to disrespect SciLab, but you might be better off
using GNU Octave instead. It is at least mostly compatible with
Matlab, although there are some significant differences.

http://www.octave.org
--
% Randy Yates % "The dreamer, the unwoken fool -
%% Fuquay-Varina, NC % in dreams, no pain will kiss the brow..."
%%% 919-577-9882 %
%%%% <[email protected]> % 'Eldorado Overture', *Eldorado*, ELO
http://www.digitalsignallabs.com

Andreas Vaerge
11-21-2007, 10:09 PM
On 2007-11-21, Randy Yates <[email protected]> wrote:
> I don't mean to disrespect SciLab, but you might be better off
> using GNU Octave instead. It is at least mostly compatible with
> Matlab, although there are some significant differences.
>
Might be worth a try, it is not like the price of trying is going
to ruin me ;-) (since it is GNU software).

Ben Jackson
11-21-2007, 11:01 PM
On 2007-11-21, Randy Yates <[email protected]> wrote:
>
> I don't mean to disrespect SciLab, but you might be better off
> using GNU Octave instead. It is at least mostly compatible with
> Matlab, although there are some significant differences.

I was going to suggest the same thing for the same reason. You'll also
want 'octave-forge', which is a collection of function that will make it
even more likely that a given Matlab example will run as-is.

--
Ben Jackson AD7GD
<[email protected]>
http://www.ben.com/

Randy Yates
11-21-2007, 11:14 PM
Ben Jackson <[email protected]> writes:

> On 2007-11-21, Randy Yates <[email protected]> wrote:
>>
>> I don't mean to disrespect SciLab, but you might be better off
>> using GNU Octave instead. It is at least mostly compatible with
>> Matlab, although there are some significant differences.
>
> I was going to suggest the same thing for the same reason. You'll also
> want 'octave-forge', which is a collection of function that will make it
> even more likely that a given Matlab example will run as-is.

Hey Ben,

I really enjoyed perusing your web site! Neat stuff!

Do you use the gEDA tools to do circuit card layout? I wonder if they
have an autorouter available. I've been considering Orcad but 1) I
don't like to spend money and 2) it won't run under linux.
--
% Randy Yates % "With time with what you've learned,
%% Fuquay-Varina, NC % they'll kiss the ground you walk
%%% 919-577-9882 % upon."
%%%% <[email protected]> % '21st Century Man', *Time*, ELO
http://www.digitalsignallabs.com

hrh1818
11-22-2007, 01:48 AM
On Nov 21, 3:50 pm, Andreas Vaerge <[email protected]> wrote:
> In an attempt to study DSP (interest not immidiate use) I have bought
> "Digital Signal Processing 3rd edition" by Proakis and Manolakis and
> the self study guide also by Proakis. However it is assumed that I
> have MatLab available which I cannot quite afford :-(. I have found
> SciLab which (according to info on the net) should be able of doing
> most of what MatLab can, just differently.
> Now, I suppose I will have to convert the samples to SciLab format
> and thus I was wondering if there is any guide from which I can
> learn what is what in the two programs.
> Alternately, is there any good (beginners) DSP book or high quality
> website which uses SciLab for the samples? I do not seem to find
> anything on google.

The help file for Scilab come with a section on "Matlab to Scilab
conversion tips"
and Scilab includes a Matlab to Scilab translator. The translator is
not bullet proof.
There are also some Web Sites that provide help with conversion.
See Matlab/Scilab equivalent functions at
http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm
and Matlab to Scilab conversion tips at
http://www.vislab.uq.edu.au/users/manuals/scilab/mtlb/whatis.htm

Howard

Tim Wescott
11-22-2007, 05:13 AM
On Wed, 21 Nov 2007 16:59:02 -0500, Randy Yates wrote:

> Andreas Vaerge <[email protected]> writes:
>
>> In an attempt to study DSP (interest not immidiate use) I have bought
>> "Digital Signal Processing 3rd edition" by Proakis and Manolakis and
>> the self study guide also by Proakis. However it is assumed that I
>> have MatLab available which I cannot quite afford :-(. I have found
>> SciLab which (according to info on the net) should be able of doing
>> most of what MatLab can, just differently.
>> Now, I suppose I will have to convert the samples to SciLab format
>> and thus I was wondering if there is any guide from which I can
>> learn what is what in the two programs.
>> Alternately, is there any good (beginners) DSP book or high quality
>> website which uses SciLab for the samples? I do not seem to find
>> anything on google.
>
> I don't mean to disrespect SciLab, but you might be better off
> using GNU Octave instead. It is at least mostly compatible with
> Matlab, although there are some significant differences.
>
> http://www.octave.org

I strongly advocate using Scilab once you know your stuff, but if the book
is centered around MATLAB you would probably do well to use Octave, unless
you're really willing to sign up to figuring out the differences. If you
do, you'll be an expert coming out the other side.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

Randy Yates
11-22-2007, 07:02 AM
Tim Wescott <[email protected]> writes:

> On Wed, 21 Nov 2007 16:59:02 -0500, Randy Yates wrote:
>
>> Andreas Vaerge <[email protected]> writes:
>>
>>> In an attempt to study DSP (interest not immidiate use) I have bought
>>> "Digital Signal Processing 3rd edition" by Proakis and Manolakis and
>>> the self study guide also by Proakis. However it is assumed that I
>>> have MatLab available which I cannot quite afford :-(. I have found
>>> SciLab which (according to info on the net) should be able of doing
>>> most of what MatLab can, just differently.
>>> Now, I suppose I will have to convert the samples to SciLab format
>>> and thus I was wondering if there is any guide from which I can
>>> learn what is what in the two programs.
>>> Alternately, is there any good (beginners) DSP book or high quality
>>> website which uses SciLab for the samples? I do not seem to find
>>> anything on google.
>>
>> I don't mean to disrespect SciLab, but you might be better off
>> using GNU Octave instead. It is at least mostly compatible with
>> Matlab, although there are some significant differences.
>>
>> http://www.octave.org
>
> I strongly advocate using Scilab once you know your stuff, but if the book
> is centered around MATLAB you would probably do well to use Octave, unless
> you're really willing to sign up to figuring out the differences. If you
> do, you'll be an expert coming out the other side.

Tim, what advantages do you see SciLab having over Matlab/Octave? I'm
curious - it looked like a really nice package, but I've never done
anything with it.
--
% Randy Yates % "Watching all the days go by...
%% Fuquay-Varina, NC % Who are you and who am I?"
%%% 919-577-9882 % 'Mission (A World Record)',
%%%% <[email protected]> % *A New World Record*, ELO
http://www.digitalsignallabs.com

Tim Wescott
11-22-2007, 07:42 AM
On Thu, 22 Nov 2007 02:02:25 -0500, Randy Yates wrote:

> Tim Wescott <[email protected]> writes:
>
>> On Wed, 21 Nov 2007 16:59:02 -0500, Randy Yates wrote:
>>
>>> Andreas Vaerge <[email protected]> writes:
>>>
>>>> In an attempt to study DSP (interest not immidiate use) I have bought
>>>> "Digital Signal Processing 3rd edition" by Proakis and Manolakis and
>>>> the self study guide also by Proakis. However it is assumed that I
>>>> have MatLab available which I cannot quite afford :-(. I have found
>>>> SciLab which (according to info on the net) should be able of doing
>>>> most of what MatLab can, just differently.
>>>> Now, I suppose I will have to convert the samples to SciLab format
>>>> and thus I was wondering if there is any guide from which I can
>>>> learn what is what in the two programs.
>>>> Alternately, is there any good (beginners) DSP book or high quality
>>>> website which uses SciLab for the samples? I do not seem to find
>>>> anything on google.
>>>
>>> I don't mean to disrespect SciLab, but you might be better off
>>> using GNU Octave instead. It is at least mostly compatible with
>>> Matlab, although there are some significant differences.
>>>
>>> http://www.octave.org
>>
>> I strongly advocate using Scilab once you know your stuff, but if the book
>> is centered around MATLAB you would probably do well to use Octave, unless
>> you're really willing to sign up to figuring out the differences. If you
>> do, you'll be an expert coming out the other side.
>
> Tim, what advantages do you see SciLab having over Matlab/Octave? I'm
> curious - it looked like a really nice package, but I've never done
> anything with it.

If you've got someone who'd rather buy you some software than a very nice
car, MATLAB is the way to go. When I looked at Octave several years ago
there was no one maintaining it, and it wasn't as polished as Scilab.
Installation was difficult and fragile, and conflicted with my Cygwin
installation (I understand that this has been fixed recently).

Mostly what I like about Scilab is that the scripting language has some
really nice object-oriented features, and that the whole package was
written by folks doing control systems. So it comes out of the box with
an extensive suite of control systems oriented features, including the
fact that both transfer functions and state-space system representations
are built-in types.

So in Scilab I can write a transfer function as easy as

H = %z / (%z - 1),

and I can the do Bode plots, or multiply it by another transfer function,
or "multiply" it (actually cascade systems) by a state-space system model.
All this makes it very easy to do what I want to do with the package.

-----
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

Randy Yates
11-22-2007, 10:26 AM
Tim Wescott <[email protected]> writes:
> [...]
> If you've got someone who'd rather buy you some software than a very nice
> car, MATLAB is the way to go.

I hear ya'.

> When I looked at Octave several years ago there was no one maintaining
> it, and it wasn't as polished as Scilab. Installation was difficult
> and fragile, and conflicted with my Cygwin installation (I understand
> that this has been fixed recently).

I agree. I had a nightmare of a time trying to upgrade to a recent,
non-RPM version. In fact, I never was successful. It is the most
convoluted install I think I've ever come across. But if you don't
mind being a few versions behind, the packaged version is a cinch to
install.

> Mostly what I like about Scilab is that the scripting language has some
> really nice object-oriented features, and that the whole package was
> written by folks doing control systems. So it comes out of the box with
> an extensive suite of control systems oriented features, including the
> fact that both transfer functions and state-space system representations
> are built-in types.
>
> So in Scilab I can write a transfer function as easy as
>
> H = %z / (%z - 1),
>
> and I can the do Bode plots, or multiply it by another transfer function,
> or "multiply" it (actually cascade systems) by a state-space system model.
> All this makes it very easy to do what I want to do with the package.

Thanks for your thoughts, Tim.
--
% Randy Yates % "Midnight, on the water...
%% Fuquay-Varina, NC % I saw... the ocean's daughter."
%%% 919-577-9882 % 'Can't Get It Out Of My Head'
%%%% <[email protected]> % *El Dorado*, Electric Light Orchestra
http://www.digitalsignallabs.com

Vladimir Vassilevsky
11-22-2007, 02:35 PM
Tim Wescott wrote:

>
> So in Scilab I can write a transfer function as easy as
>
> H = %z / (%z - 1),
>

#include <complex>

> and I can the do Bode plots,

Export to Excel

> or multiply it by another transfer function,
> or "multiply" it (actually cascade systems) by a state-space system model.
> All this makes it very easy to do what I want to do with the package.

Entities should not be multiplied beyond necessity.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

Tim Wescott
11-22-2007, 05:41 PM
Vladimir Vassilevsky wrote:
>
>
> Tim Wescott wrote:
>
>>
>> So in Scilab I can write a transfer function as easy as
>>
>> H = %z / (%z - 1),
>>
>
> #include <complex>

I can prototype algorithms in Scilab with about 1/10th the code and time
spent than in C++, thanks.

>
>> and I can the do Bode plots,
>
> Export to Excel

Scilab does _much_ better plots than Excel, in less time.
>
>> or multiply it by another transfer function,
>> or "multiply" it (actually cascade systems) by a state-space system
>> model.
>> All this makes it very easy to do what I want to do with the package.
>
> Entities should not be multiplied beyond necessity.
>

Transfer functions shouldn't, but the state space representations stay
numerically robust long after the transfer function representations have
disappeared in a puff of quantization errors.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html

Ben Jackson
11-23-2007, 04:16 AM
On 2007-11-21, Randy Yates <[email protected]> wrote:
>
> Do you use the gEDA tools to do circuit card layout? I wonder if they
> have an autorouter available. I've been considering Orcad but 1) I
> don't like to spend money and 2) it won't run under linux.

gEDA/gaf (gaf = "gEDA and friends") cover the schematic capture and
simulation part of the task. It has a symbiotic relationship with
"PCB" (formerly xpcb) which was developed independently.

PCB does have an autorouter, and I've seen it route moderately complex
boards. The results are not "pretty", though. There are tools to
beautify the resulting wires, but I have not experimented with them much.
There was someone complaining about a bug using the autorouter on a 16+
layer board with a 1156 BGA part in the middle. I know we gave him a
workaround, but I don't know how the autorouting went.

I took my flex board (you can find it on my website) and ripped up the
nets, disabled power and gnd and autorouted the 130 signals (took about 2
seconds on my old 1GHz server). It only did slightly worse than me. I
did have to remove the flood polygons, though. PCB is not smart about
polygons w/autorouting.

If you want to use PCB, you'll want to set up to build it from CVS
(on sourceforce) because there's some fairly active development.

--
Ben Jackson AD7GD
<[email protected]>
http://www.ben.com/

glen herrmannsfeldt
11-24-2007, 12:41 AM
Ben Jackson wrote:

> On 2007-11-21, Randy Yates <[email protected]> wrote:

>>Do you use the gEDA tools to do circuit card layout? I wonder if they
>>have an autorouter available. I've been considering Orcad but 1) I
>>don't like to spend money and 2) it won't run under linux.

> gEDA/gaf (gaf = "gEDA and friends") cover the schematic capture and
> simulation part of the task. It has a symbiotic relationship with
> "PCB" (formerly xpcb) which was developed independently.

Has anyone tried the PCB123 tools? It seems that they have free
design software, presumably designed for their fab system.
I have thought about using it, but not actually tried them yet.

-- glen