Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> CACSD > p_margin


phase margin and associated crossover frequency

Calling Sequence

[phm,fr] = p_margin(h)



a SISO linear system (see :syslin).


a number, the phase margin in degree if it exists or an empty matrix.


a number, the corresponding frequency (in Hz) or an empty matrix.


Given a SISO linear system in continuous or discrete time, p_margin returns phm, the phase margin in degree of h and fr, the achieved corresponding frequency in Hz.

The phase margin is the values of the phase at frequency points where the nyquist plot of h crosses the unit circle. In other words the phase margin is the difference between the phase of the frequency response of h and -180° when the gain of h is 1.

The algorithm uses polynomial root finder to solve the equations:


for the continuous time case.


for the discrete time case.


//continuous case

//discrete case
h = syslin(0.1,0.04798*%z+0.0464,%z^2-1.81*%z+0.9048);//ok
[p ,f]=p_margin(h)

See Also

  • g_margin — gain margin and associated crossover frequency
  • show_margins — display gain and phase margin and associated crossover frequencies
  • repfreq — frequency response
  • black — diagrama de Black (carta de Nichols)
  • bode — diagrama de Bode
  • nicholschart — Nichols chart
  • nyquist — diagrama de Nyquist
Report an issue
<< obsvss CACSD parrot >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:57:39 CEST 2014