Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

**MathWorks Machine Translation**

The automated translation of this page is provided by a general purpose third party translator tool.

MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.

Define system simulation settings

**Library:**RF Blockset / Circuit Envelope / Utilities

Use the Configuration block to set the model conditions for a circuit envelope simulation. The block parameters define a set of simulation frequencies, solver attributes, and thermal noise.

Connect one Configuration block to each topologically distinct RF
Blockset™ subsystem. Each Configuration block defines the parameters of the
connected RF
Blockset subsystem. To see an example of the Configuration block in a model, enter
`RFNoiseExample`

in the MATLAB Command Window.

For an introduction to RF simulation, see Simulate High Frequency Components.

Sample time in RF Blockset is

`Automatically select fundamental tones and harmonic order`

— Automatically select fundamental tones and harmonic order`on`

(default) | `off`

Select this parameter to choose **Fundamental tones** and **Harmonic
order** parameters automatically when you update the model. Automatic
selection does not always return the smallest possible set of simulation frequencies.
This approach uses conservative number of simulatio frequencies to capture the non
-linear behaviour of the system.

To set the **Fundamental tones** and **Harmonic
order**, clear this parameter. A smaller set of simulation
frequencies decreases simulation time and decreases memory requirements.
However, a decrease in simulation frequencies can reduce accuracy.

`Fundamental tones`

— Fundamental tones of set of simulation frequencyvector of positive integers in Hz

Fundamental tones of a set of simulation frequencies, specified as a vector of positive integers in Hz.

To enable this parameter, clear **Automatically select
fundamental tones and harmonic order**.

`Harmonic order`

— Harmonic order for each fundamental tonevector of positive integers

Harmonic order for each fundamental tone, specified as a vector
of positive integer. You can also specify a scalar and this value
is applied to each **Fundamental tones**.

To enable this parameter, clear **Automatically select
fundamental tones and harmonic order**.

`Total simulation frequencies: Computed at simulation time`

— Displays number for simulation frequenciesbutton

The block determines the simulation frequencies based on the fundamental tones and their respective harmonic order. The solver computes a solution to the network at each simulation frequency and the computation time scales according to the total number of simulation frequencies.

