User:John R. Brews/Sample2: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>John R. Brews
No edit summary
imported>John R. Brews
No edit summary
Line 1: Line 1:
{{TOC|right}}
{{TOC|right}}
In [[electronic  engineering]] and [[control theory]], '''step response''' of a system refers to the time behavior of its output when its input changes rapidly from zero to a finite value. In a more idealized mathematical formulation, the step response of a system refers to the time evolution of its output when its input is proportional to a [[Heaviside step function]].


From a practical standpoint, knowing how the system responds to a sudden input is important because large and fast input signals may have extreme effects on the component itself and on other portions of the overall system dependent on this component. In some cases, the overall system cannot act until the component's output settles down to some vicinity of its final state, delaying the overall system response. Formally, the step response of a dynamical system gives information about the [[stability]] of the system, and about its ability to reach one stationary state when starting from another.
[[Image:Bode High-Pass.PNG|350px|thumb|right|Figure 1(a): The Bode plot for a first-order (one-pole) [[highpass filter]]; the straight-line approximations are labeled "Bode pole"; phase varies from 90° at low frequencies (due to the contribution of the numerator, which is 90° at all
frequencies) to 0° at high frequencies (where the phase contribution of the denominator is −90° and cancels the contribution of the numerator).]]
[[Image:Bode Low-Pass.PNG|350px|thumb|right|Figure 1(b): The Bode plot for a first-order (one-pole) [[lowpass filter]]; the straight-line approximations are labeled "Bode pole"; phase is 90° lower than for Figure 1(a) because the phase contribution of the numerator is 0° at all frequencies.]]
A '''Bode plot''', named after [[Hendrik Wade Bode]], is usually a combination of a Bode magnitude plot and Bode phase plot:


== Description of time-domain behavior ==
A '''Bode magnitude plot''' is a graph of [[logarithm|log]] magnitude versus [[frequency]],  plotted with a log-frequency axis, to show the [[transfer function]] or [[frequency response]] of a [[LTI system theory|linear, time-invariant]] system. 
{{Image|Aspects of step response.PNG|right|200px|Some terms used to describe step response in time domain.}}
The step response of a system can be described by the following aspects of its time behavior:


*Overshoot: The output swings that extend above the final value
The magnitude axis of the Bode plot is usually expressed as [[decibel]]s, that is, 20 times the common logarithm of the amplitude gain.  With the magnitude gain being logarithmic, Bode plots make multiplication of magnitudes a simple matter of adding distances on the graph (in decibels), since
*Undershoot: The output swings that extend below the final value
*Ringing: The alternation of overshoot and undershoot
*Settling time: The time to settle down to remain below a specified amplitude of ringing about the final value
*Rise time: The time to first cross the final value; not necessarily the only time it will cross this value


In the case of linear dynamic systems, much can be inferred about the system from these characteristics. Below, the step response of a simple two-time-constant amplifier is presented, and some of these terms are illustrated.
:<math>
\log(a \cdot b) = \log(a) + \log(b)\,
</math>.


==Step response of feedback amplifiers==
A '''Bode phase plot''' is a graph of phase versus frequency, also plotted on a log-frequency axis, usually used in conjunction with the magnitude plot, to evaluate how much a frequency will be [[Phase (waves)|phase-shifted]]. For example a signal described by: ''A''sin(ω''t'') may be attenuated but also phase-shifted. If the system attenuates it by a factor ''x'' and phase shifts it by −Φ the signal out of the system will be (''A''/''x'')&nbsp;sin(ω''t''&nbsp;−&nbsp;Φ). The phase shift Φ is generally a function of frequency.  
{{Image|Negative feedback amplifier.PNG|right|200px| Ideal negative feedback model; open loop gain is ''A''<sub>OL</sub> and feedback factor is β.}}
This section describes the step response of a simple [[negative feedback amplifier]] shown in the figure. The amplifier when the feedback is disconnected is called the '''open-loop amplifier'''. When the amplifier including feedback is meant, it is called the '''closed-loop amplifier'''.  


The feedback amplifier consists of a main open-loop amplifier of gain ''A''<sub>OL</sub> and a feedback loop governed by a '''feedback factor''' β.  This feedback amplifier is analyzed to determine how its step response depends upon  the time constants governing the response of the main amplifier, and upon the amount of feedback used.  
Phase can also be added directly from the graphical values, a fact that is mathematically clear when phase is seen as the imaginary part of the complex logarithm of a complex gain.


===Analysis===
In Figure 1(a), the Bode plots are shown for the one-pole [[highpass filter]] function:
{{Image|Conjugate poles.PNG|right|200px| Conjugate pole locations for step response of two-pole feedback amplifier; ''Re''(s) <nowiki>=</nowiki> real axis and ''Im''(s) <nowiki>=</nowiki>  imaginary axis.}}


A negative feedback amplifier has gain given by (see [[negative feedback amplifier]]):
::<math> \mathrm{T_{High}}(f) = \frac {j f/  f_1} {1 + j f/f_1} \ , </math>


:<math>A_{FB} = \frac {A_{OL}} {1+ \beta A_{OL}} \ , </math>
where ''f'' is the frequency in Hz, and ''f''<sub>1</sub> is the pole position in Hz, ''f''<sub>1</sub> = 100 Hz in the figure. Using the rules for [[complex number]]s, the magnitude of this function is


where ''A''<sub>OL</sub> = '''open-loop''' gain, ''A''<sub>FB</sub> = '''closed-loop''' gain (the gain with negative feedback present) and β = '''feedback factor'''. The step response of such an amplifier is easily handled in the case that the open-loop gain has two time constants, τ<sub>1</sub>, τ<sub>2</sub>, introduced by postulating the open-loop gain is given by:
::<math> \mid \mathrm{T_{High}}(f) \mid = \frac { f/f_1 } { \sqrt{ 1 + (f/f_1)^2 }} \ , </math>


:<math>A_{OL} = \frac {A_0} {(1+j \omega \tau_1) (1 + j \omega \tau_2)} \ , </math>
while the phase is:


with zero-frequency gain ''A''<sub>0</sub> and angular frequency ω = 2π''f''. It is usual to describe the behavior of this function in the complex plane, using the complex variable ''s'':
::<math> \phi_{T_{High}} = 90^\circ - \mathrm{ tan^{-1} } (f/f_1) \ . </math>


:<math>A_{OL}(s) = \frac {A_0} {(1+s \tau_1) (1 + s \tau_2)} \ , </math>
Care must be taken that the inverse tangent is set up to return ''degrees'', not radians. On the Bode magnitude plot, decibels are used, and the plotted magnitude is:


which leads to the above gain expression on the imaginary ''s-''axis, when ''s = j&omega;''. On the other hand, this open-loop gain has two poles on the real ''s-''axis at ''s=−1/&tau;<sub>1</sub>'' and ''s=−1/&tau;<sub>2</sub>''. With this open-loop gain, the closed-loop gain becomes:
:<math>20\ \mathrm{log_{10}} \mid \mathrm{T_{High}}(f) \mid \ =20\  \mathrm{log_{10}} \left( f/f_1 \right)</math>  
:::::::&emsp; <math>\ -20  \  \mathrm{log_{10}} \left( \sqrt{ 1 + (f/f_1)^2 }\right) \ . </math>
In Figure 1(b), the Bode plots are shown for the one-pole [[lowpass filter]] function:


:<math>A_{FB} = \frac {A_0} {1+ \beta A_0}</math> &ensp; • &ensp; <math> \  \frac {1} {1+j \omega \frac { \tau_1 + \tau_2 } {1 + \beta A_0} + (j \omega )^2 \frac { \tau_1 \tau_2} {1 + \beta A_0} } \ . </math>
::<math> \mathrm{ T_{Low}} (f) = \frac {1} {1 + j f/f_1} \ . </math>


The time dependence of the amplifier is easy to discover by switching variables to ''s'', whereupon the gain becomes:
Also shown in Figure 1(a) and 1(b) are the straight-line approximations to the Bode plots that are used in hand analysis, and described later.


