[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: control package, can't simulate complex systems
From: |
Torsten Lilge |
Subject: |
Re: control package, can't simulate complex systems |
Date: |
Wed, 10 Jun 2020 21:57:55 +0200 |
On Wed, 2020-06-10 at 15:50 -0400, Nicholas Jankowski wrote:
> On Wed, Jun 10, 2020 at 3:14 PM Torsten Lilge <ttl-octave@mailbox.org>
> wrote:
> > On Wed, 2020-06-10 at 14:26 -0400, Nicholas Jankowski wrote:
> > > On Wed, Jun 10, 2020 at 12:40 PM Doug Stewart <
> > doug.dastew@gmail.com>
> > > wrote:
> > > > try
> > > > step(ss(q))
> > > >
> > > >
> > >
> > > well that seemed to do the trick. step(ss(q)) plots quickly in
> > > Octave, and it matches the output produced in Matlab by step(q)
> > and
> > > step(ss(q))
> > >
> > > so, thoughts on why octave needs it converted into state-space
> > > representation to avoid choking on it but Matlab doesn't?
> >
> > I think the problem is that the discretization (which is done for
> > the
> > simulation) is not sufficiently accurate for a transfer function:
> >
> > # discretization of the state space model
> > # => stable eigenvalues
> > sys_ss_ct = ss (q);
> > sys_dt2 = c2d (sys_ss_ct, 0.01);
> > eig (sys_dt2.a)
> >
> > # discretization of the transfer function
> > # unstable eigenvalues (|lambda| > 1)
> > sys_tf_dt = c2d (q, 0.01);
> > sys_dt1 = ss (sys_tf_dt);
> > eig (sys_dt1.a)
> >
> >
> >
>
> curious about output differences, I've attached diaries for both
> octave and matlab running the eig commands above. they're different.
> not sure how much so and if that explains Octave failing to process
> the tf.
>
Interesting. Does this mean that Matlab also has problems in
discretizing a transfer function of such order (or am I doing something
wrong when discretizing and then converting into state space)? Thus, a
solution might just be to first convert into state space and then do the
discretization.
- control package, can't simulate complex systems, GoSim GoSim, 2020/06/09
- Re: control package, can't simulate complex systems, Nicholas Jankowski, 2020/06/09
- Re: control package, can't simulate complex systems, GoSim GoSim, 2020/06/09
- Re: control package, can't simulate complex systems, Doug Stewart, 2020/06/10
- Re: control package, can't simulate complex systems, Nicholas Jankowski, 2020/06/10
- Re: control package, can't simulate complex systems, Thomas D. Dean, 2020/06/10
- Re: control package, can't simulate complex systems, Torsten Lilge, 2020/06/10
- Re: control package, can't simulate complex systems, Torsten Lilge, 2020/06/10
- Re: control package, can't simulate complex systems, Nicholas Jankowski, 2020/06/10
- Re: control package, can't simulate complex systems,
Torsten Lilge <=
- Re: control package, can't simulate complex systems, Torsten Lilge, 2020/06/10
- Re: control package, can't simulate complex systems, GoSim GoSim, 2020/06/14