Main Content

stdchan

Construct channel System object from set of standardized channel models

Description

chan = stdchan(chantype,rs,fd) constructs a fading channel object chan according to the specified chantype. chantype is chosen from the channel models listed in Supported Standards. rs is the sampling rate of the input signal and fd is the maximum Doppler shift.

example

Examples

collapse all

Set the sample rate and the maximum Doppler shift.

rs = 20e6;
fd = 3;

Create a CDMA Typical Urban channel model (TUx) channel object and turn on frequency response visualization.

chan = stdchan('cdmaTUx',rs,fd);
chan.Visualization = 'Frequency response';

Generate random data and apply QPSK modulation.

data = randi([0 3],10000,1);
txSig = pskmod(data,4,pi/4);

Filter the QPSK signal through the CDMA channel.

y = chan(txSig);

Create a channel model useful for GSM and EDGE simulations. Experiment with low speed and high speed conditions.

Configure Parameters and System Objects

Define variables for the frame configuration.

M = 8;               % Modulation order, 8-PSK
phaseoffset = 0;     % Phase offset for 8-PSK symbols
Rbit = 9600;         % Input bit rate
Rs = Rbit / log2(M); % Symbol rate
Nsamples = 5e2;      % Number of samples per frame
Nframes = 10;        % Number of frames

Define the channel configuration for low speed mobile and create a standard channel System object for the equalization test (EQx) with 6 taps profile.

v = 10 * 1e3 / 3600;         % Mobile speed (m/s)
fc = 1800e6;                 % Carrier frequency
c = physconst('LightSpeed'); % Speed of light in free space
fd = v * fc / c;   % Maximum Doppler shift of diffuse component

channel = stdchan('gsmEQx6',Rs,fd);
channel.RandomStream = 'mt19937ar with seed'; % For reproducibility
channel.Visualization = 'Impulse and frequency responses';
channel.SamplesToDisplay = '100%';

Create a constellation diagram System object.

refC = pskmod(0:M-1,M,phaseoffset);
constDiagram = comm.ConstellationDiagram( ...
    ReferenceConstellation=refC, ...
    XLimits=[-3 3], ...
    YLimits=[-3 3]);

Simulate at Low Speed

for iFrames = 1:Nframes
    msg = randi([0 M-1],Nsamples,1);
    modSignal = pskmod(msg,M,phaseoffset);
    chanOut = channel(modSignal);
    constDiagram(chanOut);
end

Simulate at High Speed

Release and reconfigure the channel and constellation diagram objects.

release(constDiagram);
release(channel);

v = 120 * 1e3 / 3600; % Mobile speed (m/s)
fd = v * fc / c;      % Maximum Doppler shift of diffuse component

channel.MaximumDopplerShift = fd; % Adjust maximum doppler shift

for iFrames = 1:Nframes
    msg = randi([0 M-1],Nsamples,1);
    modSignal = pskmod(msg,M,phaseoffset);
    chanOut = channel(modSignal);
    constDiagram(chanOut);
end

Input Arguments

collapse all

Channel type, specified as a string or character vector. Valid options are listed in Supported Standards.

Example: stdchan('gsmRAx6c1',rs,fd), configures a channel model for the GSM typical case for rural area (RAx), 6 taps, case 1, with a sample rate rs, and maximum Doppler shift fd

Data Types: char | string

Sample rate in Hertz, specified as a scalar.

Data Types: double

Maximum Doppler shift in Hertz, specified as a scalar.

Data Types: double

Output Arguments

collapse all

Channel object, returned as a comm.RayleighChannel or comm.RicianChannel System object.

More About

collapse all

Version History

Introduced in R2007b

expand all