Main Content

rfplot

Plot cumulative RF budget result vs. cascade input frequency and amplifier power characteristics

Description

rfplot(rfobj) plots the magnitude response of S-Parameters, S21 for the cascaded budget object, rfobj.

rfplot(rfobj,rfpara) plots the RF budget result specified by RF parameters rfpara versus a range of input frequencies. The input frequencies are applied to the cascade of elements in the RF budget object, rfobj.

Cumulative (that is, terminated subcascade) results are automatically computed to show the variation of the RF budget result through the entire design.

example

rfplot(rfobj,m,n) plots the magnitude response of S-Parameters, Smn (S11, S12, S21 , or S22) for the cascaded budget object, rfobj.

rfplot(amp,freq) plots the amplifier power characteristics at the operating frequency, specified in freq. (since R2023a)

example

rfplot(ax,___) plots the cumulative RF budget result or amplifier power characteristics (since R2023a) on the axes specified in ax instead of the current axes. Specify ax as the first input argument followed by any of the input arguments in the previous syntaxes. Return the current axes using the gca function.

Examples

collapse all

Create an RF system.

Create an RF bandpass filter using the Touchstone® file RFBudget_RF.

f1 = nport('RFBudget_RF.s2p','RFBandpassFilter');

Create an amplifier with a gain of 11.53 dB, a noise figure (NF) of 1.53 dB, and an output third-order intercept (OIP3) of 35 dBm.

a1 = amplifier(Name='RFAmplifier',Gain=11.53,NF=1.53,OIP3=35);

Create a demodulator with a gain of –6 dB, a NF of 4 dB, and an OIP3 of 50 dBm.

d = modulator(Name='Demodulator',Gain=-6,NF=4,OIP3=50, ...
        LO=2.03e9,ConverterType='Down');

Create an IF bandpass filter using the Touchstone file RFBudget_IF.

f2 = nport('RFBudget_IF.s2p','IFBandpassFilter');

Create an amplifier with a gain of 30 dB, a NF of 8 dB, and an OIP3 of 37 dBm.

a2 = amplifier(Name='IFAmplifier',Gain=30,NF=8,OIP3=37);

Calculate the RF budget of the system using an input frequency of 2.1 GHz, an input power of –30 dBm, and a bandwidth of 45 MHz.

b = rfbudget([f1 a1 d f2 a2],2.1e9,-30,45e6)
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 the available output power.

rfplot(b,'Pout')
view(90,0)

Figure Pout contains an axes object. The axes object with title Output Power Friis Analysis, xlabel Cascade, ylabel Input Frequency (GHz) contains 5 objects of type line. These objects represent 1..1, 1..2, 1..3, 1..4, 1..5.

Plot the transducer gain.

rfplot(b,'GainT')
view(90,0)

Figure GainT contains an axes object. The axes object with title Transducer Gain Friis Analysis, xlabel Cascade, ylabel Input Frequency (GHz) contains 5 objects of type line. These objects represent 1..1, 1..2, 1..3, 1..4, 1..5.

Plot S-parameters of an RF system on a Smith Chart and a Polar plot.

s = smithplot(b,1,1,'GridType','ZY'); 

Figure s11 contains an axes object. The hidden axes object contains 6 objects of type line, text. These objects represent 1..1 , 1..2 , 1..3 , 1..4 , 1..5 .

p = polar(b,2,1); 

Figure s21 contains an axes object. The hidden axes object contains 6 objects of type line, text. These objects represent 1..1 Ⓐ , 1..2 , 1..3 , 1..4 , 1..5 .

Create an RF bandpass filter using the Touchstone® file RFBudget_RF.

f1 = nport('RFBudget_RF.s2p','RFBandpassFilter');

Create an amplifier with a gain of 11.53 dB, a noise figure (NF) of 1.53 dB, and an output third-order intercept (OIP3) of 35 dBm.

a1 = amplifier(Name='RFAmplifier',Gain=11.53,NF=1.53,OIP3=35);

Create a demodulator with a gain of –6 dB, a NF of 4 dB, and an OIP3 of 50 dBm.

