Analyze gain, noise figure, IP2, and IP3 of cascaded RF elements and export to RF Blockset
The RF Budget Analyzer app analyzes the gain, noise figure, and nonlinearity of proposed RF system architecture.
Using this app, you can:
Build a cascade of RF elements.
Calculate the per-stage and cascade output power, gain, noise figure, SNR, and IP3 of the system.
Compute nonlinear effects such as output power, IP2, NF, and SNR using harmonic balance analysis.
Plot rfbudget
results across bandwidths and over stages.
Plot S-parameters of the RF System on a Smith chart and a polar plot.
Plot magnitude, phase and real, and imaginary parts of S-parameters of the RF System and over stages.
Export per-stage and cascade values to the MATLAB® workspace.
Export the system design to RF Blockset™ for simulation.
Export the system design to the RF Blockset Testbench as a device under test (DUT) subsystem and verify the results using simulation.
Visualize budget results and S-parameters over stages and frequencies.
Compare Friis and harmonic balance budget results.
The app toolstrip contains these nonlinear elements that you can use to create an RF system:
Amplifier
Modulator
Demodulator
Generic
The app toolstrip contains these linear elements that you can use to create an RF system:
S-Parameters
Transmission Line
Filter
The app toolstrip contains these templates that you can use to design a transmitter or a receiver system:
Receiver
Transmitter
MATLAB Toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon.
MATLAB command prompt: Enter rfBudgetAnalyzer
.
Design and analyze an RF transmitter using the RF Budget Analyzer app.
Enter rfBudgetAnalyzer
to open the app.
Use the Transmitter template to create a basic transmitter.
The transmitter template is displayed as follows.
In System Parameters, specify the RF transmitter requirements:
Input Frequency — 815
MHz
Available Input Power — 0
dBm
Signal Bandwidth — 100
MHz
Click the IFAmplifier
in the design canvas. Delete it using the Delete Element button on the toolstrip.
Add a Generic element in the place of the IFAmplifier
using the toolstrip. In the Element Parameters pane, specify:
Name — IFFilter
Available Power Gain — -3.6
dB
Select Apply.
Click the Modulator element. In the Element Parameters pane, specify:
Name — Mixer
Available Power Gain — -6.5
dB
OIP3 — 11.5
dBm
LO Frequency — 4.97
GHz
Converter Type — Up
Select Apply.
Delete the S-Parameters element named BandpassFilter
. Add a Generic element. In the Element Parameters pane, specify:
Name — RFFilter1
Available Power Gain — -1.4
dB
Select Apply.
Select the PowerAmplifier
element and in the Element Parameters pane, specify:
Name — PowerAmplifier1
Available Power Gain — 20
dB
OIP3 — 43
dBm
Select Apply.
Add another Amplifier element using the toolstrip. In the Element Parameters pane, specify:
Name — PowerAmplifier2
Available Power Gain — 20
dB
OIP3 — 43
dBm
Select Apply.
Add another Generic element. In the Element Parameters pane, specify:
Name — RFFilter2
Available Power Gain — -1.4
dB
Select Apply.
Save the system. The app saves the system in a MAT file.
Plot the output power of the transmitter using the 3D Plot button. Select 3D Plot and choose Output Power - Pout
.
Design and analyze an RF receiver using the RF Budget Analyzer app.
Enter rfBudgetAnalyzer
to open the app.
Use the Receiver template option to create a basic receiver.
The receiver template is displayed as follows:
In System Parameters, specify the RF receiver requirements:
Input Frequency — 5.745
MHz
Available Input Power — -65
dBm
Signal Bandwidth — 100
MHz
Click RFFilter
in the design canvas. This RFFilter
is an S-parameters element. It accepts a Touchstone® file in the S2P file type. Update the Element parameters pane as follows:
Name: BandpassFilter
S2P file: Choose an S2P file by clicking the Browse button.
Select Apply.
Click the RFAmplifier
element. In the Element Parameters pane, specify the element requirements:
Name — LNA1
Available Power Gain — 12
dB
OIP3 — 20
dBm
Select Apply.
Add another Amplifier element using the toolstrip. In the Element Parameters pane, specify the element requirements:
Name — LNA2
Available Power Gain — 12
dB
OIP3 — 20
dBm
Select Apply.
Add a Generic element. In the Element Parameters pane, specify the element requirements:
Name — IRFilter
Available Power Gain — -4.05
dB
Select Apply.
Click the Demodulator
element. In the Element Parameters pane, specify the element requirements:
Name — Mixer
Available Power Gain — -6.5
dB
OIP3 — 11.5
dBm
LO Frequency — 4.93
GHz
Converter Type — Down
Select Apply.
Delete the IFFilter
, S-parameters element. Add a Generic element in its place. In the Element Parameters pane, specify the element requirements:
Name — CSFilter
Available Power Gain — -9.55
dB
Select Apply.
Click the IFAmplifier
element. In the Element Parameters pane, specify the element requirements:
Name — PowerAmp1
Available Power Gain — 16
dB
OIP3 — 26
dBm
Select Apply.
Add two more Amplifier elements. For each element, in the Element Parameters panes specify the element requirements:
Name — PowerAmp2
| PowerAmp3
Available Power Gain — 16
dB | 20
dB
OIP3 — 26
dBm | 33
dBm
Select Apply.
Save the system. The app saves the system in a MAT file.
Plot the output OIP3 of the receiver using the 3D Plot button. Select the 3D Plot button and choose Output Third-Order Intercept Point - OIP3
.
Create an amplifier with a gain of 4 dB.
a = amplifier('Gain',4);
Create a modulator with an OIP3 of 13 dBm.
m = modulator('OIP3',13);
Create an nport
using passive.s2p
.
n = nport('passive.s2p');
Create an RF element with a gain of 10 dB.
r = rfelement('Gain',10);
Calculate the rfbudget
of a series of RF elements at an input frequency of 2.1 GHz, an available input power of -30 dBm, and a bandwidth of 10 MHz.
b = rfbudget([a m r n],2.1e9,-30,10e6);
Run this command in the command window, to open the system in RF Budget Analyzer app.
show(b)
Set OIP2 value of Amplifier
to 60
dBm using Elements Parameters pane and select Apply. In System Parameters section, set the Available Input Power to 50
dBm and run harmonic balance analysis using HB-Analyze button.
The results are displayed as shown below.
Select Auto-Analyze checkbox to automatically recompute the harmonic balance analysis calculations.
Set OIP2 value of RFelement
as 50
dBm using Elements Parameters pane and select Apply.
Select Compare View checkbox in the Results pane to compare the calculated Friis and harmonic balance solver results. You can use Select Results drop-down from the Results pane to filter the results and to compare between Friis and harmonic balance solver.
Design an input matching network for a two-stage amplifier using the Transmission Line element in the RF Budget Analyzer app.
Enter rfBudgetAnalyzer
to open the app.
In System Parameters, specify the requirements:
Input Frequency — 2.45
GHz
Available Input Power — 0
dBm
Signal Bandwidth — 2
GHz
Add two Transmission Line elements. In the Element Parameters pane, specify:
Name — Microstrip1
| Microstrip2
Type — microstrip
| microstrip
Width — 0.0034173
| 0.0034173
meters
Height — 0.001524
| 0.001524
meters
Thickness — 3.5e-06
| 3.5e-06
meters
EpsilonR — 3.48
| 3.48
LossTangent — 0.0037
| 0.0037
meters
SigmaCond — Inf
| Inf
S/m
LineLength — 0.0089
| 0.0147
meters
StubMode — Shunt
| NotAStub
Termination — Open
Select Apply.
Add two S-Parameters elements. In the Element Parameters pane, specify:
Name — Sparams1
| Sparams2
Load the Touchstone® file (f551432p.s2p
) to the S-Parameters elements provided in this example and select Apply.
Plot the input reflection coefficient of the system using the 3D Plot button. Select the 3D Plot button, choose S-Parameters
and select S11
.
Design an RF system and plot S-parameters, output power, and transducer gain using RF Budget Analyzer app.
Enter rfBudgetAnalyzer
to open the app.
In System Parameters, specify the requirements:
Input Frequency — 2.1
GHz
Available Input Power — -30
dBm
Signal Bandwidth — 45
MHz
Add a S-Parameters element. In the Element Parameters, specify:
Name — RFBandpassFilter
Load the Touchstone® file (RFBudget_RF.s2p
) to the S-Parameters element provided in this example and select Apply.
Add an Amplifier element. In the Element Parameters, specify:
Name — RFAmplifier
Available Power Gain — 11.53
dB
NF — 1.53
dB
OIP3 — 35
dBm
Select Apply.
Add the Demodulator element. In the Element Parameters, specify:
Name — Demodulator
Available Power Gain — -6
dB
NF — 4
dB
OIP3 — 50
dBm
LO Frequency — 2.03
GHz
Converter Type — Down
Select Apply.
Add another S-Parameters element. In the Element Parameters, specify:
Name — IFBandpassFilter
Load the Touchstone file (RFBudget_IF.s2p
) to the S-Parameters element provided in this example and select Apply.
Add another Amplifier element. In the Element Parameters, specify:
Name — IFAmplifier
Available Power Gain — 30
dB
NF — 8
dB
OIP3 — 37
dBm
Select Apply.
Save the system. The app saves the system in a MAT file.
Select S-Parameters Plot button. This allows you to plot Smith® chart, polar plot, magnitude, phase and real, and imaginary parts of S-parameters of the RF System and over stages.
Set the Plot Bandwidth to 75
and Resolution to 250
under Plots section.
The S-parameters data is displayed as follows.
Select Phase (deg)
from the drop-down menu of XY Plot in S-Parameters pane to plot the phase of the S21.
The phase plot is displayed as shown.
Plot the output power of the RF system using the 2D Plot button. Select 2D Plot button and choose Output Power - Pout.
2-D output power is displayed.
Plot the transducer gain of the RF system using the 2D Plot button. Select 2D Plot button and choose Transducer Gain - GainT.
rfBudgetAnalyzer
rfBudgetAnalyzer
opens the RF Budget Analyzer app to analyze
the per-stage and total gain, noise figure, and nonlinearity (IP3) of an RF
system.
rfBudgetAnalyzer(rfsystem)
rfBudgetAnalyzer(rfsystem)
opens an RF system saved using the RF
Budget Analyzer app. rfsystem
is a MAT file.
The RF Budget Analyzer app accepts 0
Hz as
Input Frequency for a system. You can set the
Input Frequency in the System
Parameters section.
The RF Budget Analyzer app does not accept 0
Hz
as LO Frequency. This is applicable to
Modulator and Demodulator
elements.
In the Filter Element pane, when you set the
Filter Type to 'InverseChebyshev'
,
you can only use the 'Transfer function'
implementation.
The output frequencies are always positive.
[1] Pozar, David M. Microwave Engineering. 4th ed. Hoboken, NJ: Wiley, 2012.
You have a modified version of this example. Do you want to open this example with your edits?