In most cases, the control system is often designed for linear
systems,namely,by using the transfer function as a block representing
the object to control. However, I have to build a control system to
simulate the control of nonlinear object without any linearization.
How can I achieve that? Can I use the S-function?
Thanks in advance!
On Wed, 28 Jan 2009 19:30:28 -0800, workaholic wrote:
Your question is unclear.
Are you doing this work in some tool?
Why are you stopping at simulation?
If you mean "how do I design a controller for a nonlinear system", the
answer space is huge, and depends largely on the salient points of the
system (there are formal design methods for some simple nonlinear
systems, but few real world ones).
If you mean "how do I build the controller in a simulation tool", and if
you mean that an "s-function" is a transfer function block, then yes, you
can use transfer function blocks for at least part of the work, possibly
wrapped with nonlinearities as appropriate to compensate your plant.
I am sorry,for I am so eagerly to know the answer...
What I really mean is, if I simulate a linear system's control, I only
need to build a transfer function and add the feedback to form a
classic control loop, as for the nonlinear case, can I simply replace
the transfer function block with the s-function block which is define
by a m-file like a differential equation to describe the nonlinear
say, if I have a system like below:
r ====> +/- ==================>| controller|==========>|the object's
================================| feedback |
Can I change the transfer function into a block
r ====> +/- ==================>| controller|==========>|the nonlinear
object's differential eqs|============>y
================================| feedback |
The differential equation may be put in a m-file ,and my equation is
how can I achieve that, can I use the s-function block to model it?
But it seems that the s-function is really complicated, I wish to know
if there is any other way?
Thanks for all!
On Thu, 29 Jan 2009 17:35:54 -0800, workaholic wrote:
This is more properly a Matlab question, so it may be helpful to ask it
on the Matlab group.
Matlab has a rich set of nonlinear blocks; it may be far easier to build
the nonlinear system up from that.
Making s-functions for blocks is documented in the Matlab help. It isn't
trivial, but it can be done.
I know you wanted to work in Matlab, but SimApp offers a very
convenient way to represent nonlinear systems with many nonlinearities
built in. It is also graphically oriented. Depending on your
situation, you can linearize effects like sqrt by providing an x^2
function. For hard nonlinearities like backlash, you will find that
the system easily goes into limit cycles. Sometimes you can bias the
system to operate in a more friendly region where the analysis can be
linearized. Finally, there are more advanced methods available. You
can make time responses of nonlinear systems with most nonlinearities,
but frequency responses require some form of linearization technique.
But first, try the program for free. www.simapp.com
I have no idea what a s function is. If you mean Laplace transforms
the answer is no.
I use a system of differential equations when I do serious simulation
and use RK4 to do the iterations. The differential equations can be
linear or non-linear. The PID and feed forwards are part of the
forcing function for one of the differential equations. You mention
using a block and I assume you are talking about a graphical
simulation software package like SimApp, Scicos or Simulink. I have
no idea if these programs can do what you want to do graphically but
simulations using normal programming is easy enough. The hard part is
getting accurate parameters coefficients.
On Sun, 01 Feb 2009 10:58:15 -0800, pnachtwey wrote:
-- snip --
One of his other responses prodded me to remembering -- an s-function is
the Matlab/Simulink native way of building the innards of a block to be
simulated. There's a specific format that takes care of initialization,
running, and tear-down, so you can write just about anything you want and
have it work right inside of a block.
So basically the OP was making the newbie mistake of equating control
theory with Matlab/Simulink (heaven knows if he's also making the mistake
of equating control _practice_ with control _theory_).
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.