Simulate transmission

Hello,

I would like to simulate a transmission in order to test the
configuration
of the receiver’s Costas loop.
I’d like to mix the modulated signal to IF, add some noise and convert
back
to baseband for demodulation. The frequency value configured for channel
selection at reception is to be slightly different from the real
frequency
used. Do you think this model is representative?

Here is how the simulation part is coded :

    # Transmission channel simulation (cc)

Mix to IF

lo = gr.sig_source_c(sample_rate, gr.GR_SIN_WAVE, if_freq, 1.0, 0)
mixer = gr.multiply_cc()
fg.connect(lo, (mixer, 1))

Take real part as transmit

ctof = gr.complex_to_float()

Simulate noise in the channel

noise = gr.noise_source_f(gr.GR_GAUSSIAN, noise_mag)
air_noise = gr.add_ff()
fg.connect(noise, (air_noise, 1))

Mix to baseband / channel selection

chan_taps = gr.firdes.low_pass(1.0, sample_rate, lp_cutoff, lp_tw,
gr.firdes.WIN_HAMMING)
chan_filter = gr.freq_xlating_fir_filter_fcf(1, chan_taps, if_freq,
sample_rate)

and it is connected as follows :

fg.connect(…, objMod, mixer, ctof, air_noise, chan_filter, objDemod,
…)

where objMod = dqpsk.dqpsk_mod() and objDemod = dqpsk.dqpsk_demod().

The code works without the transmission simulation part (fg.connect(…,
objMod, objDemod, …)).

Once I implement the simulation, data received is corrupted. Is
something
wrong in the code?

Regards,
Irene


View this message in context:
http://www.nabble.com/Simulate-transmission-tp17517019p17517019.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Wed, May 28, 2008 at 09:41:57AM -0700, irene159 wrote:

Hello,

I would like to simulate a transmission in order to test the configuration
of the receiver’s Costas loop.
I’d like to mix the modulated signal to IF, add some noise and convert back
to baseband for demodulation. The frequency value configured for channel
selection at reception is to be slightly different from the real frequency
used. Do you think this model is representative?

You may want to consider using the already existing channel_model block.

from gnuradio import blks2

channel = blks.channel_model(…)

Eric

class channel_model(gr.hier_block2):
def init(self, noise_voltage=0.0, frequency_offset=0.0,
epsilon=1.0, taps=[1.0,0.0], noise_seed=3021):
‘’’ Creates a channel model that includes:
- AWGN noise power in terms of noise voltage
- A frequency offest in the channel in ratio
- A timing offset ratio to model clock difference (epsilon)
- Multipath taps
‘’’
gr.hier_block2.init(self, “channel_model”,
gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature