## Quadrature Mixers

### Use RF Blockset Equivalent Baseband Software to Model Quadrature Mixers

RF Blockset™ software lets you model upconversion and downconversion quadrature mixers using Physical blocks. These mixers convert a complex baseband signal up to and down from the desired carrier frequency by mixing the real and imaginary parts of the signal with a cosine and sine of the same frequency.

### Model Upconversion I/Q Mixers

You use the Input Port block to model the upconversion of in-phase/quadrature baseband signals to modulated signals at a finite real carrier frequency. The real component of the block input represents the in-phase signal. The imaginary component of the block input represents the quadrature signal.

To model a perfect quadrature upconversion mixer, use the Input
Port block with the **Center frequency (Hz)** parameter
set to the carrier frequency.

To model an imperfect quadrature upconversion mixer, use the Input Port block with the
**Center frequency (Hz)** parameter set to the carrier
frequency. Follow this block immediately by a mixer block with the **LO
frequency (Hz)** parameter set to `0`

. Specify
imperfections as follows:

S-parameters — Use S-parameters to specify imperfections such as frequency response. For a mixer, S

_{21}describes the conversion gain, as explained in the Network Parameters section of the reference page for each mixer block. Use purely real and purely imaginary S_{21}parameters to represent multiplying the input signal by a pure cosine and a pure sine, respectively. Use a complex S_{21}parameter to represent multiplying the input signal by a combination of sine and cosine.Thermal noise — Use thermal noise to specify temperature-dependent random noise.

Phase noise — Use the phase noise to specify noise to add to the angle component of the input signal.

Nonlinearity — Use nonlinearity (specified as output power and phase as a function of input power and frequency in an AMP file or as third-order intercept point) to specify nonlinear mixer behavior as a function of input power.

**Note**

If you specify a nonzero value for the local oscillator frequency
of the mixer and set the **Type** parameter to `Upconverter`

,
the blockset converts the signal to a frequency above the center frequency.
The final IF value is the sum of the Input Port center frequency and
the mixer local oscillator frequency.

### Model Downconversion I/Q Mixers

You use the Output Port block to model the downconversion of in-phase/quadrature modulated carrier signals to baseband signals. The real component of the block output represents the in-phase signal. The imaginary component of the block output represents the quadrature signal.

The finite real carrier frequency is set automatically as the sum of the center frequency of the Input Port block and the LO frequencies in any mixer blocks in the cascade.

**Note**

In the cascade, upconversion mixers increase the carrier frequency and downconversion mixers decrease the carrier frequency.

The Output Port block models a perfect quadrature downconversion mixer. To model an imperfect
quadrature downconversion mixer, precede the Output Port block immediately by a
mixer block with the **LO frequency (Hz)** parameter set to
`0`

. Specify imperfections as follows:

S-parameters — Use S-parameters to specify imperfections such as frequency response. For a mixer, S

_{21}describes the conversion gain, as explained in the Network Parameters section of the reference page for each mixer block. Use purely real and purely imaginary S_{21}parameters to represent multiplying the input signal by a pure cosine and a pure sine, respectively. Use a complex S_{21}parameter to represent multiplying the input signal by a combination of sine and cosine.Thermal noise — Use thermal noise to specify temperature-dependent random noise.

Phase noise — Use the phase noise to specify noise to add to the angle component of the input signal.

Nonlinearity — Use nonlinearity (specified as output power and phase as a function of input power and frequency in an AMP file or as third-order intercept point) to specify nonlinear mixer behavior as a function of input power.

**Note**

The mixer output frequency must be positive. This means that
if you choose a downconverting mixer, the input carrier frequency *f _{in}* must
be greater than the local oscillator frequency

*f*. Otherwise, an error appears.

_{lo}### Simulate I/Q Mixers

When you model an I/Q mixer in the blockset, the center frequency you specify in the Input Port block dialog is only used to build a complex-baseband equivalent model of the cascade that represents the mixer. The blockset simulates this model using a fixed time step equal to the sample time that you specify in the Input Port block dialog box.

To examine the model in the Simulink^{®} window:

Click

**Modeling**>**Compile Diagram**>**Update Model**to update the model diagram.Right-click the Output Port block and select

**Mask**>**Look Under Mask**.

For more information on baseband-equivalent modeling, see Model RF Components.