Main Content

Mixer

Model RF and IQ modulator and RF and IQ demodulator with impairments and noise

  • Library:
  • RF Blockset / Idealized Baseband

  • Idealized Baseband Mixer block

Description

The Mixer block models four complex baseband mixers and with impairments and noise. The four mixer types that the block models are Modulator, Demodulator, IQ Modulator, and IQ Demodulator. Impairments include IQ gain and phase mismatch where appropriate, while noise includes both system and LO phase noise.

Note

  • Idealized Baseband library blocks assume input and output ports are matched. For more information on port signal power, see Power Ports and Signal Power Measurement in RF Blockset.

  • Idealized Baseband library blocks are single carrier with assumed carrier frequency value. Therefore the Ideal Baseband Mixer block can produce only a single sideband output.

  • Mixer block mask icons are dynamic and indicate the current set of applied noise parameters. For more information, see Mixer Block Icons.

Ports

Input

expand all

Time-dependent input signal, specified as a real scalar, real column, complex scalar, or complex column. A column represents consecutive time points.

Data Types: double | single

Output

expand all

Time-dependent output signal , returned as a complex scalar or complex column. The size of the output time dependent signal is equal in size to the input time dependent signal.

Data Types: double | single

Parameters

expand all

Main Tab

Mixers available in the Mixer block, specified as one of the following:

  • Modulator

  • Demodulator

  • IQ Modulator

  • IQ Demodulator

For more information, see Mixer Architectures and Design Equations.

Sidebands of the mixer, specified as one of the one of the following:

  • Lower

  • Upper

For more information, see Mixer Sidebands.

Dependencies

To enable this parameter, set Mixer type to Modulator.

Specify whether the mixer baseband input carrier frequency is greater than the mixer LO frequency, specified as a logical.

Dependencies

To enable this parameter, set Mixer type to Modulator and Mixer sideband to Loweror Mixer type to Demodulator.

Conversion gain for the mixer model, specified as a real number in dB.

Type of simulation to run, specified as one of the following:

  • Code generation — Simulate model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is faster than Interpreted execution.

  • Interpreted execution — Simulate model using the MATLAB® interpreter. This option shortens startup time speed, but the speed of the subsequent simulations is slower than Code generation. In this mode, you can debug the source code of the block.

Impairments Tab

LO phase offset, specified as a real number in degrees.

Dependencies

To enable this parameter, set Mixer type to Modulator or Demodulator.

IQ gain imbalance, specified as a nonnegative real numbers in decibels.

Dependencies

To enable this parameter, set Mixer type to IQ Modulator or IQ Demodulator.

IQ phase imbalance, specified as a real number in degrees.

Dependencies

To enable this parameter, set Mixer type to IQ Modulator or IQ Demodulator.

Type of third-order nonlinearity type in the cubic polynomial model, specified as IIP3, OIP3, IP1dB, OP1dB, IPsat, or OPsat.

For more information, see Nonlinearities in Idealized Baseband Mixer Block.

Input third-order intercept point, specified as a real positive number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to IIP3.

Output third-order intercept point, specified as a real positive number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to OIP3.

Input 1 dB compression point, specified as a real positive number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to IP1dB.

Output 1 dB compression point, specified as a real positive number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to OP1dB.

Input saturation point, specified as a real positive number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to IPsat.

Output saturation point, specified as a positive real number in dBm.

Dependencies

To enable this parameter, set Type of Non-Linearity to OPsat.

This button plots the power characteristics based on the value you specify in the Conversion gain (dB) parameter in the Main tab and the Type of Non-Linearity in the Impairments tab. When plotting power characteristics, the block ignores all other impairment values.

For more information, see Plot Power Characteristics.

Noise Tab

Select this parameter to add mixer noise to the input signal. Once you select this parameter, the parameters associated with Include mixer noise are displayed and the mixer components in the block icon are shaded gray.

For more information, see Mixer (System) Noise Simulations.

Type of noise, specified as a Noise temperature, Noise figure, or Noise factor.

For more information, see Mixer (System) Noise Simulations.

Dependencies

To enable this parameter, select Include mixer noise.

Noise temperature to model the mixer noise, specified as a nonnegative real number in kelvin.

Dependencies

