def __init__( self,
                LOS_power, no_taps, vlen, have_LOS = True ):
    gr.hier_block2.__init__( self,
        "static_fading_channel",
        gr.io_signature( 1, 1, gr.sizeof_gr_complex ),
        gr.io_signature( 1, 1, gr.sizeof_gr_complex ) )

    channel = ofdm.itpp_tdl_channel( [0]*no_taps, range(no_taps) ) #dummy  values
    channel.set_channel_profile_exponential( no_taps )
    channel.set_fading_type( ofdm.Static )

    #channel.global_rng_reset( 9 )

    if have_LOS:
      LOS_rel_power = numpy.zeros( channel.taps() )
      print LOS_rel_power
      LOS_rel_doppler = numpy.zeros( channel.taps() )
      LOS_rel_power[0] = 10**(LOS_power/10.0)
      channel.set_LOS( LOS_rel_power, LOS_rel_doppler )

    assert( channel.get_fading_type() == ofdm.Static )
    assert( channel.taps() == no_taps )

    self.connect( self, channel, self )

    #freq_resp = numpy.zeros(vlen)
    #print freq_resp
    freq_resp = channel.calc_frequency_response( vlen )
    self.freq_resp = concatenate([ freq_resp[len(freq_resp)/2:len(freq_resp)],
                                   freq_resp[0:len(freq_resp)/2] ]) # shift

    self.channel = channel
    self.vlen = vlen
Esempio n. 2
0
  def __init__(self, bw):
    gr.hier_block2.__init__(self, "itpp_channel", 
        gr.io_signature(1,1,gr.sizeof_gr_complex),
        gr.io_signature(1,1,gr.sizeof_gr_complex))

    self._bandwidth=bw
    fad_chan= self.fad_chan = ofdm.itpp_tdl_channel(  ) #[0, -7, -20], [0, 2, 6]
    fad_chan.set_channel_profile( ofdm.ITU_Pedestrian_B, 1./self._bandwidth) #5e-8 )
    fad_chan.set_norm_doppler( 5e-7 )

    self.connect(self, fad_chan, self)

    fad_chan.set_norm_doppler( pow(10,-10) )
Esempio n. 3
0
    def __init__(self, bw):
        gr.hier_block2.__init__(self, "itpp_channel",
                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
                                gr.io_signature(1, 1, gr.sizeof_gr_complex))

        self._bandwidth = bw
        fad_chan = self.fad_chan = ofdm.itpp_tdl_channel(
        )  #[0, -7, -20], [0, 2, 6]
        fad_chan.set_channel_profile(ofdm.ITU_Pedestrian_B,
                                     1. / self._bandwidth)  #5e-8 )
        fad_chan.set_norm_doppler(5e-7)

        self.connect(self, fad_chan, self)

        fad_chan.set_norm_doppler(pow(10, -10))