d = modulator(Name='Demodulator',Gain=-6,NF=4,OIP3=50, ...
        LO=2.03e9,ConverterType='Down');

Create an IF bandpass filter using the Touchstone file RFBudget_IF.

f2 = nport('RFBudget_IF.s2p','IFBandpassFilter');

Create an amplifier with a gain of 30 dB, a NF of 8 dB, and an OIP3 of 37 dBm.

a2 = amplifier(Name='IFAmplifier',Gain=30,NF=8,OIP3=37);

Calculate the RF budget of the system using an input frequency of 2.1 GHz, an input power of –30 dBm, and a bandwidth of 45 MHz.

b = rfbudget([f1 a1 d f2 a2],2.1e9,-30,45e6);

Show the analysis in the RF plot.

rfplot(b)

Figure Sparameters contains an axes object and another object of type uitoolbar. The axes object with title s21 Friis Analysis, xlabel Cascade, ylabel Input Frequency (GHz) contains 5 objects of type line. These objects represent 1..1, 1..2, 1..3, 1..4, 1..5.

Group Delay

To plot the group delay, first plot the S11 data for the RF System.

rfplot(b,1,1)

Figure Sparameters contains an axes object and another object of type uitoolbar. The axes object with title s11 Friis Analysis, xlabel Cascade, ylabel Input Frequency (GHz) contains 5 objects of type line. These objects represent 1..1, 1..2, 1..3, 1..4, 1..5.

Use the Group Delay option on the plot graph to plot the group delay of the RF system.

groupdelayrf.png

Phase Delay

Use the Phase Delay option on the plot graph to plot the phase delay of the RF System.

phasedelayrf.png

Since R2023a

Create an amplifier object.

amp = amplifier;

Plot the amplifier power characteristics at 2.1 GHz.

rfplot(amp,2.1e9)

Set OIP3 of amplifier to 25 dBm.

amp.OIP3 = 25;

Plot the amplifier power characteristics at 2.1 GHz with nonlinearity.

rfplot(amp,2.1e9)

Figure Amplifier contains 2 axes objects. Axes object 1 with title Power Characteristics - Amplifier, xlabel P_i_n (dBm), ylabel P_o_u_t (dBm) contains 2 objects of type line. These objects represent Cubic term is zero, Linear Gain. Axes object 2 with title Power Characteristics - Amplifier, xlabel P_i_n (dBm), ylabel P_o_u_t (dBm) contains 21 objects of type line, text. These objects represent Amplifier C-E, Amplifier Ideal, Linear Gain, 3rd Harmonic.

Plot the amplifier power characteristics on the axes specified in ax instead of the current axes.

f = figure;
ax = axes(f);
rfplot(ax,amp,2.1e9)

Figure contains an axes object. The axes object with title Power Characteristics - Amplifier, xlabel P_i_n (dBm), ylabel P_o_u_t (dBm) contains 21 objects of type line, text. These objects represent Amplifier C-E, Amplifier Ideal, Linear Gain, 3rd Harmonic.

Input Arguments

collapse all

RF budget object, specified as a rfbudget object.

Example: rfplot(rfobj,'Pout')

RF parameters, specified as one of the following:

  • 'Pout' — Available output power (dBm)

  • 'GainT' — Transducer gain (dB)

  • 'NF'— Noise Figure (dB)

  • 'OIP3' - Output Third-Order Intercept (dBm)

  • 'IIP3' — Input Third-Order Intercept (dBm)

  • 'SNR' — Signal-to-Noise Ratio (dB)

  • 'Sparameters' — S - parameters S21 magnitude response (dB)

  • 'OneTone' — One-tone analysis (since R2023b)

  • 'TwoTone' — Two-tone analysis (since R2023b)

Note

To plot one- and two-tone analysis results, you must compute robj using the harmonic balance solver. (since R2023b)

Example: rfplot(rfobj,'Pout')

Since R2023a

Amplifier object, specified as an amplifier object.

Since R2023a

Operating frequency, specified as a positive scalar.

Axes object, specified as an axes or a uiaxes object.

Version History

Introduced in R2017b

expand all