Exemplo n.º 1
0
def main(args):
    data_file_list = tl.get_data_file_list(args.library)
    if args.list:
        tl.print_list(data_file_list)
        sys.exit(0)
    data = tl.load_data_file(data_file_list, args.select)

    if not args.static:
        logging.debug('Remove zero velocity samples')
        data = ntp.remove_non_positive_velocity_samples(data)

    if args.ue == 'e398':
        # Rename MAC downlink throughput in Application downlink throughput if need be
        ntp.process_data(data, ntp.process_lte_rename_mac_to_app)

    ntp.process_data(data, ntp.process_lte_app_bw_prb_util)
    ntp.process_data(data, ntp.process_lte_app_bw_prb_util_bw10)
    ntp.process_data(data, ntp.process_lte_app_bw_prb_util_bw15)
    ntp.process_data(data, ntp.process_lte_app_bw_prb_util_bw20)
    ntp.process_data(data, ntp.process_lte_rsrp_rs_snr)
    ntp.process_data(data, ntp.process_lte_rsrp_rs_snr_full)
    ntp.process_data(data, ntp.process_se_bw_norm)
    ntp.process_data(data, ntp.process_velocity)

    column_list = [
        'Velocity', 'Velocity full', 'DL bandwidth', 'DL bandwidth full',
        'PRB utilization DL', 'PRB utilization DL full',
        'Application throughput downlink',
        'Application throughput downlink norm',
        'Application throughput downlink 10 norm',
        'Application throughput downlink 15 norm', 'RS SNR/Antenna port - 1',
        'RS SNR/Antenna port - 2', 'RS SNR/Antenna port - 1 full',
        'RS SNR/Antenna port - 2 full', 'RSRP/Antenna port - 1',
        'RSRP/Antenna port - 2', 'RSRP/Antenna port - 1 full',
        'RSRP/Antenna port - 2 full', 'SE norm'
    ]

    if args.select is None:
        df = tl.concat_pandas_data([df[column_list] for df in data])
    else:
        df = data

    # Remove outliers because of bandwidth normalization issues
    df['SE norm'][df['SE norm'] > 7.5] = np.nan

    print(df['Application throughput downlink'].describe())
    print(df['Application throughput downlink 10 norm'].describe())
    print(df['Application throughput downlink 15 norm'].describe())

    plt.ion()

    plt.figure()
    X = df[['RS SNR/Antenna port - 1 full', 'SE norm']].dropna()
    dpl.plot_scatter(X['RS SNR/Antenna port - 1 full'], X['SE norm'],
                     'RS-SNR AP 1', 'Spectral efficiency', 'dB', 'bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['RS SNR/Antenna port - 1 full'],
                    X['SE norm'],
                    'RS-SNR AP 1',
                    'Spectral efficiency',
                    'dB',
                    'bit/s/Hz',
                    bins=50)
    if args.print:
        plt.savefig(args.print[0], dpi=300, bbox_inches='tight')

    plt.figure()
    X = df[['RS SNR/Antenna port - 2 full', 'SE norm']].dropna()
    dpl.plot_scatter(X['RS SNR/Antenna port - 2 full'], X['SE norm'],
                     'RS-SNR AP 2', 'Spectral efficiency', 'dB', 'bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['RS SNR/Antenna port - 2 full'],
                    X['SE norm'],
                    'RS-SNR AP 2',
                    'Spectral efficiency',
                    'dB',
                    'bit/s/Hz',
                    bins=50)

    plt.figure()
    X = df[['Velocity', 'SE norm']].dropna()
    dpl.plot_scatter(X['Velocity'], X['SE norm'], 'Velocity',
                     'Spectral efficiency', 'km/h', 'bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['Velocity'],
                    X['SE norm'],
                    'Velocity',
                    'Spectral efficiency',
                    'km/h',
                    'bit/s/Hz',
                    bins=50)
    if args.print:
        plt.savefig(args.print[1], dpi=300, bbox_inches='tight')

    plt.figure()
    X = df[['Velocity', 'RS SNR/Antenna port - 1']].dropna()
    dpl.plot_hist2d(X['Velocity'],
                    X['RS SNR/Antenna port - 1'],
                    'Velocity',
                    'RS-SNR AP 1',
                    'km/h',
                    'dB',
                    bins=50)

    if args.print:
        plt.savefig(args.print[2], dpi=300, bbox_inches='tight')

    plt.figure()
    X = df[['Velocity', 'RS SNR/Antenna port - 2']].dropna()
    dpl.plot_hist2d(X['Velocity'],
                    X['RS SNR/Antenna port - 2'],
                    'Velocity',
                    'RS-SNR AP 2',
                    'km/h',
                    'dB',
                    bins=50)

    input('Press any key.')