:<math> A_{FB} = \frac {A_0} { \tau_1 \tau_2 }</math> &ensp; • &ensp; <math> \frac {1} {s^2 +s \left( \frac {1} {\tau_1} + \frac {1} {\tau_2} \right) + \frac {1+ \beta A_0} {\tau_1 \tau_2}} </math>
The magnitude and phase Bode plots can seldom be changed independently of each other — changing the amplitude response of the system will most likely change the phase characteristics and vice versa. For minimum-phase systems the phase and amplitude characteristics can be obtained from each other with the use of the [[Hilbert transform]].


The poles of this expression (that is, the zeros of the denominator) occur at:
If the transfer function is a [[rational function]] with real poles and zeros, then the Bode plot can be approximated with straight lines. These asymptotic approximations are called '''straight line Bode plots''' or '''uncorrected Bode plots''' and are useful because they can be drawn by hand following a few simple rules.  Simple plots can even be predicted without drawing them.


:<math>2s = - \left( \frac {1} {\tau_1} + \frac {1} {\tau_2} \right) </math>
The approximation can be taken further by ''correcting'' the value at each cutoff frequency. The plot is then called a '''corrected Bode plot'''.
::::<math>\pm \sqrt { \left( \frac {1} {\tau_1} - \frac {1} {\tau_2} \right) ^2 -\frac {4 \beta A_0 } {\tau_1 \tau_2 } } \ ,</math>


==Rules for hand-made Bode plot==


which shows for large enough values of β''A''<sub>0</sub> the square root becomes the square root of a negative number, that is the square root becomes imaginary, and the pole positions are complex conjugate numbers, either ''s''<sub>+</sub> or ''s''<sub>−</sub>; see the figure:
The main idea about Bode plots is that one can think of the log of a function in the form:
:<math> f(x) = A \prod (x + c_n)^{a_n} </math>


:<math> s_{\pm} = -\rho \pm j \mu \ </math>
as a sum of the logs of its [[Pole (complex analysis)|poles]] and [[Zero (complex analysis)|zeros]]:
:<math> \log(f(x)) = \log(A) + \sum a_n \log(x + c_n). </math>


with
This idea is used explicitly in the method for drawing phase diagrams. The method for drawing amplitude plots implicitly uses this idea, but since the log of the amplitude of each pole or zero always starts at zero and only has one asymptote change (the straight lines), the method can be simplified.


::<math> \rho = \frac {1}{2} \left( \frac {1} {\tau_1} + \frac {1} {\tau_2} \right ) \ , </math>
=== Straight-line amplitude plot===
Amplitude decibels is usually done using the <math> 20 \log_{10}(X)</math> version. Given a transfer function in the form
:<math> H(s) = A \prod \frac{(s + x_n)^{a_n}}{(s + y_n)^{b_n}} </math>
:: where <math>x_n</math> and <math>y_n</math> are constants, <math>s = j\omega</math>, <math>a_n</math>, <math>b_n</math> > 0, and H is the transfer function:


and
* at every value of s where <math>\omega = x_n</math> (a zero), '''increase''' the slope of the line by <math>20 \cdot a_n dB</math> per decade.
::<math> \mu = \frac {1} {2} \sqrt { \frac {4 \beta A_0} { \tau_1 \tau_2} - \left( \frac {1} {\tau_1} - \frac {1} {\tau_2} \right)^2 } \ . </math>
* at every value of s where <math>\omega = y_n</math> (a pole), '''decrease''' the slope of the line by <math>20 \cdot b_n dB </math> per decade.
Using polar coordinates with the magnitude of the radius to the roots given by |''s''| (See figure):
* The initial value of the graph depends on the boundaries. The initial point is found by putting the initial angular frequency ''ω'' into the function and finding |H()|.
* The initial slope of the function at the initial value depends on the number and order of zeros and poles that are at values below the initial value, and are found using the first two rules.


:<math> | s | = |s_{ \pm } | =  \sqrt{ \rho^2 +\mu^2} \ , </math>
To handle irreducible 2nd order polynomials, <math> ax^2 + bx + c \ </math> can, in many cases, be approximated as <math> (\sqrt{a}x + \sqrt{c})^2 </math>.


and the angular coordinate φ is given by:
Note that zeros and poles happen when ω is ''equal to'' a certain <math>x_n</math> or <math>y_n</math>. This is because the function in question is the magnitude of H(jω), and since it is a complex function, <math>|H(j\omega)| = \sqrt{H \cdot H^* } </math>. Thus at any place where there is a zero or pole involving the term <math>(s + x_n) </math>, the magnitude of that term is <math>\sqrt{(x_n + j\omega) \cdot (x_n - j\omega)}= \sqrt{x_n^2+\omega^2}</math>.


: <math> \mathrm {cos}\  \phi = \frac { \rho} { | s | } \ </math> &emsp; <math> \mathrm {sin}\  \phi = \frac { \mu} { | s | } \ .</math>
=== Corrected amplitude plot===
Tables of [[Laplace transform]]s show that the time response of such a system is composed of combinations of the two functions:


::<math> e^{- \rho t} \mathrm {sin} ( \mu t) \ </math> <math> \quad </math> and <math> \quad </math> <math> e^{- \rho t} \mathrm {cos} ( \mu t) \ , </math>
To correct a straight-line amplitude plot:


which is to say, the solutions are damped oscillations in time. In particular, the unit step response of the system is:<ref name=Kuo/>
* at every zero, put a point <math>3 \cdot a_n\ \mathrm{dB}</math>  '''above''' the line,
:<math>S(t) = 1 -  e^{- \rho t} \ \frac {  \mathrm {sin} \left( \mu t + \phi \right)}{ \mathrm {sin}( \phi )} \ . </math>
* at every pole, put a point <math>3 \cdot b_n\ \mathrm{dB}</math> '''below''' the line,
* draw a smooth line through those points using the straight lines as asymptotes (lines which the curve approaches).


Notice that the damping of the response is set by ρ, that is, by the time constants of the open-loop amplifier. In contrast, the frequency of oscillation is set by μ, that is, by the feedback parameter through β''A''<sub>0</sub>. Because ρ is a sum of reciprocals of time constants, it is interesting to notice that ρ is dominated by the ''shorter'' of the two.
Note that this correction method does not incorporate how to handle complex values of <math> x_n </math> or <math> y_n </math>. In the case of an irreducible polynomial, the best way to correct the plot is to actually calculate the magnitude of the transfer function at the pole or zero corresponding to the irreducible polynomial, and put that dot over or under the line at that pole or zero.


===Results===
=== Straight-line phase plot ===
{{Image|Step response of negative feedback amplifier.PNG|right|300px| Step-response of a linear two-pole feedback amplifier; time is in units of 1/ρ, that is, in terms of the time constants of ''A''<sub>OL</sub>; curves are plotted for three values of ''mu'' <nowiki>=</nowiki> μ, which is controlled by β.}}
The figure to the right shows the time response to a unit step input for three values of the parameter μ. It can be seen that the frequency of oscillation increases with μ, but the oscillations are contained between the two asymptotes set by the exponentials [ 1 - exp (−ρt) ] and [ 1 + exp (−ρt) ]. These asymptotes are determined by ρ and therefore by the time constants of the open-loop amplifier, independent of feedback.


The phenomena of oscillation about final value is called '''[[ringing]]'''. The '''[[overshoot]]''' is the maximum swing above final value, and clearly increases with μ. Likewise, the '''undershoot''' is the minimum swing below final value, again increasing with μ. The '''[[settling time]]''' is the time for departures from final value to sink below some specified level, say 10% of final value.  
Given a transfer function in the same form as above:
:<math> H(s) = A \prod \frac{(s + x_n)^{a_n}}{(s + y_n)^{b_n}} </math>
the idea is to draw separate plots for each pole and zero, then add them up. The actual phase curve is given by <math>-\mathrm{arctan}(\mathrm{Im}[H(s)] / \mathrm{Re}[H(s)])</math>.


The dependence of settling time upon μ is not obvious, and the approximation of a two-pole system probably is not accurate enough to make any real-world conclusions about feedback dependence of settling time. However, the asymptotes [ 1 - exp (−ρt) ] and [ 1 + exp (−ρt) ] clearly impact settling time, and they are controlled by the time constants of the open-loop amplifier, particularly the shorter of the two time constants. That suggests that a specification on settling time must be met by appropriate design of the open-loop amplifier.
To draw the phase plot, for '''each''' pole and zero:


