communications system with embedded rf receiver -凯发k8网页登录
this example shows how to integrate an rf receiver together with baseband signal processing algorithms to model an end-to-end communications system.
the example requires communications toolbox™.
part 1: baseband communications link with integrated rf receiver model
the following model includes a baseband signal generator, a simple channel, an initially designed using the rf budget analyzer as described in getting started with rf modeling, an analog-to-digital conversion, a demodulation scheme, and a computation block for the symbol error rate.
model = 'simrfv2_comms_rf_example';
open_system(model);
for this model, blocks from communications toolbox and dsp system toolbox™ are used to perform baseband signal processing. the nonstandard compliant baseband signal has a rectangular qam constellation with raised cosine filtering and the baseband receiver does not include carrier/clock synchronization. parameters for the baseband signal generation are defined in the model properties
-> model callbacks
preloadfcn, which sets these parameters in the matlab workspace when the model is loaded:
bw = 8 mhz;
tstep = 125 ns; % 1/bw
framelength = 128;
m = 4; % constellation size 2^m
tsymbol = 64 us; % m*framelength*tstep
sample time
for the baseband signal and step size
of the rf blockset receiver configuration block have the same value. this guarantees that the rf simulation bandwidth is consistent with the sampling rate of the input signal. the rf blockset receiver has input and output ports that convert the simulink signals into rf domain quantities and scale their power to a 50 ohm reference impedance. the input port centers the baseband signal at a specified center frequency of 2.45 ghz, and the rf iq demodulator downconverts the input signal to baseband with a single quadrature stage.
bdclose(model);
part 2: include an out-of-band interfering blocker signal
the model simrfv2_comms_rf_interferer
shows how to add a high power out-of-band interferer centered around 2.5 ghz. this blocker affects the rf receiver by driving it into the nonlinear region. use the following steps to complete this task.
model = 'simrfv2_comms_rf_interferer';
open_system(model);
add an 8-psk modulator baseband block source to include a blocking signal with a higher power level than the transmitter signal. using the vector concatenate block, combine the baseband and blocker signals. the input signal to the rf receiver is now composed of two complex baseband signals. it is important that the two baseband sources use the same sample rate to insure equal simulation bandwidths for each signal (same envelope bandwidth). if the two signals don't have the same sample time, they need to be resampled before combining. this is the recommended best practice for simulating blocker signals when they are "far away" from the desired signal in the frequency spectrum and cannot be included in the same envelope for a particular carrier. to display the spectral positioning of the two input signals in the spectrum analyzer block, the offset
option has two frequencies specified for the two baseband signals.
the input port of the rf receiver has been modified to include the two carrier (carrier frequencies
) signals (2.45 ghz and 2.5 ghz). initially we leave the configuration block to automatically select the fundamental tones and the harmonic order.
bdclose(model);
part 3: add imperfections to the rf receiver
the model simrfv2_comms_rf_impairments
shows how to add impairments to the rf receiver that were initially not estimated in the link budget of the rf budget analyzer.
model = 'simrfv2_comms_rf_impairments';
open_system(model);
under the mask of the rf receiver, modify the rf demodulator to add imperfections that will be driven by the blocking signal. in the mask of the iq demodulator change these parameters:
i/q gain mismatch
= 0.5 dbi/q phase mismatch
= 1 degreelo to rf isolation
= 85 dbiip2
= 45 dbphase noise frequency offset
= [1e5 5e5 2e6] hzphase noise level
= [-95 -120 -140] dbc/hz
each of these imperfections separately increases the bit error rate. these imperfections cause finite image rejection and a dc offset that is removed in the baseband domain. as observed, the dc offset correction requires time to integrate the signal power and remove the dc component. to further modify the structure of the i/q demodulator system, you can click on the "edit system" button. with this operation you disable the link to the library, inline the value of the parameters, and have the ability to manually modify the block parameters as well as the block architecture.
bdclose(model);
part 4: how to decrease simulation time
the model simrfv2_comms_rf_speed
shows how to decrease the simulation time of the previous model described in this example. follow these steps to speed up the simulation of the model.
model = 'simrfv2_comms_rf_speed';
open_system(model);
in simulink, select accelerator
mode to speed up the simulation by leveraging automatic c code generation.
in the rf blockset section, to speed up simulation reduce the harmonic order
of the circuit envelope configuration block. uncheck automatically select fundamental tones and harmonic order
and set the harmonic order
equal to 3. the total simulation frequencies
is reduced from 61 to 25, equivalent to an approximate 2.5 times speed up. after reducing the harmonic order, verify that simulation results do not change.
to further increase simulation speed, use frequency domain
modeling instead of time domain
modeling for the s-parameters saw filter block. you need to verify that when changing the approach the simulated transfer function is still correct and that the model uses a sufficiently long impulse response duration
.
with the above modifications, the simulation is approximately five times faster without significantly affecting the simulation results.
bdclose(model);
clear model;