def main(args):
    data_file_list = tl.get_data_file_list(args.library)
    if args.list:
        tl.print_list(data_file_list)
        sys.exit(0)
    data = tl.load_data_file(data_file_list,args.select)

    if not args.static:
        logging.debug('Remove zero velocity samples')
        data = ntp.remove_non_positive_velocity_samples(data)

    if args.ue == 'e398':
        # Rename MAC downlink throughput in Application downlink throughput if need be
        ntp.process_data(data,ntp.process_lte_rename_mac_to_app)

    ntp.process_data(data,ntp.process_lte_app_bw_prb_util)
    ntp.process_data(data,ntp.process_lte_app_bw_prb_util_bw10)
    ntp.process_data(data,ntp.process_lte_app_bw_prb_util_bw15)
    ntp.process_data(data,ntp.process_lte_app_bw_prb_util_bw20)
    ntp.process_data(data,ntp.process_lte_rsrp_rs_snr)
    ntp.process_data(data,ntp.process_lte_rsrp_rs_snr_full)
    ntp.process_data(data,ntp.process_se_bw_norm)
    ntp.process_data(data,ntp.process_velocity)

    column_list = ['Velocity', 'Velocity full',
                   'DL bandwidth','DL bandwidth full',
                   'PRB utilization DL','PRB utilization DL full',
                   'Application throughput downlink',
                   'Application throughput downlink norm',
                   'Application throughput downlink 10 norm','Application throughput downlink 15 norm',
                   'RS SNR/Antenna port - 1','RS SNR/Antenna port - 2',
                   'RS SNR/Antenna port - 1 full','RS SNR/Antenna port - 2 full',
                   'RSRP/Antenna port - 1','RSRP/Antenna port - 2',
                   'RSRP/Antenna port - 1 full','RSRP/Antenna port - 2 full',
                   'SE norm']

    if args.select is None:
        df = tl.concat_pandas_data([df[column_list] for df in data ])
    else:
        df = data

    # Remove outliers because of bandwidth normalization issues
    df['SE norm'][df['SE norm'] > 7.5] = np.nan

    print(df['Application throughput downlink'].describe())
    print(df['Application throughput downlink 10 norm'].describe())
    print(df['Application throughput downlink 15 norm'].describe())

    plt.ion()

    plt.figure()
    X = df[['RS SNR/Antenna port - 1 full','SE norm']].dropna()
    dpl.plot_scatter(X['RS SNR/Antenna port - 1 full'],
                     X['SE norm'],
                     'RS-SNR AP 1','Spectral efficiency',
                     'dB','bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['RS SNR/Antenna port - 1 full'],
                    X['SE norm'],
                    'RS-SNR AP 1','Spectral efficiency',
                    'dB','bit/s/Hz',
                    bins=50)
    if args.print:
        plt.savefig(args.print[0],dpi=300,bbox_inches='tight')

    plt.figure()
    X = df[['RS SNR/Antenna port - 2 full','SE norm']].dropna()
    dpl.plot_scatter(X['RS SNR/Antenna port - 2 full'],
                     X['SE norm'],
                     'RS-SNR AP 2','Spectral efficiency',
                     'dB','bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['RS SNR/Antenna port - 2 full'],
                    X['SE norm'],
                    'RS-SNR AP 2','Spectral efficiency',
                    'dB','bit/s/Hz',
                    bins=50)

    plt.figure()
    X = df[['Velocity','SE norm']].dropna()
    dpl.plot_scatter(X['Velocity'],
                     X['SE norm'],
                     'Velocity','Spectral efficiency',
                     'km/h','bit/s/Hz')

    plt.figure()
    dpl.plot_hist2d(X['Velocity'],
                     X['SE norm'],
                    'Velocity','Spectral efficiency',
                     'km/h','bit/s/Hz',bins=50)
    if args.print:
        plt.savefig(args.print[1],dpi=300,bbox_inches='tight')

    plt.figure()
    X = df[['Velocity','RS SNR/Antenna port - 1']].dropna()
    dpl.plot_hist2d(X['Velocity'],
                    X['RS SNR/Antenna port - 1'],
                    'Velocity','RS-SNR AP 1',
                    'km/h','dB',bins=50)

    if args.print:
        plt.savefig(args.print[2],dpi=300,bbox_inches='tight')

    plt.figure()
    X = df[['Velocity','RS SNR/Antenna port - 2']].dropna()
    dpl.plot_hist2d(X['Velocity'],
                    X['RS SNR/Antenna port - 2'],
                    'Velocity','RS-SNR AP 2',
                    'km/h','dB',bins=50)

    input('Press any key.')