The two major conclusions from this analysis are:
* if A is positive, start line (with zero slope) at 0 degrees
#Feedback controls the amplitude of oscillation about final value for a given open-loop amplifier and given values of open-loop time constantsτ<sub>1</sub> and τ<sub>2</sub>.
* if A is negative, start line (with zero slope) at 180 degrees
#The open-loop amplifier decides settling time. It sets the time scale of Figure 3, and the faster the open-loop amplifier, the faster this time scale.
* at every <math> \omega = x_n </math> (for stable zeros – <math>Re(z) < 0</math>), '''increase''' the slope by <math>45 \cdot a_n</math> degrees per decade, beginning one decade before <math> \omega = x_n </math> (i.e. <math> \frac{x_n}{10} </math>)
* at every <math> \omega = y_n </math> (for stable poles – <math>Re(p) < 0</math>), '''decrease''' the slope by <math>45 \cdot b_n</math> degrees per decade, beginning one decade before <math> \omega = y_n </math> (i.e. <math> \frac{y_n}{10} </math>)
* "unstable" (right half plane) poles and zeros (<math>Re(s) > 0</math>) have opposite behavior
* flatten the slope again when the phase has changed by <math>90 \cdot a_n</math> degrees (for a zero) or <math>90 \cdot b_n</math> degrees (for a pole),
* After plotting one line for each pole or zero, add the lines together to obtain the final phase plot; that is, the final phase plot is the superposition of each earlier phase plot.


As an aside, it may be noted that real-world departures from this linear two-pole model occur due to two major complications: first, real amplifiers have more than two poles, as well as zeros; and second, real amplifiers are nonlinear, so their step response changes with signal amplitude.
==Example==


===Control of overshoot===
A passive (unity pass band gain) [[lowpass]] [[RC circuit|RC filter]], for instance has the following [[transfer function]] expressed in the [[frequency domain]]:
{{Image|Overshoot control.PNG|right|350px|Step response for three values of α. Top: α <nowiki>=</nowiki> 4; Center: α <nowiki>=</nowiki> 2; Bottom: α <nowiki>=</nowiki> 0.5. As α is reduced the pole separation reduces, and the overshoot increases.}}
How overshoot may be controlled by appropriate parameter choices is discussed next.


Using the equations above, the amount of overshoot can be found by differentiating the step response and finding its maximum value. The result for maximum step response ''S''<sub>max</sub> is:<ref name=Kuo2/>
:<math>
H(jf) = \frac{1}{1+j2\pi f R C}
</math>


:<math>S_{max}= 1 \   </math>&ensp;<math>\ +\  \mathrm {exp} \left( - \pi \frac { \rho }{ \mu } \right) \ . </math>
From the transfer function it can be determined that the [[cutoff frequency]] point ''f''<sub>c</sub> (in [[hertz]]) is at the frequency
:<math>
f_\mathrm{c} = {1 \over {2\pi RC}}
</math>
:or (equivalently) at
:<math>
\omega_\mathrm{c} = {1 \over {RC}}
</math> where <math>\omega_\mathrm{c}=2\pi f_\mathrm{c}</math> is the angular cutoff frequency in radians per second.


The final value of the step response is 1, so the exponential is the actual overshoot itself. It is clear the overshoot is zero if μ = 0, which is the condition:
The transfer function in terms of the angular frequencies becomes:
:<math>
H(j\omega)  = {1 \over 1+j{\omega \over {{\omega_\mathrm{c}}}}}
</math>
The above equation is the normalized form of the transfer function. The Bode plot is shown in Figure 1(b) above, and construction of the straight-line approximation is discussed next.


:<math> \frac {4 \beta A_0} { \tau_1 \tau_2} = \left( \frac {1} {\tau_1} - \frac {1} {\tau_2} \right)^2  \ . </math>
===Magnitude plot===


This quadratic is solved for the ratio of time constants by setting ''x'' = ( τ<sub>1</sub> / τ<sub>2</sub> )<sup>1 / 2 </sup> with the result
The magnitude (in [[decibel]]s) of the transfer function above, (normalized and converted to angular frequency form), given by the decibel gain expression <math>A_\mathrm{vdB}</math>:
:<math>
A_\mathrm{vdB} \ = \ 20\ \log|H(j\omega)| \ = \ 20\  \log {1 \over \left|1+j{\omega \over {{\omega_\mathrm{c}}}}\right|} </math>
:::<math>= \ - 20\  \log \left|1+j{\omega \over {{\omega_\mathrm{c}}}}\right| </math> &ensp; <math> = \ -10\  \log{\left[1 + \frac{\omega^2}{\omega_\mathrm{c}^2}\right]}
</math>


:<math>x = \sqrt{ \beta A_0 } + \sqrt { \beta A_0 +1 } \ . </math>
when plotted versus input frequency <math>\omega</math> on a logarithmic scale, can be approximated by two lines and it forms the asymptotic (approximate) magnitude Bode plot of the transfer function:
* for angular frequencies below <math>\omega_\mathrm{c}</math> it is a horizontal line at 0 dB since at low frequencies the <math>{\omega \over {\omega_\mathrm{c}}}</math> term is small and can be neglected, making the decibel gain equation above equal to zero,
* for angular frequencies above <math>\omega_\mathrm{c}</math> it is a line with a slope of −20 dB per decade since at high frequencies the <math>{\omega \over {\omega_\mathrm{c}}}</math> term dominates and the decibel gain expression above simplifies to <math>-20 \log {\omega \over {\omega_\mathrm{c}}}</math> which is a straight line with a slope of -20 dB per decade.


Because β ''A''<sub>0</sub> >> 1, the 1 in the square root can be dropped, and the result is
These two lines meet at the [[corner frequency]]. From the plot, it can be seen that for frequencies well below the corner frequency, the circuit has an attenuation of 0 dB, corresponding to a unity pass band gain, i.e. the amplitude of the filter output equals the amplitude of the input. Frequencies above the corner frequency are attenuated – the higher the frequency, the higher the [[attenuation]].
[[Image:Bode Low Pass Magnitude Plot.PNG|thumbnail|400px|Figure 2: Bode magnitude plot for zero and low-pass pole; curves labeled "Bode" are the straight-line Bode plots]]
[[Image:Bode Low Pass Phase Plot.PNG|thumbnail|400px|Figure 3: Bode phase plot for zero and low-pass pole; curves labeled "Bode" are the straight-line Bode plots]]
[[Image:Bode Pole-Zero Magnitude Plot.PNG|thumbnail|400px|Figure 4: Bode magnitude plot for pole-zero combination; the location of the zero is ten times higher than in Figures 2&3; curves labeled "Bode" are the straight-line Bode plots]]
[[Image:Bode Pole-Zero Phase Plot.PNG|thumbnail|400px|Figure 5: Bode phase plot for pole-zero combination; the location of the zero is ten times higher than in Figures 2&3; curves labeled "Bode" are the straight-line Bode plots]]


:<math> \frac { \tau_1} { \tau_2} = 4 \beta A_0 \ . </math>
===Phase plot===
The phase Bode plot is obtained by plotting the phase angle of the transfer function given by:
<math>
\phi = -\tan^{-1}{\omega \over {\omega_\mathrm{c}}}
</math>
versus <math>\omega</math>, where <math>\omega</math> and <math>\omega_\mathrm{c}</math> are the input and cutoff angular frequencies respectively. For input frequencies much lower than corner, the ratio <math> {\omega \over {\omega_\mathrm{c}}}</math> is small and therefore the phase angle is close to zero. As the ratio increases the absolute value of the phase increases and becomes –45 degrees when <math>\omega =\omega_\mathrm{c}</math>. As the ratio increases for input frequencies much greater than the corner frequency, the phase angle asymptotically approaches -90 degrees. The frequency scale for the phase plot is logarithmic.


