DOC PREVIEW
UK EE 221 - Graphing Transfer Function

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

2.1Graphing Transfer Functions:Graphic presentations of transfer function phases and magnitudes provide insight into the general behavior of the circuit or system for a broad range of inputs. Three ways to generate a transfer function plot:- Enter the transfer function expression in a math program: For these programs you must specify plot range and axis details. The most convenient programs automatically handle complex numbers and have built-in graphics. - Sketch a Bode plot: This can be done by hand and provides a general shape of the transfer function, but does not provide details.- Use a spread sheet program: You must enter the formula for frequency axis values, the magnitude, and phase as a function of  (or f). These programs typically cannot handle complex numbers.To graph a transfer function you must know the range of frequencies, the number of evaluation points, and the nature (scale) of the axes. For the initial range use a log scale on the frequency axis (decade scale). Begin the plot from a decade before the smallest magnitude non-zero pole or zero and end the plot a decade after the largest magnitude pole or zero. You can later change the range if you want to examine a particular part of the graph.2.2Graphing with Matlab:“Matlab” is short for matrix laboratory. This program is primarily designed to handle matrices and vectors (both complex and real) and provided a wide selection of graphics. It comes with large set of functions to easily perform most tasks for engineering with a single command. It is also easy to create your own functions and scripts (programs).Example:Graph the magnitude and phase of the transfer function. Create both a linear scaledplot and a log (base 10) scaled plot.( )H pIVpp p ps   023 24561454% Define range for w% Find poles and zeros:ps = roots([1, 6, (14/5), 4]); % Vector containing polynomial coefficients % ps will be a vector containing the rootszs = roots([(4/5), 0, 0]); % Vector containing polynomial coefficients % zs will be a vector containing the roots% Find maximum magnitude pole and zerofend1 = max(abs(ps)) % fend1 will be the maximum of the magnitudes of ps.2.3fend1 = 5.6288fend2 = max(abs(zs)) % fend2 will be the maximum of the magnitudes of zs.fend2 = 0% Pick out the maximum value between the two (5.6 in this case) round up to% the next decade (which is 10) and increment to next decade (100 in this% case). % Find minimum magnitude pole and zerofbeg1 = min(abs(ps)) % fbeg1 will be the minimum of the magnitudes of ps.fbeg1 = 0.8430fbeg2 = min(abs(zs)) % fbeg2 will be the minimum of the magnitudes of zs.fbeg2 = 0% Pick out the minimum non-zero value between the two (.84 in this case)% round down round down to the next decade (which .1) and decrement to% next decade (.01 in this case). % Now create the w-axis vector with 201 equally spaced point on a log% (base 10) scale:w = logspace(-2, 2, 201); % w is now a vector of points from 10^-2 to 10^2 % Note that the transfer function is computed for p=j*w, therefore assign:p=j*w; % now p is a vector of imaginary numbers (j=sqrt(-1) by default)% Now evaluate the transfer function at all points defined by p:h = (4/5)*p.^2 ./ (p.^3 + 6*p.^2 + (14/5)*p + 4);% Plot magnitude on semilog axis in decibels:2.4figure(1)semilogx(w, 20*log10(abs(h)))grid % Add gridlines to the plotxlabel('Radians per Second') % Add x-axis labelylabel('TF Magnitude in Decibels') % Add y-axis label% Plot phase on semilog axis in degrees:figure(2)semilogx(w, (180/pi)*(angle(h))) % angle return in radians, convert to phase.grid % Add gridlines to the plotxlabel('Radians per Second') % Add x-axis labelylabel('TF Phase in Degrees') % Add y-axis label% To print just type >>print after the graph is displayed and it will send to default% printer10-210-1100101102-100-80-60-40-200Radians per SecondTF Magnitude in Decibels10-210-1100101102-100-50050100150200Radians per SecondTF Phase in Degrees2.5% For the linear plot redefine the range for w, the interesting part looks% like it's between .1 and 20. So create a new w-axis:wl= [0:0.1:20]; % This creates and array of points starting at 0 and % going up to 20 in increments of 0.1p=j*wl;h = (4/5)*p.^2 ./ (p.^3 + 6*p.^2 + (14/5)*p + 4);% Now Create a linear plot for the magnitude:figure(3)plot(wl, abs(h))grid % Add gridlines to the plotxlabel('Radians per Second')% Add x-axis labelylabel('TF Magnitude') % Add y-axis label% Now Create a linear plot for the phase:figure(4)plot(wl, angle(h))grid % Add gridlines to the plotxlabel('Radians per Second') % Add x-axis labelylabel('TF Phase') % Add y-axis label0 5 10 15 2000.050.10.150.20.250.30.35Radians per SecondTF Magnitude0 5 10 15 20-2-101234Radians per SecondTF Phase2.6Bode Plots:Bode Plots of transfer functions use:- a log scale for the frequency axis (can be in Hertz or radians per second) of both magnitude and phase- a decibel (dB) scale for the magnitude2.7- a linear scale for the phase (can be in degrees or radians).The transfer function magnitude represents the amplitude gain between the input and output of the circuit, if either both input and output are voltages, or both input and output are currents. The four possible combinations of input-output ratios are:( )H pVVoi (unitless) ( )H pIIoi (unitless) ( )H pVIoi(Ohms) ( )H pIVoi (Siemens)If the transfer function magnitude is squared, then the values are proportional to the power gain of the system. If Ri denotes the input resistance then: Power at input = I Ri i2 or VRii2Power at output = I Ro o2 or VRoo2Therefore, power gain = P H j R Rg i o ( ) ( )2combination of and Let Ri and Ro be such that their combination scales to unity for the particular transfer function ratio.Definition:A decibel (dB) is a unit of power gain expressed on a log scale as follows:P H j H jg in dB ( 10 2010210log) log( ) 2.8Through proper choice of axes values and scale, a Bode plot can be created on a computer. This was done with the transfer function in the last example.Bode plots are also useful for generating simple sketches of the transfer function due to the dB scale, which converts mulplicative factors to additive terms.Recall logarithmic relationship:log( )( )( )log ( ) log ( ) log ( )p pp p p pp p p p p pzp pz p p     


View Full Document

UK EE 221 - Graphing Transfer Function

Documents in this Course
Filters

Filters

8 pages

Unit 12

Unit 12

13 pages

Load more
Download Graphing Transfer Function
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Graphing Transfer Function and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Graphing Transfer Function 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?