Exemplo n.º 3
0
def main(args):
    data_file_list = tl.get_data_file_list(args.library)
    if args.list:
        tl.print_list(data_file_list)
        sys.exit(0)
    data = tl.load_data_file(data_file_list, args.select)

    if args.ue == 'e398':
        # Rename MAC downlink throughput in Application downlink throughput if need be
        ntp.process_data(data, ntp.process_lte_rename_mac_to_app)

    # Get basic data
    ntp.process_data(data, ntp.process_lte_app_bw_prb_util)
    # RSRP and RS-SNR
    ntp.process_data(data, ntp.process_lte_rsrp_rs_snr)
    ntp.process_data(data, ntp.process_lte_rsrp_rs_snr_full)
    # Spectral efficiency
    ntp.process_data(data, ntp.process_lte_se_rb)

    column_list = [
        'DL bandwidth', 'DL bandwidth full', 'Application throughput downlink',
        'PRB utilization DL', 'PRB utilization DL full',
        'RSRP/Antenna port - 1 full', 'RSRP/Antenna port - 2 full',
        'RS SNR/Antenna port - 1 full', 'RS SNR/Antenna port - 2 full',
        'SE RB norm'
    ]
    if args.select is None:
        df = dl.concat_pandas_data([df[column_list] for df in data])
    else:
        df = data

    print(df['SE RB norm'].describe())
    print(df['Application throughput downlink'].describe())
    print(df['RS SNR/Antenna port - 1 full'].describe())
    print(df['RS SNR/Antenna port - 2 full'].describe())
    print(df['RSRP/Antenna port - 1 full'].describe())
    print(df['RSRP/Antenna port - 2 full'].describe())

    # Normalize
    f_norm = lambda x: x / 1e6

    plt.ion()
    index = df[['SE RB norm', 'RS SNR/Antenna port - 1 full']].dropna().index
    plt.subplot2grid((1, 2), (0, 0))
    dpl.plot_scatter(df['RS SNR/Antenna port - 1 full'][index],
                     df['SE RB norm'][index],
                     'RS SNR AP1',
                     'SE RB',
                     'dB',
                     'bit/s/Hz',
                     marker_size=20,
                     alpha=.3)
    plt.subplot2grid((1, 2), (0, 1))
    dpl.plot_scatter(df['RS SNR/Antenna port - 2 full'][index],
                     df['SE RB norm'][index],
                     'RS SNR AP2',
                     'SE RB',
                     'dB',
                     'bit/s/Hz',
                     marker_size=20,
                     alpha=.3)

    plt.figure()
    plt.subplot2grid((1, 2), (0, 0))
    dpl.plot_scatter(df['RSRP/Antenna port - 1 full'][index],
                     df['SE RB norm'][index],
                     'RSRP AP1',
                     'SE RB',
                     'dBm',
                     'bit/s/Hz',
                     marker_size=20,
                     alpha=.3)
    plt.subplot2grid((1, 2), (0, 1))
    dpl.plot_scatter(df['RSRP/Antenna port - 2 full'][index],
                     df['SE RB norm'][index],
                     'RSRP AP2',
                     'SE RB',
                     'dBm',
                     'bit/s/Hz',
                     marker_size=20,
                     alpha=.3)

    input('Press any key')
