comm.RayleighChannel
Filter input signal through multipath Rayleigh fading channel
Description
Thecomm.RayleighChannel
System object™ filters an input signal through the multipath Rayleigh fading channel. For more information on fading model processing, see theMethodology for Simulating Multipath Fading Channelssection.
To filter an input signal through a multipath Rayleigh fading channel:
Create the
comm.RayleighChannel
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, seeWhat Are System Objects?
Creation
Description
creates a frequency-selective or frequency-flat multipath Rayleigh fading channel System object. This object filters a real or complex input signal through the multipath channel to obtain a channel-impaired signal.rayleighchan
= comm.RayleighChannel
sets properties using one or more name-value arguments. For example,rayleighchan
= comm.RayleighChannel(Name,Value)'SampleRate',2
sets the input signal sample rate to 2.
Properties
Unless otherwise indicated, properties arenontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and therelease
function unlocks them.
If a property istunable, you can change its value at any time.
For more information on changing property values, seeSystem Design in MATLAB Using System Objects.
SampleRate
—Input signal sample rate
1
(default) |positive scalar
Input signal sample rate in hertz, specified as a positive scalar.
Data Types:double
PathDelays
—Discrete path delay
0
(default) |scalar|row vector
Discrete path delay in seconds, specified as a scalar or row vector.
When you set
PathDelays
to a scalar, the channel is frequency flat.When you set
PathDelays
to a vector, the channel is frequency selective.
ThePathDelays
andAveragePathGains
properties must be the same length.
Data Types:double
AveragePathGains
—Average gains of discrete paths
0
(default) |scalar|row vector
Average gains of the discrete paths in decibels, specified as a scalar or row vector. TheAveragePathGains
andPathDelays
properties must be the same length.
Data Types:double
NormalizePathGains
—Normalize average path gains
true
or1
(default) |false
or0
Normalize average path gains, specified as one of these logical values:
1
(true
) — The fading processes are normalized so that the total power of the path gains, averaged over time, is 0 dB.0
(false
) — The total power of the path gains is not normalized.
TheAveragePathGains
property specifies the average powers of the path gains.
Data Types:logical
MaximumDopplerShift
—Maximum Doppler shift for all channel paths
0.001
(default) |nonnegative scalar
Maximum Doppler shift for all channel paths, specified as a nonnegative scalar. Units are in hertz.
多普勒频移的最大限制适用于每个channel path. When you set this property to0
, the channel remains static for the entire input. You can use thereset
object function to generate a new channel realization. TheMaximumDopplerShift
property value must be smaller thanSampleRate
/10/fcfor each path.fc我s the cutoff frequency factor of the path. For most Doppler spectrum types, the value offc我s 1. For Gaussian and bi-Gaussian Doppler spectrum types,fc我s dependent on the Doppler spectrum structure fields. For more details about howfc我s defined, see theCutoff Frequency Factorsection.
Data Types:double
DopplerSpectrum
—Doppler spectrum shape for all channel paths
doppler('Jakes')
(default) |Doppler spectrum structure|1-by-NPcell array of Doppler spectrum structures
Doppler spectrum shape for all channel paths, specified as a Doppler spectrum structure or a 1-by-NPcell array of Doppler spectrum structures. These Doppler spectrum structures must be outputs of the form returned from thedoppler
function.NP我s the number of discrete delay paths specified by thePathDelays
property. TheMaximumDopplerShift
property defines the maximum Doppler shift value that theDopplerSpectrum
property permits when you specify the Doppler spectrum..
When you set
DopplerSpectrum
to a single Doppler spectrum structure, all paths have the same specified Doppler spectrum.When you set
DopplerSpectrum
to a cell array of Doppler spectrum structures, each path has the Doppler spectrum specified by the corresponding structure in the cell array.
Specify options for the spectrum type by using thespecType
我nput to thedoppler
function. If you set theFadingTechnique
property to'Sum of sinusoids'
, you must setDopplerSpectrum
todoppler('Jakes')
.
Dependencies
To enable this property, set theMaximumDopplerShift
property to a positive scalar.
Data Types:struct
|cell
ChannelFiltering
—Channel filtering
true
or1
(default) |false
or0
Channel filtering, specified as one of these logical values:
1
(true
) — The channel accepts an input signal and produces a filtered output signal.0
(false
) — The object does not accept an input signal, produces no filtered output signal, and outputs only channel path gains. You must specify the duration of the fading process by using theNumSamples
property.
Data Types:logical
PathGainsOutputPort
—Output channel path gains
false
or0
(default) |true
or1
Output channel path gains, specified as a logical0
(false
) or1
(true
). Set this property totrue
to output the channel path gains of the underlying fading process.
Dependencies
To enable this property, set theChannelFiltering
property totrue
.
Data Types:logical
NumSamples
—Number of samples
100
(default) |nonnegative integer
Number of samples used for the duration of the fading process, specified as a nonnegative integer.
Tunable:Yes
Dependencies
To enable this property, set theChannelFiltering
property tofalse
.
Data Types:double
OutputDataType
—Path gain output data type
'double'
(default) |'single'
Path gain output data type, specified as'double'
or'single'
.
Dependencies
To enable this property, set theChannelFiltering
property tofalse
.
Data Types:查r
|string
FadingTechnique
—Channel model fading technique
'Filtered Gaussian noise'
(default) |'Sum of sinusoids'
Channel model fading technique, specified as'Filtered Gaussian noise'
or'Sum of sinusoids'
.
Data Types:查r
|string
NumSinusoids
—Number of sinusoids used
48
(default) |positive integer
Number of sinusoids used to model the fading process, specified as a positive integer.
Dependencies
To enable this property, set theFadingTechnique
property to'Sum of sinusoids'
.
Data Types:double
InitialTimeSource
—Source to control start time of fading process
'Property'
(default) |'Input port'
Source to control the start time of the fading process, specified as'Property'
or'Input port'
.
When you set
InitialTimeSource
to'Property'
, set the initial time offset by using theInitialTime
property.When you set
InitialTimeSource
to'Input port'
, specify the start time of the fading process by using the我nittime
我nput argument. The input value can change in consecutive calls to the object.
Dependencies
To enable this property, set theFadingTechnique
property to'Sum of sinusoids'
.
Data Types:查r
|string
InitialTime
—Initial time offset
0
(default) |nonnegative scalar
Initial time offset for the fading model in seconds, specified as a nonnegative scalar.
Whenmod
(InitialTime
/SampleRate
)我s nonzero, the initial time offset is rounded up to the nearest sample position.
Dependencies
To enable this property, set theFadingTechnique
property to'Sum of sinusoids'
and theInitialTimeSource
property to'Property'
.
Data Types:double
RandomStream
—Source of random number stream
'Global stream'
(default) |'mt19937ar with seed'
Source of the random number stream, specified as'Global stream'
or'mt19937ar with seed'
.
When you specify
'Global stream'
, the object uses the current global random number stream for random number generation. In this case, thereset
object function resets only the filters.When you specify
'mt19937ar with seed'
, the object uses the mt19937ar algorithm for random number generation. In this case, thereset
object function resets the filters and reinitializes the random number stream to the value of theSeed
property.
Data Types:查r
|string
Seed
—Initial seed of mt19937ar random number stream
73
(default) |nonnegative integer
Initial seed of the mt19937ar random number stream generator algorithm, specified as a nonnegative integer. When you call thereset
object function, it reinitializes the mt19937ar random number stream to theSeed
value.
Dependencies
To enable this property, set theRandomStream
property to'mt19937ar with seed'
.
Data Types:double
Visualization
—Channel visualization
'Off'
(default) |'Impulse response'
|'Frequency response'
|'Impulse and frequency responses'
|'Doppler spectrum'
Channel visualization, specified as'Off'
,'Impulse response'
,'Frequency response'
,'Impulse and frequency responses'
, or'Doppler spectrum'
. For more information, see theChannel Visualizationtopic.
Dependencies
To enable this property, set theFadingTechnique
property to'Filtered Gaussian noise'
.
Data Types:查r
|string
PathsForDopplerDisplay
—Path used for displaying Doppler spectrum
1
(default) |positive integer
Path used for displaying the Doppler spectrum, specified as a positive integer in the range [1,NP].NP我s the number of discrete delay paths specified by thePathDelays
property. Use this property to select the discrete path used in constructing a Doppler spectrum plot.
Dependencies
To enable this property, set theVisualization
property to'Doppler spectrum'
.
Data Types:double
SamplesToDisplay
—Percentage of samples to display
'25%'
(default) |'10%'
|'50%'
|'100%'
Percentage of samples to display, specified as'25%'
,'10%'
,'50%'
, or'100%'
. Increasing the percentage improves display accuracy at the expense of simulation speed.
Dependencies
To enable this property, set theVisualization
property to'Impulse response'
,'Frequency response'
, or'Impulse and frequency responses'
.
Data Types:查r
|string
Usage
Syntax
Description
filters the input signaly
= rayleighchan(x
)x
through a multipath Rayleigh fading channel and returns the result iny
.
To enable this syntax, set theChannelFiltering
property totrue
.
specifies a start time for the fading process.y
= rayleighchan(x
,我nittime
)
To enable this syntax, set theFadingTechnique
property to'Sum of sinusoids'
and theInitialTimeSource
property to'Input port'
.
[
also returns the channel path gains of the underlying multipath Rayleigh fading process iny
,pathgains
] = rayleighchan(___)pathgains
using any of the input argument combinations in the previous syntaxes.
To enable this syntax, set thePathGainsOutputPort
property set totrue
.
returns the channel path gains of the underlying fading process. In this case, the channel requires no input signal and acts as a source of path gains.pathgains
= rayleighchan()
To enable this syntax, set theChannelFiltering
property tofalse
.
returns the channel path gains of the underlying fading process beginning at the specified initial time. In this case, the channel requires no input signal and acts as a source of path gains.pathgains
= rayleighchan(我nittime
)
To enable this syntax, set theFadingTechnique
property to'Sum of sinusoids'
, theInitialTimeSource
property to'Input port'
, and theChannelFiltering
property tofalse
.
Input Arguments
x
—Input signal
NS-by-1 vector
Input signal, specified as anNS-by-1 vector, whereNS我s the number of samples.
Data Types:single
|double
Complex Number Support:Yes
我nittime
—Initial time offset
0
|nonnegative scalar
Initial time offset in seconds, specified as a nonnegative scalar.
Whenmod
(我nittime
/SampleRate
)我s nonzero, the initial time offset is rounded up to the nearest sample position.
Data Types:single
|double
Output Arguments
y
— Output signal
NS-by-1 vector
Output signal, returned as anNS-by-1 vector of complex values with the same data precision as the input signalx
.NS我s the number of samples.
pathgains
— Output path gains
NS-by-NPmatrix
Output path gains, returned as anNS-by-NPmatrix.NS我s the number of samples.NP我s the number of discrete delay paths specified by thePathDelays
property.pathgains
contains complex values.
When you set theChannelFiltering
property tofalse
, the data type of this output has the same precision as the input signalx
. When you set theChannelFiltering
property totrue
, the data type of this output is specified by theOutputDataType
property.
Object Functions
To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object namedobj
, use this syntax:
release(obj)
Examples
Produce Same Rayleigh Channel Outputs Using Two Random Number Generation Methods
Produce the same multipath Rayleigh fading channel response by using two different methods for random number generation. The multipath Rayleigh fading channel System object includes two methods for random number generation. You can use the current global stream or the mt19937ar algorithm with a specified seed. By interacting with the global stream, the System object can produce the same outputs from these two methods.
Create a PSK modulator System object to modulate randomly generated data.
pskModulator = comm.PSKModulator; insig = randi([0,pskModulator.ModulationOrder-1],1024,1); channelInput = pskModulator(insig);
Create a multipath Rayleigh fading channel System object, specifying the random number generation method as the my19937ar algorithm and the random number seed as 22.
rayleighchan = comm.RayleighChannel(...'SampleRate',10e3,...'PathDelays',[0 1.5e-4],...'AveragePathGains',[2 3],...'NormalizePathGains',true,...'MaximumDopplerShift',30,...'DopplerSpectrum',{doppler('Gaussian',0.6),doppler('Flat')},...'RandomStream','mt19937ar with seed',...'Seed',22,...'PathGainsOutputPort',true);
Filter the modulated data by using the multipath Rayleigh fading channel System object.
[chanOut1,pathGains1] = rayleighchan(channelInput);
Set the System object to use the global stream for random number generation.
释放(rayleighchan);rayleighchan。RandomStream ='Global stream';
Set the global stream to have the same seed that you specified when creating the multipath Rayleigh fading channel System object.
rng(22)
Filter the modulated data by using the multipath Rayleigh fading channel System object again.
[chanOut2,pathGains2] = rayleighchan(channelInput);
Verify that the channel and path gain outputs are the same for each of the two methods.
我sequal(chanOut1,chanOut2)
ans =logical1
我sequal(pathGains1,pathGains2)
ans =logical1
Display Impulse and Frequency Responses of Multipath Rayleigh Fading Channel
Display the impulse and frequency responses of a frequency-selective multipath Rayleigh fading channel that is configured to disable channel filtering.
Define simulation variables. Specify path delays and gains by using the ITU pedestrian B channel configuration.
fs = 3.84e6;% Sample rate in HzpathDelays = [0 200 800 1200 2300 3700]*1e-9;% in secondsavgPathGains = [0 -0.9 -4.9 -8 -7.8 -23.9];% dBfD = 50;% Max Doppler shift in Hz
Create a multipath Rayleigh fading channel System object to visualize the impulse response and frequency response plots.
rayleighchan = comm.RayleighChannel('SampleRate',fs,...'PathDelays',pathDelays,...'AveragePathGains',avgPathGains,...'MaximumDopplerShift',fD,...'ChannelFiltering',false,...'Visualization','Impulse and frequency responses');
Visualize the channel response by running the multipath Rayleigh fading channel System object with no input signal. The impulse response plot enables you to identify the individual paths and their corresponding filter coefficients. The frequency response plot shows the frequency-selective nature of the ITU pedestrian B channel.
rayleighchan();
Model Multipath Rayleigh Fading Channel by Using Sum-of-Sinusoids Technique
Show that the channel state is maintained for discontinuous transmissions by using multipath Rayleigh fading channel System objects that use the sum-of-sinusoids technique. Observe discontinuous channel response segments overlaid on a continuous channel response.
Set the channel properties.
fs = 1000;% Sample rate (Hz)pathDelays = [0 2.5e-3];% In secondspathPower = [0 -6];% In dBfD = 5;% Maximum Doppler shift (Hz)ns = 1000;% Number of samplesnsdel = 100;% Number of samples for delayed paths
Define a continuous time span and three discontinuous time segments over which to plot and view the channel response. View a 1000-sample continuous channel response that starts at time 0 and three 100-sample channel responses that start at times 0.1, 0.4, and 0.7 seconds, respectively.
to0 = 0.0; to1 = 0.1; to2 = 0.4; to3 = 0.7; t0 = (to0:ns-1)/fs;% Transmission 0t1 = to1+(0:nsdel-1)/fs;% Transmission 1t2 = to2+(0:nsdel-1)/fs;% Transmission 2t3 = to3+(0:nsdel-1)/fs;% Transmission 3
Create a frequency-flat multipath Rayleigh fading System object, specifying a 1000 Hz sampling rate, the sum-of-sinusoids fading technique, disabled channel filtering, and the number of samples to view. Specify a seed value so that results can be repeated. Use the defaultInitialTime
property setting so that the fading channel is simulated from time 0.
rayleighchan1 = comm.RayleighChannel('SampleRate',fs,...'MaximumDopplerShift',fD,...'RandomStream','mt19937ar with seed',...'Seed',17,...'FadingTechnique','Sum of sinusoids',...'ChannelFiltering',false,...'NumSamples',ns);
Create a clone of the multipath Rayleigh fading channel System object. In the cloned object, set the number of samples to view for the delayed paths. Also configure the initial time source as an input so that you can specify the fading channel offset time as an input argument when using the System object.
rayleighchan2 = clone(rayleighchan1); rayleighchan2.NumSamples = nsdel; rayleighchan2.InitialTimeSource ='Input port';
Save the path gain output for the continuous channel response by using therayleighchan1
object and for the discontinuous delayed channel responses by using therayleighchan2
object with initial time offsets are provided as input arguments.
pg0 = rayleighchan1(); pg1 = rayleighchan2(to1); pg2 = rayleighchan2(to2); pg3 = rayleighchan2(to3);
Compare the number of samples processed by the two channels by using the我nfo
object function. Therayleighchan1
object processed 1000 samples, while therayleighchan2
object processed only 300 samples.
G = info(rayleighchan1); H = info(rayleighchan2); [G.NumSamplesProcessed H.NumSamplesProcessed]
ans =1×21000 300
Convert the path gains into decibels.
pathGain0 = 20*log10(abs(pg0)); pathGain1 = 20*log10(abs(pg1)); pathGain2 = 20*log10(abs(pg2)); pathGain3 = 20*log10(abs(pg3));
Plot the path gains for the continuous and discontinuous cases. The gains for the three segments match the gain for the continuous case. Because the channel characteristics are maintained even when data is not transmitted, the alignment of the two plots shows that the sum-of-sinusoids technique is suited to the simulation of packetized data.
plot(t0,pathGain0,'r--') holdonplot(t1,pathGain1,'b') plot(t2,pathGain2,'b') plot(t3,pathGain3,'b') grid xlabel('Time (sec)') ylabel('Path Gain (dB)') legend('Continuous','Discontinuous','location','nw') title('Continuous and Discontinuous Transmission Path Gains')
Reproduce Multipath Rayleigh Fading Channel Response
Reproduce the multipath Rayleigh fading channel output across multiple frames by using theChannelFilterCoefficients
property returned by the info object function of thecomm.RayleighChannel
System object.
Create a multipath Rayleigh fading channel System object, defining two paths. Generate data to pass through the channel.
rayleighchan = comm.RayleighChannel(...'SampleRate',1000,...'PathDelays',[0 1.5e-3],...'AveragePathGains',[0 -3],...'PathGainsOutputPort',true)
rayleighchan = comm.RayleighChannel with properties: SampleRate: 1000 PathDelays: [0 0.0015] AveragePathGains: [0 -3] NormalizePathGains: true MaximumDopplerShift: 1.0000e-03 DopplerSpectrum: [1x1 struct] ChannelFiltering: true PathGainsOutputPort: true Show all properties
data = randi([0 1],600,1);
Pass data through the channel. Assign theChannelFilterCoefficients
property value to the variablecoeff
. Within afor
loop, calculate the fractional delayed input signal at the path delay locations stored incoeff
, apply the path gains, and sum the results for all of the paths. Compare the output of the multipath Rayleigh fading channel System object (查nout1
) to the output reproduced using the path gains and theChannelFilterCoefficients
property of the multipath Rayleigh fading channel System object (查nout2
).
查ninfo = info(rayleighchan); coeff = chaninfo.ChannelFilterCoefficients; Np = length(rayleighchan.PathDelays); state = zeros(size(coeff,2)-1,size(coeff,1)); nFrames = 10; chkChan = zeros(nFrames,1);forjj = 1 : nFrames data = randi([0 1],600,1); [chanout1,pg] = rayleighchan(data); fracdelaydata = zeros(size(data,1),Np);% Calculate the fractional delayed input signal.for我我= 1:Np [fracdelaydata(:,ii),state(:,ii)] =...filter(coeff(ii,:),1,data,state(:,ii));end% Apply the path gains and sum the results for all of the paths.% Compare the channel outputs.查nout2 = sum(pg .* fracdelaydata,2); chkChan(jj) = isequal(chanout1,chanout2);endchkChan'
ans =1×101 1 1 1 1 1 1 1 1 1
Verify Autocorrelation of Rayleigh Channel Path Gains
Verify that the autocorrelation of the path gain output from the Rayleigh channel System object is a Bessel function. The results in[ 1 ]and Appendix A of[ 2 ], show that when the autocorrelation of the path gain outputs is a Bessel function, the Doppler spectrum is Jakes-shaped.
Initialize simulation parameters.
Rsym = 9600;% Input symbol rate (symbols/s)sps = 10;% Number of samples per input symbolFs = sps*Rsym;% Input sampling frequency (samples/s)Ts = 1/Fs;% Input sampling period (s)numsym = 1e6;% Number of input symbols to simulatenumsamp = numsym*sps;% Number of channel samples to simulatefd = 100;% Maximum Doppler frequency shift (Hz)num_acsamp = 5000;% Number of samples of autocovariance% of complex fading process calculatednumtx = 1;% Number of transmit antennasnumrx = 1;% Number of receive antennasnumsin = 48;% Number of sinusoidsfrmLen = 10000; numFrames = numsamp/frmLen;
Configure a Rayleigh channel System object.
查n = comm.RayleighChannel(...'FadingTechnique','Sum of sinusoids',...'NumSinusoids',numsin,...'RandomStream','mt19937ar with seed',...'PathDelays',0,...'AveragePathGains',0,...'SampleRate',Fs,...'MaximumDopplerShift',fd,...'PathGainsOutputPort',true);
Apply DPSK modulation to a random bit stream.
tx = randi([0 1],numsamp,numtx);% Random bit streamdpskSig = dpskmod(tx,2);% DPSK signal
Pass the modulated signal through the channel.
outsig = zeros(numsamp,numrx); pg_rx = zeros(numsamp,numrx,numtx);forfrmNum = 1:numFrames [outsig((1:frmLen)+(frmNum-1)*frmLen,:),pathGains] =...查n(dpskSig((1:frmLen)+(frmNum-1)*frmLen,:));for我= 1:numrx pg_rx((1:frmLen)+(frmNum-1)*frmLen,i,:) =...pathGains(:,:,:,i);endend
Using the channel path gains received per antenna, compute the autocovariance of the fading process for each transmit-receive path.
autocov = zeros(frmLen+1,numrx,numtx); autocov_normalized_real = zeros(num_acsamp+1,numrx,numtx); autocov_normalized_imag = zeros(num_acsamp+1,numrx,numtx);for我= 1:numrx% Compute autocovariance of simulated complex fading processforj = 1:numtx autocov(:,i,j) = xcov(pg_rx(:,i,j),num_acsamp);% Real part of normalized autocovarianceautocov_normalized_real(:,i,j) =...real(autocov(num_acsamp+1:end,i,j).../ autocov(num_acsamp+1,i,j));% Imaginary part of normalized autocovarianceautocov_normalized_imag(:,i,j) =...我mag(autocov(num_acsamp+1:end,i,j).../ autocov(num_acsamp+1,i,j));endend
Compute the theoretical autocovariance of the complex fading process by using thebesselj
function.
Rrr = zeros(1,num_acsamp+1);forn = 1:1:num_acsamp+1 Rrr(n) = besselj(0,2*pi*fd*(n-1)*Ts);endRrr_normalized = Rrr/Rrr(1);
Display the autocovariance to compare the results from the Rayleigh channel System object and thebesselj
function.
subplot(2,1,1) plot(autocov_normalized_real,'b-') holdonplot(Rrr_normalized,'r-') holdofflegend('comm.RayleighChannel',...'Bessel function of the first kind') title('Autocovariance of Real Part of Rayleigh Process') subplot(2,1,2) plot(autocov_normalized_imag) legend('comm.RayleighChannel') title('Autocovariance of Imaginary Part of Rayleigh Process')
As computed below, the mean square error comparing the results from the Rayleigh channel object versus the Bessel function is insignificant.
act_mse_real =...sum((autocov_normalized_real-repmat(Rrr_normalized.',1,numrx,numtx)).^2,1).../ size(autocov_normalized_real,1)
act_mse_real = 7.0043e-08
act_mse_imag = sum((autocov_normalized_imag-0).^2,1).../ size(autocov_normalized_imag,1)
act_mse_imag = 4.1064e-07
References
1. Dent, P., G.E. Bottomley, and T. Croft. “Jakes Fading Model Revisited.”Electronics Letters29, no. 13 (1993): 1162. https://doi.org/10.1049/el:19930777.
2. Pätzold, Matthias.Mobile Fading Channels. Chichester, UK: John Wiley & Sons, Ltd, 2002. https://doi.org/10.1002/0470847808.
Compare PDF of Empirical and Theoretical Rayleigh Channel
Compute and plot the empirical and theoretical probability density function (PDF) for a Rayleigh channel with one path.
Initialize parameters and create a Rayleigh channel System object that does not apply channel filtering.
Ns = 1.92 e6;Rs = 1.92 e6;dopplerShift = 2000;查n = comm.RayleighChannel(...'SampleRate',Rs,...'PathDelays',0,...'AveragePathGains',0,...'MaximumDopplerShift',dopplerShift,...'ChannelFiltering',false,...'NumSamples',Ns,...'FadingTechnique','Sum of sinusoids');
Compute and plot the empirical and theoretical PDF for the Rayleigh channel, by using thefitdist
(Statistics and Machine Learning Toolbox)andpdf
(Statistics and Machine Learning Toolbox)functions.
figure; holdon;% Empirical PDF plotgain = chan(); pd = fitdist(abs(gain),'Kernel','BandWidth',.01); r = 0:.1:3; y = pdf(pd,r); plot(r,y)% Theoretical PDF plotexp_pdf_amplitude = raylpdf(r,0.7); plot(r,exp_pdf_amplitude') legend('Empirical','Theoretical') title('Empirical and Theoretical PDF Curves')
More About
Cutoff Frequency Factor
The cutoff frequency factor,fc, is dependent on the type of Doppler spectrum.
For any Doppler spectrum type other than Gaussian and bi-Gaussian,fcequals 1.
For a
doppler
('Gaussian')
spectrum type,fcequalsNormalizedStandardDeviation
.For a
doppler
('BiGaussian')
spectrum type:If the
PowerGains
(1)
andNormalizedCenterFrequencies
(2)
field values are both0
, thenfcequalsNormalizedStandardDeviation
(1)
.If the
PowerGains
(2)
andNormalizedCenterFrequencies
(1)
field values are both0
, thenfcequalsNormalizedStandardDeviation
(2)
.If the
NormalizedCenterFrequencies
field value is[0,0]
and theNormalizedStandardDeviation
field has two identical elements, thenfcequalsNormalizedStandardDeviation
(1)
.In all other cases,fcequals 1.
References
[1]Oestges, Claude, and Bruno Clerckx.MIMO Wireless Communications: From Real-World Propagation to Space-Time Code Design. 1st ed. Boston, MA: Elsevier, 2007.
[2]Correia, Luis M., and European Cooperation in the Field of Scientific and Technical Research (Organization), eds.Mobile Broadband Multimedia Networks: Techniques, Models and Tools for 4G. 1st ed. Amsterdam ; Boston: Elsevier/Academic Press, 2006.
[3]一般Kermoal, l·舒马赫K.I. Pedersen体育Mogensen, and F. Frederiksen. “A Stochastic MIMO Radio Channel Model with Experimental Validation.”IEEE Journal on Selected Areas in Communications20, no. 6 (August 2002): 1211–26. https://doi.org/10.1109/JSAC.2002.801223.
[4]Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan.Simulation of Communication Systems. Second edition. Boston, MA: Springer US, 2000.
[5]Patzold, M., Cheng-Xiang Wang, and B. Hogstad. “Two New Sum-of-Sinusoids-Based Methods for the Efficient Generation of Multiple Uncorrelated Rayleigh Fading Waveforms.”IEEE Transactions on Wireless Communications8, no. 6 (June 2009): 3122–31. https://doi.org/10.1109/TWC.2009.080769.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
To generate C code, set the
DopplerSpectrum
属性到一个多普勒谱结构。Code generation is available only when you set the
Visualization
property to'Off'
.SeeSystem Objects in MATLAB Code Generation(MATLAB Coder).
Version History
Introduced in R2013bR2022b:Updates to channel visualization display
The channel visualization feature now presents:
Configuration settings in the bottom toolbar on the plot window.
Plots side-by-side in one window when you select the
Impulse and frequency response
查nnel visualization option.
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina(Español)
- Canada(English)
- United States(English)
Europe
- 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)