Documentation Center

  • Trial Software
  • Product Updates

Filter Mixing Products

This section of the tutorial shows you how to:

  • Configure a SimRF Outport block to probe multiple carrier frequencies simultaneously.

  • Model an analog filter in the SimRF™ environment using SimRF Capacitor and Inductor blocks.

The preceding figure illustrates low-pass filtering of a low-side injection system. Mixing fRF and fLO produces signals on the carriers fIF = fRF – fLO and fRF + fLO. Adding a low-pass filter to the model reduces the power present in the high-frequency signal.

To begin, open the model that you created in the Model an RF Mixer section, or at MATLAB® command line, enter:

addpath(fullfile(docroot,'toolbox','simrf','examples'))
ex_simrf_tut_mixer

at the Command Window prompt.

Probe Multiple RF Carriers

The SimRF environment specifies the carriers fRF – fLO, fRF, fLO, and fRF + fLO, but the SimRF Outport block probes only the carrier fRF – fLO. Examine the carriers fRF – fLO and fRF + fLO by changing the model according to the following workflow:

  1. From the Simulink® Commonly Used Blocks library, add a Demux block to your model.

  2. In the Scope block dialog box, click the Parameters button, then set Number of Axes to 2.

  3. In the Outport block dialog box, set Carrier frequencies to [RFCarrier - LOFrequency, RFCarrier + LOFrequency]

  4. Connect the blocks as shown in the following figure.

  5. Select Simulation > Run to run the model.

To view the results of the simulation, double-click the scope.

The first set of axes displays the modulation of specified carrier fIF = fRF – fLO. This carrier appears on the first set of axes because the Carrier frequencies parameter of the outport specifies it first. The second set of axes displays the modulation at fRF + fLO. The modulation of the upper mixing product has the same amplitude as the modulation of the downconverted signal.

Model an RF Filter

To begin, open the model that you created in the Probe Multiple RF Carriers section, or at MATLAB command line, enter:

addpath(fullfile(docroot,'toolbox','simrf','examples'))
ex_simrf_tut_probe

at the MATLAB Command Window prompt.

  1. From the Elements library, drag and drop one Capacitor and two Inductor blocks onto your model

  2. Set the Capacitance parameter of the capacitor to 40e-12 F.

  3. Set the Inductance parameter of both inductors to 50e-9 H.

  4. Connect the blocks as shown in the following figure.

    This configuration models a third-order low-pass Butterworth filter with a cutoff frequency of 1 rad/ns, or about 0.159 GHz. The high-frequency mixing product is in the stopband of the filter. The low-frequency product is in the passband.

    You can also use an LC Ladder block to model this filter.

Simulate Filtering of RF Signals

To begin, open the model that you created in the previous section, Model an RF Filter, or at MATLAB command line, enter:

addpath(fullfile(docroot,'toolbox','simrf','examples'))
ex_simrf_tut_filter

at the MATLAB Command Window prompt. Select Simulation > Run to run the model.

To view the results of the simulation, double-click the scope.

The filter attenuates the high-frequency signal at fRF + fLO and transmits the signal at fRF – fLO with minimal loss.

The SimRF documentation contains additional RF filter analysis and simulation examples:

such as

Improve Performance by Reducing Total Simulation Frequencies

The models in the preceding examples use the Automatically select fundamental tones and harmonic order setting in the Configuration block. This setting sacrifices performance for compatibility by guaranteeing that every specified Carrier Frequency parameter appears in the set of SimRF simulation frequencies. The performance of the ex_simrf_tut_filter can be improved by reducing the size of the set of simulation frequencies, as measured by the Total simulation frequencies value displayed in the Configuration block dialog.

To enhance performance of the ex_simrf_tut_filter model, follow the procedure below.

  1. Open and simulate the ex_simrf_tut_filter model.

    At the MATLAB command line, enter:

    addpath(fullfile(docroot,'toolbox','simrf','examples'))
    ex_simrf_tut_filter
  2. Double-click the Configuration block to open the block dialog box. Note that the block dialog displays a Total simulation frequencies value of 121. This value indicates that the environment is running 121 separate simulations.

  3. Clear the Automatically select fundamental tones and harmonic order check box.

  4. Set Fundamental tones to [RFCarrier, LOFrequency]. This step is not strictly necessary, but setting these values clarifies the meaning of the parameters. Because the mixer has fRF and fLO at its input ports, all signals at the output of the mixer have carrier frequencies that are linear combinations of these fundamental tones.

  5. Set Harmonic order to 1. The frequencies fRF + fLO and fRF – fLO are the only output carriers of interest. Modeling signals at a higher harmonic order than one is not necessary for this system.

  6. Click Apply. Note that the block dialog displays a Total simulation frequencies value of 9.

  7. Simulate the model.

The result of the simulation has not changed because every frequency of importance appears in the new set of simulation frequencies. However, this procedure reduces overall compatibility. If you make modifications to the model, such as adding nonlinear amplification, the resulting signals of interest may not appear in the set of simulation frequencies. You can restore compatibility by restoring the Automatically select fundamental tones and harmonic order check box to its default.

Was this topic helpful?