Main Content

info

Characteristic information about fading channel object

Description

example

infostruct = info(obj) returns a structure containing characteristic information about the fading channel System object™.

Examples

collapse all

Use the info object function to get information from a comm.RayleighChannel object.

Create a Rayleigh channel object and some data to pass through the channel.

rayleighchan = comm.RayleighChannel('SampleRate',1000,'PathDelays',[0 0],'AveragePathGains',[0 0])
rayleighchan = 
  comm.RayleighChannel with properties:

             SampleRate: 1000
             PathDelays: [0 0]
       AveragePathGains: [0 0]
     NormalizePathGains: true
    MaximumDopplerShift: 1.0000e-03
        DopplerSpectrum: [1x1 struct]
       ChannelFiltering: true
    PathGainsOutputPort: false

  Show all properties

data = randi([0 1],600,1);

Check the Rayleigh channel object information.

info(rayleighchan)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: [2x1 double]
          NumSamplesProcessed: 0

Pass data through the channel and check the object information again.

rayleighchan(data);
info(rayleighchan)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: [2x1 double]
          NumSamplesProcessed: 600

Release the object so you can update attributes. Add a 1.5e-3 second path delay to the second delay path.

release(rayleighchan)
rayleighchan.PathDelays = [0 1.5e-3]
rayleighchan = 
  comm.RayleighChannel with properties:

             SampleRate: 1000
             PathDelays: [0 0.0015]
       AveragePathGains: [0 0]
     NormalizePathGains: true
    MaximumDopplerShift: 1.0000e-03
        DopplerSpectrum: [1x1 struct]
       ChannelFiltering: true
    PathGainsOutputPort: false

  Show all properties

Pass data through the channel and check the object information again.

rayleighchan(data);
info(rayleighchan)
ans = struct with fields:
           ChannelFilterDelay: 6
    ChannelFilterCoefficients: [2x16 double]
          NumSamplesProcessed: 600

Use the info object function to get information from a comm.RicianChannel object.

Create a Rician channel object and some data to pass through the channel.

ricianchan = comm.RicianChannel('SampleRate',500)
ricianchan = 
  comm.RicianChannel with properties:

                SampleRate: 500
                PathDelays: 0
          AveragePathGains: 0
        NormalizePathGains: true
                   KFactor: 3
    DirectPathDopplerShift: 0
    DirectPathInitialPhase: 0
       MaximumDopplerShift: 1.0000e-03
           DopplerSpectrum: [1x1 struct]
          ChannelFiltering: true
       PathGainsOutputPort: false

  Show all properties

data = randi([0 1],600,1);

Check the Rician channel object information.

info(ricianchan)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: 1
          NumSamplesProcessed: 0

Pass data through the channel and check the object information again.

ricianchan(data);
info(ricianchan)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: 1
          NumSamplesProcessed: 600

Release the object so you can update attributes. Add a second path delay with a delay of 3.1e-3 second and an average path gain of -3 dB.

release(ricianchan)
ricianchan.PathDelays = [0 3.1e-3];
ricianchan.AveragePathGains = [0 -3]
ricianchan = 
  comm.RicianChannel with properties:

                SampleRate: 500
                PathDelays: [0 0.0031]
          AveragePathGains: [0 -3]
        NormalizePathGains: true
                   KFactor: 3
    DirectPathDopplerShift: 0
    DirectPathInitialPhase: 0
       MaximumDopplerShift: 1.0000e-03
           DopplerSpectrum: [1x1 struct]
          ChannelFiltering: true
       PathGainsOutputPort: false

  Show all properties

Pass data through the channel and check the object information again.

ricianchan(data);
info(ricianchan)
ans = struct with fields:
           ChannelFilterDelay: 6
    ChannelFilterCoefficients: [2x16 double]
          NumSamplesProcessed: 600

Use the info object function to get information from a comm.MIMOChannel object.

Create a MIMO channel object and some data to pass through the channel.

mimo = comm.MIMOChannel('SampleRate',1000);
data = randi([0 1],600,2);

Check the MIMO channel object information.

info(mimo)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: 1
          NumSamplesProcessed: 0

Pass data through the channel and check the object information again.

mimo(data);
info(mimo)
ans = struct with fields:
           ChannelFilterDelay: 0
    ChannelFilterCoefficients: 1
          NumSamplesProcessed: 600

Release the object so you can update attributes. Add a 2.5e-3 second path delay. Recheck the object information.

