Help save net neutrality! Learn more.

T2-Base and T2-Lite profile basic implementation using CSP

  • md.sazzad hossen

    Hello every one!

    i am new in DVB-T2 CSP but i have already studied all the reference documents and various discussions related to CSP and V&V. Before start using CSP for my work i need to know some information about the capability of CSP because it's not clear to me at all. Is it possible/convenient to use CSP for research work which is not related to any company without any hard ward interface and implementation. For my work i need to calculate the BER for both T2-base profile and T2-Lite profile is it possible in CSP. If i want to use only two plp one plp carry T2-base and another plp carry t2-lite at a same time and then BER calculation, can i do using CSP. if i want to transmit one T2 profile in the FEF part of the other profile and then BER calculation is it possible in CSP. i am new in this platform, your advice and any suggestions will be helpful for me. is there any other software where i can simply simulation DVB-T2 without any hardward interface and implementation just for research work.

    i am looking forward to receive from Mr. Oliver Haffenden.

    Thanks in advance

  • Oliver Haffenden

    The CSP is a software simulation and is normally used without any hardware. As you can see from the other threads on this forum, the CSP can indeed be used for simulations of BER against SNR. It's not particularly fast so is only really suitable for simulations down to a BER of about 10^-4. Simulations at lower BERs, such as those reported in the DVB-T2 Implementation Guidelines (TS 102 831), generally make use either of hardware implementations or massively parallel software implementations making use of GPU hardware. The reason for this is that at lower BERs a longer period of time needs to be simulated in order to obtain a statistically significant number of errors and error events.

    T2-Base and T2-Lite are two different profiles of DVB-T2 signal: to conform to a given profile, all of the PLPs have to meet the constraints of the profile. The idea of having T2-Base and T2-Lite in different PLPs of that same DVB-T2 signal is meaningless. However, you can, as you suggest, have a T2-Base and T2-Lite components in a composite signal in which frames of each profile appear in the FEF of the other profile.

    The CSP can insert FEFs and can generate a composite signal by combining the results of two simulations, one for each component. However, this combining operation is currently done after the CSP has finished running. One straightforward improvement would be to define a new FEF type that reads a previously written file and uses that data to insert in the FEF. That would allow an end-to-end simulation of a signal with a FEF.

    However, for static channels (Gaussian, P1 and F1) the presence of a FEF is unlikely to make any difference to the BER performance. For time-varying channels it could make a difference because the channel could change significantly during the FEF, particularly for the T2-Lite signal which can have a FEF that is much longer than the T2-Frame. However, the CSP is not well suited for simulating time-varying channels because, like the low BER simulations, these require a much longer time period to be simulated in order to explore the statistics of the channel.

    The differences between T2-Base and T2-Lite are discussed in detail in clause 16 of the Implementation Guidelines (TS 102 831), but essentially the two profiles are subsets of a wider range of modes, in particular relating to FFT sizes, interleaving depths and code rates. There are many modes that conform to both profiles, and these modes would give identical performance whether designated as T2-Base or as T2-Lite. You therefore need to think carefully about what you actually want to compare.

  • md.sazzad hossen

    Dear Mr. Oliver Haffenden,
    many many thanks for your informative explanation about DVB-T2 two profile. Let me explain what i actually want to do with the help of CSP. First i need to analysis BER Vs SNR graph for T2-base profile and T2-Lite profile separately. Second t2-base profile in one plp and t2=-lite profile in another profile at a same time without using FEF part for BER Vs SNR. Third i need to analysis a composite signal with t2-lite profile in the FEF part of the t2-base profile signal for BER vs SNR.

    For analyzing the BER vs SNR graph i simply execute

    after 3 hour the simulation is finished. every thing is ok that i understood after observe the different threads of the forum but i can't understand who to plot BER vs SNR (ber vs snrVect as workpace file name)because vectors are not same length. also there are only three ber value which is not enough to plot any graph and also only two value in snrVect. so could you please tell me how can i get a BER vs SNR graph with more point.

    after analyzing "cfg_indep_var" and cfg_scenario" that i understood that "dvbt2bl_ber_snr" using only one plp for simulation ( or same configuration[QPSK, 2/3, 2.9, AWGN, Ideal] for all plp). If i want to change the configuration what should i need to do, need to change in matlab file or need to use run(........{....}) for different more thing if i want to use two different configuration at the same time then what to do,

    Hope you will give some good solution. Thanks in advance.

  • Oliver Haffenden

    For plotting BER vs SNR please see this thread and the French thread that I linked to (use Google Translate as necessary).

    If you are using the dvbt2bl_ber_snr simulation then yes, you should add the scenarios you want to simulate to cfg_scenario.m. If you look at the file you will see that a wide range of scenarios (code rates, channels etc) are already set up for you; you just need to uncomment the relevant lines and change which array is returned in the line:

    scenario =  AWGN_scenario;

    As explained in section 3.4 of BBC R&D White Paper 196, the simulation will run from the specified SNR until it reaches the target BER (typically 10^-4). Running it at higher SNRs is likely to be extremely time consuming and may never complete because of the requirement for 1000 errors. You can however start at lower SNR value; be warned however that the simulation times at low SNRs can be slow because the LDPC decoder has to perform the maximum number of iterations each time. If you want to add new code rates (e.g. to model T2-Lite), you should read carefully section 3.5 of the White Paper which explains the use of ber_snr_dico to find an appropriate starting SNR.

    Your other questions appear to repeat several points in your first post which I have attempted to address above. As I said, it is meaningless to have T2-Base in one PLP and T2-Lite in another. Please explain what you mean by this.

    Note that ber_snr does not simulate a compliant mode of DVB-T2, as is explained in the White Paper. If you want a T2-compliant mode you should probably use ber_snr_VV (see section 3.6 of the White Paper). However, note that designing your own mode is not straightforward.

  • md.sazzad hossen

    Dear Mr. Oliver,

    thanks for your response.
    "T2-base in one PLP and T2-Lite in another plp" i just want to use two different scenario ( configuration) without using FEF part in one simulation which is the main advantage of PLP concept, provide different configuration for different plp. is it possible in CSP, Could you please give me some hints.

    i observed the thread as you mentioned in your comments but please try to understand my point may be it's my fault, my question is not clear enough to understand, in order to plot
    i BER Vs SNR i need several point data of BER and SNR but in my case the ber only two values (0.000179249762583096 0.000708590534979424) and snrVect(9.60000000000000) only one value, how can i draw because not enough point to draw. i want to draw in range BER(0 to e-4) and SNR(0 to 25 ). may i need to simulate for each target BER for example (e-2, e-3,..) and find SNR value each time. in my result why ber contains only two value and snrVect contains one value, if i want to get more point in these vector then what should i need to do

    Thanks in advance

    • Oliver Haffenden

      "T2-base in one PLP and T2-Lite in another plp" i just want to use two different scenario ( configuration) without using FEF part in one simulation which is the main advantage of PLP concept, provide different configuration for different plp. is it possible in CSP, Could you please give me some hints.

      As I have tried to explain, T2-Lite and T2-Base are profiles of T2. To belong to a profile, all the PLPs have to have configurations that belong to that profile. The T2-Base and T2-Lite profiles place restrictions on the following (this is all clearly laid out in annex I of EN 302 655 V1.3.1):
      - FFT size, pilot pattern and guard interval; these are overall parameters and cannot be different for different PLPs
      - Code rate, constellation and interleaving depth; these are PLP-specific parameters and can therefore be different in different PLPs. Code rates 1/2, 3/5, 2/3 and 3/4 may be used in both profiles; 1/3 and 2/5 are T2-Lite-only; and 4/5 and 5/6 are T2-Base only.

      There are also differences in signalling. A signal can be either T2-Base, T2-Lite, or T2-Lite-compatible T2-Base . The latter case is signalled using the T2_BASE_LITE flag in the L1, and indicates amongst other things that all the PLPs use constellations and code rates that are in the intersection of the two profiles (e.g. the code rate is between 1/2 and 3/4).

      You can have for example a T2-Lite mode with code rate 1/3 in one PLP and rate 2/3 in another. Would that qualify as "T2-Base in one PLP and T2-Lite in another"? A 1.3.1 compliant T2-Base receiver would be able to decode it, and so would a T2-Lite-only receiver.

      Or do you mean e.g. rate 1/3 in one PLP and 5/6 in another? That would not be a legal T2 mode because 1/3 is illegal in T2-Base and 5/6 is illegal in T2-Lite.

      If you simply want to have different parameters in different PLPs, you could start by looking at the VV450-455 test cases, which include some examples.

      I'll deal with the BER measurement issue in a separate post for clarity.

      • md.sazzad hossen

        Daer Mr. Oliver,

        Thanks for your informative description, actually i am confused because of some information that i studied in EBU Tech 3384 r3, page- 112, where they mentioned

        Or T2-Base and T2-Lite are transmitted in separate PLP and no FEF mechanism is required.

        so i though that it maybe possible to transmit two profile in two plp at a same time without FEF mechanism but now it clear to me that

        Single PLP case: T2-base or T2-Lite or T2-lite compatible T2-base(composite signal)
        only one is possible

        Multiple PLP case: overall parameters(FFT size, pilot pattern, guard interval) if set in configuration such as 1)which support only T2-base(ex-16K,1/32,pp4)(32k,1/128,pp7)
        2)which support both T2-lite and T2-base(ex-16k,1/32,pp7)
        when case 1) different plp can be configure(code rate, constellation, interleaving depth) in any set which is only decode by regular service(fixed STB/TV,portable device but not low capacity device(mobile))

        when case 2) different plp can be configure(code rate, constellation, interleaving depth) in any set some are decode by regular service(STB/TV), some are decode by mobile device or portable device.

        on the other hand we can also say

        Signal can be T2-base(single or multiple, overall parameter(any configuration)) or T2-Lite(single or multiple,overall parameter(limited configuration)) or
        Composite signal(single or multiple, overall parameter(different/same configuration for two profile ))

        IF any thing is wrong please correct me.

        Could you please tell where i can get the reference file or code to study about test case VV450-455, in where the VVV450-MPLP1 contains only test point output no code or configuration.

        Again thanks for your cooperation and help.

  • Oliver Haffenden

    in order to plot
    i BER Vs SNR i need several point data of BER and SNR but in my case the ber only two values (0.000179249762583096 0.000708590534979424) and snrVect(9.60000000000000) only one value, how can i draw because not enough point to draw. i want to draw in range BER(0 to e-4) and SNR(0 to 25 ). may i need to simulate for each target BER for example (e-2, e-3,..) and find SNR value each time. in my result why ber contains only two value and snrVect contains one value, if i want to get more point in these vector then what should i need to do

    The thread I pointed you to suggested you use the text file rather than the .mat file. Have you tried that? I've looked at the scripts again, and have concluded that the snrVect and ber vectors are not intended as the final output results. They are saved and loaded as a way to enable the CSP to resume a simulation that was stopped partway through. In particular, as you've noticed, the SNR vector will always be missing its last entry, but the last element in the BER is also incorrect, since it keeps a running total of the BERs and only at the end does it divide by the number of seeds simulated to get the actual BER. (That's why the value, 0.0007, appears to be greater than the 0.0001 for a lower SNR).

    You say you want more values to plot: do you want more values at lower SNR, or higher SNR, or both? If you want values at lower SNR, you should change the starting SNR value in cfg_scenario.m. For example:

    %                  --Mod-----Cod.Rate-----Initial SNR----Noise-----
    AWGN_scenario     = {
    %                     'QPSK'     '1/2'   0.9  'AWGN'  'Ideal'; %     
    %                     'QPSK'     '3/5'   2.1  'AWGN'  'Ideal';    
    %                     'QPSK'     '2/3'   2.9  'AWGN'  'Ideal';      

    The initial SNR is in the column helpfully headed "Initial SNR", i.e. the value 0.9 in the row for QPSK rate 1/2. If you want more points at lower SNRs (and higher BER) you just need to put a lower value in here.

    If you want values at higher SNRs, you need to lower the target BER. That is set in test_dvbt2bl_ber_snr (or whichever simulation you are running), in a line like this:

    berTarget = 1e-4;

    Note that simulations always simulate a given SNR and measure the BER. There's no simple way of simulating a particular BER, which is what you appear to be wanting. The SNR can be controlled; the BER is the dependent variable that you observe.

  • Oliver Haffenden

    Yes, it sounds like you understand everything. Thanks for pointing me at the EBU document - in my opinion that section is slightly misleading and we may try to see if it could be clarified.

    The documentation for the T2 reference streams is in

  • md.sazzad hossen

    Dear Mr. Oliver,

    In last few days i am trying to find Out BER performance for configuration "VV463-MBSTATIC" but i could not. My working procedure as follow
    1) first i try to change configure according to ""VV463-MBSTATIC" In >>test_dvbt2bl_ber_snr/src/cfg/cfg_indep_var.m


    function DVBT2 = cfg_indep_var(DVBT2,Test_Path)
    % DVBT2 configuration
    % Parameter that controls the length of the simulation (could change to
    DVBT2.NUM_SIM_T2_FRAMES= 4; % Number of T2-Frames for model to generate (best to make it a multiple of all the P_I x I_JUMP)
    DVBT2.START_T2_FRAME = 0; % First T2-frame to generate (to allow generation of large files a frame at a time)

    % Specification version
    DVBT2.SPEC_VERSION = '1.2.1'; % 1.1.1 is the original blue book, 1.2.1 is with the changes agreed 2008-12-22

    DVBT2.TR_V_CLIP = inf;

    % Overall parameters
    DVBT2.MODE = '16k'; % Mode
    DVBT2.EXTENDED = 0; % Extended carrier mode: 1=extended 0=normal
    DVBT2.GI_FRACTION = 19/128;
    DVBT2.SP_PATTERN = 'PP3'; % Scattered pilot pattern
    DVBT2.L_DATA = 27; % Data Symbols per T2-frame
    DVBT2.N_T2 = 2; % Frames per superframe
    DVBT2.MISO_ENABLED = 0; % 1=MISO enabled 0=MISO disabled
    DVBT2.MISO_GROUP = 1; % MISO group = 1 or 2
    DVBT2.TR_ENABLED = 0; % 1=Tone Reservation used, 0=not used
    DVBT2.MIXED = 0; % mixed frame types
    DVBT2.NUM_SUBSLICES = 207; % subslices per frame
    DVBT2.BW = 8; % Bandwidth in MHz (8, 7, 6 or 5)

    DVBT2.L1_CONSTELLATION = '16-QAM'; % Constellation for L1-post

    DVBT2.NETWORK_ID = 12421; % 0x3085
    DVBT2.T2_SYSTEM_ID = 32769; % 0x8001
    DVBT2.FREQUENCY = 729833333; % Channel 53, negative offset

    DVBT2.NUM_PLPS = 2;

    DVBT2.PLP.BW = 8; % Bandwidth in MHz (8, 7, 6 or 5)

    % per-PLP parameters
    DVBT2.PLP(1).CONSTELLATION = '256-QAM'; % Constellation
    DVBT2.PLP(1).CRATE = '2/3'; % High priority stream coding rate
    DVBT2.PLP(1).FECLEN = 64800; % either 64800 or 16200
    DVBT2.PLP(1).NBLOCKS = 30; % Number of FEC blocks in one Interleaving Frame
    DVBT2.PLP(1).NUM_BLOCKS_MAX = 30; % Max number of FEC blocks in one Interleaving Frame
    DVBT2.PLP(1).NTI = 1; % Number of TI blocks in Interleaving Frame
    % (if 0 the interleaver is bypassed)
    DVBT2.PLP(1).P_I = 1; % Number of T2-frames to which Interleaving Frame is mapped
    DVBT2.PLP(1).I_JUMP = 1; % Number of T2-frames to skip (not implemented yet)
    DVBT2.PLP(1).FIRST_FRAME_IDX = 0; % First frame in which PLP appears (not implemented yet)
    DVBT2.PLP(1).ROTCON_BYPASS = 1; % Disable constellation rotation
    DVBT2.PLP(1).PLP_ID = 0;
    DVBT2.PLP(1).PLP_GROUP_ID = 0;
    DVBT2.PLP(1).PLP_TYPE = 1; % 0=common 1=Type 1 2=type 2
    DVBT2.PLP(1).IN_BAND_A_FLAG = 1;
    DVBT2.PLP(1).IN_BAND_B_FLAG = 0;
    DVBT2.PLP(1).OTHER_PLP_IN_BAND = []; % List of other PLPs to signal

    DVBT2.RX_PLP = 1; % which PLP to receive (serial number, not PLP_ID)

    DVBT2.PLP(2).CONSTELLATION = '16-QAM'; % Constellation
    DVBT2.PLP(2).CRATE = '3/5'; % High priority stream coding rate
    DVBT2.PLP(2).FECLEN = 64800; % either 64800 or 16200
    DVBT2.PLP(2).NBLOCKS = 32; % Number of FEC blocks in one Interleaving Frame
    DVBT2.PLP(2).NUM_BLOCKS_MAX = 32; % Max number of FEC blocks in one Interleaving Frame
    DVBT2.PLP(2).NTI = 1; % Number of TI blocks in Interleaving Frame
    % (if 0 the interleaver is bypassed)
    DVBT2.PLP(2).P_I = 1; % Number of T2-frames to which Interleaving Frame is mapped
    DVBT2.PLP(2).I_JUMP = 1; % Number of T2-frames to skip (not implemented yet)
    DVBT2.PLP(2).FIRST_FRAME_IDX = 0; % First frame in which PLP appears (not implemented yet)
    DVBT2.PLP(2).ROTCON_BYPASS = 1; % Disable constellation rotation
    DVBT2.PLP(2).PLP_ID = 1;
    DVBT2.PLP(2).PLP_GROUP_ID = 1;
    DVBT2.PLP(2).PLP_TYPE = 1; % 0=common 1=Type 1 2=type 2
    DVBT2.PLP(2).IN_BAND_A_FLAG = 1;
    DVBT2.PLP(2).IN_BAND_B_FLAG = 0;
    DVBT2.PLP(2).OTHER_PLP_IN_BAND = []; % List of other PLPs to signal

    DVBT2.RX_PLP = 2; % which PLP to receive (serial number, not PLP_ID)

    DVBT2.PLP(1).DESIGN_DELAY = 1131008+12089;
    DVBT2.PLP(2).DESIGN_DELAY = 1131008+12261;
    DVBT2.PLP(1).STREAM.BUFFER_SIZE = 2048 * 1024;
    DVBT2.PLP(2).STREAM.BUFFER_SIZE = 2048 * 1024;

    DVBT2.GROUP(1).DATA_PLPS = [1];
    DVBT2.GROUP(2).DATA_PLPS = [2];


    % Stream Configuration
    %DVBT2.PLP(1).STREAM.SIS_MIS = 1; % Single input
    %DVBT2.PLP(1).STREAM.CCM_ACM = 1; % CCM (?)
    DVBT2.PLP(1).STREAM.ISSYI = 1; % ISSY active
    DVBT2.PLP(1).STREAM.NPD = 1; % NULL packet deletion active
    DVBT2.PLP(1).STREAM.EXT = 0; % EXT field currently rfu

    DVBT2.PLP(2).STREAM.ISSYI = 0; % ISSY active
    DVBT2.PLP(2).STREAM.NPD = 0; % NULL packet deletion active
    DVBT2.PLP(2).STREAM.EXT = 0; % EXT field currently rfu

    % Settings for V&V test case
    %DVBT2.PLP(1).STREAM.TS_GS = 3; %TS
    %DVBT2.PLP(1).STREAM.UPL = 188*8; % user packet length: MPEG TS
    %DVBT2.PLP(1).STREAM.SYNC = hex2dec('47'); % user packet sync byte: MPEG TS
    %DVBT2.PLP(1).STREAM.MODE = 1; % high efficiency

    % Use these settings for the original PRBS (GCS mode)
    DVBT2.PLP(1).STREAM.TS_GS = 1; %GCS - for the original PRBS
    DVBT2.PLP(1).STREAM.UPL = 0; % user packet length: MPEG TS
    DVBT2.PLP(1).STREAM.SYNC = 0; % user packet sync byte: MPEG TS
    DVBT2.PLP(1).STREAM.MODE = 0; % normal mode

    DVBT2.PLP(2).STREAM.TS_GS = 1; %GCS - for the original PRBS
    DVBT2.PLP(2).STREAM.UPL = 0; % user packet length: MPEG TS
    DVBT2.PLP(2).STREAM.SYNC = 0; % user packet sync byte: MPEG TS
    DVBT2.PLP(2).STREAM.MODE = 0; % normal mode

    % I/O Configuration

    DVBT2.SIM.CSP_VERSION = '019001'; % 1.1.1 is the original blue book, 1.2.1 is with the changes agreed 2008-12-22
    DVBT2.SIM.EN_FIGS = 0; % Enable figure plotting
    DVBT2.SIM.EN_PAUSES = 1; % Enable pauses during execution
    DVBT2.SIM.SAVE_FIGS = 0; % Enable figure saving
    DVBT2.SIM.CLOSE_FIGS = 1; % Close figures after plotting
    DVBT2.SIM.SIMDIR = Test_Path; % Saving directory

    DVBT2.SIM.EN_MEX = 1; % Enable optimized function

    DVBT2.SIM_VV_PATH = '';


    DVBT2.SIM.PLP(1).RX_BBF_FILENAME = ''; % received BB frame file
    DVBT2.SIM.PLP(1).OUTPUT_BBF_FILENAME = ''; % output BB frames
    DVBT2.SIM.PLP(1).INPUT_BBF_FILENAME = ''; % output BB frames
    DVBT2.SIM.PLP(1).INPUT_TS_FILENAME = ''; % input TS file

    DVBT2.SIM.PLP(2).RX_BBF_FILENAME = ''; % received BB frame file
    DVBT2.SIM.PLP(2).OUTPUT_BBF_FILENAME = ''; % output BB frames
    DVBT2.SIM.PLP(2).INPUT_BBF_FILENAME = ''; % output BB frames
    DVBT2.SIM.PLP(2).INPUT_TS_FILENAME = ''; % input TS file

    % Transmitter parameters

    % Enables
    DVBT2.TX.ENABLE = 1; % TX enable
    DVBT2.TX.DATAGEN.ENABLE = 1; % Enable/Disable data generation
    DVBT2.TX.MADAPT.ENABLE = 1; % Enable/Disable mode adaption
    DVBT2.TX.BBSCRAMBLE.ENABLE = 1; % Enable/Disable BB scrambler
    DVBT2.TX.OCOD.ENABLE = 1; % Enable/Disable outer-coder block
    DVBT2.TX.ICOD.ENABLE = 1; % Enable/Disable inner-coder block
    DVBT2.TX.BINT.ENABLE = 1; % Enable/Disable bit interleaver
    DVBT2.TX.BMAP.ENABLE = 1; % Enable/Disable bit mapping
    DVBT2.TX.MAP.ENABLE = 1; % Enable/Disable mapper block
    DVBT2.TX.CONROT.ENABLE = 1; % Enable/Disable constellation rotation
    DVBT2.TX.CINT.ENABLE = 1; % Enable/Disable cell interleaver
    DVBT2.TX.TINT.ENABLE = 1; % Enable/Disable time interleaver
    DVBT2.TX.DMCELLS.ENABLE = 1; % Enable/Disable dummycell insertion
    DVBT2.TX.L1GEN.ENABLE = 0; % Enable/Disable L1 generation
    DVBT2.TX.FBUILD.ENABLE = 0; % Enable/Disable frame builder
    DVBT2.TX.FINT.ENABLE = 1; % Enable/Disable frequency interleaver
    DVBT2.TX.MISO.ENABLE = 1; % Enable/Disable MISO processing
    DVBT2.TX.FADAPT.ENABLE = 1; % Enable/Disable frame adaptation block
    DVBT2.TX.OFDM.ENABLE = 1; % Enable/Disable fft block
    DVBT2.TX.CP.ENABLE = 1; % Enable/Disable CP insertion block
    DVBT2.TX.P1.ENABLE = 0; % Enable/Disable P1 insertion block

    % I/O Filenames
    DVBT2.TX.DATAGEN_FDO = ''; % O: random data generator
    DVBT2.TX.MADAPT_FDI = ''; % I: stream adaptor
    DVBT2.TX.MADAPT_FDO = 'madapt_tx_do'; % O: mode adaptor
    DVBT2.TX.BBSCRAMBLE_FDI = 'madapt_tx_do'; % I: BB scrambler
    DVBT2.TX.BBSCRAMBLE_FDO = ''; % O: BB scrambler
    DVBT2.TX.OCOD_FDI = ''; % I: outer coder
    DVBT2.TX.OCOD_FDO = 'ocoder_tx_do'; % O: outer coder
    DVBT2.TX.ICOD_FDI = 'ocoder_tx_do'; % I: inner coder
    DVBT2.TX.ICOD_FDO = ''; % O: inner coder
    DVBT2.TX.BINT_FDI = ''; % I: bit interleaver
    DVBT2.TX.BINT_FDO = ''; % O: bit interleaver
    DVBT2.TX.BMAP_FDI = ''; % I: bit mapping
    DVBT2.TX.BMAP_FDO = 'bmap_tx_do'; % O: bit mapping
    DVBT2.TX.MAP_FDI = 'bmap_tx_do'; % I: mapper
    DVBT2.TX.MAP_FDO = ''; % O: mapper
    DVBT2.TX.CONROT_FDI = ''; % I: constellation rotation
    DVBT2.TX.CONROT_FDO = ''; % O: constellation rotation
    DVBT2.TX.CINT_FDI = ''; % I: cell interleaver
    DVBT2.TX.CINT_FDO = ''; % O: cell interleaver
    DVBT2.TX.TINT_FDI = ''; % I: time interleaver
    DVBT2.TX.TINT_FDO = ''; % O: time interleaver
    DVBT2.TX.DMCELLS_FDI = ''; % I: Dummy Cells Insertion
    DVBT2.TX.DMCELLS_FDO = ''; % O: Dummy Cells Insertion
    DVBT2.TX.L1GEN_FDI = ''; % I: L1 generator
    DVBT2.TX.L1GEN_FDO = ''; % O: L1 generator
    DVBT2.TX.TXSIGAUXGEN_FDI = ''; % I: Tx sig aux gen
    DVBT2.TX.TXSIGAUXGEN_FDO = ''; % O: Tx sig aux gen
    DVBT2.TX.FBUILD_FDI = ''; % I: Frame Builder
    DVBT2.TX.FBUILD_FDO = ''; % O: Frame Builder
    DVBT2.TX.FINT_FDI = ''; % I: Frequency interleaver
    DVBT2.TX.FINT_FDO = ''; % O: Frequency interleaver
    DVBT2.TX.MISO_FDI = ''; % I: MISO
    DVBT2.TX.MISO_FDO = ''; % O: MISO
    DVBT2.TX.FADAPT_FDI = ''; % I: frame builder
    DVBT2.TX.FADAPT_FDO = ''; % O: frame builder
    DVBT2.TX.OFDM_FDI = ''; % I: fft
    DVBT2.TX.OFDM_FDO = ''; % O: fft
    DVBT2.TX.PAPRTR_FDI = ''; % I: Tone reservation
    DVBT2.TX.PAPRTR_FDO = ''; % O: Tone reservation
    DVBT2.TX.CP_FDI = ''; % I: CP adder
    DVBT2.TX.CP_FDO = ''; % O: CP adder
    DVBT2.TX.FEF_FDI = ''; % I: FEF inserter
    DVBT2.TX.FEF_FDO = ''; % O: FEF inserter
    DVBT2.TX.TX_FDO = ''; % O: transmitter
    DVBT2.TX.P1_FDI = ''; % I: P1
    DVBT2.TX.P1_FDO = ''; % O: P1

    % Block type
    DVBT2.TX.TYPE = 'DVBT2BL'; % Transmiter type
    DVBT2.TX.DATAGEN.TYPE = 'DVBT2BL'; % Transport stream generator type
    DVBT2.TX.MADAPT.TYPE = 'DVBT2BL'; % Mode adaptor type
    DVBT2.TX.BBSCRAMBLE.TYPE = 'DVBT2BL'; % BB scramble type
    DVBT2.TX.OCOD.TYPE = 'DVBT2BL'; % Outer coder type
    DVBT2.TX.ICOD.TYPE = 'DVBT2BL'; % Inner coder type
    DVBT2.TX.BINT.TYPE = 'DVBT2BL'; % Bit interleaver type
    DVBT2.TX.BMAP.TYPE = 'DVBT2BL'; % Bit mapping type
    DVBT2.TX.CONROT.TYPE = 'DVBT2BL'; % constellation rotation type
    DVBT2.TX.CINT.TYPE = 'DVBT2BL'; % Cell interleaver type
    DVBT2.TX.TINT.TYPE = 'DVBT2BL'; % Time interleaver type
    DVBT2.TX.DMCELLS.TYPE = 'DVBT2BL'; % Dummy Cells type
    DVBT2.TX.FBUILD.TYPE = 'DVBT2BL'; % Frame Builder type
    DVBT2.TX.L1GEN.TYPE = 'DVBT2BL'; % L1 generator type
    DVBT2.TX.FINT.TYPE = 'DVBT2BL'; % Frequency interleaver type
    DVBT2.TX.MAP.TYPE = 'DVBT2BL'; % Mapper type
    DVBT2.TX.FADAPT.TYPE = 'DVBT2BL'; % Frame adaptation type
    DVBT2.TX.OFDM.TYPE = 'DVBT2BL'; % OFDM modulator type
    DVBT2.TX.CP.TYPE = 'DVBT2BL'; % Cyclic prefix type
    DVBT2.TX.P1.TYPE = 'DVBT2BL'; % Preamble type

    DVBT2.TX.DATAGEN.SEED = 0; % Random number generator seed

    % Constellation rotation options
    DVBT2.TX.CONROT.EN_CONST_A = 1; % Enable constellation rot plot
    DVBT2.TX.CONROT.CONSTA_FNAME = '_con_rot_a.fig'; % Figure name if saved

    % Channel parameters

    % Ch Enable
    DVBT2.CH.ENABLE = 1; % Channel enable
    DVBT2.CH.PSCEN.ENABLE = 1; % Enable/Disable channel convolution
    DVBT2.CH.NOISE.ENABLE = 1; % Enable/Disable noise

    % I/O Filenames
    DVBT2.CH.CH_FDI = ''; % I: channel
    DVBT2.CH.PSCEN_FDI = ''; % I: propagation scenario
    DVBT2.CH.PSCEN_FDO = 'pscen_ch_do'; % O: propagation scenario
    DVBT2.CH.NOISE_FDI = 'pscen_ch_do'; % I: noise adder
    DVBT2.CH.NOISE_FDO = 'ch_do'; % O: noise adder
    DVBT2.CH.CH_FDO = 'ch_do'; % O channel

    % Ch type
    DVBT2.CH.TYPE = 'DVBT'; % Channel type
    DVBT2.CH.PSCEN.TYPE = 'DVBT'; % Type of the propagation scenario
    DVBT2.CH.NOISE.TYPE = 'DVBT'; % Noise type

    % Propagation scenario configuration
    DVBT2.CH.PSCEN.SEED = 1; % Seed (if 0, random seeds will be used)
    %DVBT2.CH.PSCEN.CHSTR.TYPE = 'DVBT-F'; % DVB-T Fixed channel
    %DVBT2.CH.PSCEN.CHSTR.TYPE = 'DVBT-P'; % DVB-T portable channel
    DVBT2.CH.PSCEN.CHSTR.FDMAX = 0; % Maximum doppler frequency (Hz)

    % Noise configuration
    DVBT2.CH.NOISE.SNR = 100; % SNR (dB) (>100 == without noise)
    DVBT2.CH.NOISE.SEED = 1; % Seed (if 0, random seeds will be used)

    % Receiver parameters

    % Enables
    DVBT2.RX.ENABLE = 1; % RX enable
    DVBT2.RX.P1.ENABLE = 0; % Enable/Disable P1
    DVBT2.RX.CP.ENABLE = 1; % Enable/Disable CP remove block
    DVBT2.RX.OFDM.ENABLE = 1; % Enable/Disable fft block
    DVBT2.RX.CHE.ENABLE = 1; % Enable/Disable che block
    DVBT2.RX.FADAPT.ENABLE = 1; % Enable/Disable frame de-adaptation block
    DVBT2.RX.MISO.ENABLE = 1; % Enable/Disable MISO equalisation block
    DVBT2.RX.FDINT.ENABLE = 1; % Enable/Disable frequency de-interleaver
    DVBT2.RX.DMCELLS.ENABLE = 1; % Enable/Disable dummycell extraction
    DVBT2.RX.FEXTRACT.ENABLE = 0; % Enable/Disable frame extraction
    DVBT2.RX.TDINT.ENABLE = 1; % Enable/Disable bit de-interleaver
    DVBT2.RX.CDINT.ENABLE = 1; % Enable/Disable cell de-interleaver
    DVBT2.RX.ROTCON.ENABLE = 1; % Enable/Disable rot constell de-mapper block
    DVBT2.RX.BDMAP.ENABLE = 1; % Enable/Disable bit de-mapping
    DVBT2.RX.BDINT.ENABLE = 1; % Enable/Disable bit de-interleaver
    DVBT2.RX.IDCOD.ENABLE = 1; % Enable/Disable inner-decoder block
    DVBT2.RX.ODCOD.ENABLE = 0; % Enable/Disable outer-decoder block
    DVBT2.RX.SADAPT.ENABLE = 0; % Enable/Disable stream adaption

    % BER enables
    DVBT2.RX.BER.DMAP_EN = 1; % Enable/Disable BER after demaper
    DVBT2.RX.BER.BDINT_EN = 1; % Enable/Disable BER after bit de-interleaver
    DVBT2.RX.BER.IDCOD_EN = 1; % Enable/Disable BER after inner decoder
    DVBT2.RX.BER.ODCOD_EN = 0; % Enable/Disable BER after outer decoder
    DVBT2.RX.BER.SADAPT_EN = 0; % Enable/Disable BER after stream adaption

    % I/O Filenames
    DVBT2.RX.P1_FDI = ''; % Input file for P1 extraction
    DVBT2.RX.P1_FDO = ''; % Output file for P1 rxtraction
    DVBT2.RX.CP_FDI = 'ch_do'; % I: CP removal block
    DVBT2.RX.CP_FDO = ''; % O: CP removal block
    DVBT2.RX.OFDM_FDI = ''; % I: fft
    DVBT2.RX.OFDM_FDO = ''; % O: fft
    DVBT2.RX.CHE_FDI = ''; % I: Channel estimator
    DVBT2.RX.CHE_FDO = ''; % O: Channel estimator
    DVBT2.RX.CHE_FCH = 'pscen_ch_do'; % ideal Estimation file name
    DVBT2.RX.FADAPT_FDI = ''; % O: frame demodulator
    DVBT2.RX.FADAPT_FDO = ''; % I: frame demodulator
    DVBT2.RX.MISO_FDI = ''; % I: MISO equaliser
    DVBT2.RX.MISO_FDO = ''; % O: MISO equaliser
    DVBT2.RX.FDINT_FDI = ''; % I: frequency de-interleaver
    DVBT2.RX.FDINT_FDO = ''; % O: frequency de-interleaver
    DVBT2.RX.DMCELLS_FDI = ''; % I: Dummy Cells Extraction
    DVBT2.RX.DMCELLS_FDO = ''; % O: Dummy Cells Extraction
    DVBT2.RX.L1DECODE_FDI = ''; % I: L1 decode
    DVBT2.RX.L1DECODE_FDO = ''; % O: L1 decode
    DVBT2.RX.FEXTRACT_FDI = ''; % I: Frame Extraction
    DVBT2.RX.FEXTRACT_FDO = ''; % O: Frame Extraction
    DVBT2.RX.TDINT_FDI = ''; % I: time deinterleaver
    DVBT2.RX.TDINT_FDO = ''; % O: time deinterleaver
    DVBT2.RX.CDINT_FDI = ''; % I: cell deinterleaver
    DVBT2.RX.CDINT_FDO = ''; % O: cell deinterleaver
    DVBT2.RX.ROTCON_FDI = ''; % I: rot con de-mapper
    DVBT2.RX.ROTCON_FDO = ''; % O: rot con de-mapper
    DVBT2.RX.BDMAP_FDI = ''; % I: bit de-mapper
    DVBT2.RX.BDMAP_FDO = ''; % O: bit de-mapper
    DVBT2.RX.BDINT_FDI = ''; % I: bit de-interleaver
    DVBT2.RX.BDINT_FDO = ''; % O: bit de-interleaver
    DVBT2.RX.IDCOD_FDI = ''; % I: inner-decoder
    DVBT2.RX.IDCOD_FDO = ''; % O: inner-decoder
    DVBT2.RX.ODCOD_FDI = ''; % I: outer-decoder
    DVBT2.RX.ODCOD_FDO = ''; % O: outer-decoder
    DVBT2.RX.SADAPT_FDI = ''; % I: stream adaptor
    DVBT2.RX.SADAPT_FDO = ''; % O: stream adaptor

    DVBT2.RX.TYPE = 'DVBT2BL'; % Receiver type
    DVBT2.RX.P1.TYPE = 'DVBT2BL'; % P1 extraction type
    DVBT2.RX.CP.TYPE = 'DVBT2BL'; % Cyclic prefix removal type
    DVBT2.RX.OFDM.TYPE = 'DVBT2BL'; % OFDM demodulator type
    DVBT2.RX.CHE.TYPE = 'IDEAL'; % Channel estimator type
    DVBT2.RX.FADAPT.TYPE = 'DVBT2BL'; % Frame adaptation type
    DVBT2.RX.MISO.TYPE = 'DVBT2BL'; % MISO eq type
    DVBT2.RX.FDINT.TYPE = 'DVBT2BL'; % Frequency de-interleaver type
    DVBT2.RX.DMCELLS.TYPE = 'DVBT2BL'; % Time deinterleaver type
    DVBT2.RX.L1DECODE.TYPE = 'DVBT2BLCHEAT'; % L1 decoder type
    DVBT2.RX.FEXTRACT.TYPE = 'DVBT2BL'; % Frame extract type
    DVBT2.RX.TDINT.TYPE = 'DVBT2BL'; % Time deinterleaver type
    DVBT2.RX.CDINT.TYPE = 'DVBT2BL'; % Cell deinterleaver type
    DVBT2.RX.ROTCON.TYPE = 'DVBT2BL'; % Constellation de-rotation type
    DVBT2.RX.BDMAP.TYPE = 'DVBT2BL'; % Bit demapping type
    DVBT2.RX.BDINT.TYPE = 'DVBT2BL'; % Bit deinterleaver type
    DVBT2.RX.IDCOD.TYPE = 'DVBT2BL'; % Inner decoder type
    DVBT2.RX.ODCOD.TYPE = 'DVBT2BL'; % Outer decoder type
    DVBT2.RX.SADAPT.TYPE = 'DVBT2BL'; % Stream adaptor type

    % Constellation de-rotation options
    DVBT2.RX.ROTCON.EN_CONST_A = 1; % Enable constellation rot plot
    DVBT2.RX.ROTCON.CONSTA_FNAME = '_con_drot_a.fig'; % Figure name if saved
    DVBT2.RX.ROTCON.GA = 1; % Enable Genie-Aided Demapper

    % Channel estimator options
    DVBT2.RX.CHE.EN_HPLOT = 1; % Enable channel estimation plot
    DVBT2.RX.CHE.HPLOT_FNAME = '_estim_ch.fig'; % Figure file name if saved
    DVBT2.RX.CHE.EN_CONST_B = 1; % Enable constellation plot
    % before equalization
    DVBT2.RX.CHE.CONSTB_FNAME = '_const_b.fig'; % Figure file name if saved
    DVBT2.RX.CHE.EN_CONST_A = 1; % Enable constellation plot
    % after equalization
    DVBT2.RX.CHE.SYMBS = [8 10]; % Symbols to be plotted
    DVBT2.RX.CHE.CONSTA_FNAME = '_const_a.fig'; % Figure file name if saved

    % Decoder options
    DVBT2.RX.IDCOD.LDPC_MAXNIT = 50; % max number of iterations

    after that i simply run,


    but there is error like "Index exceeds matrix dimension"

    as far as i understand maybe some miss configuration, i am struggling to fix this configuration but i failed every time because every parameters are related to each other so any wrong input in any parameters leads to error. Is there any other way to run ber_snr in any configuration (VV test configuration as mentioned in the excel file) by just simply using run command such as

    run('dvbt2bl_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV007-16KFFT''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData''','DVBT2.CH.ENABLE=0','DVBT2.RX.ENABLE=0'})

    but this command generate test point output, i need output like ber_snr

    if my configuration like this
    guard interval=1/128
    pilot pattern= pp7

    PLP 1 configure
    const.=256 rotated
    code rate=2/3
    Ts bit rate= 7.9Mbp

    PLP 2 configure
    code rate=3/5
    Ts bit rate=1.9Mbp

    any other parameters you can configure as you want

    then what and where should i need to change in order to find ber_snr.

    Thanks in advance

  • Oliver Haffenden

    From above:

    If you want a T2-compliant mode you should probably use ber_snr_VV (see section 3.6 of the White Paper)

    This gives output in the same format but uses a DVB-T2-compliant mode.

  • md.sazzad hossen

    Dear Mr. Oliver ,

    thanks for your response

    Last edit: md.sazzad hossen 2014-06-05
  • Oliver Haffenden

    Please explain the specific difficulty you encountered when using the dvbt2bl_ber_snr_VV simulation as described in section 3.6 of WHP196. An example is given in utils/exampleCommands.m. You can change the simulated configuration by setting DVBT2.SIM.VV_CONFIG_NAME as illustrated in the dvbt2bl_VV examples further down.

  • md.sazzad hossen

    Dear Mr. Oliver,

    Several times i try to execute the following command

    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV463-MBSTATIC''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData''','DVBT2.CH.ENABLE=1','DVBT2.RX.ENABLE=1'})


    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV463-MBSTATIC''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData'''})

    but the problem is

    Out of memory. Type HELP MEMORY for your options.

    Error in bi2de (line 128)
    b = b2(:,n:-1:1);

    Could you please tell me what can i do in this situation? Is there any specific requirement of physical memory to work on this platfrom.

    Thanks in advance

  • Oliver Haffenden

    Does this happen in the bit interleaver? It's quite a common problem for the CSP to run out of memory at this stage. The V&V test cases all run on our Linux machine but some of them didn't used run on a Windows machine. We didn't establish the reason for the difference, whether it depends on the physical memory in the machine or on some aspect of the OS or MATLAB.

    It looks as though that simulation doesn't specify framewise operation, so you could try adding 'DVBT2.SIM.FRAMEWISE = true' to the override parameters. This should reduce the amount of data that it needs to process in one go.

    (See also the footnote on page 7 of the WHP196).

    Last edit: Oliver Haffenden 2014-06-13
  • md.sazzad hossen

    Dear Mr. Oliver,

    In order to avoid Out of memory problem, i have installed ubuntu 12.04 LTS(64 bit) and Matlab 2013b (64 bit) but now the problem in starting point when i execute Compile_mex.m error like this

    Checking tx_dvbt2vvdatagen directory
    /usr/bin/ld: cannot find -lstdc++
    collect2: ld returned 1 exit status

    mex: link of ' "/home/sazzad/Documents/DVB-T2/model/mex/lib/t2_ch_dvbtpscen_conv_fast.mexa64" ' failed.

    Unable to complete successfully
    Error in compile mex (line 63)

    could you please give me some suggestions how can i solve this problem

  • md.sazzad hossen

    Dear Mr. Oliver,

    Could you please suggest me a specific configuration of the pc and software to work on this platform without any system configuration problem

    Thanks in advance

  • Oliver Haffenden

    I can't really help with the mex problem. That doesn't seem to be anything to do with the CSP itself, it's just that in your Ubuntu/MATLAB installation, one or more of the libraries aren't where ld expects to find them. You probably need to do an Internet search to find other people with the same issue. There are lots of people who seem to have similar problems and some suggested solutions out there. You could start with this page, for example:

    If that doesn't solve your problem, try posting on those fora where there will be more active members to help with your question. (And if you do find the answer please post it back here for other users to benefit).

    Our Linux box is Debian GNU/Linux 5.0.4 (lenny) running on an Intel Xeon X3470 @ 2.93GHz. RAM size is 8GB.

  • md.sazzad hossen

    Dear Mr. Oliver,

    Hope you are fine.
    when i want to execute the following commands

    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV456-RES''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData'''})

    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV453-2GRPS''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData'''})


    Starting Tx Digital Video Broadcasting - DVB-T2: (DVBT2BL)
    Data generator: (DVBT2ITU)
    4362164 Bytes generated
    Data stored in workspace
    Error using t2_tx_dvbt2model2madapt (line 161)
    Assertion failed.

    Error in t2_tx_madapt_wr (line 78)
    data = t2_tx_dvbt2model2madapt(DVBT2, FidLogFile, data);

    Error in t2_tx_dvbt2bltx (line 62)
    t2_tx_madapt_wr(DVBT2, FidLogFile);

    Error in t2_tx_wr (line 67)
    t2_tx_dvbt2bltx(DVBT2, FidLogFile);

    Error in test_dvbt2bl_ber_snr_VV (line 164)

    Error in run (line 96)
    feval(runTest, test_path, work_path, fid_log, fid_rep, varargin);

    Could you please tell me how can i solve this problem
    thanks in advance

  • Oliver Haffenden


    When using the dvbt2bl_ber_snr_VV simulations, you should configure the V&V mode in sim/test_dvbt2bl_ber_snr_VV/src/cfg_cfg_scenario.m, because this overrides any value you set on the command line.

    For example, in the following line, the VV003 configuration is selected.

    AWGN_scenario     = {'VV003-CR23'      17.8      'AWGN'  'Ideal'};

    You should not set the configuration on the command line at all, as is the case in the example in exampleCommands.m.

    This allows a run of simulations to be done using different V&V configurations, but can put the CSP in an inconsistent state if it's configured first with one V&V mode and then with another.

    Sorry that this wasn't explained properly in the White Paper; we'd either forgotten about this or never realised there was a problem.

  • md.sazzad hossen

    Dear Mr. Oliver,

    Thanks for your clarification. I am facing another problem when i execute the command

    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV456-RES''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData'''})


    run('dvbt2bl_ber_snr_VV', 'work', 'stdout',{'DVBT2.SIM.VV_CONFIG_NAME=''VV453-2GRPS''','DVBT2.SIM.SIMDIR=''C:/local/dvb-t2/CSPData'''})

    error like this:

    Commandline parameters:
    Setting parameters for V&V test case VV456-RES
    Setting parameters for V&V test case VV456-RES
    Commandline parameters:
    Error using /
    Matrix dimensions must agree.

    Error in test_dvbt2bl_ber_snr_VV (line 115)
    maxSeeds = ceil(aveBitErrorsPerBlockminFecErrors/(berTargetDVBT2.STANDARD.PLP(1).ICOD.CR*...

    Error in run (line 96)
    feval(runTest, test_path, work_path, fid_log, fid_rep, varargin);


    could you please tell me how can i solve this problem. Thanks in advance

    Last edit: Oliver Haffenden 2014-07-08
  • Oliver Haffenden

    See my post above. Your command is still setting the V&V test case, in this part: DVBT2.SIM.VV_CONFIG_NAME=''VV456-RES'''. You should set it in the scenarios file, as explained above.


Log in to post a comment.