Combinations of fundamental tones determine the set of simulation frequencies:
[*m***f*1 +
*n***f*2 + …]. In
this case, the fundamental tones are represented by [*f _{s}*1,

Click **View** to open the dialog box containing additional
information about the simulation frequencies in your system. The
`Configuration`

block displays the number of simulation frequencies
for a nonlinear model. For linear models, the actual number of frequencies are
automatically optimized during simulation.

By clicking a listed simulation frequency, you can see which linear or multiple combinations of fundamental tones represent that frequency. From the dialog box, you can also plot the simulation frequencies on a number line.

Consider a single fundamental tone *f*1 = 2 GHz and
corresponding harmonic order *h1* = 3. The set of
simulation frequencies are:```
[0, f1, 2f1, 3f1] = [0GHz, 2 GHz, 4 GHz,
6GHz]
```

.

Consider a circuit with two fundamental tones ```
[f1 = 2 GHz, f2 = 50
MHz]
```

and corresponding harmonic orders `h1 = h2 = 1`

. This
setup results in five simulation frequencies with values: ```
[0, f2, f1-f2, f1,
f1+f2]
```

.

Consider a circuit with two fundamental tones ```
[f1 = 2 GHz, f2 =
3GHz]
```

and corresponding harmonic orders `h1 = 1`

, and
`h2 = 3`

. This setup results in 11 simulation frequencies with
values: ```
[0, f2, f1-f2, f1, f1+f2, -f1+2f2, 2f2, -f1+3f2, f1+2f2, 3f2,
f1+3f2]
```

.

The set of simulation frequencies must include all carrier frequencies specified in the RF Blockset subsystem such as the carrier frequencies inside Inport, Outport, and source blocks.

To enable this parameter, select **Automatically select fundamental tones
and harmonic order**. If you clear **Automatically select
fundamental tones and harmonic order**, the option becomes, **Total
simulation frequencies: N/A: Fundamental tones undefined**.

`Step size`

— Time step for fixed step solver configuration`1e-6`

(default) | scalar in secondsTime step for fixed step solver configuration, specified as a scalar in seconds. The inverse of the time step determines the simulation bandwidth of the signal envelope centred around each simulation frequency.

The time step of a circuit envelope simulation should be commensurate to relative signal bandwidth and not to the absolute value of the carrier frequency.

The default (1e-6s) is sufficient for modelling envelope signals with bandwidths of
up to 1/*h*, or 1MHz. Simulation accuracy is reduced
when simulating close to the maximum bandwidth. Reduce the step size to model signals
with a larger bandwidth, or improve accuracy.

The simulation speed is inversely proportional to the simulation step size. A smaller simulation step size corresponds to a wider envelope bandwidth and to a slower simulation.

When the white noise is simulated, the noise bandwidth for each simulation frequency is equal
to 1/*h*.

`Envelope bandwidth`

— Maximum simulated envelope bandwidth`1 MHz`

(default) | scalar in HzMaximum simulated envelope bandwidth, returned as a scalar in
Hz. Configuration block automatically calculates this
value using the **Step size** parameter. The formula
used is: $$bandwidth=\frac{1}{(step\text{\hspace{0.05em}}\text{\hspace{0.17em}}size)}$$.

`Simulate noise`

— Globally enable or disable noise modeling`on`

(default) | `off`

Select this parameter to globally enable noise modeling in RF Blockset circuits. When this check box is selected:

Amplifier and Mixer blocks use the value of their respective

**Noise figure (dB)**parameters.Amplifier and Mixer blocks simulate with thermal noise at the temperature specified by the

**Temperature**parameter.Resistor blocks model thermal noise using the

**Temperature**parameters.Noise blocks model a specified noise power as a voltage or current source.

To disable noise modeling globally, clear this parameter.

`Use default random number generator`

— Default pseudorandom noise stream for RF Blockset sources`on`

(default) | `off`

Select this parameter to retain the default pseudorandom noise stream for RF Blockset sources. Clear this option to specify an independent pseudorandom number stream for the RF Blockset topological subsystem and determine the seed of the noise stream.

To expose this parameter, select **Simulate noise**.

`Noise seed`

— Seed of the independent pseudorandom number stream`0`

(default) | scalar positive integerSeed of the independent pseudorandom number stream, specified as a scalar positive integer.

To expose this parameter, clear **Use default random
number generator**.

`Temperature`

— Global noise temperature`290.0`

`K`

| scalar integer in kelvinGlobal noise temperature, specified as a scalar integer in kelvin.

`Normalize Carrier Power`

— Normalize power of carrier signal`on`

(default) | `off`

Select this option to normalize the carrier power such that the average power of the signal is:

$${I}^{2}+\text{\hspace{0.17em}}\text{\hspace{0.17em}}{Q}^{2}$$

$${s}_{k}(t)=I(t)\sqrt{2}\mathrm{cos}(2\pi {f}_{k}t)\text{\hspace{0.17em}}-\text{\hspace{0.17em}}Q(t)\sqrt{2}\mathrm{sin}(2\pi {f}_{k}t)$$

*I*(*t*) am the in-phase part of the carrier signal.*Q*(*t*) is the quadrature part of the carrier signal.*f*are the carrier frequencies._{k}

Clear this option so the average power of the carrier signal is:

$$\frac{{I}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}}\text{\hspace{0.17em}}{Q}^{2}}{2}$$

$${s}_{k}(t)=I(t)\mathrm{cos}(2\pi {f}_{k}t)\text{\hspace{0.17em}}-\text{\hspace{0.17em}}Q(t)\mathrm{sin}(2\pi {f}_{k}t)$$

0 carrier frequency is a special case. Its passband representation
is always *I* and
average power *I*^{2}

`Transient analysis`

— Fixed-step solver of RF Blockset™ environment`Auto`

(default) | `NDF2`

| `Trapezoidal Rule`

| `Backward Euler`

Fixed-step solver of RF Blockset environment, specified as one of the following:

`Auto`

: Set this parameter to`Auto`

, when you are not sure which solver to use.`NDF2`

: Set this parameter to`NDF2`

to balance narrowband and wideband accuracy. This solver is suitable for situations where the frequency content of the signals in the system is unknown relative to the Nyquist rate.`Trapezoidal Rule`

: Set this parameter to`Trapezoidal Rule`

for narrowband simulations. Frequency warping and the lack of damping effects make this method inappropriate for most wideband simulations.`Backward Euler`

: Set this parameter to`Backward Euler`

to simulate the largest class of systems and signals. Damping effects make this solver suitable for wideband simulation, but overall accuracy is low.

The RF Blockset solver is an extension of the Simscape™ local solver. For more information on the Simscape local solver, see the Solver Configuration block reference page.

`Relative tolerance`

— Relative newton tolerance for system variables`1e-3`

(default) | real positive finite scalarRelative newton tolerance for system variables, specified as a real positive finite scalar.

`Absolute tolerance`

— Absolute newton tolerance for system variables`1e-6`

(default) | real positive finite scalarAbsolute newton tolerance for system variables, specified as a real positive finite scalar.

`Maximum iterations`

— Number iterations required for convergence`10`

(default) | real positive integer scalarNumber iterations required for convergence, specified as a real positive integer scalar.

`Error estimation`

— Check for error of convergence in system variables`2-norm over all variables`

(default) | `Each variable separately`

Check for error of convergence in system variables, specified as:

`2-norm over all variables`

: Use this option to calculate the 2-norm of all the state variables and then check the error in convergence of state variables.`Each variable separately`

: Use this option to check the error in convergence of each variable separately.

`Restore Default Settings`

— Restore newton solver to default valuesbutton

Restore newton solver to default values, specified as a button.

The key parameters in setting up a Circuit Envelope simulation are the fundamental tones, the harmonic order, and the step size. To speed up simulation, you can trade off the simulation step size and the total number of simulation frequencies.

For example, suppose that you have two large inputs signals each with 100 MHz bandwidth, centred around 10 GHz, and 10.1 GHz respectively. You can simulate the two signals using two separate fundamental tones [10 10.1] GHz. Each tone has a harmonic order of 3 (for a total of 13 simulation frequencies), and a simulation step size equal to 1/200MHz = 5 ns.

You could also set up the RF subsystem so that both of the signals are within the same simulation bandwidth centred around 10.05 GHz. In this case, you set the harmonic order equal to 3 (for a total of 4 simulation frequencies), and a simulation step size equal to 1/400MHz = 2.5 ns. The latter configuration is faster as the number of simulation frequencies is smaller by a factor 3, and the simulation step size is only smaller by a factor 2.

When setting up a circuit envelope simulation, avoid overlapping envelopes. The thermal noise generated by passive components are accounted for separately in each subband thus allowing for overlap of separate envelopes.

The simulation step size must be small enough to capture the signal bandwidth and in-band spectral regrowth.

For example, your complex input Simulink signal has a sample frequency equal to 10 MHz. The minimum time step required to simulate this signal is 1/20 MHz = 50 ns. You can use an oversampling factor from 4 through 8, corresponding to a simulation time step between 25 ns and 12.5 ns. This captures the spectral regrowth caused by non-linear effects.

It is recommended that the Configuration block,use the same step size as the input Simulink signals. The input port resamples the input signal with the step size specified in the Configuration block. Using the same step size avoids undesired aliasing effects. It is best to resample the Simulink signals before importing them in RF Blockset using either analog (continuous time) or digital (discrete time) interpolation filters.

Circuit envelope solver in the RF Blockset is a solving a set of nonlinear equations from a set of system variables. These system variables are derived from the circuit topology and simulation frequencies. Relative tolerance and absolute tolerance are used to keep the error in convergence of the system variables to minimum. The number of iterations used at each time step dramatically affects the speed of the solutions and the tradeoff between accuracy and speed. The tradeoff is governed by the stopping criterion for the iterations. This stopping criterion is based on 3 sub criterion:

Variable error convergence:

where:$$\left|\Delta X\right|<\mathrm{Re}lTol.\underset{t}{\mathrm{max}}(\left|X\right|)+AbsTo{l}_{x}$$

*X*- System variables*t*- maximum iterations.

Residue error convergence:

where:$$\left|F(X)\right|<\mathrm{Re}lTol.\underset{t,n}{\mathrm{max}}(\left|{F}_{n}(X)\right|+AbsTo{l}_{F}$$

*F*- represents a part of_{n}(X)*F(X)*coming from the nth branch.

Maximum number of iterations.

Stop the calculations if the first two sub criteria are filled or the last sub criterion is filled. If only one of the sub-criteria is filled, error out that the ' non-linear solver failed'.

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Was this topic helpful?

You can also select a location from the following list:

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)