Esempio n. 1
0
def plotPowerProfile(cell, rep, iter_, consumption=0.):
    """Plot the OFDMA power allocation of one cell"""
    from plotting import channelplotter
    powerProfile = np.sum(cell.OFDMA_power,axis=0) # add power over antennas
    powerProfile = np.maximum(1e-3, powerProfile) # for plotting, avoids -Inf
    powerProfile = utils.db2dbm(utils.WTodB(powerProfile))
    colorProfile = cell.outmap
    title = 'Power profile repetition {}, iteration {}, {:.2f} W consumption'.format(rep, iter_, consumption)
    channelplotter.hist3d(powerProfile, title, outpath+'powerprofile_rep'+str(rep).zfill(3)+'_iter'+str(iter_).zfill(3), colorProfile)
Esempio n. 2
0
def plotPowerProfiles(wrld, rep, iter_):
    """Plot the OFDMA power allocation of all cells"""
    
    from plotting import channelplotter
    powerProfiles = np.empty([50,10,len(wrld.cells)])
    colorProfiles = np.empty([50,10,len(wrld.cells)])
    for i in np.arange(len(wrld.cells)):
        powerProfiles[:,:,i] = utils.db2dbm(utils.WTodB(np.maximum(1e-3, np.sum(wrld.cells[i].OFDMA_power,axis=0))))
        colorProfiles[:,:,i] = wrld.cells[i].outmap.copy()
    title = 'Power profiles rep {}, iteration {}'.format(rep, iter_)
    channelplotter.hist3d(powerProfilex, title, outpath+'powerprofiles_rep'+str(rep).zfill(3)+'_iter'+str(iter_).zfill(3), colorProfile)
Esempio n. 3
0
def plotPowerProfiles(wrld, rep, iter_):
    """Plot the OFDMA power allocation of all cells"""
    
    from plotting import channelplotter
    powerProfiles = np.empty([50,10,len(wrld.cells)])
    colorProfiles = np.empty([50,10,len(wrld.cells)])
    for i in np.arange(len(wrld.cells)):
        powerProfiles[:,:,i] = utils.db2dbm(utils.WTodB(np.maximum(1e-3, np.sum(wrld.cells[i].OFDMA_power,axis=0))))
        colorProfiles[:,:,i] = wrld.cells[i].outmap
    title = 'Power profiles rep {}, iteration {}'.format(rep, iter_)
    channelplotter.hist3d(powerProfilex, title, outpath+'powerprofiles_rep'+str(rep).zfill(3)+'_iter'+str(iter_).zfill(3), colorProfile)