release(mimo)
mimo.PathDelays = 2.5e-3;
info(mimo)
ans = struct with fields:
           ChannelFilterDelay: 5
    ChannelFilterCoefficients: [-0.0326 0.0403 -0.0504 0.0646 -0.0861 ... ]
          NumSamplesProcessed: 0

Show that the channel state is maintained for discontinuous transmissions by using MIMO channel System objects configured to use the sum-of-sinusoids fading 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]; % Path delays (s)
pathPower = [0 -6];      % Path power (dB)
fD = 5;                  % Maximum Doppler shift (Hz)
ns = 1000;               % Number of samples
nsdel = 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 starting at time 0 and three 100-sample channel responses starting 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 0
t1 = to1+(0:nsdel-1)/fs; % Transmission 1
t2 = to2+(0:nsdel-1)/fs; % Transmission 2
t3 = to3+(0:nsdel-1)/fs; % Transmission 3

Create a flat-fading 2-by-2 MIMO channel System object, disabling channel filtering and specifying a 1000 Hz sampling rate, the sum-of-sinusoids fading technique, and the number of samples to view. Specify a seed value so that results can be repeated. Use the default InitialTime property setting so that the fading channel is simulated from time 0.

mimoChan1 = comm.MIMOChannel('SampleRate',fs, ...
    'MaximumDopplerShift',fD, ...
    'RandomStream','mt19937ar with seed', ...
    'Seed',17, ...
    'FadingTechnique','Sum of sinusoids', ...
    'ChannelFiltering',false, ...
    'NumSamples',ns);

Create a clone of the MIMO channel System object. Change the number of samples for the delayed paths and the source for the initial time so that you can specify the fading channel offset time as an input argument when calling the System object.

mimoChan2 = clone(mimoChan1);
mimoChan2.InitialTimeSource = 'Input port';
mimoChan2.NumSamples = nsdel;

Save the path gain output for the continuous channel response by using the mimoChan1 object and for the discontinuous delayed channel responses by using the mimoChan2 object with initial time offsets provided as input arguments.

pg0 = mimoChan1();
pg1 = mimoChan2(to1);
pg2 = mimoChan2(to2);
pg3 = mimoChan2(to3);

Compare the number of samples processed by the two channels by using the info method. The results show that mimoChan1 processed 1000 samples and that mimoChan2 processed only 300 samples.

G = info(mimoChan1);
H = info(mimoChan2);
[G.NumSamplesProcessed H.NumSamplesProcessed]
ans = 1×2

        1000         300

Convert the path gains into decibels for the path corresponding to the first transmit and first receive antenna.

pathGain0 = 20*log10(abs(pg0(:,1,1,1)));
pathGain1 = 20*log10(abs(pg1(:,1,1,1)));
pathGain2 = 20*log10(abs(pg2(:,1,1,1)));
pathGain3 = 20*log10(abs(pg3(:,1,1,1)));

Plot the path gains for the continuous and discontinuous cases. The results show that the gains for the three segments match the gain for the continuous case. The alignment of the two shows that the sum-of-sinusoids technique is ideally suited to the simulation of packetized data because the channel characteristics are maintained even when data is not transmitted.

plot(t0,pathGain0,'r--')
hold on
plot(t1,pathGain1,'b')
plot(t2,pathGain2,'b')
plot(t3,pathGain3,'b')
grid
title('Continuous and Discontinuous Channel Response')
xlabel('Time (sec)')
ylabel('Path Gain (dB)')
legend('Continuous','Discontinuous','location','nw')

Figure contains an axes object. The axes object with title Continuous and Discontinuous Channel Response contains 4 objects of type line. These objects represent Continuous, Discontinuous.

Input Arguments

collapse all

System object to get information from, specified as a comm.MIMOChannel, comm.RayleighChannel, or comm.RicianChannel System object.

Output Arguments

collapse all

Structure containing these fields with information about the System object.

Channel filter delay in samples, returned as a positive integer.

Channel filter coefficients, returned as a matrix. The coefficient matrix is used to convert path gains to channel filter tap gains for each sample and each pair of transmit and receive antennas.

Number of samples processed by the channel object since the last reset, returned as a positive integer.

Last frame ending time in seconds, returned as a positive scalar. Use this value to confirm the simulation time.

Dependencies

This property applies when the FadingTechnique property is 'Sum of sinusoids' and the InitialTimeSource property is 'Input port'.

Introduced in R2012a