EECS 6B Designing Information Devices and Systems II Fall 208 Elad Alon and Miki Lustig Discussion 5A Transfer Function When we write the transfer function of an arbitrary circuit, it always takes the following form. This is called a rational transfer function. We also like to factor the numerator and denominator, so that they become easier to work with and plot: ( ) H(ω) = z(ω) p(ω) = ( jω)nz0 ( jω) n α n + ( jω) n α n + + jωα + α 0 ( jω) N p0 ( jω) m β m + ( jω) m β m + + jωβ + β 0 ) ) ( jω) N z0 ( + j )( ω + j ω ( + j ω ωz ωz2 ωzn = K ( )( ( ) ( jω) N p0 + j ω ω p + j ω ω p2 ) + j ω ω pm Here, we define the constants ω z as zeros and ω p as poles, and N z0, N p0 are the number of zeros and poles at ω = 0 2 Bode Plots Bode plots provide us with a simple and easy tool to plot these transfer functions by hand. Always remember that Bode plots are an approximation; if you want the precisely correct plots, you need to use numerical methods (like solving using MATLAB or IPython). When we make Bode plots, we plot the frequency on a logarithmic scale, the magnitude on a decibel scale, and the angle in either degrees or radians. We use the decibel because it allows us to break up complex transfer functions into its constituent components. We define the decibel as the following: 20log 0 ( H(ω) ) = H(ω) [db] When making the Bode plot (and plotting using a logarithmic unit), we treat each individual pole and zero independently, and then add them back together at the end. We can use the Bode plot rules to help us plot each of the individual poles and zeros. H(ω) = 0log P out P in = 0log Vout 2 R Vin 2 R = 0log V 2 out V 2 in = 20log V out V in EECS 6B, Fall 208, Discussion 5A
2. Algorithm Given a frequency response H(ω), (a) Break H(ω) into a product of poles and zeros as in the cheat sheet. Appropriately divide terms to reduce H(ω) into one of the given forms. (b) Draw out the Bode plot for each pole and zero in the product above. (c) Add the resulting plots to get the final Bode plot. 2.2 Example Plot the magnitude and phase of the following transfer function using the Bode approximation and a numerical solver and compare the two. H(ω) = ( ) ω 00 + j 000 ( )( ) + j ω + j ω 0 6 0 8 We see zero at 0 3 rad rad s, 2 poles at 06 s and 0 8 rad s, and a constant gain of 00. We start with the constant value, and then move from lowest to highest frequency plotting the poles and zeros as we go. Finally, we add together the plots for each of the individual poles and zeros to give us the final Bode plot. Figure : Plotting of the transfer function magnitude using the Bode approximation Figure 2: Plotting of the transfer function angle using the Bode approximation Finally, comparing the Bode approximation and the precise value calculated via a computer, we can see the Bode approximation is very similar to the exact answer, except for around the pole and zero frequencies (as expected). EECS 6B, Fall 208, Discussion 5A 2
H(ω) (db) 00 80 60 40 exact approximation H(ω)( ) 00 50 0 50 00 exact approximation 0 0 3 0 5 0 7 0 9 0 ω (rad/s) Figure 3: A comparison of Bode vs. exact (numerically computed) answers. Note the agreement between both, except at the pole and zero frequencies. 2.3 Questions. Bode Plots of Transfer Functions To understand the concept of transfer functions and filters with a concrete example, consider the following simple RC circuit. Let the voltage source V S be designated as the input phasor, and let V R and V C designate the two output voltage phasors. R = kω and C = µf. V s V C + + C V R R (a) What is the impedance of a kω resistor? Draw a Bode plot of the impedance of the resistor as a function of frequency. (Don t forget that a Bode plot has both a magnitude plot and a phase plot.) Z R = kω EECS 6B, Fall 208, Discussion 5A 3
(b) What is the impedance of a µf capacitor? On the same Bode plot as the last question, sketch the capacitor s impedance as a function of frequency. When is Z C Z R and vice versa? At what ω does Z C = Z R? What is this ω called? Z C Z R approximately when ω < RC. Z C Z R approximately when ω > the corner frequency, or ω c. RC. This ω is called EECS 6B, Fall 208, Discussion 5A 4
(c) Now lets look at the impedance voltage divider below. What is the transfer function H(ω) = ṼC ṼS? Z C + V C + + V s V R Z R H(ω) = + jωrc = + j ω 0 3 (d) For the region where Z R Z C, what is the approximate function for ṼC ṼS? At what frequencies is our approximation no longer valid? Sketch the approximate function in the appropreiate region on a Bode magnitude plot. This is valid for ω > RC. Ṽ C Ṽ S Z C Z R EECS 6B, Fall 208, Discussion 5A 5
(e) What is the approximate function for V C ṼS when Z C Z R? On the same Bode magnitude plot as before, sketch the this approximate function. Where does this function meet your approximation for when Z R Z C? Ṽ C Ṽ S This is approximately valid for ω < RC. This meets our other approximation at ω = RC. (f) What is the worst case error for our piecewise approximation? On a log-log plot, does this error appear very large? A factor of 2 at ω = RC. The logarithmic nature of Bode plots means that this error doesn t really affect the general shape of the Bode plot. EECS 6B, Fall 208, Discussion 5A 6
(g) Approximately what is the phase of ṼC ṼS at ω = 0, 0RC, RC, 0 RC, 000 RC? Connect the dots and sketch a plot of phase vs. time in a phase plot below your magnitude plot to complete your Bode plot for ṼC ṼS. 0,0, 45, 90, 90 EECS 6B, Fall 208, Discussion 5A 7
. (h) Draw the Bode plot for ṼR ṼS 2. Bode Plots (a) Derive a transfer function that would result in the following Bode plot. EECS 6B, Fall 208, Discussion 5A 8
H(ω) = ( ) 2 + jω ω c (b) Derive a transfer function that would result in the following Bode plot. Hint: 20log 0 2 = 6 j20ω H(ω) = ( ) ( + jω) + jω 00 3. Bode Plots and Phasors + V in R V 2 x R 0 V out L R I L I R C We found the transfer function of this circuit to be: Using the following values: Plot its magnitude and phase Bode plots. H(ω) = R L + jω L R ( jω)( + jωr 2 C) R 0 = 00Ω,R = kω,l = µh,r 2 = 00kΩ,C = pf EECS 6B, Fall 208, Discussion 5A 9
2.4 Extra Practice. Transfer Function Create a Bode plot of the following transfer function: H(ω) = (( jω) 2 + 0 jω + 000)( jω + 0000) 0 ( jω + 000)(( jω) 2 + 0 jω + 00) EECS 6B, Fall 208, Discussion 5A 0
First of all, we decompose the second-order terms: H(ω) = (( jω) + 00)( jω + 0))( jω + 0000) = ( jω + 0)( jω + 0000) 0 ( jω + 000)(( jω) + 00)( jω + )) 0 ( jω + 000)( jω + ) Then, we convert it to the normal form: H(ω) = 0 ( jω jω 0 + )( ( jω 000 0000 + ) + )( jω + ) 20 H(ω) (db) 0 0 0 20 0 H(ω)( ) 45 0 2 0 0 0 0 0 2 0 3 0 4 0 5 0 6 ω 2. RLC Circuit In this question, we will take a look at an electrical systems described by second order differential equations and analyze it using the phasor domain. Consider the circuit below where V s is a sinusoidal signal, L = mh, and C = nf: R + V R L + V L + V s V C C (a) Transform the circuit into the phasor domain. Z R = R Z L = jωl Z C = jωc EECS 6B, Fall 208, Discussion 5A
(b) Solve for the transfer function H C (ω) = ṼC Ṽs in terms of R, L, and C. Ṽ C is a voltage divider where the output voltage is taken across the capacitor. Ṽ C = H C (ω) = Z C Ṽ s Z R + Z L + Z C Z C jωc = Z R + Z L + Z C R + jωl + jωc Multiplying the numerator and denominator by jωc gives H C (ω) = ( jω) 2 LC + jωrc + (c) Solve for the transfer function H L (ω) = ṼL Ṽs in terms of R, L, and C. Ṽ L is a voltage divider where the output voltage is taken across the inductor. Z L Ṽ L = Ṽ s Z R + Z L + Z C Z L jωl H L (ω) = = Z R + Z L + Z C R + jωl + jωc Multiplying the numerator and denominator by jωc gives H L (ω) = ( jω) 2 LC ( jω) 2 LC + jωrc + (d) Solve for the transfer function H R (ω) = ṼR Ṽs in terms of R, L, and C. Ṽ R is a voltage divider where the output voltage is taken across the resistor. Z R Ṽ R = Ṽ s Z R + Z L + Z C Z R R H R (ω) = = Z R + Z L + Z C R + jωl + jωc Multiplying the numerator and denominator by jωc gives H R (ω) = (e) Sketch the bode plot for H C. Let R = 2kΩ. jωrc ( jω) 2 LC + jωrc + From part (a) we have, H C (ω) = ( jω) 2 LC + ( jω)rc + = 0 2 ( jω) 2 + 2 0 6 ( jω) + = ( jω) 2 2( jω) + + (0 6 ) 2 0 6 EECS 6B, Fall 208, Discussion 5A 2
Hence, we have two poles at ω p = 0 6 and ζ =, and hence we will have a 40 db/dec drop off at ω p. With these parameters, we have the following plot: s EECS 6B, Fall 208, Discussion 5A 3
EECS 6B, Fall 208, Discussion 5A 4
Figure 4: Bode Plot Cheat Sheet EECS 6B, Fall 208, Discussion 5A 5