TWO CELL SIMULATION

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #10414
    BP
    Participant

    Sir
    I tried simulating two cells first has one base station and one user equipment whereas second has one base station and two user equipment’s. It is giving me an error given below:
    In an assignment A(:) = B, the number of elements in A and B must be the same.

    Error in Elements.BaseStation/generateTransmitSignal (line 80)
    modulationMatTemp(~logical(sum(currentMod.ChannelEstimator.PilotMatrix,3)))
    = dataSymbolsPrecoded(:,iAntenna);

    Error in main (line 81)
    BS{iBS}.generateTransmitSignal(LinksParFor);

    #10487

    Hi,

    there is likely an error with the simulated topology or antenna configuration. Please post the entire simulation parameters from the scenario file such that I can review them.

    best
    Stefan

    #10488
    BP
    Participant

    Sir
    I have been running this code with different power delay profiles like pedestrian A ,Vehicular A so on
    each time it gives different error.

    %% Simulation Parameters
    % set link types to simulate
    scStr.simulation.simulateDownlink = true; % downlink
    scStr.simulation.simulateUplink = false; % uplink
    scStr.simulation.simulateD2D = false; % device to device links

    % plot options
    scStr.simulation.plotOverSNR = true; % select to plot resulty over SNR instead of pathloss

    % define a sweep parameter
    scStr.simulation.sweepParam = {‘simulation.pathloss’}; % sweep ove pathloss to obtain results over SNR
    scStr.simulation.sweepValue = linspace(140,110,8); % Define parameter values to sweep over, in dB. A good starting point for the pathloss is 150 to 110

    scStr.simulation.nFrames = 1000; % number of frames to simulate per sweep value

    scStr.simulation.txPowerUser = [30,30,30];
    scStr.simulation.txPowerBaseStation = [30,30]; % 10dB more transmit power for UE1

    scStr.simulation.pathloss = 80;

    scStr.simulation.nAntennasUser = [1,1,1]; % single antenna setup for all nodes
    scStr.simulation.nAntennasBaseStation = [1,1];

    scStr.simulation.centerFrequency = 2.5e9;
    scStr.simulation.channelEstimationMethod = ‘PilotAided’;
    scStr.simulation.pilotPattern = ‘LTE Downlink’;
    scStr.simulation.equalizerType = ‘One-Tap’;
    scStr.simulation.receiverTypeMIMO = ‘ZF’;

    %% Topology
    % Specifiy all the nodes in ascending order with starting
    % index of 1 (BS0 or UE0 is not allowed).
    scStr.topology.nodes = [‘BS1,BS2,UE1,UE2,UE3’]; % 2 cells with one user each

    % Primary (desired) links
    scStr.topology.primaryLinks = [ ‘BS1:UE1,’…
    ‘BS2:UE2,’…% downlink links only
    ‘BS2:UE3’ ];

    % Interference Links
    scStr.topology.interferenceGeneration = ‘Automatic’; % automatic generation of interference links
    scStr.topology.attenuation = 30; % set attenuation to zero to virtually have two users in one cell

    scStr.topology.interferingLinks = [ ‘BS1:UE2*0,’… % unused
    ‘BS2:UE1*0’];

    %% Modulation Parameters
    % waveform
    scStr.modulation.waveform = { ‘f-OFDM’, … % waveform for each BS:
    ‘f-OFDM’ }; % ‘OFDM’ – Orthogonal Frequency Division Multiplexing
    % ‘FBMC’ – Filer Bank MultiCarrier
    % ‘UFMC’ – Universal Filtered MultiCarrier
    % ‘f-OFDM’ – filtered OFDM
    % ‘WOLA’ – Weighted OverLap and Add

    % parameters for FBMC
    scStr.modulation.prototypeFilter = ‘PHYDYAS-OQAM’; % prototype filter for FBMC:
    % ‘Hermite-OQAM’
    % ‘Hermite-QAM’
    % ‘Rectangle-QAM’
    % ‘RRC-OQAM’
    % ‘RRC-QAM’
    % ‘PHYDYAS-OQAM’
    % ‘PHYDYAS-QAM’

    % parameters for UFMC
    scStr.modulation.nSubcarriersPerSubband = [12,12]; % number of subcarriers per subband
    scStr.modulation.FilterLength = [112, 28]; % filter length

    % SISO transmission
    scStr.modulation.transmissionMode = ‘spatial multiplexing’; % SM with single antenna equals a SISO transmission
    scStr.modulation.precodingCodebook = ‘custom’;
    scStr.modulation.mcs = [15, 15];
    scStr.modulation.nStreams = [1, 1];
    scStr.modulation.precodingMatrix{1} = 1;
    scStr.modulation.precodingMatrix{2} = 1;
    scStr.modulation.precodingMatrix{3} = 1;
    % time and bandwidth setup
    scStr.modulation.subcarrierSpacing = [15e3, 60e3]; % select a four times bigger subcarrier spacing in the second cell
    scStr.modulation.numerOfSubcarriers = [208, 52]; % to have the same bandwidth, the total number of subcarriers must be one fourth on the second cell
    scStr.modulation.nSymbolsTotal = [15, 60]; % to have the same frame duration, the total number of symbols must be four times higher in the second cell
    scStr.modulation.nGuardSymbols = [1, 4]; % the total guard time has to be four times larger in the second cell to make frame durations match
    scStr.modulation.samplingRate = ‘Automatic’; % sampling rate has to be the same for all nodes (across all base stations):
    % either numeric value for manual setting or ‘Automatic’
    scStr.modulation.oversamplingFactor = 2; % oversampling factor for sampling rate calculation, should be at least two

    %% Channel Coding Parameters
    scStr.coding.code = {‘Turbo’, ‘Turbo’};
    scStr.coding.decoding = { ‘MAX-Log-MAP’,…
    ‘MAX-Log-MAP’};
    scStr.coding.decodingIterations = [10, 10];

    %% Schedule
    % both users are scheduled the same total bandwidth
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:96,UE2:112’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘none:28,UE3:24’ ]; % second user gets the lower half of the second cells’s schedule

    %% Channel Parameters
    scStr.simulation.userVelocity = [30,40,50];
    scStr.channel.dopplerModel = ‘Jakes’;
    scStr.channel.nPaths = 50;
    scStr.channel.powerDelayProfile = ‘ExtendedVehicularA’;

    #10489
    BP
    Participant

    Sir
    whenever i run simple topologies with vehicularA and ExtendedVehicular A it takes more than 2 hrs to run.Is there any solution to this problem

    #10523

    Hi,

    in your topology and link configuration you assign UE1 to BS1 and UE2 and UE3 to BS2:

    % Primary (desired) links
    scStr.topology.primaryLinks = [ ‘BS1:UE1,’…
    ‘BS2:UE2,’…% downlink links only
    ‘BS2:UE3’ ];

    However, in your downlink schedule, you assign UE1 and UE2 to BS1 and UE3 to BS2:

    %% Schedule
    % both users are scheduled the same total bandwidth
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:96,UE2:112’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘none:28,UE3:24’ ]; % second user gets the lower half of the second cells’s schedule

    which is not consistent with your topology setting.

    best
    Stefan

    #10524

    Hi,

    regarding the simulation time: The channel PDP model does not have any impact on the run time. However, as you are using 1000 frames, the simulation will take some time of course. I recommend to test you desired settings with a lower number of frames, e.g., 100, and then to increase the number of frames for more significant results once you verified that your settings lead to expected behavior.

    best
    Stefan

    #10525
    BP
    Participant

    Sir
    Sorry!I pasted the wrong one now below i am pasting the correct code but it is again giving me error “In an assignment A(:) = B, the number of elements in A and B must be the same.

    Error in Elements.BaseStation/generateTransmitSignal (line 80)
    modulationMatTemp(~logical(sum(currentMod.ChannelEstimator.PilotMatrix,3)))
    = dataSymbolsPrecoded(:,iAntenna);

    Error in main (line 81)
    BS{iBS}.generateTransmitSignal(LinksParFor);

    >> ”

    CODE

    numerology scenario
    %
    % simulation setup to show simulation with different subcarrier
    % spacings for different users with UFMC modulation

    %% Simulation Parameters
    % set link types to simulate
    scStr.simulation.simulateDownlink = true; % downlink
    scStr.simulation.simulateUplink = false; % uplink
    scStr.simulation.simulateD2D = false; % device to device links

    % plot options
    scStr.simulation.plotOverSNR = true; % select to plot resulty over SNR instead of pathloss

    % define a sweep parameter
    scStr.simulation.sweepParam = {‘simulation.pathloss’}; % sweep ove pathloss to obtain results over SNR
    scStr.simulation.sweepValue = linspace(140,110,8); % Define parameter values to sweep over, in dB. A good starting point for the pathloss is 150 to 110

    scStr.simulation.nFrames = 1000; % number of frames to simulate per sweep value

    scStr.simulation.txPowerUser = [30,30,30];
    scStr.simulation.txPowerBaseStation = [30, 30]; % 10dB more transmit power for UE1

    scStr.simulation.pathloss = 80;

    scStr.simulation.nAntennasUser = [1, 1,1]; % single antenna setup for all nodes
    scStr.simulation.nAntennasBaseStation = [1, 1];

    scStr.simulation.centerFrequency = 2.5e9;
    scStr.simulation.channelEstimationMethod = ‘PilotAided’;
    scStr.simulation.pilotPattern = ‘LTE Downlink’;
    scStr.simulation.equalizerType = ‘One-Tap’;
    scStr.simulation.receiverTypeMIMO = ‘ZF’;

    %% Topology
    % Specifiy all the nodes in ascending order with starting
    % index of 1 (BS0 or UE0 is not allowed).
    scStr.topology.nodes = [‘BS1,BS2,UE1,UE2,UE3’]; % 2 cells with one user each

    % Primary (desired) links
    scStr.topology.primaryLinks = [ ‘BS1:UE1,’…
    ‘BS2:UE2,’… % downlink links only
    ‘BS2:UE3’ ];

    % Interference Links
    scStr.topology.interferenceGeneration = ‘Automatic’; % automatic generation of interference links
    scStr.topology.attenuation = 30; % set attenuation to zero to virtually have two users in one cell

    scStr.topology.interferingLinks = [ ‘BS1:UE2*0,’… % unused
    ‘BS2:UE1*0’];

    %% Modulation Parameters
    % waveform
    scStr.modulation.waveform = { ‘UFMC’, … % waveform for each BS:
    ‘UFMC’ }; % ‘OFDM’ – Orthogonal Frequency Division Multiplexing
    % ‘FBMC’ – Filer Bank MultiCarrier
    % ‘UFMC’ – Universal Filtered MultiCarrier
    % ‘f-OFDM’ – filtered OFDM
    % ‘WOLA’ – Weighted OverLap and Add

    % parameters for FBMC
    scStr.modulation.prototypeFilter = ‘PHYDYAS-OQAM’; % prototype filter for FBMC:
    % ‘Hermite-OQAM’
    % ‘Hermite-QAM’
    % ‘Rectangle-QAM’
    % ‘RRC-OQAM’
    % ‘RRC-QAM’
    % ‘PHYDYAS-OQAM’
    % ‘PHYDYAS-QAM’

    % parameters for UFMC
    scStr.modulation.nSubcarriersPerSubband = [12, 12]; % number of subcarriers per subband
    scStr.modulation.FilterLength = [112, 28]; % filter length

    % SISO transmission
    scStr.modulation.transmissionMode = ‘spatial multiplexing’; % SM with single antenna equals a SISO transmission
    scStr.modulation.precodingCodebook = ‘custom’;
    scStr.modulation.mcs = [15, 15];
    scStr.modulation.nStreams = [1, 1];
    scStr.modulation.precodingMatrix{1} = 1;
    scStr.modulation.precodingMatrix{2} = 1;

    % time and bandwidth setup
    scStr.modulation.subcarrierSpacing = [15e3, 60e3]; % select a four times bigger subcarrier spacing in the second cell
    scStr.modulation.numerOfSubcarriers = [208, 52]; % to have the same bandwidth, the total number of subcarriers must be one fourth on the second cell
    scStr.modulation.nSymbolsTotal = [15, 60]; % to have the same frame duration, the total number of symbols must be four times higher in the second cell
    scStr.modulation.nGuardSymbols = [1, 4]; % the total guard time has to be four times larger in the second cell to make frame durations match
    scStr.modulation.samplingRate = ‘Automatic’; % sampling rate has to be the same for all nodes (across all base stations):
    % either numeric value for manual setting or ‘Automatic’
    scStr.modulation.oversamplingFactor = 2; % oversampling factor for sampling rate calculation, should be at least two

    %% Channel Coding Parameters
    scStr.coding.code = {‘Turbo’, ‘Turbo’};
    scStr.coding.decoding = { ‘MAX-Log-MAP’,…
    ‘MAX-Log-MAP’};
    scStr.coding.decodingIterations = [10,10];

    %% Schedule
    % both users are scheduled the same total bandwidth
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:96,none:112’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘UE2:28,UE3:24’ ]; % second user gets the lower half of the second cells’s schedule

    %% Channel Parameters
    scStr.simulation.userVelocity = [30,40,50];
    scStr.channel.dopplerModel = ‘Jakes’;
    scStr.channel.nPaths = 50;
    scStr.channel.powerDelayProfile = ‘ExtendedVehicularA’;

    #10542
    BP
    Participant

    Sir
    Moreover when i tried it with LDPC coding it again gave me some error.

    Error using speye
    Input arguments must be nonnegative integers less than MAXSIZE as defined by COMPUTER. Use HELP COMPUTER for
    more details.

    Error in Coding.ChannelCodingComponents.LDPCCoding.LDPCLift (line 172)
    A = speye(Zi,Zi);

    Error in Coding.ChannelCoding/update (line 298)
    Coding.ChannelCodingComponents.LDPCCoding.LDPCLift(obj);

    Error in Elements.Link/updateLink (line 156)
    obj.NrInputBits = obj.ChannelCoder.update(nCodedBits);

    Error in main (line 68)
    Links{BS{iBS}.ID, iLink}.updateLink( simParams );

    >> CODE
    % numerology scenario
    %
    % simulation setup to show simulation with different subcarrier
    % spacings for different users with UFMC modulation

    %% Simulation Parameters
    % set link types to simulate
    scStr.simulation.simulateDownlink = true; % downlink
    scStr.simulation.simulateUplink = false; % uplink
    scStr.simulation.simulateD2D = false; % device to device links

    % plot options
    scStr.simulation.plotOverSNR = true; % select to plot resulty over SNR instead of pathloss

    % define a sweep parameter
    scStr.simulation.sweepParam = {‘simulation.pathloss’}; % sweep ove pathloss to obtain results over SNR
    scStr.simulation.sweepValue = linspace(140,110,8); % Define parameter values to sweep over, in dB. A good starting point for the pathloss is 150 to 110

    scStr.simulation.nFrames = 1000; % number of frames to simulate per sweep value

    scStr.simulation.txPowerUser = [30,30,30];
    scStr.simulation.txPowerBaseStation = [30,30]; % 10dB more transmit power for UE1

    scStr.simulation.pathloss = 80;

    scStr.simulation.nAntennasUser = [1,1,1]; % single antenna setup for all nodes
    scStr.simulation.nAntennasBaseStation = [1,1];

    scStr.simulation.centerFrequency = 2.5e9;
    scStr.simulation.channelEstimationMethod = ‘PilotAided’;
    scStr.simulation.pilotPattern = ‘LTE Downlink’;
    scStr.simulation.equalizerType = ‘One-Tap’;
    scStr.simulation.receiverTypeMIMO = ‘ZF’;

    %% Topology
    % Specifiy all the nodes in ascending order with starting
    % index of 1 (BS0 or UE0 is not allowed).
    scStr.topology.nodes = [‘BS1,BS2,UE1,UE2,UE3’]; % 2 cells with one user each

    % Primary (desired) links
    scStr.topology.primaryLinks = [ ‘BS1:UE1,’…
    ‘BS2:UE2,’…% downlink links only
    ‘BS2:UE3’ ];

    % Interference Links
    scStr.topology.interferenceGeneration = ‘Automatic’; % automatic generation of interference links
    scStr.topology.attenuation = 30; % set attenuation to zero to virtually have two users in one cell

    scStr.topology.interferingLinks = [ ‘BS1:UE2*0,’… % unused
    ‘BS2:UE1*0’];

    %% Modulation Parameters
    % waveform
    scStr.modulation.waveform = { ‘UFMC’, … % waveform for each BS:
    ‘UFMC’ }; % ‘OFDM’ – Orthogonal Frequency Division Multiplexing
    % ‘FBMC’ – Filer Bank MultiCarrier
    % ‘UFMC’ – Universal Filtered MultiCarrier
    % ‘f-OFDM’ – filtered OFDM
    % ‘WOLA’ – Weighted OverLap and Add

    % parameters for FBMC
    scStr.modulation.prototypeFilter = ‘PHYDYAS-OQAM’; % prototype filter for FBMC:
    % ‘Hermite-OQAM’
    % ‘Hermite-QAM’
    % ‘Rectangle-QAM’
    % ‘RRC-OQAM’
    % ‘RRC-QAM’
    % ‘PHYDYAS-OQAM’
    % ‘PHYDYAS-QAM’

    % parameters for UFMC
    scStr.modulation.nSubcarriersPerSubband = [12,12]; % number of subcarriers per subband
    scStr.modulation.FilterLength = [112, 28]; % filter length

    % SISO transmission
    scStr.modulation.transmissionMode = ‘spatial multiplexing’; % SM with single antenna equals a SISO transmission
    scStr.modulation.precodingCodebook = ‘custom’;
    scStr.modulation.mcs = [15, 15];
    scStr.modulation.nStreams = [1, 1];
    scStr.modulation.precodingMatrix{1} = 1;
    scStr.modulation.precodingMatrix{2} = 1;
    scStr.modulation.precodingMatrix{3} = 1;
    % time and bandwidth setup
    scStr.modulation.subcarrierSpacing = [15e3, 60e3]; % select a four times bigger subcarrier spacing in the second cell
    scStr.modulation.numerOfSubcarriers = [208, 52]; % to have the same bandwidth, the total number of subcarriers must be one fourth on the second cell
    scStr.modulation.nSymbolsTotal = [15, 60]; % to have the same frame duration, the total number of symbols must be four times higher in the second cell
    scStr.modulation.nGuardSymbols = [1, 4]; % the total guard time has to be four times larger in the second cell to make frame durations match
    scStr.modulation.samplingRate = ‘Automatic’; % sampling rate has to be the same for all nodes (across all base stations):
    % either numeric value for manual setting or ‘Automatic’
    scStr.modulation.oversamplingFactor = 2; % oversampling factor for sampling rate calculation, should be at least two

    %% Channel Coding Parameters
    scStr.coding.code = {‘LDPC’, ‘LDPC’};
    scStr.coding.decoding = { ‘Min-Sum’,…
    ‘Min-Sum’};
    scStr.coding.decodingIterations = [10, 10];

    %% Schedule
    % both users are scheduled the same total bandwidth
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:96,UE2:112’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘none:28,UE3:24’ ]; % second user gets the lower half of the second cells’s schedule

    %% Channel Parameters
    scStr.simulation.userVelocity = [30,40,50];
    scStr.channel.dopplerModel = ‘Jakes’;
    scStr.channel.nPaths = 50;
    scStr.channel.powerDelayProfile = ‘ExtendedVehicularA’;

    • This reply was modified 2 years, 9 months ago by BP.
    #10553
    BP
    Participant

    Sir
    The above problem is solved..Thanks alot but i have a doubt regarding scheduling of resources.I have 2 cells one of which has one base station and one user equipment and another has one base station and one user equipment. I did the scheduling in order to provide UE1 36 subcarriers and 12 subcarriers as guard band whereas 12 subcarriers to UE2 AND 12 SUBCARRIERS AS GUARD BAND.Is it correct.

    % parameters for UFMC
    scStr.modulation.nSubcarriersPerSubband = [12, 12]; % number of subcarriers per subband
    scStr.modulation.FilterLength = [60, 36]; % filter length

    % SISO transmission
    scStr.modulation.transmissionMode = ‘spatial multiplexing’; % SM with single antenna equals a SISO transmission
    scStr.modulation.precodingCodebook = ‘custom’;
    scStr.modulation.mcs = [15, 15];
    scStr.modulation.nStreams = [2, 2];
    scStr.modulation.precodingMatrix{1} = 1/sqrt(2) * eye(2);
    scStr.modulation.precodingMatrix{2} = 1/sqrt(2) * eye(2);

    % time and bandwidth setup
    scStr.modulation.subcarrierSpacing = [15e3, 30e3]; % select a four times bigger subcarrier spacing in the second cell
    scStr.modulation.numerOfSubcarriers = [96, 48]; % to have the same bandwidth, the total number of subcarriers must be one fourth on the second cell
    scStr.modulation.nSymbolsTotal = [15, 30]; % to have the same frame duration, the total number of symbols must be four times higher in the second cell
    scStr.modulation.nGuardSymbols = [1, 2]; % the total guard time has to be four times larger in the second cell to make frame durations match
    scStr.modulation.samplingRate = 15e3*72*2; % sampling rate has to be the same for all nodes (across all base stations):
    % either numeric value for manual setting or ‘Automatic’
    scStr.modulation.oversamplingFactor = 2; % oversampling factor for sampling rate calculation, should be at least two

    %% Channel Coding Parameters
    scStr.coding.code = {‘Turbo’, ‘Turbo’};
    scStr.coding.decoding = { ‘MAX-Log-MAP’,…
    ‘MAX-Log-MAP’};
    scStr.coding.decodingIterations = [8,8];

    %% Schedule
    % both users are scheduled the same total bandwidth
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:36,none:60’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘none:36,UE2:12’ ]`

    ———————————————————–

    If i wish to add more UEs in this system.can we write this:
    scStr.schedule.fixedSchedule{1} = [ ‘UE1:36,UE2:60’ ]; % first user gets the upper half of the first cells’s schedule
    scStr.schedule.fixedSchedule{2} = [ ‘UE3:36,UE4:12’ ]

    #10580

    With this setting there are 540kHz in between the users, which corresponds to 36 subcarriers at 15kHz or to 18 subcarriers at 30kHz.

    best
    Stefan

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.