From: Pat Z on
Hi,

in GSM, the I, Q sample values received at the tranceiver is between 0
and 65536. I want to verify this by the fact that I^2 + Q^2 =1.

I choose the following formula:

if I > 32767 choose I - 65536, else choose I
if Q > 32767 choose Q - 65536, else choose Q

and calculate (I/32767)^2 + (Q/32767)^2, but doesn't equal to 1. How
to normalize the I, Q data?

thanks
Pat
From: Tim Wescott on
Jerry Avins wrote:
> Pat Z wrote:
>
> ...
>
>> if I > 32767 choose I - 65536, else choose I
>> if Q > 32767 choose Q - 65536, else choose Q
>
> What is this inversion intended to accomplish?

It's what you do if your ADC is delivering 2's complement conversions
and you're sticking the result into an unsigned data type.

But most ADCs that convert bipolar voltages deliver offset binary, where
0V = half range.

So, OP -- are you _sure_ that 32768 'means' -32768?

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Tim Wescott on
Jerry Avins wrote:
> Tim Wescott wrote:
>> Jerry Avins wrote:
>>> Pat Z wrote:
>>>
>>> ...
>>>
>>>> if I > 32767 choose I - 65536, else choose I
>>>> if Q > 32767 choose Q - 65536, else choose Q
>>>
>>> What is this inversion intended to accomplish?
>>
>> It's what you do if your ADC is delivering 2's complement conversions
>> and you're sticking the result into an unsigned data type.
>
> Thanks. I wanted to see Pat Z write that.

Sorry -- you were being Socratic. I thought maybe you were being absent
minded.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: robert bristow-johnson on
On Mar 9, 12:20 am, Tim Wescott <t...(a)seemywebsite.now> wrote:
> Jerry Avins wrote:
> > Tim Wescott wrote:
> >> Jerry Avins wrote:
> >>> Pat Z wrote:
>
> >>>   ...
>
> >>>> if I > 32767  choose  I - 65536, else choose I
> >>>> if Q > 32767  choose  Q - 65536, else choose Q
>
> >>> What is this inversion intended to accomplish?
>
> >> It's what you do if your ADC is delivering 2's complement conversions
> >> and you're sticking the result into an unsigned data type.
>
> > Thanks. I wanted to see Pat Z write that.
>
> Sorry -- you were being Socratic.  I thought maybe you were being absent
> minded.

:-)

ya gotta get up pretty early in the morning to fool Jerry.

r b-j
From: Pat Z on
thanks for your reply.

Here is what i did,

1) knocking off the leading bit.
If (I > 32767, choose I = I - 0x8000, else choose I

2) (I/32768)^2 + (Q/32768)^2 still doesn't equal to 1.

where is wrong?

thanks
Pat