| Contents | Index |
| On this page… |
|---|
Simulate a Passband Signal in Simulink Software |
This example shows how to use circuit-envelope simulation to reduce the number of time steps required to simulate a simple signal by a factor of 100.
Traditional methods of circuit simulation are not ideal for RF systems. High-frequency carriers require very small time steps. This approach results in a long simulation time. Circuit-envelope simulation is a solution for modeling RF signals accurately, while also reducing simulation time.

The preceding figure illustrates a signal x(t) for which circuit-envelope simulation is ideal. The signal consists of a time-varying modulation on a high-frequency carrier. In many RF applications, the frequency of the modulation A(t) is orders of magnitude less than the frequency of the carrier, fc.
SimRF software handles the carrier cos(2πfct) analytically, so it only needs to simulate the modulation. The redefined system that the software uses is mathematically equivalent to the original. However, by taking time steps on the scale of the modulation instead of the carrier, the software produces equivalent results in less time.
The model
ex_simrf_tut_passband
simulates a 1-GHz sine wave using fundamental Simulink® blocks. This section of the example shows you how to model the modulation of a real passband signal with in-phase and quadrature components.

The system specifies a real passband signal x(t) according to the formula
![]()
where:
I(t) is the in-phase part of the modulation, equal to 3 in this example, modeled by the Constant block labeled In-phase modulation.
Q(t) is the quadrature part of the modulation, equal to 4 in this example, modeled by the Constant block labeled Quadrature modulation.
fc is the carrier frequency, equal to 1 GHz in this example.
Running the model produces the following output on the scope.

The output signal at the Real Passband Scope has a magnitude of 5 and a phase shift consistent with the specified in-phase and quadrature amplitudes.
In the Configuration Parameters dialog box, the Fixed-step size (fundamental sample time) parameter has been set to 1/20*1e-9. This value is on the order of the wavelength of the carrier. The simulation takes a total of 101 samples—20 per cycle.
The model
ex_simrf_tut_compare
simulates a 1-GHz sine wave using SimRF blocks. This example builds on the results of the previous section, Simulate a Passband Signal in Simulink Software.

The system simulates a real passband signal as the real part of a complex passband signal according to the formula
![]()
where:
I(t) + jQ(t) is the complex-valued modulation, equal to 3 + 4j.
fc is the angular frequency, equal to 1 GHz.
Contrary to the Simulink passband implementation in the previous section, the complex baseband signal driving the SimRF system does not include the carrier. Instead, the SimRF environment handles the carrier analytically. The carrier appears in four different blocks in the SimRF environment:
In the SimRF Inport block, the Carrier frequencies parameter defines the carrier frequencies of the modulations entering from outside the SimRF environment. In this example, there is only one input signal, and only one carrier (1 GHz, specified as 1e9 Hz).
In the SimRF Outport block, the Carrier frequencies parameter specifies the signal on the 1e9 Hz carrier (1 GHz) as Simulink signals. These signals appear at the I and Q ports. The Output parameter is set to Real Passband, so this signal represents a real passband signal on the 1-GHz carrier.
In the block labeled SimRF Outport1 block, also a SimRF Outport block, the Carrier frequencies parameter specifies the signal outputted on the 1e9 Hz carrier (1 GHz) as Simulink signals. These signals appear at the I and Q ports. The Output parameter is set to In-phase and Quadrature Baseband, so these signals represent the in-phase and quadrature modulations of the signal on the 1-GHz carrier.
In the SimRF Parameters block, the Carrier frequencies parameter specifies all of the carriers to be modeled in the SimRF circuit-envelope simulation environment. In this example, only one carrier is specified.
Note The Solver Configuration block, required in SimRF models, retains its default settings. |
Running the model produces the following output on the scopes.

The Real Passband Scope displays the same output as the example in the previous section, Simulate a Passband Signal in Simulink Software. The signal has a magnitude of 5 and a phase shift consistent with the specified in-phase and quadrature amplitudes.

The 1-GHz carrier itself does not appear in the output. The results correspond to the real and imaginary parts of the Complex modulation at the input of the system. They also correspond to the In-phase modulation and Quadrature modulation blocks in Simulate a Passband Signal in Simulink Software.
In the Configuration Parameters dialog box, the Fixed-step size (fundamental sample time) parameter has been set to 1/20*1e-9. This value is on the order of the wavelength of the carrier. The simulation takes a total of 101 samples—20 per cycle.
The model
ex_simrf_tut_envelope
simulates the envelope of a 1-GHz sine wave using SimRF blocks. This example builds on the results of the previous section, Compare Passband and Baseband Signals in SimRF Software.

The system is almost identical to the system in the previous section, except:
The model contains only one SimRF Outport block and only one scope. The SimRF environment outputs in-phase and quadrature modulations of the 1-GHz signal. However, this system does not output a real passband signal.
In the Configuration Parameters dialog box, the Fixed-step size (fundamental sample time) parameter is greater. Its value is 5e-9 instead of 1/20*1e-9.
Running the model produces the following output at the scope.

The I/Q Scope displays the in-phase and quadrature modulations of the 1-GHz signal. The 1-GHz carrier itself does not appear in the output. The results correspond to the real and imaginary parts of the Complex modulation at the input of the system.
In contrast to the models in the previous two sections, Simulink works differently in this model. Here, Simulink does not have to simulate this system using a fundamental sample time on the order of the wavelength of the carrier. Because the modulations are constant in this example, only two sample points are needed.
The model uses a value of 5e-9 for the Fixed-step size (fundamental sample time) parameter. This value equals the Stop time because the modulations are constant. Compared to the preceding examples, which use a sample time of 1/20*1e-9, this model simulates accurately with a time step 100 times larger. This step size results in a reduction of total sample time by a factor of 100, excluding the initial time step at time 0.
![]() | Product Description | Working with SimRF Software | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |