[scilab-Users] LTI SISO gain margin : weird results

Vladímir Rodríguez vladimir.rodriguez at reduc.edu.cu
Tue Mar 9 17:40:35 CET 2010


El mar, 09-03-2010 a las 16:39 +0100, David PICARD escribió:
> Well, I eventually came up to the conclusion that both p_margin() and 
> g_margin() are buggy. I had to write my own code to replace them.
> 
> I can give details upon request.
> 
> Regards.
> 
> 
> David PICARD a écrit :
> > I corrected the subject.
> >
> > David PICARD a écrit :
> >> I get weird results when I try to calculate gain margin for transfer 
> >> functions. For example, this one :
> >>
> >> -->Hbo=syslin(1.0,(0.263-0.656*z+0.206*z^2+0.3*z^3)/(-0.263+0.656*z+0.28*z^2-1.674*z^3+z^4)) 
> >>
> >> Hbo_s  =
> >>
> >>                             2      3         0.263 - 0.656z + 0.206z 
> >> + 0.3z        ----------------------------------   
> >>                          2        3   4  - 0.263 + 0.656z + 0.28z - 
> >> 1.674z + z It is a digital controller open loop transfer function.
> >>
> >> Phase margin : p_margin(Hbo_s) returns 65.62, which is correct 
> >> (checked with both a book and Matlab).
> >> Gain margin : g_margin(Hbo_s) returns -41.06, which I is not what I 
> >> expect.
> >>
> >> So, I plot the frequency response with :
> >> -->show_margins(Hbo_s,'nyquist')
> >> to try to figure out the gain margin graphically.
> >>
> >> The gain margin is the inverse of the gain of the transfer function 
> >> when the phase is -180°).
> >>
> >> The curve crosses the X axis at -0.368, which leads to gain_margin = 
> >> 1/0.368 = 2.7, which is the value given in my book and returned by 
> >> Matlab (margin() ).
> >> In addition, the blue line that I assume, shows the gain margin, 
> >> extends way beyond -0.368, probably as far as -41.06.
> >>
> >> Did I get something wrong here ? Thanks.
> >>
> >> My configuration : Scilab 5.2.1, Windows XP SP3
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> 
I am interested in every detail about it, I am going to use these
function in clases.
Thanks
-- 
                      MSc. Vladímir Rodríguez Diez
                  Departamento de Ingeniería Eléctrica
                        Universidad de Camagüey




More information about the users mailing list