def main(args):
    data_file_list = tl.get_data_file_list(args.library)
    if args.list:
        tl.print_list(data_file_list)
        sys.exit(0)
    data = tl.load_data_file(data_file_list,args.select)

    if args.ue == 'e398':
        # Rename MAC downlink throughput in Application downlink throughput if need be
        ntp.process_data(data,ntp.process_lte_rename_mac_to_app)

    # Get basic data
    ntp.process_data(data,ntp.process_lte_app_bw_prb_util)
    # RSRP and RS-SNR
    ntp.process_data(data,ntp.process_lte_rsrp_rs_snr)
    ntp.process_data(data,ntp.process_lte_rsrp_rs_snr_full)
    # Spectral efficiency
    ntp.process_data(data,ntp.process_lte_se_rb)

    column_list = ['DL bandwidth','DL bandwidth full',
                   'Application throughput downlink',
                   'PRB utilization DL','PRB utilization DL full',
                   'RSRP/Antenna port - 1 full', 'RSRP/Antenna port - 2 full',
                   'RS SNR/Antenna port - 1 full', 'RS SNR/Antenna port - 2 full',
                   'SE RB norm']
    if args.select is None:
        df = dl.concat_pandas_data([df[column_list] for df in data ])
    else:
        df = data

    print(df['SE RB norm'].describe())
    print(df['Application throughput downlink'].describe())
    print(df['RS SNR/Antenna port - 1 full'].describe())
    print(df['RS SNR/Antenna port - 2 full'].describe())
    print(df['RSRP/Antenna port - 1 full'].describe())
    print(df['RSRP/Antenna port - 2 full'].describe())

    # Normalize
    f_norm = lambda x: x/1e6

    plt.ion()
    index = df[['SE RB norm','RS SNR/Antenna port - 1 full']].dropna().index
    plt.subplot2grid((1,2), (0,0))
    dpl.plot_scatter(df['RS SNR/Antenna port - 1 full'][index],df['SE RB norm'][index],
                     'RS SNR AP1','SE RB',
                     'dB','bit/s/Hz',marker_size=20,alpha=.3)
    plt.subplot2grid((1,2), (0,1))
    dpl.plot_scatter(df['RS SNR/Antenna port - 2 full'][index],df['SE RB norm'][index],
                     'RS SNR AP2','SE RB',
                     'dB','bit/s/Hz',marker_size=20,alpha=.3)

    plt.figure()
    plt.subplot2grid((1,2), (0,0))
    dpl.plot_scatter(df['RSRP/Antenna port - 1 full'][index],df['SE RB norm'][index],
                     'RSRP AP1','SE RB',
                     'dBm','bit/s/Hz',marker_size=20,alpha=.3)
    plt.subplot2grid((1,2), (0,1))
    dpl.plot_scatter(df['RSRP/Antenna port - 2 full'][index],df['SE RB norm'][index],
                     'RSRP AP2','SE RB',
                     'dBm','bit/s/Hz',marker_size=20,alpha=.3)

    input('Press any key')