Main Content

Time-Domain Filtering of RF Complex Baseband Signals in Simulink

This example shows you how to use the Idealized Baseband Filter block to filter of RF complex baseband signals in Simulink®. The Idealized Baseband Filter block performs time-domain or frequency-domain simulation for Butterworth, Chebyshev, or inverse Chebyshev filters. The example compares time-domain simulation of RF complex baseband signals between Idealized Baseband and Circuit Envelope Filter blocks in Simulink and the circuit envelope domain, respectively. The Idealized Baseband Filter block allows you to design single-carrier perfectly matched RF systems, whereas the Circuit Envelope (CE) Filter block allows you to design multi-carrier RF systems with impedance mismatches.

System Architecture

This example uses three filter blocks:

  • Idealized Baseband Filter block simulated using Interpreted execution. This option performs block signal processing using the MATLAB® interpreter, and shortens startup time, but the speed is slower than Code generation.

  • Idealized Baseband Filter block simulated using Code generation. This option performs block signal processing 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 code path does not change. This option requires additional startup time, but the speed of the subsequent simulations is faster than interpreted execution.

  • Circuit Envelope Filter block implemented using Transfer function. This option allows you to model an analog filter using two-port S-parameters.

Define Simulation Parameters

Define sample time, samples per frame, and carrier frequency as the simulation parameters.

sampleTime = 8e-6;
samplesPerFrame = 128;
carrierFrequency = 1e9;

Set Stop Time to sampleTime*1e3.

Open Model

The Filter type parameter in the three filter blocks is set to Butterworth. Set the Carrier frequency (Hz) parameter to 1e9 Hz, and Solver type to NDF2. For the Circuit Envelope Filter block, specify the carrier frequency, solver type, and frame size in the Configuration block, and for the Idealized Baseband blocks, specify the carrier frequency and solver type in the block masks. The frame size for the Idealized Baseband Filter blocks is automatically detected by the software.

open_system('idealfilter.slx')

Simulate Model

Simulate the model using the sim('idbbfilter.slx') command.

sim('idealfilter.slx');

Compare the real and imaginary output waveforms and observe that the output waveforms are identical. Idealized Baseband and Circuit Envelope Filter blocks are simulated using NDF2, a fixed-step time-domain solver. This solver balances narrowband and wideband accuracy and is suitable for situations where the frequency content of the signals in the system is unknown relative to the Nyquist rate.

See Also

| |

Related Topics