visualizing rf budget analysis over bandwidth -凯发k8网页登录
this example shows how to programmatically perform an rf budget analysis of an rf receiver system and visualize the computed budget results across the bandwidth of the input signal.
first, use , , , and objects to specify the 2-port rf elements in a design. then compute rf budget results by cascading the elements together into an rf system with .
the rfbudget
object enables design exploration and visualization at the matlab® command-line or graphically in the rf budget analyzer app. it also enables automatic rf blockset™ model and measurement testbench generation.
introduction
rf system designers typically begin a design process with budget specifications for the gain, noise figure (nf), and nonlinearity (ip3) of the entire system.
matlab functionality supporting rf budget analysis makes it easy to visualize gain, nf and ip3 results at multiple frequencies throughout the bandwidth of the signal. you can:
programmatically build an
rfbudget
object out of 2-port rf elements.use the command line display of the
rfbudget
object to view single-frequency budget results.vectorize the input frequency of the
rfbudget
object and use matlab plot to visualize rf budget results across the bandwidth of the input signal.
in addition, with an rfbudget
object you can:
use export methods to generate matlab scripts, rf blockset models, or measurement testbenches in simulink®.
use
show
command to copy anrfbudget
object into the rf budget analyzer app.
building elements of rf receiver
a basic rf receiver consists of an rf filter, an rf amplifier, a demodulator, an if filter, and an if amplifier.
first build and parameterize each of the 2-port rf elements. then use rfbudget
to cascade the elements with input frequency 2.1 ghz, input power -30 dbm, and input bandwidth 45 mhz.
f1 = nport('rfbudget_rf.s2p','rfbandpassfilter'); a1 = amplifier('name','rfamplifier', ... 'gain',11.53, ... 'nf',1.53, ... 'oip3',35); d = modulator('name','demodulator', ... 'gain',-6, ... 'nf',4, ... 'oip3',50, ... 'lo',2.03e9, ... 'convertertype','down'); f2 = nport('rfbudget_if.s2p','ifbandpassfilter'); a2 = amplifier('name','ifamplifier', ... 'gain',30, ... 'nf',8, ... 'oip3',37); b = rfbudget('elements',[f1 a1 d f2 a2], ... 'inputfrequency',2.1e9, ... 'availableinputpower',-30, ... 'signalbandwidth',45e6);
visualize rf budget results in matlab
scalar frequency results can be viewed simply by using matlab disp
to see the results at the command line. each column of the budget shows the results of cascading only the elements of the previous columns. note that final column shows the rf budget results of the entire cascade.
disp(b)
rfbudget with properties: elements: [1x5 rf.internal.rfbudget.element] inputfrequency: 2.1 ghz availableinputpower: -30 dbm signalbandwidth: 45 mhz solver: friis autoupdate: true analysis results outputfrequency: (ghz) [ 2.1 2.1 0.07 0.07 0.07] outputpower: (dbm) [-31.53 -20 -26 -27.15 2.847] transducergain: (db) [-1.534 9.996 3.996 2.847 32.85] nf: (db) [ 1.533 3.064 3.377 3.611 7.036] iip2: (dbm) [] oip2: (dbm) [] iip3: (dbm) [ inf 25 24.97 24.97 4.116] oip3: (dbm) [ inf 35 28.97 27.82 36.96] snr: (db) [ 65.91 64.38 64.07 63.83 60.41]
plot rf budget results versus input frequency
use the budget's rfplot
function to produce report-ready plots of cumulative rf budget results versus a range of cascade input frequencies. cumulative (i.e. terminated sub-cascade) results are automatically computed to show the variation of the rf budget result through the entire design. use the data cursor of the figure window to interactively explore values at different frequencies at different stages.
rfplot(b,'pout')
rfplot(b,'gaint')
plot rf budget network parameter results versus input frequency
use the rf budget smithplot/polar
function to produce plots of cumulative rf budget sparameter results versus a range of cascade input frequencies. use smithplot
function to view reflection coefficients and polar to view reflection and transmission coefficients.
smithplot(b,1,1)
polar(b,2,1)
easily export to rf blockset and simulink
the rfbudget
object has other useful matlab methods:
- generate a matlab script that builds the current design
- generate an rf blockset model for simulation
- generate a simulink measurement testbench
visualize rf budget results in app
use the show command to copy a single-frequency rfbudget
object into the rf budget analyzer app. the plot, smith, and polar button in the app, with its pull-down options, calls rfplot
, smithplot
, and polar
respectively.
in the app, the export button copies the current design to an rfbudget
object in the matlab workspace. all of the other export methods of the rf budget object are available through the pulldown options of the export button.
show(b)
automatically create reports from matlab files
if you have written a 'myfile.m'
script that builds your design and visualizes it with rfplot
commands, try the publish('myfile.m')
function at the command line (or click the publish button in the matlab editor). this automatically generates all figures and produces a report for your colleagues, saved as an html file.
to save your design, first undock using the commands shown below and then use the figure toolbar to pulldown the file menu and save using file -> save as and select the save as type to png or pdf. to redock the figure window into the app you can click the dock affordance on the upper right corner of the figure window.
h = findall(0,'type','figure','name','untitled'); set(h,'windowstyle','normal') set(h,'menubar','figure') set(h,'toolbar','auto')