octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46597] control 3.0.0. Impulse yields incorrec


From: Doug Stewart
Subject: [Octave-bug-tracker] [bug #46597] control 3.0.0. Impulse yields incorrect result
Date: Wed, 23 Mar 2016 02:46:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36

Follow-up Comment #4, bug #46597 (project octave):


I want to document where I have arrived at.

In   __impulse_response__ 
at line 333 we have:

x = B * u; # B, not G!

If we replace the B with G  opposite to the comment,
then the final values of the impulse response are correct.
And the error reported here is fixed.
I then did more testing to make sure that nothing else broke,
and found that the initial values were wrong! They seemed to
 be the values for the second numbers of the sequence, not time 0 values.
After studying the code and trying different ways to get values for time=0
I came to the conclusion that the code is giving me 
a value (wrong value) for time zero.

The real problem is in the convertion from Laplce space to Z space.
This is done with the c2d command. But the conversion is using the 
"ZOH" method. The "ZOH" methode of conversion from Laplace to "Z" space 
gives accurate results for a "step" input but not for an "impulse" input.
Therefore to get the proper impulse responce we must add a "Impulse
invarient"
option to the c2d function in the control pkg. (matlab has this option)

I have never figued out this convertion, and would ask you the reader
If you know the exact method to let me know or implement it your self
in the c2d function.

Until this is done I think we should do the change on line 333.
(this must be done either way)
This will give us a much closer curve. 

Doug Stewart


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46597>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]