First of all thank you very much for replying and I will refrain from posing questions that way.
I still have some doubts about this. I will be thankful to you if you clear these. I want to de-spread a spread spectrum signal. I have a transmitter that transmits data spread using PN sequence. These can be any type such as m-sequence or gold sequence. I want to strip the PN sequence from the received spread spectrum signal. We get complex baseband signal from USRP_source. I want to write C++ blocks to do this. a. How can I multiply this to this received complex baseband? Can I do it directly on this complex representation? b. The output of this needs to be input to the costas loop for carrier tracking and I want the result of the above step in complex. Thanks, Peng. On Mon, Jun 15, 2009 at 6:01 PM, Bob McGwier <[email protected]> wrote: > Sir: > > Welcome to GnuRadio and happy to have a newcomer. Let me spend some time > on netiquette here. Asking the same question, many times in many different > ways is a sure fired way to get LESS help and for it to be delayed by an > irritation factor. > > To convert a complex signal to real, it depends on where you are doing it. > You are writing what looks like C/C++. There are gr_complex types for > GnuRadio in C++. Let us assume you have a complex number X. Then X.re() > is the real part. > > Your x(t) is not "making the signal real", it is modulating the complex > signal Y at baseband by the complex carrier exp(j 2pi t fc). > > This gives > > Yc(t)Cos(2*pi*fc*t) - Yi(t)Sin(2*pi*fc*t) > > > > as the REAL PART of that modulation process. > Yc(t)Sin(2*pi*fc*t) + Yi(t)Cos(2*pi*fc*t) is the imaginary part of that > complex modulation process. > > > > This is not taking the real part, or "making it real", it is making a > passband signal out of a baseband signal. > > Your question is somewhat ill posed. Assuming that you meant modulating > the signal away from zero frequency by > the carrier frequency fc, and taking the real part to get a passband > signal, then the answer to your question is yes, you did it right. > > Bob > > > > > Peng Huo wrote: > >> sorry a correction, >> >> To convert this complex signal to a real, one has to do >> >> this according to the following formula, isn't it? >> >> x(t) = Yc(t)Cos(2*pi*fc*t) - Yi(t)Sin(2*pi*fc*t) where Yc(t) -> >> Inphase component,Yi(t)-> Quadrature component, fc -> Carrier frequency, >> x(t) -> real signal. >> >> >> >> I looked at the block "complex_to_real" and it outputs the Inphase >> component >> as the real signal. Is it because, "fc" is 0Hz as the signal being at >> baseband? I think this sounds right. >> >> >> >> I want to mulitply this real signal with a PN sequence and then pass >> the result >> on to a costas loop which takes a complex input. I want to know how can >> we >> get a complex signal from a real one. Is there a block that does that? >> >> >> The book "Communication Systems" by Simon Haykin 2nd edition says, >> - The complex envelope g_complex(t) equals a frequency shifted version >> of the pre-envelope g+(t) as shown >> g_complex(t) = g+(t)*exp(-j2*pi*fc*t), where fc-> >> carrier frequency. >> >> >> and the pre-envelop is defined as, g+(t) = g_real(t) + >> j*g_hilbert(t). >> >> I suppose this is what I need to do to get what I want. Is there a >> block that does it all? >> >> Thanks, >> Peng. >> >> >> P.S. - I am sorry but I thought to make sure before I go ahead so that >> I don't spend time doing things that may be unnecessary. >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> [email protected] >> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> >> > > > -- > (Co)Author: DttSP, Quiktrak, PowerSDR, GnuRadio Member: ARRL, AMSAT, > AMSAT-DL, TAPR, Packrats, > NJQRP, QRP ARCI, QCWA, FRC. > "You don't need to see the whole staircase, just > take the first step.", MLK. > Twitter:rwmcgwier > Active: Facebook,Myspace,LinkedIn > > >
_______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