To enable this parameter, select Include mixer noise and set Mixer noise type to Noise temperature.

Noise figure to model the mixer noise, specified as a nonnegative real number in decibels.

Dependencies

To enable this parameter, select Include mixer noise and set Mixer noise type to Noise figure.

Noise factor to model mixer noise, specified as a positive integer scalar greater than or equal to 1

Dependencies

To enable this parameter, select Include mixer noise and set Mixer noise type to Noise factor.

Source of initial seed used to prepare the Gaussian random number noise generator, specified as one of the following:

  • Auto — When you set Seed source, mixer noise to Auto, seeds for each mixer instance are generated using a random number generator. The reset method of the instance has no effect.

  • User specified — When you set Seed source, mixer noise to User specified, the value provided in the Seed for mixer noise is used to initialize the random number generator and the reset method resets the random number generator using the Seed for mixer noise property value.

Dependencies

To enable this parameter, select Include mixer noise.

Seed for the random number generator, specified as a nonnegative integer less than 232. Use this value to initialize the random number generator.

Dependencies

To enable this parameter, select Include mixer noise and set the Seed source, mixer noise parameter to User specified.

Select this parameter to add frequency-depended LO phase noise to the LO signal. Once you select this parameter, the parameters associated with the Include phase noise are displayed and the LO source inside the block icon is shaded gray.

For more information, see Phase Noise in Mixer Block.

Phase noise level relative to carrier, specified as negative real scalar or vector in dBc/Hz.

Note

The number of terms listed in the Phase noise level (dBc/Hz) parameter must equal the number of terms in the Frequency offset (Hz) field.

Dependencies

To enable this parameter, select the Include phase noise parameter.

Data Types: double

Specify the frequency offset as a positive real scalar or vector of positive increasing real values of type double in Hz.

Note

The number of terms listed in the Frequency offset (Hz) must equal the number of terms in the Phase noise level (dBc/Hz) field.

Dependencies

To enable this parameter, select the Include phase noise parameter.

Select this parameter to automatically determine number of frequency bins used in a two-sided phase noise spectrum. You can also set the number of frequency bins using the Number of signal samples and Sample rate (Hz) parameters when you set the Automatic frequency resolution parameter is set to off.

Dependencies

To enable this parameter, click Include phase noise.

Number of samples in the time-domain signal for the blocks sample time or the number of frequency lines (bins) in the signals two-sided frequency spectrum to achieve the required frequency resolution for a specified Frequency offset, specified as a real nonnegative integer less than or equaled to 65536. Frequency resolution increases as the value of number of signal samples increases.

Note

The value of this parameter must be set to a power of two.

Dependencies

To enable this parameter, select the Include phase noise parameter and deselect Automatic frequency resolution.

Source of initial seed used to prepare the Gaussian random number LO phase noise generator, specified as one of the following:

  • Auto — When you set the Seed source, phase noise to Auto, seeds for each mixer instance are generated using a random number generator. The reset method of the instance has no effect.

  • User specified — When you set the Seed source, phase noise to User specified, the value provided in the Seed for phase noise is used to initialize the random number generator and the reset method resets the random number generator using the Seed for phase noise property value.

Dependencies

To enable this parameter, select the Include phase noise parameter.

Seed for the random number generator, specified as a nonnegative integer less than 232. Use this value to initialize the random number generator.

Dependencies

To enable this parameter, select Include phase noise and set the Seed source, phase noise parameter to User specified.

This button plots the phase characteristics based on the parameters specified on the Noise tab and either the block sample time when a simulation has been performed or estimated from the Frequency offset (Hz) parameters values.

For more information, see Plot Phase Noise Characteristics.

Algorithms

expand all

Compatibility Consideration

expand all

Behavior changed in R2021a

References

[1] Razavi, Behzad. “Basic Concepts “ in RF Microelectronics, 2nd edition, Prentice Hall, 2012.

[2] Kundert, Ken.“ Accurate and Rapid Measurement of IP2 and IP3,“ The Designer Guide Community, May 22, 2002.

[3] Kasdin, N.J. “Discrete Simulation of Colored Noise and Stochastic Processes and 1/f α Power Law Noise Generation.” Proceedings of the IEEE 83, no. 5 (May 1995): 802–27. https://doi.org/10.1109/5.381848.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a