ROOKIE Q: Using ltitr() + possible bug

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ROOKIE Q: Using ltitr() + possible bug

Iñaky Pérez González

        Hi

        I'm new to Octave, as I have started this year with a class
which uses matlab, and I'm trying to do it with Octave. Yaw ... love
free software, you know.

        Well, everything went fine until I tried to use a function
which came along with the control package of Matlab, that we need to
use. I pretended to use the impulse() function to feed the input of a
lineal control system, but it was requesting a function, ltitr() which
octave, AFAIK, doesn't have, and MatLab has it built-in as an in-core
one, so no source available (even in the front package, which was said
to have more stuff).

        So, following a tip for =D3scar M=E1rquez, I implemented the
function using this:

function _x =3D ltitr (_a, _b, _u, _x0)

_n =3D length (_u);
_U =3D _u';

for _i=3D1:_n
        _x(:,_i) =3D _x0;
        _x0 =3D _a * _x0 + _b * _U(:, _i);
end
_x =3D _x.';


(shameless copy from MatLab's help).

        Then everything seemed to be fine until I had to use the
ss2tf() function from the MatLab control package. It gives far away
the results it gives in MatLab. Haven't seen a possible cause ???

        I attach the file which causes the problem. Look at the
ss2tf() function call. It returns two matrixs, num_chk and
den_chk. They should be equal to num and den, and they do not. Anybody
could tell me if it is a bug or a feature? and if it is a feature,
what am I doing wrong?

--

          Linux-USB! http://peloncho.fis.ucm.es/~inaky/USB.html -
                                                                -
                Inaky Perez Gonzalez --  PGP pubkey fingerprint -
           [hidden email] -- 8E 34 3A 62 64 99 E2 44 -
   http://peloncho.fis.ucm.es/~inaky -- AD 7B 30 D9 DD FF 3E 4C -
   --------------------------------- -- ----------------------- -
   The loneliness of the long distance runner .....


Reply | Threaded
Open this post in threaded view
|

Re: ROOKIE Q: Using ltitr() + possible bug

Jose Daniel Munyoz Frias
Iñaky Pérez González wrote:

>         I attach the file which causes the problem. Look at the
> ss2tf() function call. It returns two matrixs, num_chk and
> den_chk. They should be equal to num and den, and they do not. Anybody
> could tell me if it is a bug or a feature? and if it is a feature,
> what am I doing wrong?

You can get a control toolbox for octave at
ftp://ftp.eng.auburn.edu/pub/hodel , and there are a ss2tf function that
works correctly (I think).

Regards

Dani.
--
______________________________________________________________
José Daniel Muñoz Frías       [hidden email]

Universidad Pontificia Comillas
ICAI. Depto. Electrónica y Automática

Alberto Aguilera 23
28015 Madrid, Spain

Telf. 34-1-5422800                           Fax: 34-1-5596569
______________________________________________________________


Reply | Threaded
Open this post in threaded view
|

Re: ROOKIE Q: Using ltitr() + possible bug

Kai Mueller
In reply to this post by Iñaky Pérez González
On Tue, Oct 21, 1997 at 11:40:53PM +0200, Iqaky Pirez Gonzalez wrote:
>         Well, everything went fine until I tried to use a function
> which came along with the control package of Matlab, that we need to
> use. I pretended to use the impulse() function to feed the input of a
> lineal control system, but it was requesting a function, ltitr() which
> octave, AFAIK, doesn't have, and MatLab has it built-in as an in-core
> one, so no source available (even in the front package, which was said
> to have more stuff).
>

The recent control toolbox at
  ftp://ftp.eng.auburn.edu/pub/hodel
contains the impulse() function. It does not use ltitr() but should
give you the expected results. Function ist *new*, please report bugs.

Kai

--
 Kai P. Mueller
 Control Department (Regelungstechnik) | Phone [+49] (531) 391-3835
 Technical University Braunschweig     | Fax   [+49] (531) 391-5194
 D-38092 Braunschweig                  | Email [hidden email]