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]

  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]

  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]

  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]

  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: [1x16 double]
          NumSamplesProcessed: 0

Create a MIMO channel object and pass data through it using the sum-of-sinusoids technique. The example demonstrates how the channel state is maintained in cases in which data is discontinuously transmitted.

Define the overall simulation time and three time segments for which data will be transmitted. In this case, the channel is simulated for 1 s with a 1000 Hz sampling rate. One 1000-sample, continuous data sequence is transmitted at time 0. Three 100-sample data packets are transmitted at time 0.1 s, 0.4 s, and 0.7 s.

t0 = 0:0.001:0.999;   % Transmission 0
t1 = 0.1:0.001:0.199; % Transmission 1
t2 = 0.4:0.001:0.499; % Transmission 2
t3 = 0.7:0.001:0.799; % Transmission 3

Generate random binary data corresponding to the previously defined time intervals.

d0 = randi([0 1],1000,2);  % 1000 samples
d1 = randi([0 1],100,2);   % 100 samples
d2 = randi([0 1],100,2);   % 100 samples
d3 = randi([0 1],100,2);   % 100 samples

Create a flat fading 2x2 MIMO channel System object with the Sum of sinusoids fading technique. So that results can be repeated, specify a seed using a name-value pair. As the InitialTime property is not specified, the fading channel will be simulated from time 0. Enable the path gains output port.

mimoChan1 = comm.MIMOChannel('SampleRate',1000, ...
    'MaximumDopplerShift',5, ...
    'RandomStream','mt19937ar with seed', ...
    'Seed',17, ...
    'FadingTechnique','Sum of sinusoids', ...
    'PathGainsOutputPort',true);

Create a clone of the MIMO channel System object. Set the InitialTimeSource property to Input port so that the fading channel offset time can be specified as an input argument to the mimoChan function.

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

Pass random binary data through the first channel object, mimoChan1. Data is transmitted over all 1000 time samples. For this example, only the complex path gain is needed.

[~,pg0] = mimoChan1(d0);

Pass random data through the second channel object, mimoChan2, where the initial time offsets are provided as input arguments.

[~,pg1] = mimoChan2(d1,0.1);
[~,pg2] = mimoChan2(d2,0.4);
[~,pg3] = mimoChan2(d3,0.7);

Compare the number of samples processed by the two channels using the info method. You can see that 1000 samples were processed by mimoChan1 while only 300 were processed by mimoChan2.

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. Observe that the gains for the three segments perfectly match the gain for the continuous case. The alignment of the two highlights that the sum-of-sinusoids technique is ideally suited to the simulation of packetized data as 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
xlabel('Time (sec)')
ylabel('Path Gain (dB)')
legend('Continuous','Discontinuous','location','nw')

Figure contains an axes. The axes 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