|
From: | Peng Huo |
Subject: | Re: [Discuss-gnuradio] Re: Mulitply PN sequence to real and convert output to complex - Question |
Date: | Mon, 15 Jun 2009 18:49:37 -0500 |
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 givesas the REAL PART of that modulation process.
Yc(t)Cos(2*pi*fc*t) - Yi(t)Sin(2*pi*fc*t)
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
address@hidden
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
[Prev in Thread] | Current Thread | [Next in Thread] |