From: [email protected]
To: [email protected]
Date: Tue, 10 Nov 2009 21:19:49 +0100
CC: [email protected]
Subject: Re: [OctDev] Bugs in control/tzero function (was Re: Discrete  
feedback        loop)


On 10.11.2009, at 20:32, <[email protected]> <[email protected]> wrote:
 
> From: [email protected]
> Date: Tue, 10 Nov 2009 09:41:52 +0100
> To: [email protected]; [email protected]
> Subject: [OctDev] Bugs in control/tzero function (was Re: Discrete feedback 
> loop)
> 
> I made some further investigations (I'm writing pzmap.m for control-oo at the 
> moment, which needs to compute the zeros of a system) and came to the 
> conclusion that tzero.m from the control package is buggy. The attachment 
> contains an example where the discrepancy of the results is big: Matlab gets 
> -13.2759, -0.0155, 12.5774, while tzero gets -5.708333, -0.015561, 31.509741. 
> Apparently the bug has been undiscovered for about 15 (!) years.
> 
> The bad thing is that I reused the code from tzero.m in the control-oo 
> package ...
> 
> Regards,
> Lukas
> 
> 
Hi Lukas.
 
try using tzero2, it works for me on your example. What the difference is I 
don't know.
 
 
Doug Stewart

Hi Doug,
That's strange. I tried tzero2 on my PPC- as well as on my Intel-Mac and I get  
  -1   -1   -1   -1   -1  -10That's even worse than tzero, because tzero got at 
least one out of three zeros right ;-)
RegardsLukas


octave-3.0.1:1> tzzero
z =

  -13.275931
   12.577369
   -0.015526

and tzzero.m is

A = [   -0.7   -0.0458     -12.2        0     

      0    -0.014   -0.2904   -0.562      

      1   -0.0057      -1.4        0       

      1         0         0        0 ];

B = [  -19.1      -3.1  

       -0.0119   -0.0096     

       -0.14     -0.72      

        0         0 ];

C = [      0         0        -1        1  

           0         0     0.733        0 ];

D = [      0         0  

          0.0768    0.1134 ];

sys = ss (A, B, C, D);

z = tzero2 (A,B,C,D)

                                  

                                     

% Expected Results from the "Dark Side"%%  -13.2759%   12.5774%   -0.0155%% 
Results from tzero.m%%   -5.708333%   -0.015561%   31.509741


So I don't know why you are getting a different answer.


                                          
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to