[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enhancing Bode functionality
From: |
A S Hodel |
Subject: |
Re: enhancing Bode functionality |
Date: |
Mon, 25 Nov 2002 22:05:41 -0600 |
There's certainly room to refine and/or improve performance of these
functions from when my students and I wrote them 7 or 8 years ago.
Some things that have changed since then. For example, user-defined
types (in C++) are a possibility. The "object-oriented" design in the
octave functions predates MATLAB's release by a year, but is kludgy in
the sense that, instead of
PC = P*C % MATLAB syntax
we must write
PC = sysmult(P,C); % do the multiplication
sysout(PC); % display the system
For reasons that made sense at the time I allowed a system to contain
both continuous and discrete states; in retrospect I'm not sure that
was smart.
When the Octave controls toolbox was implemented there were neither
cell arrays (MATLAB) nor lists (octave), so I was kind of stuck with
SISO frequency response treatment from a data-structure and complexity
standpoint. Whether it's desirable for
bode(sys)
to generate umpteen plots for an MIMO system vs requiring a channel to
be specified as in octave
bode(sys,[],output_number,input_number)
is open to question. For MIMO systems octave currently plots the
maximum singular value (induced two-norm gain) of the MIMO system.
This may be relevant to those using the hinfsyn function (and its
related functions) that Kai Mueller kindly
updated several years ago after my initial implementation based on the
DGKF paper. For more information you can take a look at
@inproceedings{hodtenetal96,
author = {A. S. Hodel and R. B. Tenison and D. A. Clem and J.
E. Ingram},
title = {The Octave Control Systems Toolbox: A ${\rm
MATLAB^{tm}}$-like {CACSD} Environment},
booktitle = {Proceedings of the 1996 {IEEE} International
Symposium on Computer-Aided Control System Design},
year = 1996,
pages = {386--391},
publisher = {{IEEE} Control Systems Society},
address = {Dearborn, Mich.},
month = {Sept. 15-18}
}
(The session also includes several papers related to SciLab, a similar
project that I think was initially developed in Europe.)
The discussion of displaying frequency data in Hertz vs rad/s sec is
trivial (scale frequency data by 2*pi and plot). For such a purpose,
it's worthwhile to use the advice given immediately below and replot as
desired. The dB - rad/s - degrees units for bode plots used in Octave
is pretty standard in most controls textbooks (although Ziemer, Tranter
and Fanin's signals and systems book works in both rad/s and Hz).
On Monday, November 25, 2002, at 03:49 PM, Julian DeMarchi wrote:
Hmmm. The syntax is more or less
[mag,phase,w] = bode(sys)
and this function will not generate any plots unless
you don't specify the left-side parameters. So, rather
than write separate functions, why not simply use bode()
as above, and plot as a second step?
[mag,phase,w] = bode(sys);
semilogx(w, [mag phase]);
Or something of that nature.
Note, Matlab [mag,phase] arguments are MIMO-ised
(see
http://www.mathworks.com/access/helpdesk/help/toolbox/control/ref/
bode.shtml)
I'm not sure that Octave works the same way.
Also, the example in the link uses the function tf()
which for Octave would be tf2sys().
- JD
-----Original Message-----
From: Steven Pavao [mailto:address@hidden
Sent: Monday, November 25, 2002 3:20 PM
To: address@hidden
Subject: enhancing Bode functionality
Hi,
I'm interested in improved bode functions for Octave,
so I'm doing a little work to try and get the
improvements I'm looking for. Maybe some others have
also done some work, or would like to help me along in
my effort.
First, I've split the bode magnitude and phase
portions into two functions I'm calling bmag and
bphase. This lets me get around a bug I was informed
of - one where plotting multiple curves on multiple
plots on a page does not work. So now I can get
multiple curves onto either a magnitude or phase plot.
Cool. I'm really most interested in the magnitude in
general, though I would like to inspect the phase as
well. Splitting them out just made sense for my
purposes, and for geting around the bug.
Now, I really want to plot the x axis in Hz, not
radians. It's just the right thing for my my
purposes. I have not done the work to do this. I
wonder if the best approach is to just change what is
sent to gnuplot, although this may not suffice for the
feature I mention in the next paragraph...
The other annoyance is the auto-scaling of the axes.
Many times when plotting, I want to compare multiple
curves, say, based on a varying coefficient(s). So, I
don't want it to autoscale the axes in that case. In
that case, I'd like to expose the axes "limits" to the
command line. Of course, for the magnitude plot, I'd
like to specify these limits in dB and Hz. If no
limits were specified, then autoscaling based on the
most recently plotted curve would be fine.
I would appeciate any tips or help. I'm willing to do
some work and share my results. I know this bode
functionality could be much more useful to my learning
process if I could just accomplish this small handful
of improvements, and others could probably benefit,
too.
best,
Steve Pavao
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
A. S. Hodel, Assoc. Prof, Dept. Elect & Comp Eng, Auburn University, AL
36849-5201
(334) 844-1854 200 Broun Hall address@hidden
http://ww.eng.auburn.edu/~scotte
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------