In words, the first time constant must be much larger than the second. To be more adventurous than a design allowing for no overshoot we can introduce a factor α in the above relation:
===Normalized plot===
The horizontal frequency axis, in both the magnitude and phase plots, can be replaced by the normalized (nondimensional) frequency ratio <math>{\omega \over {\omega_\mathrm{c}}}</math>. In such a case the plot is said to be normalized and units of the frequencies are no longer used since all input frequencies are now expressed as multiples of the cutoff frequency <math>\omega_\mathrm{c}</math>.


:<math> \frac { \tau_1} { \tau_2} = \alpha \beta A_0 \ , </math>
==An example with pole and zero==
Figures 2-5 further illustrate construction of Bode plots. This example with both a pole and a zero shows how to use superposition. To begin, the components are presented separately.


and let α be set by the amount of overshoot that is acceptable.  
Figure 2 shows the Bode magnitude plot for a zero and a low-pass pole, and compares the two with the Bode straight line plots. The straight-line plots are horizontal up to the pole (zero) location and then drop (rise) at 20 dB/decade. The second Figure 3 does the same for the phase. The phase plots are horizontal up to a frequency a factor of ten below the pole (zero) location and then drop (rise) at 45°/decade until the frequency is ten times higher than the pole (zero) location. The plots then are again horizontal at higher frequencies at a final, total phase change of 90°.


