bugGNU Octave - Bugs: bug #47302, control system feedback() OR TF()...

 
 

bug #47302: control system feedback() OR TF() gives wrong result z plane

Submitter:  None
Submitted:  Mon 29 Feb 2016 05:57:00 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Kent Deines Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 29 Feb 2016 05:48:57 PM UTC, comment #2: 

This is the correct behavior of the control package functions, not a bug. The documentation could use some expanding or examples showing how to define different types of systems.

The easiest way to get what you want:


H = tf ([0 0 1], [1 -1 0], 1, "tfvar", "z^-1")

Transfer function 'H' from input 'u1' to output ...

        z^-2
 y1:  --------
      1 - z^-1

Sampling time: 1 s
Discrete-time model.


The control functions use positive powers of the variable z by default, whereas DSP people like to think in terms of negative powers of z, which you have to explicitly request as shown above (and also make sure the num and den vectors align).

If you try the above and something else doesn't work the way you expect, please file another bug report.

Mike Miller <mtmiller>
Group Member
Mon 29 Feb 2016 02:57:34 PM UTC, comment #1: 

I think your way of thinking is correct. Unfortunately octave control tool box does not handle delays very well. If you just keep them as polynomials and do the math your self then filter still will work.

I had to do this for myself last week.
use conv( p1,p2) to multiply 2 polynomials
and p1+p2 to add them.
and deconv(p1,p2) to divide p1 by p2
HTH

Doug Stewart <dastew>
Mon 29 Feb 2016 05:57:00 AM UTC, original submission:  

I claim no great expertise in control systems, but, my way of thinking is like this:
the polynomial [0 1]=>z^-1  has a delay of 1 sample, [0 0 1]=>z^-2 has a delay of 2 samples. [0 1 1]=>z^-1+z^-2 This interpretation is consistent with freqz and filter.
So
H=tf([ 0 0 1],[1 -1],1);
H(z)=z^-2/(1 -z^-1)
what I get is H(z) = 1/(z-1),\. In fact, shifting the numerator over does nothing, [0 0 1]=[0 0 0 0 1]


T=feedback(H) adds the numerator and denominator of H to get the denominator of T. When it does this, it should do it from left to right, not right to left. Ie adding like delays together.

Maybe my whole way of thinking about his is wrong.

Kent


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 -
    2016-02-29 mtmiller StatusNone Wont Fix
        Open/ClosedOpen Closed
    2016-02-29 rik5 Carbon-CopyRemoved 72865 -
    2016-02-29 rik5 CategoryOctave Function Octave Package

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code