bugGNU Octave - Bugs: bug #48138, control package: impulse function...

 
 

bug #48138: control package: impulse function scales impulse response incorrectly

Submitter:  Jose Andrade <joseandrade>
Submitted:  Sun 05 Jun 2016 07:06:41 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Duplicate Assigned to:  None
Originator Name:  Jose Andrade Open/Closed:  * Closed
Release:  * 4.0.2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 05 Mar 2018 07:46:50 PM UTC, comment #6: 

this and be closed.
the fix is in control-3.1.0

Doug Stewart <dastew>
Sun 05 Jun 2016 09:16:06 PM UTC, comment #5: 

Thanks, I'll close this as a duplicate then. Please post any new information or patches on bug #46597.

Mike Miller <mtmiller>
Group Member
Sun 05 Jun 2016 09:14:40 PM UTC, comment #4: 

I rewrote the posted script (and quoted in a verbatim block) to make it clearer what the computed parameters are:


t = (0:.1:30)';
NUM = 0.9375; DEN = [1 2 4];
sys = tf (NUM, DEN)
yi = impulse (sys, t);
yii = NUM ./ sqrt (3) .* exp (-t) .* sin (sqrt (3) .* t);
figure
plot (t, yi, t, yii)
title ("Impulse Response of LTI System")



I can also confirm that this works correctly in control version 2.8.5 but not in 3.0.0.

With version 3.0.0, if I scale the impulse response by the sampling period, I get something that more closely agrees with the correct result, especially as dt is made smaller.

Mike Miller <mtmiller>
Group Member
Sun 05 Jun 2016 09:13:39 PM UTC, comment #3: 

Mike  I think it is.

Doug Stewart <dastew>
Sun 05 Jun 2016 09:12:06 PM UTC, comment #2: 

Doug, is this the same issue as bug #46597 that you were looking at earlier?

Mike Miller <mtmiller>
Group Member
Sun 05 Jun 2016 09:08:17 PM UTC, comment #1: 

Yes there is a problem.
The C2D function does not have an impulse invariant
method, so the program for the impulse response
uses the ZOH method, which is wrong.

I started making an impulse invariant method for the C2D but got bogged down on the multiple repeated roots part. I will now prod
myself and get working on it.

I would be easy to do if the control pkg would allow complex numerators and denominators but it doesn't. So I am writing
a lot of code to handle these repeated roots.

After the C2D is upgraded then it will be easy to get the impulse function working.
Doug

Doug Stewart <dastew>
Sun 05 Jun 2016 07:06:41 PM UTC, original submission:  

There is a bug on the Impulse function of the Control Package.

The Exemple code:


t=0:0.1:30;
NUM=[0.9375]; DEN=[1 2 4];
sys=tf(NUM,DEN)
yi=impulse(sys,t);
yii=exp(-t).*(0.5412*sin(1.7321*t));
figure
plot(t,yi,t,yii)
title('Impulse Response of LTI System')


The correct answer should be the same graph, but they are different.

Jose Andrade <joseandrade>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by joseandrade (Submitted the item)
  • -email is unavailable- added by joseandrade
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-05 mtmiller StatusConfirmed Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #46597
    2016-06-05 mtmiller Item GroupIncorrect Result Regression
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any
        SummaryImpulse function of the Control Package control package: impulse function scales impulse response incorrectly
    2016-06-05 joseandrade Attached File- Added Impulse Response of LTI System.pdf, #37399
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code