The figure at right illustrates the procedure. Comparing the top panel (α = 4) with the lower panel (α = 0.5) shows lower values for α increase the rate of response, but increase overshoot. The case α = 2 (center panel) is the [[Butterworth_filter#Maximal_flatness|''maximally flat'']] design that shows no peaking in the [[Bode plot|Bode gain vs. frequency plot]]. That design has the [[rule of thumb]] built-in safety margin to deal with non-ideal realities like multiple poles (or zeros), nonlinearity (signal amplitude dependence) and manufacturing variations, any of which can lead to too much overshoot. The adjustment of the pole separation (that is, setting α ) is the subject of [[frequency compensation]], and one such method is [[pole splitting]].
Figure 4 and Figure 5 show how superposition (simple addition) of a pole and zero plot is done. The Bode straight line plots again are compared with the exact plots. The zero has been moved to higher frequency than the pole to make a more interesting example. Notice in Figure 4 that the 20 dB/decade drop of the pole is arrested by the 20 dB/decade rise of the zero resulting in a horizontal magnitude plot for  frequencies above the zero location. Notice in Figure 5 in the phase plot that the straight-line approximation is pretty approximate in the region where both pole and zero affect the phase. Notice also in Figure 5 that the range of frequencies where the phase changes in the straight line plot is limited to frequencies a factor of ten above and below the pole (zero) location. Where the phase of the pole and the zero both are present, the straight-line phase plot is horizontal because the 45°/decade drop of the pole is arrested by the overlapping 45°/decade rise of the zero in the limited range of frequencies where both are active contributors to the phase.


===Control of settling time ===
==Gain margin and phase margin==
The amplitude of ringing in the step response is governed by the damping factor exp ( −ρ t ). That is, if we specify some acceptable step response deviation from final value, say Δ, that is:
Bode plots are used to assess the stability of negative feedback amplifiers by finding the gain and [[phase margin]]s of an amplifier. The notion of gain and phase margin is based upon the gain expression for a [[negative feedback amplifier]] given by


:<math> S(t)  \le 1 + \Delta  \ ,</math>
::<math> A_{FB} = \frac {A_{OL}} {1 + \beta A_{OL}} \ , </math>


this condition is satisfied  regardless of the value of β ''A''<sub>OL</sub> provided the time is longer than the settling time, say ''t''<sub>S</sub>, given by:<ref name=note1/>
where A<sub>FB</sub> is the gain of the amplifier with feedback (the '''closed-loop gain'''), β is the '''feedback factor''' and ''A''<sub>OL</sub> is the gain without feedback (the '''open-loop gain'''). The gain ''A''<sub>OL</sub> is a complex function of frequency, with both magnitude and phase.<ref name=note1/> Examination of this relation shows the possibility of infinite gain (interpreted as instability) if the product β''A''<sub>OL</sub> = −1. (That is, the magnitude of β''A''<sub>OL</sub> is unity and its phase is −180°, the so-called '''Barkhausen  criteria'''). Bode plots are used to determine just how close an amplifier comes to satisfying this condition.


:<math> \Delta = e^{- \rho t_S }</math> &emsp; or &emsp; <math>t_S = \frac { \mathrm{ln} \left( \frac{1} { \Delta} \right) } { \rho } = \tau_2 \  \frac {2 \  \mathrm{ln} \left( \frac{1} { \Delta} \right) } { 1 + \frac { \tau_2 } { \tau_1} } \approx 2 \ \tau_2 \  \mathrm{ln} \left( \frac{1} { \Delta} \right)\ , </math>
Key to this determination are two frequencies. The first, labeled here as ''f''<sub>180</sub>, is the frequency where the open-loop gain flips sign. The second, labeled here ''f''<sub>0dB</sub>, is the frequency where the magnitude of the product | β ''A''<sub>OL</sub> | = 1 (in dB, magnitude 1 is 0 dB). That is, frequency ''f''<sub>180</sub> is determined by the condition:


where the approximation τ<sub>1</sub> >> τ<sub>2</sub> is applicable because of  the overshoot control condition, which makes τ<sub>1</sub> = α β''A''<sub>OL</sub> τ<sub>2</sub>. Often the settling time condition is referred to by saying the settling period is inversely proportional to the unity gain bandwidth,  because 1/( 2π τ<sub>2</sub> ) is close to this bandwidth for an amplifier with typical [[Frequency_compensation#Dominant-pole_compensation|dominant pole compensation]]. However, this result is more precise than this [[rule of thumb]]. As an example of this formula, if Δ = 1/e<sup>4</sup> = 1.8 %, the settling time condition is  ''t''<sub>S</sub> = 8 τ<sub>2</sub>.
:::<math> \beta A_{OL} \left( f_{180} \right) = - | \beta A_{OL} \left( f_{180} \right)| = - | \beta A_{OL}|_{180} \ , </math>


In general, control of overshoot sets the time constant ratio, and settling time ''t''<sub>S</sub> sets τ<sub>2</sub>.<ref name=Johns/><ref name=Sansen/><ref name=note2/>
where vertical bars denote the magnitude of a complex number (for example, | a + j b | = [ a<sup>2</sup> + b<sup>2</sup>]<sup>1/2</sup> ), and frequency ''f''<sub>0dB</sub> is determined by the condition:


===Phase margin===
:::<math>| \beta A_{OL} \left( f_{0dB} \right) | = 1 \ . </math>
{{Image|Gain Bode plot for two-pole amplifier.PNG|right|200px|Bode gain plot to find phase margin; scales are logarithmic, so labeled separations are multiplicative factors. For example, ''f''<sub>0dB</sub>  <nowiki>=</nowiki> β ''A''<sub>0</sub> × ''f''<sub>1</sub>.}}
Next, the choice of pole ratio τ<sub>1</sub> / τ<sub>2</sub> is related to the phase margin of the feedback amplifier.<ref name=note3/>  The procedure outlined in the [[Bode_plot#Examples_using_Bode_plots|Bode plot]] article is followed. To the right is the Bode gain plot for the two-pole amplifier in the range of frequencies up to the second pole position. The assumption behind the plot is that the frequency ''f''<sub>0dB</sub> lies between the lowest pole at ''f''<sub>1</sub> = 1 / ( 2π τ<sub>1</sub> ) and the second pole at ''f''<sub>2</sub> = 1 / ( 2π τ<sub>2</sub> ). As indicated in the figure, this condition is satisfied for values of α ≥ 1.


Using the figure the frequency (denoted by ''f''<sub>0dB</sub> ) is found where the loop gain β''A''<sub>0</sub> satisfies the unity gain or 0 dB condition , as defined by:
One measure of proximity to instability is the '''gain margin'''. The Bode phase plot locates the frequency where the phase of β''A''<sub>OL</sub> reaches −180°, denoted here as frequency ''f''<sub>180</sub>. Using this frequency, the Bode magnitude plot finds the magnitude of β''A''<sub>OL</sub>. If |β''A''<sub>OL</sub>|<sub>180</sub> = 1, the amplifier is unstable, as mentioned. If |β''A''<sub>OL</sub>|<sub>180</sub> < 1, instability does not occur, and the separation in dB of the magnitude of |β''A''<sub>OL</sub>|<sub>180</sub> from |β''A''<sub>OL</sub>| = 1 is called the ''gain margin''. Because a magnitude of one is 0 dB, the gain margin is simply one of the equivalent forms: 20 log<sub>10</sub>( |β''A''<sub>OL</sub>|<sub>180</sub>) = 20 log<sub>10</sub>( |''A''<sub>OL</sub>|<sub>180</sub>) − 20 log<sub>10</sub>( 1 / β ).


:<math> | \beta A_{OL} ( f_{0db} ) | = 1 \ . </math>
Another equivalent measure of proximity to instability is the '''[[phase margin]]'''. The Bode magnitude plot locates the frequency where the magnitude of |β''A''<sub>OL</sub>| reaches unity, denoted here as frequency ''f''<sub>0dB</sub>. Using this frequency, the Bode phase plot finds the phase of β''A''<sub>OL</sub>. If the phase of β''A''<sub>OL</sub>( ''f''</sub><sub>0dB</sub>) > −180°,  the instability condition cannot be met at any frequency (because its magnitude is going to be < 1 when ''f = f''<sub>180</sub>), and the distance of the phase at ''f''<sub>0dB</sub> in degrees above −180° is called the ''phase margin''.


The slope of the downward leg of the gain plot is (20 dB/decade); for every factor of ten increase in frequency, the gain drops by the same factor:<ref name=note4/>
If a simple ''yes'' or ''no'' on the stability issue is all that is needed, the amplifier is stable if ''f''<sub>0dB</sub> < ''f''<sub>180</sub>. This criterion is sufficient to predict stability only for amplifiers satisfying some restrictions on their pole and zero positions ([[minimum phase]] systems). Although these restrictions usually are met, if they are not another method must be used, such as the [[Nyquist plot]].<ref name=Lee/><ref name=Levine/>
[[Image:Magnitude of feedback amplifier.PNG|thumbnail|380px|Figure 6: Gain of feedback amplifier ''A''<sub>FB</sub> in dB and corresponding open-loop amplifier ''A''<sub>OL</sub>. The gain margin in this amplifier is nearly zero because &#124; β''A''<sub>OL</sub>&#124; = 1 occurs at almost ''f'' = ''f''<sub>180°</sub>.]]
[[Image:Phase of feedback amplifier.PNG|thumbnail|380px|Figure 7: Phase of feedback amplifier ''°A''<sub>FB</sub> in degrees and corresponding open-loop amplifier ''°A''<sub>OL</sub>. The phase margin in this amplifier is nearly zero because the phase-flip occurs at almost the unity gain frequency ''f'' = ''f''<sub>0dB</sub> where &#124; β''A''<sub>OL</sub>&#124; = 1.]]
===Examples using Bode plots===
Figures 6 and 7 illustrate the gain behavior and terminology. For a three-pole amplifier, Figure 6 compares the Bode plot for the gain without feedback (the ''open-loop'' gain) ''A''<sub>OL</sub> with the gain with feedback ''A''<sub>FB</sub> (the ''closed-loop'' gain). See [[negative feedback amplifier]] for more detail.


:<math> f_{0dB} = \beta A_0 f_1 \ . </math>
Because the open-loop gain ''A''<sub>OL</sub> is plotted and not the product β ''A''<sub>OL</sub>, the condition ''A''<sub>OL</sub> = 1 / β decides ''f''<sub>0dB</sub>. The feedback gain at low frequencies and for large ''A''<sub>OL</sub> is ''A''<sub>FB</sub> &asymp; 1 / β (look at the formula for the feedback gain at the beginning of this section for the case of large gain ''A''<sub>OL</sub>), so an equivalent way to find ''f''<sub>0dB</sub> is to look where the feedback gain intersects the open-loop gain. (Frequency ''f''<sub>0dB</sub> is needed later to find the phase margin.)


The phase margin is the departure of the phase at ''f''<sub>0dB</sub> from −180°. Thus, the margin is:
Near this crossover of the two gains at ''f''<sub>0dB</sub>, the Barkhausen criteria are almost satisfied in this example, and the feedback amplifier exhibits a massive peak in gain (it would be infinity if β ''A''<sub>OL</sub> = −1). Beyond the unity gain frequency ''f''<sub>0dB</sub>, the open-loop gain is sufficiently small that ''A''<sub>FB</sub> ≈ ''A''<sub>OL</sub> (examine the formula at the beginning of this section for the case of small ''A''<sub>OL</sub>).


:<math> \phi_m = 180 ^\circ - \mathrm {atan} (f_{0dB} /f_1) - \mathrm {atan} ( f_{0dB} /f_2)  \ . </math>
Figure 7 shows the corresponding phase comparison: the phase of the feedback amplifier is nearly zero out to the frequency ''f''<sub>180</sub> where the open-loop gain has a phase of −180°. In this vicinity, the phase of the feedback amplifier plunges abruptly downward to become almost the same as the phase of the open-loop amplifier. (Recall, ''A''<sub>FB</sub> ≈ ''A''<sub>OL</sub> for small ''A''<sub>OL</sub>.)


Because ''f''<sub>0dB</sub> / ''f''<sub>1</sub> = β''A''<sub>0</sub> >> 1, the term in ''f''<sub>1</sub> is 90°. That makes the phase margin:
Comparing the labeled points in Figure 6 and Figure 7, it is seen that the unity gain frequency ''f''<sub>0dB</sub> and the phase-flip frequency ''f''<sub>180</sub> are very nearly equal in this amplifier, ''f''<sub>180</sub> &asymp; ''f''<sub>0dB</sub> &asymp; 3.332 kHz, which means the gain margin and phase margin are nearly zero. The amplifier is borderline stable.
[[Image:Gain Margin.PNG|thumbnail|380px|Figure 8: Gain of feedback amplifier ''A''<sub>FB</sub> in dB and corresponding open-loop amplifier ''A''<sub>OL</sub>. The gain margin in this amplifier is 19 dB.]]
[[Image:Phase Margin.PNG|thumbnail|380px|Figure 9: Phase of feedback amplifier ''A''<sub>FB</sub> in degrees and corresponding open-loop amplifier ''A''<sub>OL</sub>. The phase margin in this amplifier is 45°.]]
Figures 8 and 9 illustrate the gain margin and phase margin for a different amount of feedback β. The feedback factor is chosen smaller than in Figure 6 or 7, moving the the condition | β ''A''<sub>OL</sub> | = 1 to lower frequency.


:<math> \phi_m = 90 ^\circ - \mathrm {atan} ( f_{0dB} /f_2)  </math>
Figure 8 shows the gain plot. From Figure 8, the intersection of 1 / β and ''A''<sub>OL</sub> occurs at ''f''<sub>0dB</sub> = 1 kHz. Notice that the peak in the gain ''A''<sub>FB</sub> near ''f''<sub>0dB</sub> is almost gone.<ref name=note2/><ref name=Sansen/>
::<math> = 90 ^\circ -  \mathrm {atan} \left( \frac {\beta A_0 f_1} {\alpha \beta A_0 f_1 } \right) </math>
::<math> = 90 ^\circ -  \mathrm {atan} \left( \frac {1} {\alpha } \right) </math> <math> = \mathrm {atan} \left(  \alpha  \right) \ . </math>
Figure 9 is the phase plot. Using the value of ''f''<sub>0dB</sub> = 1 kHz found above from the magnitude plot of Figure 8, the open-loop phase at ''f''<sub>0dB</sub> is −135°, which is a phase margin of 45° above −180°.


In particular, for case α = 1,  φ<sub>m</sub> = 45°, and for α = 2, φ<sub>m</sub> = 63.4°. Sansen<ref name=Sansen3/> recommends α = 3, φ<sub>m</sub> = 71.6° as a "good safety position to start with".
Using Figure 9, for a phase of −180° the value of ''f''<sub>180</sub> = 3.332 kHz (the same result as found earlier, of course<ref name=note3/>). The open-loop gain from Figure 8 at ''f''<sub>180</sub> is 58 dB, and 1 / β = 77 dB, so the gain margin is 19 dB.


If α is increased by shortening τ<sub>2</sub>, the settling time ''t''<sub>S</sub> also is shortened. If α is increased by lengthening τ<sub>1</sub>, the settling time ''t''<sub>S</sub> is little altered. More commonly, both τ<sub>1</sub> ''and'' τ<sub>2</sub> change, for example if the technique of [[pole splitting]] is used.  
As an aside, it should be noted that stability is not the sole criterion for amplifier response, and in many applications a more stringent demand than stability is good [[Step_response#Step_response_of_feedback_amplifiers|step response]]. As a [[rule of thumb]], good step response requires a phase margin of at least 45°, and often a margin of over 70° is advocated, particularly where component variation due to manufacturing tolerances is an issue.<ref name=Sansen2/> See also the discussion of phase margin in the [[Step_response#Phase_margin|step response]] article.
 
As an aside, for an amplifier with more than two poles, the diagram in the figure still may be made to fit the Bode plots by making ''f''<sub>2</sub> a fitting parameter, referred to as an "equivalent second pole" position.<ref name=Palumbo/>


==References and notes==
==References and notes==
{{reflist|refs=
{{reflist|refs=
<ref name=Kuo>
<ref name=note1>
Ordinarily, as frequency increases the magnitude of the gain drops and the phase becomes more negative, although these are only trends and may be reversed in particular frequency ranges. Unusual gain behavior can render the concepts of gain and phase margin inapplicable. Then other methods such as the [[Nyquist plot]] have to be used to assess stability.
</ref>
 
<ref name=Lee>
{{cite book  
{{cite book  
|author=Benjamin C Kuo & Golnaraghi F
|author=Thomas H. Lee
|title=Automatic control systems
|title=The design of CMOS radio-frequency integrated circuits
|year= 2003
|page=§14.6 pp. 451-453
|pages=p. 253
|year= 2004
|publisher=Wiley
|edition=Second Edition
|edition=Eighth Edition
|publisher=Cambridge University Press
|location=New York
|location=Cambridge UK
|isbn=0-471-13476-7
|isbn=0-521-83539-9
|url=http://worldcat.org/isbn/0-471-13476-7}}
|url=http://worldcat.org/isbn/0-521-83539-9}}
</ref>
</ref>


<ref name=Kuo2>
<ref name=Levine>
{{cite book  
{{cite book  
|author=Benjamin C Kuo & Golnaraghi F
|author=William S Levine
|title=p. 259
|title=The control handbook: the electrical engineering handbook series
|isbn=0-471-13476-7
|page=§10.1 p. 163
|url=http://worldcat.org/isbn/0-471-13476-7}}
|year= 1996
</ref>
|edition=Second Edition
|publisher=CRC Press/IEEE Press
|location=Boca Raton FL
|isbn=0849385709
|url=http://books.google.com/books?id=2WQP5JGaJOgC&pg=RA1-PA163&lpg=RA1-PA163&dq=stability+%22minimum+phase%22&source=web&ots=P3fFTcyfzM&sig=ad5DJ7EvVm6In_zhI0MlF_6vHDA}}
</ref>  


<ref name=note1>
<ref name=note2>The critical amount of feedback where the peak in the gain ''just'' disappears altogether is the ''maximally flat'' or [[Butterworth_filter#Maximal_flatness|Butterworth]] design.
This estimate is a bit conservative (long) because the factor 1 /sin(φ) in the overshoot contribution  to ''S'' ( ''t'' ) has been replaced by  1 /sin(φ)  &asymp; 1.
</ref>
</ref>


<ref name=Johns>
<ref name=note3>
{{cite book
The frequency where the open-loop gain flips sign ''f''<sub>180</sub> does not change with a change in feedback factor; it is a property of the open-loop gain. The value of the gain at ''f''<sub>180</sub> also does not change with a change in β. Therefore, we could use the previous values from Figures 6 and 7. However, for clarity the procedure is described using only Figures 8 and 9.
|author=David A. Johns & Martin K W
|title=Analog integrated circuit design
|year= 1997
|pages=pp. 234-235
|publisher=Wiley
|location=New York
|isbn=0-471-14448-7
|url=http://worldcat.org/isbn/0-471-14448-7}}
</ref>
</ref>


Line 203: Line 242:
|author=Willy M C Sansen
|author=Willy M C Sansen
|title=Analog design essentials
|title=Analog design essentials
|page=§0528 p. 163
|page=§0517-§0527 pp. 157-163
|year= 2006
|year= 2006
|publisher=Springer
|publisher=Springer
Line 211: Line 250:
</ref>
</ref>


<ref name=note2>
According to Johns and Martin, ''op. cit.'', settling time is significant in [[switched capacitor|switched-capacitor circuits]], for example, where an op amp settling time must be less than half a clock period for sufficiently rapid charge transfer.
</ref>


<ref name=note3>
<ref name=Sansen2>
The gain margin of the amplifier cannot be found using a two-pole model, because gain margin requires determination of the frequency ''f''<sub>180</sub> where the gain flips sign, and this never happens in a two-pole system. If we know ''f''<sub>180</sub> for the amplifier at hand, the gain margin can be found approximately, but ''f''<sub>180</sub> then depends on the third and higher pole positions, as does the gain margin, unlike the estimate of phase margin, which is a two-pole estimate.
</ref>
 
<ref name=note4>
For more detail on the use of logarithmic scales, see [[Logarithmic_scale#Slope_of_a_log-log_plot|log scale]].
</ref>
 
<ref name=Sansen3>
{{cite book  
{{cite book  
|author=Willy M C Sansen
|author=Willy M C Sansen
Line 229: Line 257:
|isbn=0-387-25746-2
|isbn=0-387-25746-2
|url=http://worldcat.org/isbn/0-387-25746-2}}
|url=http://worldcat.org/isbn/0-387-25746-2}}
</ref>
<ref name=Palumbo> 
{{cite book
|author=Gaetano Palumbo & Pennisi S
|title=Feedback amplifiers: theory and design
|year= 2002
|pages=§ 4.4 pp. 97-98
|publisher=Kluwer Academic Press
|location=Boston/Dordrecht/London
|isbn=0-7923-7643-9
|url=http://books.google.com/books?id=Xb0W1VsQFe0C&pg=PA98&dq=%22equivalent+two-pole+amplifier%22&lr=&as_brr=0&sig=LVB6t0wlg7WL7U_PB4eavGTP7Aw }}
</ref>
</ref>


}}
}}
== Further reading ==
*Robert I. Demrow ''Settling time of operational amplifiers'' [http://www.analog.com/UploadedFiles/Application_Notes/466359863287538299597392756AN359.pdf]
*Cezmi Kayabasi ''Settling time measurement techniques achieving high precision at high speeds'' [http://www.wpi.edu/Pubs/ETD/Available/etd-050505-140358/unrestricted/ckayabasi.pdf]
*Vladimir Igorevic Arnol'd "Ordinary differential equations", various editions from MIT Press and from Springer Verlag, chapter 1 "Fundamental concepts"

Revision as of 15:29, 3 June 2011

Figure 1(a): The Bode plot for a first-order (one-pole) highpass filter; the straight-line approximations are labeled "Bode pole"; phase varies from 90° at low frequencies (due to the contribution of the numerator, which is 90° at all frequencies) to 0° at high frequencies (where the phase contribution of the denominator is −90° and cancels the contribution of the numerator).
Figure 1(b): The Bode plot for a first-order (one-pole) lowpass filter; the straight-line approximations are labeled "Bode pole"; phase is 90° lower than for Figure 1(a) because the phase contribution of the numerator is 0° at all frequencies.

A Bode plot, named after Hendrik Wade Bode, is usually a combination of a Bode magnitude plot and Bode phase plot:

A Bode magnitude plot is a graph of log magnitude versus frequency, plotted with a log-frequency axis, to show the transfer function or frequency response of a linear, time-invariant system.

The magnitude axis of the Bode plot is usually expressed as decibels, that is, 20 times the common logarithm of the amplitude gain. With the magnitude gain being logarithmic, Bode plots make multiplication of magnitudes a simple matter of adding distances on the graph (in decibels), since

.

A Bode phase plot is a graph of phase versus frequency, also plotted on a log-frequency axis, usually used in conjunction with the magnitude plot, to evaluate how much a frequency will be phase-shifted. For example a signal described by: Asin(ωt) may be attenuated but also phase-shifted. If the system attenuates it by a factor x and phase shifts it by −Φ the signal out of the system will be (A/x) sin(ωt − Φ). The phase shift Φ is generally a function of frequency.

Phase can also be added directly from the graphical values, a fact that is mathematically clear when phase is seen as the imaginary part of the complex logarithm of a complex gain.

In Figure 1(a), the Bode plots are shown for the one-pole highpass filter function:

where f is the frequency in Hz, and f1 is the pole position in Hz, f1 = 100 Hz in the figure. Using the rules for complex numbers, the magnitude of this function is

while the phase is:

Care must be taken that the inverse tangent is set up to return degrees, not radians. On the Bode magnitude plot, decibels are used, and the plotted magnitude is:

In Figure 1(b), the Bode plots are shown for the one-pole lowpass filter function:

Also shown in Figure 1(a) and 1(b) are the straight-line approximations to the Bode plots that are used in hand analysis, and described later.

The magnitude and phase Bode plots can seldom be changed independently of each other — changing the amplitude response of the system will most likely change the phase characteristics and vice versa. For minimum-phase systems the phase and amplitude characteristics can be obtained from each other with the use of the Hilbert transform.

If the transfer function is a rational function with real poles and zeros, then the Bode plot can be approximated with straight lines. These asymptotic approximations are called straight line Bode plots or uncorrected Bode plots and are useful because they can be drawn by hand following a few simple rules. Simple plots can even be predicted without drawing them.

The approximation can be taken further by correcting the value at each cutoff frequency. The plot is then called a corrected Bode plot.

Rules for hand-made Bode plot

The main idea about Bode plots is that one can think of the log of a function in the form:

as a sum of the logs of its poles and zeros:

This idea is used explicitly in the method for drawing phase diagrams. The method for drawing amplitude plots implicitly uses this idea, but since the log of the amplitude of each pole or zero always starts at zero and only has one asymptote change (the straight lines), the method can be simplified.

Straight-line amplitude plot

Amplitude decibels is usually done using the version. Given a transfer function in the form

where and are constants, , , > 0, and H is the transfer function:
  • at every value of s where (a zero), increase the slope of the line by per decade.
  • at every value of s where (a pole), decrease the slope of the line by per decade.
  • The initial value of the graph depends on the boundaries. The initial point is found by putting the initial angular frequency ω into the function and finding |H(jω)|.
  • The initial slope of the function at the initial value depends on the number and order of zeros and poles that are at values below the initial value, and are found using the first two rules.

To handle irreducible 2nd order polynomials, can, in many cases, be approximated as .

Note that zeros and poles happen when ω is equal to a certain or . This is because the function in question is the magnitude of H(jω), and since it is a complex function, . Thus at any place where there is a zero or pole involving the term , the magnitude of that term is .

Corrected amplitude plot

To correct a straight-line amplitude plot:

  • at every zero, put a point above the line,
  • at every pole, put a point below the line,
  • draw a smooth line through those points using the straight lines as asymptotes (lines which the curve approaches).

Note that this correction method does not incorporate how to handle complex values of or . In the case of an irreducible polynomial, the best way to correct the plot is to actually calculate the magnitude of the transfer function at the pole or zero corresponding to the irreducible polynomial, and put that dot over or under the line at that pole or zero.

Straight-line phase plot

Given a transfer function in the same form as above:

the idea is to draw separate plots for each pole and zero, then add them up. The actual phase curve is given by .

To draw the phase plot, for each pole and zero:

  • if A is positive, start line (with zero slope) at 0 degrees
  • if A is negative, start line (with zero slope) at 180 degrees
  • at every (for stable zeros – ), increase the slope by degrees per decade, beginning one decade before (i.e. )
  • at every (for stable poles – ), decrease the slope by degrees per decade, beginning one decade before (i.e. )
  • "unstable" (right half plane) poles and zeros () have opposite behavior
  • flatten the slope again when the phase has changed by degrees (for a zero) or degrees (for a pole),
  • After plotting one line for each pole or zero, add the lines together to obtain the final phase plot; that is, the final phase plot is the superposition of each earlier phase plot.

Example

A passive (unity pass band gain) lowpass RC filter, for instance has the following transfer function expressed in the frequency domain:

From the transfer function it can be determined that the cutoff frequency point fc (in hertz) is at the frequency

or (equivalently) at
where is the angular cutoff frequency in radians per second.

The transfer function in terms of the angular frequencies becomes:

The above equation is the normalized form of the transfer function. The Bode plot is shown in Figure 1(b) above, and construction of the straight-line approximation is discussed next.

Magnitude plot

The magnitude (in decibels) of the transfer function above, (normalized and converted to angular frequency form), given by the decibel gain expression :

when plotted versus input frequency on a logarithmic scale, can be approximated by two lines and it forms the asymptotic (approximate) magnitude Bode plot of the transfer function:

  • for angular frequencies below it is a horizontal line at 0 dB since at low frequencies the term is small and can be neglected, making the decibel gain equation above equal to zero,
  • for angular frequencies above it is a line with a slope of −20 dB per decade since at high frequencies the term dominates and the decibel gain expression above simplifies to which is a straight line with a slope of -20 dB per decade.

These two lines meet at the corner frequency. From the plot, it can be seen that for frequencies well below the corner frequency, the circuit has an attenuation of 0 dB, corresponding to a unity pass band gain, i.e. the amplitude of the filter output equals the amplitude of the input. Frequencies above the corner frequency are attenuated – the higher the frequency, the higher the attenuation.

Figure 2: Bode magnitude plot for zero and low-pass pole; curves labeled "Bode" are the straight-line Bode plots
Figure 3: Bode phase plot for zero and low-pass pole; curves labeled "Bode" are the straight-line Bode plots
Figure 4: Bode magnitude plot for pole-zero combination; the location of the zero is ten times higher than in Figures 2&3; curves labeled "Bode" are the straight-line Bode plots
Figure 5: Bode phase plot for pole-zero combination; the location of the zero is ten times higher than in Figures 2&3; curves labeled "Bode" are the straight-line Bode plots

Phase plot

The phase Bode plot is obtained by plotting the phase angle of the transfer function given by: versus , where and are the input and cutoff angular frequencies respectively. For input frequencies much lower than corner, the ratio is small and therefore the phase angle is close to zero. As the ratio increases the absolute value of the phase increases and becomes –45 degrees when . As the ratio increases for input frequencies much greater than the corner frequency, the phase angle asymptotically approaches -90 degrees. The frequency scale for the phase plot is logarithmic.

Normalized plot

The horizontal frequency axis, in both the magnitude and phase plots, can be replaced by the normalized (nondimensional) frequency ratio . In such a case the plot is said to be normalized and units of the frequencies are no longer used since all input frequencies are now expressed as multiples of the cutoff frequency .

An example with pole and zero

Figures 2-5 further illustrate construction of Bode plots. This example with both a pole and a zero shows how to use superposition. To begin, the components are presented separately.

Figure 2 shows the Bode magnitude plot for a zero and a low-pass pole, and compares the two with the Bode straight line plots. The straight-line plots are horizontal up to the pole (zero) location and then drop (rise) at 20 dB/decade. The second Figure 3 does the same for the phase. The phase plots are horizontal up to a frequency a factor of ten below the pole (zero) location and then drop (rise) at 45°/decade until the frequency is ten times higher than the pole (zero) location. The plots then are again horizontal at higher frequencies at a final, total phase change of 90°.

Figure 4 and Figure 5 show how superposition (simple addition) of a pole and zero plot is done. The Bode straight line plots again are compared with the exact plots. The zero has been moved to higher frequency than the pole to make a more interesting example. Notice in Figure 4 that the 20 dB/decade drop of the pole is arrested by the 20 dB/decade rise of the zero resulting in a horizontal magnitude plot for frequencies above the zero location. Notice in Figure 5 in the phase plot that the straight-line approximation is pretty approximate in the region where both pole and zero affect the phase. Notice also in Figure 5 that the range of frequencies where the phase changes in the straight line plot is limited to frequencies a factor of ten above and below the pole (zero) location. Where the phase of the pole and the zero both are present, the straight-line phase plot is horizontal because the 45°/decade drop of the pole is arrested by the overlapping 45°/decade rise of the zero in the limited range of frequencies where both are active contributors to the phase.

Gain margin and phase margin

Bode plots are used to assess the stability of negative feedback amplifiers by finding the gain and phase margins of an amplifier. The notion of gain and phase margin is based upon the gain expression for a negative feedback amplifier given by

where AFB is the gain of the amplifier with feedback (the closed-loop gain), β is the feedback factor and AOL is the gain without feedback (the open-loop gain). The gain AOL is a complex function of frequency, with both magnitude and phase.[1] Examination of this relation shows the possibility of infinite gain (interpreted as instability) if the product βAOL = −1. (That is, the magnitude of βAOL is unity and its phase is −180°, the so-called Barkhausen criteria). Bode plots are used to determine just how close an amplifier comes to satisfying this condition.

Key to this determination are two frequencies. The first, labeled here as f180, is the frequency where the open-loop gain flips sign. The second, labeled here f0dB, is the frequency where the magnitude of the product | β AOL | = 1 (in dB, magnitude 1 is 0 dB). That is, frequency f180 is determined by the condition:

where vertical bars denote the magnitude of a complex number (for example, | a + j b | = [ a2 + b2]1/2 ), and frequency f0dB is determined by the condition:

One measure of proximity to instability is the gain margin. The Bode phase plot locates the frequency where the phase of βAOL reaches −180°, denoted here as frequency f180. Using this frequency, the Bode magnitude plot finds the magnitude of βAOL. If |βAOL|180 = 1, the amplifier is unstable, as mentioned. If |βAOL|180 < 1, instability does not occur, and the separation in dB of the magnitude of |βAOL|180 from |βAOL| = 1 is called the gain margin. Because a magnitude of one is 0 dB, the gain margin is simply one of the equivalent forms: 20 log10( |βAOL|180) = 20 log10( |AOL|180) − 20 log10( 1 / β ).

Another equivalent measure of proximity to instability is the phase margin. The Bode magnitude plot locates the frequency where the magnitude of |βAOL| reaches unity, denoted here as frequency f0dB. Using this frequency, the Bode phase plot finds the phase of βAOL. If the phase of βAOL( f0dB) > −180°, the instability condition cannot be met at any frequency (because its magnitude is going to be < 1 when f = f180), and the distance of the phase at f0dB in degrees above −180° is called the phase margin.

If a simple yes or no on the stability issue is all that is needed, the amplifier is stable if f0dB < f180. This criterion is sufficient to predict stability only for amplifiers satisfying some restrictions on their pole and zero positions (minimum phase systems). Although these restrictions usually are met, if they are not another method must be used, such as the Nyquist plot.[2][3]

Figure 6: Gain of feedback amplifier AFB in dB and corresponding open-loop amplifier AOL. The gain margin in this amplifier is nearly zero because | βAOL| = 1 occurs at almost f = f180°.
Figure 7: Phase of feedback amplifier °AFB in degrees and corresponding open-loop amplifier °AOL. The phase margin in this amplifier is nearly zero because the phase-flip occurs at almost the unity gain frequency f = f0dB where | βAOL| = 1.

Examples using Bode plots

Figures 6 and 7 illustrate the gain behavior and terminology. For a three-pole amplifier, Figure 6 compares the Bode plot for the gain without feedback (the open-loop gain) AOL with the gain with feedback AFB (the closed-loop gain). See negative feedback amplifier for more detail.

Because the open-loop gain AOL is plotted and not the product β AOL, the condition AOL = 1 / β decides f0dB. The feedback gain at low frequencies and for large AOL is AFB ≈ 1 / β (look at the formula for the feedback gain at the beginning of this section for the case of large gain AOL), so an equivalent way to find f0dB is to look where the feedback gain intersects the open-loop gain. (Frequency f0dB is needed later to find the phase margin.)

Near this crossover of the two gains at f0dB, the Barkhausen criteria are almost satisfied in this example, and the feedback amplifier exhibits a massive peak in gain (it would be infinity if β AOL = −1). Beyond the unity gain frequency f0dB, the open-loop gain is sufficiently small that AFBAOL (examine the formula at the beginning of this section for the case of small AOL).

Figure 7 shows the corresponding phase comparison: the phase of the feedback amplifier is nearly zero out to the frequency f180 where the open-loop gain has a phase of −180°. In this vicinity, the phase of the feedback amplifier plunges abruptly downward to become almost the same as the phase of the open-loop amplifier. (Recall, AFBAOL for small AOL.)

Comparing the labeled points in Figure 6 and Figure 7, it is seen that the unity gain frequency f0dB and the phase-flip frequency f180 are very nearly equal in this amplifier, f180f0dB ≈ 3.332 kHz, which means the gain margin and phase margin are nearly zero. The amplifier is borderline stable.

Figure 8: Gain of feedback amplifier AFB in dB and corresponding open-loop amplifier AOL. The gain margin in this amplifier is 19 dB.
Figure 9: Phase of feedback amplifier AFB in degrees and corresponding open-loop amplifier AOL. The phase margin in this amplifier is 45°.

Figures 8 and 9 illustrate the gain margin and phase margin for a different amount of feedback β. The feedback factor is chosen smaller than in Figure 6 or 7, moving the the condition | β AOL | = 1 to lower frequency.

Figure 8 shows the gain plot. From Figure 8, the intersection of 1 / β and AOL occurs at f0dB = 1 kHz. Notice that the peak in the gain AFB near f0dB is almost gone.[4][5]

Figure 9 is the phase plot. Using the value of f0dB = 1 kHz found above from the magnitude plot of Figure 8, the open-loop phase at f0dB is −135°, which is a phase margin of 45° above −180°.

Using Figure 9, for a phase of −180° the value of f180 = 3.332 kHz (the same result as found earlier, of course[6]). The open-loop gain from Figure 8 at f180 is 58 dB, and 1 / β = 77 dB, so the gain margin is 19 dB.

As an aside, it should be noted that stability is not the sole criterion for amplifier response, and in many applications a more stringent demand than stability is good step response. As a rule of thumb, good step response requires a phase margin of at least 45°, and often a margin of over 70° is advocated, particularly where component variation due to manufacturing tolerances is an issue.[7] See also the discussion of phase margin in the step response article.

References and notes

  1. Ordinarily, as frequency increases the magnitude of the gain drops and the phase becomes more negative, although these are only trends and may be reversed in particular frequency ranges. Unusual gain behavior can render the concepts of gain and phase margin inapplicable. Then other methods such as the Nyquist plot have to be used to assess stability.
  2. Thomas H. Lee (2004). The design of CMOS radio-frequency integrated circuits, Second Edition. Cambridge UK: Cambridge University Press. ISBN 0-521-83539-9. 
  3. William S Levine (1996). The control handbook: the electrical engineering handbook series, Second Edition. Boca Raton FL: CRC Press/IEEE Press. ISBN 0849385709. 
  4. The critical amount of feedback where the peak in the gain just disappears altogether is the maximally flat or Butterworth design.
  5. Willy M C Sansen (2006). Analog design essentials. Dordrecht, The Netherlands: Springer. ISBN 0-387-25746-2. 
  6. The frequency where the open-loop gain flips sign f180 does not change with a change in feedback factor; it is a property of the open-loop gain. The value of the gain at f180 also does not change with a change in β. Therefore, we could use the previous values from Figures 6 and 7. However, for clarity the procedure is described using only Figures 8 and 9.
  7. Willy M C Sansen. §0526 p. 162. ISBN 0-387-25746-2.