Borrar filtros
Borrar filtros

Maximum variable size allowed by the program is exceeded. FOR OCDM MODULATION

29 visualizaciones (últimos 30 días)
amani
amani el 26 de Jun. de 2024 a las 13:35
Editada: amani el 27 de Jun. de 2024 a las 14:47
i need a help plzzzz !
i would have the OCDM modulation BER SNR figure for 64 QAM
so had a problem at this point, matlab give me this problem : Maximum variable size allowed by the program is exceeded.
here is the code :
%% Simulation Parameters
% OCDM Modulation
num_OCDMGrdIntv = 16; %c'est = num_OCDMSymbol/16
num_OCDMSymbol = 256; % number of symbol
num_OCDMChirp = 256; %number of subcarriers
num_OCDMBlock = 2^6;
OCDMParam = struct;
OCDMParam.Num_GrdIntv = num_OCDMGrdIntv;
OCDMParam.Num_Symbol = num_OCDMSymbol;
OCDMParam.Num_Chirp = num_OCDMChirp;
OCDMParam.Num_Block = num_OCDMBlock;
% Symbol Mapping
num_ModemOrder = 64; % Oder da modulaQAM
%symbolConstMapping = qammod( ( 0 : 2^num_ModemOrder - 1 ).', 2^num_ModemOrder, 'InputType', 'integer', 'UnitAveragePower', true );
if num_ModemOrder==4
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder - 1 )/sqrt(1/2),num_OCDMSymbol);
end
if num_ModemOrder==16
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder - 1 )/sqrt(1/10),num_OCDMSymbol);
end
if num_ModemOrder==64
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder - 1 )/sqrt(1/46),num_OCDMSymbol);
end
% OCDM Channel Equalization
OCDMChEst_Param = struct;
OCDMChEst_Param.EQUMode = 1;
OCDMChEst_Param.SNR = 100;
OCDMChEst_Param.CFR = 1;
% Signal Frame
num_InfoBit = num_ModemOrder * num_OCDMSymbol * num_OCDMBlock;
num_ModSignal = ( num_OCDMChirp + num_OCDMGrdIntv ) * num_OCDMBlock;
% Multipath Fading Channel
mode_Multipath = 'LTE-EVA';
switch mode_Multipath
case 'AWGN'
case 'EquiPath'
Ch_MultiPath_PDP = [ 1, 1, 1, 1, 1, 1 ].'; % Power delay profile
Ch_MultiPath_DP = [ 0, 6, 8, 11, 17, 25 ].'; % Delay profile
case 'LTE-EVA'
Ch_EVA_DelayProfile = [
0 0.0
30 -1.5
150 -1.4
310 -3.6
370 -0.6
710 -9.1
1090 -7.0
1730 -12.0
2510 -16.9
];
Ch_MultiPath_PDP = 10.^( Ch_EVA_DelayProfile( : , 2 ) ./ 10 );
Ch_MultiPath_DP = round( Ch_EVA_DelayProfile( : , 1 ) ./ 1e9 .* 100e6 );
otherwise
end

Respuesta aceptada

Steven Lord
Steven Lord el 26 de Jun. de 2024 a las 14:15
Since:
num_ModemOrder = 64; % Oder da modulaQAM
This line of code (which I've commented out since it's not going to work and I want later lines of code in this answer to run):
% symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder - 1 )/sqrt(1/46),num_OCDMSymbol);
would try to create a vector with 2^num_ModemOrder elements.
format longg
numberOfElements = 2^num_ModemOrder
numberOfElements =
1.84467440737096e+19
The maximum possible array size in MATLAB is given by the second output of the computer function.
[~, maximumPossibleSize] = computer
maximumPossibleSize =
281474976710655
Is numberOfElements greater than that maximum possible size?
toolarge = numberOfElements > maximumPossibleSize
toolarge = logical
1
Yes. How much larger?
toolargefactor = numberOfElements ./ maximumPossibleSize
toolargefactor =
65536.0000000002
It's over 65k times too large.
But let's say that MATLAB (really, it's your operating system's limit on how much memory it can address at once) didn't have that limitation. How much memory would be required to store that vector? Since that vector is real, each element takes up 8 bytes.
bytes = 8*numberOfElements;
petabytes = bytes/(1e15)
petabytes =
147573.952589676
exabytes = petabytes/1000
exabytes =
147.573952589676
Your machine doesn't have the 147+ exabytes that would be required to store that vector. [To show you just how large that is one exabyte, according to Wikipedia, is roughly the global monthly Internet traffic in 2004.]
You're going to need to rethink your approach to solve whatever problem you're trying to solve.
  3 comentarios
Steven Lord
Steven Lord el 26 de Jun. de 2024 a las 15:13
From that same Wikipedia page I linked above, 1 petabyte is approximately two thousand years of MP3-encoded music. If you used all the memory your vector would occupy to store MP3-encoded music instead, it would hold:
format longg
num_ModemOrder = 64; % Oder da modulaQAM
numberOfElements = 2^num_ModemOrder;
bytes = 8*numberOfElements;
petabytes = bytes/(1e15);
yearsOfMusic = 2000*petabytes
yearsOfMusic =
295147905.179353
pretty close to 300 million years of music.
Your computer does not have enough memory to even try to create such a gigantic array. It's not even close.
The only solution is to find a different approach to solve your problem, one that does not require storing an array of that size. Yes, computers can be powerful. But they're not magic. They have limitations and this is one of them.
amani
amani el 26 de Jun. de 2024 a las 15:25
yeah sadly the machine limitation, oki thank you @Steven Lord.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Propagation and Channel Models en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by