# Perform Frequency Planning to Find Spur-Free IF Bandwidths

This example shows you how find spur-free IF bandwidths of a mixer. In this example, you wiil:

• Perform frequency planning to identify spur-free intermediate frequencies (IF) bandwidths.

• Visualize the mixer spurs to observe the effect of interference when selecting the desired IF.

• Export the cascaded mixer chain to the RF Budget Analyzer app and vary the IF and RF bandwidths to analyze the budget output.

Frequency planning in mixers involves the careful selection and arrangement of input and output frequencies to ensure optimal performance. This process aims to minimize interference, spurious signals, and other undesirable effects that can arise due to the mixing of frequencies within the mixer circuit. By strategically planning the which frequencies to use within the mixer, engineers can mitigate issues and optimize the desired output signals.

### Define Mixer Configuration

This example considers a dual-conversion receiver operating in the 5275 to 5525 MHz band, as depicted in the figure. To find a spur-free IF for this receiver, the receiver must be down-converted to dual IF bands. To find an IF center frequency that is spur-free for all IF bands, specify the RF center frequency, the RF bandwidth, and the IF bandwidth that correspond with the input RF signal.

Define the RF center frequency for mixer 1.

`RFCF1 = 5400e6;`

Define the RF bandwidth (RFBW) and IF bandwidth (IFBW) of the mixer 1.` `

```RFBW1 = 250e6; IFBW1 = 50e6;```

Define the RFBW and IFBW of the mixer 2.

```RFBW2 = 150e6; IFBW2 = 25e6;```

Specify the IMT measured data for each RF band.

```IMT1 = [99 0 21 17 26; 11 0 29 29 63; 60 48 70 86 41; 90 89 74 68 87; 99 99 95 99 99]; IMT2 = [99 1 9 12 15; 20 0 26 31 48; 55 70 51 70 53; 85 90 60 70 94; 96 95 94 93 92];```

Assign the IMT data to mixers by using the `mixerIMT` object.

```mixer1 = mixerIMT("ConverterType","Down","IMT",IMT1); mixer2 = mixerIMT("ConverterType","Down","IMT",IMT2);```

#### Perform Frequency Planning for First Mixer Element

Plot frequency planning output of the first mixer with 250 MHz as the RFBW and 50 MHz as the IFBW. The plot displays the spur-free regions or frequency bands from which you can select the IF.

```rfplot(mixer1,'Frequency',RFCF1,'RFBW',RFBW1,'IFBW',IFBW1) xlim([0.1 2]*1e9) % X-limit is set to 2 GHz```

Select an IF frequency from the frequency planning graph that falls within the spur-free zones. This example presents two cases: one where you select a signal that does not fall in the spur-free zones and visualize the interference effect on the desired signal, and another where you select a signal from the in spur-free zones and visualize the interference free desired signal.

#### Case 1: Selected Signal Lies Outside Spur-Free Zone

Consider an IF of 1350 MHz that falls that does not fall in the spur-free zones. This IF value implies an LO1 of as 4050 MHz assuming a low-side injection.

Given this data, plot the mixer spurs using `rfplot` function.

```mixer1.LO = 4050e6; rfplot(mixer1,'Frequency',RFCF1) ylim([-100 0])```

This plot shows that selecting an IF that does not fall in the spur-free zone results in interference from spurs affecting the desired signal.

#### Case 2: Selected Signal Lies Within Spur-Free Zone

Considering a low-side injection mixer, this example selects an IF of 1600 MHz for mixer 1, resulting in an LO frequency of 3800 MHz.

Plot the mixer spur graph for mixer 1 with LO frequency set to 3800 MHz . This plot locates the signals and spurs in power (dBm) versus frequency (GHz).

```mixer1.LO = 3800e6; rfplot(mixer1,'Frequency',RFCF1) ylim([-100 0])```

This plot shows that the desired signal is free from interference.

#### Perform Frequency Planning for Second Mixer Element` `

Perform frequency planning for the second mixer with an RFBW of 150 MHz and an IFBW of 25 MHz. The RF center frequency of the second mixer is the desired IF of mixer 1, which is 1600 MHz.` `

```rfplot(mixer2,'Frequency',1600e6,'RFBW',RFBW2,'IFBW',IFBW2) xlim([0.1 1]*1e9)```

Provide the IF of the first mixer as an input to the second mixer. Based on the frequency planning plot, select 70 MHz as IF2. This results in 1670 MHz as LO2, and the mixer is down converted.

Visualize the mixer spurs of mixer 2 using the `rfplot` function.

```mixer1.LO = 1670e6; rfplot(mixer2,'Frequency',1600e6) ylim([-100 0])```

The plot shows that the desired signal is free of interference.

### Perform Frequency Planning Using RF Budget Analyzer App

Create the budget object using the `rfbudget` function. Cascade the mixers in series.` `

`b = rfbudget([mixer1,mixer2],RFCF1,-30,RFBW1);`

You can use the RF Budget Analyzer app to perform frequency planning. To export the budget object `b` to the app, type the `show(b)` command in the command line.

```show(b) ```

In the app, set the Input Frequency to 5.4 GHz and set the Signal Bandwidth to 250 MHz. The Signal Bandwidth represents the RFBW of the first mixer. In the Element Parameters pane, click the Plot Frequency Plan button. In the plot tab, set the IFBW to 50e6. If you do not specify IFBW, the app assigns IFBW to Signal Bandwidth.

To visualize the spurs of the mixer 1, in the Element Parameters pane, click the Plot Spurs button.

To set the RFBW of the second mixer, adjust the Signal Bandwidth to 150 MHz in the System Parameter section. Then, select the second mixer element from the Cascade pane, and in the Element Parameters pane, click the Plot Frequency Plan button. In the plot, set the IFBW to 25 MHz and click Enter.