bugGNU Octave - Bugs: bug #46597, [octave forge] (control) version...

 
 

bug #46597: [octave forge] (control) version 3.0.0 impulse function yields incorrect result

Submitted by:  None
Submitted on:  Thu 03 Dec 2015 11:52:28 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: ConfirmedAssigned to: None
Originator Name: Pablo FernándezOriginator Email: -unavailable-
Open/Closed: OpenRelease: 4.0.0
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 23 Mar 2016 02:46:13 AM UTC, comment #4:

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

Doug Stewart <dastew>
Tue 26 Jan 2016 12:47:15 AM UTC, comment #3:

I looked at this again and now my test_control is stable and does not crash octave

I also see that the impulse(1/s) is returning .1 instead of 1
I did some single stepping through the code but have not got it figured out yet.

Doug Stewart <dastew>
Thu 03 Dec 2015 04:28:24 PM UTC, comment #2:

Marking as confirmed and adding package maintainer in cc.

Mike Miller <mtmiller>
Project Administrator
Thu 03 Dec 2015 04:06:41 PM UTC, comment #1:

I can confirm that control 3.0.0 has problems.
test_control crashes octave to a frozen state and I get different error messages depending on what I did before I ran test_control.

Doug Stewart

Anonymous
Thu 03 Dec 2015 11:52:28 AM UTC, original submission:

I think impulse yields and incorrect result in control 3.0.0.

For example, if I do, in my box

>> s = tf("s");
>> G = 1/(s+1);
>> R = 1/s;
>> y = impulse(R);


y returns an array of 0.1
where it should be an array of 1

Also, impulse(R*G) should return the same plot as step(G) but it doesn't. For example:

>> y = impulse(R*G);
>> y(end)

ans = 10.438

But it should be 1.

I have compared with http://octave-online.net/ featuring
Octave 3.8.2 with control 2.6.6 (according to the ver command) where results are correct.

Thanks

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by mtmiller
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Aug 2017 01:20:27 PM UTCjweSummarycontrol package 3.0.0: impulse function yields incorrect result=>[octave forge] (control) version 3.0.0 impulse function yields incorrect result
    Sun 05 Jun 2016 09:17:56 PM UTCmtmillerOperating SystemGNU/Linux=>Any
      Summarycontrol 3.0.0. Impulse yields incorrect result=>control package 3.0.0: impulse function yields incorrect result
    Sun 05 Jun 2016 09:16:06 PM UTCmtmillerDependencies-=>bugs #48138 is dependent
    Thu 10 Mar 2016 09:57:30 PM UTCmtmillerDependencies-=>bugs #47384 is dependent
    Thu 03 Dec 2015 04:28:24 PM UTCmtmillerItem GroupIncorrect Result=>Regression
      StatusNone=>Confirmed
      Carbon-Copy-=>Added paramaniac

    Back to the top


    Powered by Savane 3.1-cleanup1