This example shows how to use the SimRF™ Circuit Envelope library to run a two-tone experiment that measures the second- and third-order intercept points of an amplifier. The model computes the intercept points of the amplifier from the modulated signal power measured on each carrier, verifying the behavior of the SimRF system.
The system consists of:
Two complex voltage sources connected in series. The first voltage source is modeled with Simulink® blocks, and the second with blocks from the SimRF circuit envelope library. In the Simulink Source subsystem, two series Sine Wave blocks model in-phase and quadrature components of the first tone. An Inport block assigns the Simulink signal to the carrier
fc1. In the SimRF Source subsystem, two series Sinusoid blocks model in-phase and quadrature voltage signals that modulate the carrier
A resistor modeling the voltage source impedance.
An amplifier with input impedance, output impedance specified in the Main tab; output IP2, and output IP3 specified in the Nonlinearity tab.
An Outport block that probes the output voltage of the amplifier across a shunt Resistor block. The ordering of the output signals is determined by the ordering of the carriers specified in the Outport block dialog.
The example model defines variables for block parameters using a callback function. To access model callbacks, select File > Model Properties > Model Properties and click the Callbacks tab in the Model Properties window.
Running the Example
open_system('simrfV2_carriers') at the Command Window prompt.
Select Simulation > Run.
Output power and amplifier output intercept points are displayed on the right side of the model. The Calculate Power subsystem computes the power in dBm of each intermodulation product using a running root-mean-square (RMS) average.
Modeling Nonlinear SimRF Components
To model nonlinearities in the SimRF circuit envelope environment:
Place an Amplifier or Mixer block in your model.
Specify parameters that generate nonlinearities, such as IP2 and IP3, taking care to specify the convention or specify a polynomial directly in the Nonlinearity tab of the block dialog.
Specify any additional carrier frequencies for simulation in the Configuration block. In this example, the Configuration block specifies a total of forty nine frequencies :
fc2, as the Fundamental Tones of the input signals; a Harmonic Order of 3 for each tone resulting in a complete set of second, third, fourth-order intermodulation products(second and third-order harmonic products included), and a partial set of fifth and sixth-order intermodulation products.
In order to calculate the power level of each envelope, the measured voltage signals are scaled with the inverse of the square root of the characteristic impedance. An additional scaling of
1/sqrt(2) in the Calculate Power subsystem normalizes the complex-valued output signal.