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

 
 

bug #60677: [octave forge] (control) add functionality to tf class

Submitter:  None
Submitted:  Wed 26 May 2021 03:39:31 PM UTC
   
 
Category:  Octave Package Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 29 May 2021 06:10:21 PM UTC, comment #6: 

@Torsten

Thank you for explaining.
This can be closed.


lp2lp is not implemented bug #46440
Did not continue with the examples








Anonymous
Thu 27 May 2021 04:09:53 PM UTC, comment #5: 

Oh uh, error in the example of my previous post (third line in second code block). Correct is:


Hw = freqs (num{1}, den{1}, w);


Torsten Lilge <ttl>
Group Member
Thu 27 May 2021 02:02:45 PM UTC, comment #4: 

abs (H) and angle (H) does not work in Matlab if H is really a tf object.

From the document of your link, I don't think that H is really a tf object. Instead, on page 215, H is defined as


H = freqs(num,den,w);


which is not a transfer function but the frequency response of a transfer function with numerator num and denominator den. If you have a transfer function H of a SISO system, then you have to do the following:


[num,den] = tfdata (H);
w = logspace (-2, 2, 500)  % or whatever is suitable for your system
Hw = freqs (num{1}, den{1});
mag = abs (Hw);
phase = angle (Hw);


If you can confirm that this code works for you, I will close this report.


Torsten Lilge <ttl>
Group Member
Thu 27 May 2021 12:12:28 PM UTC, comment #3: 

@Torsten Following:
https://ewh.ieee.org/r1/ct/sps/PDF/MATLAB/chapter5.pdf


On Slide 5.

mag=abs(H); % compute magnitude response
phase=angle(H)*180/pi; % compute phase response


Where the transfer function is H.
Is there a better source to follow?

Anonymous
Thu 27 May 2021 06:17:35 AM UTC, comment #2: 

What exactly is expected when applying abs() or angle() to a transfer function? It is possible to apply these functions to a transfer function at a specific value of the frequency, like, e.g.,


G = tf ([1],[1 1])   % G = 1/(1+s)
abs (G (1))          % |G(j1)|
angle (G (1))        % arg{G(j1}


You can also provide a vector of frequencies as argument to a tf object. The magnitude and phase of a system over a specific frequency range is provided by bode().

Torsten Lilge <ttl>
Group Member
Wed 26 May 2021 09:54:04 PM UTC, comment #1: 

These methods aren't supported in the Matlab version of the tf class either, so I'm not sure why they should be added in Octave. This would be a new incompatible feature with unclear benefit.

Mike Miller <mtmiller>
Group Member
Wed 26 May 2021 03:39:31 PM UTC, original submission:  

It appears some functions will not work on the tf class


>> abs(T)
error: abs: not defined for class
>> angle(T)
error: arg: not defined for class
>> whos
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  =====
        T           1x1                         26  tf

Total is 1 element using 26 bytes




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 ttl (Posted a comment)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-02 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2021-05-26 mtmiller CategoryOctave Function Octave Package
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Summary[wish] add functionality to handle tf class [octave forge] (control) add functionality to tf class

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code