# Why can't the orthogonal PN codes help in the near-far effect?

The CDMA near far problem arises because handsets may be anywhere within the particular cell boundaries. Some handsets will be close to the base station, whereas others will be much further away. In a free space scenario signals decay according a an inverse square law...signals within a cell will have a huge variation in signal strengths. For the receiver to be able to decode all the signals in the channel, they should ideally all be at the same signal strength

I got the above information on a website while trying to understand the near-far problem. I understood the basic concept that the mobile devices near the base station will have a higher amplitude when the signal reaches the base station as compared to the ones far away. But, can't the orthogonal PN sequences used in CDMA be able to handle this. As I recall, the sequences when ex-ored with each other will produce a string of all zeros. Note that this question has already been answered here. There It has been mentioned that, the mobile phones dont have orthogonal codes. What if they did ? would that solve the near-far problem ? If not, can I know why ? Basically, In short, If 2 mobile phone signals reach the base station at different levels of power but have Orthogonal codes, wouldnt that solve the near-far problem ?

• The correlators have finite dynamic range. Jan 10, 2019 at 4:24

the orthogonal PN sequences used in CDMA be able to handle this?

Orthogonal PN sequences could.

In reality, you don't get these – frequency and timing offsets, and trade-offs during the design phase mean that you only get approximately orthogonal sequences.

So, even if the cross-correlation between what TX1 and TX2 transmits is say -50 dB, but TX2 is 53 dB stronger at the receiver than TX1, then TX1's energy after correlation with the matching PN sequence is still only half of that of TX2's interference.

Well, the clue is in the last sentence. The receiver has to reliably detect the number of received signals (e.g. 1's in the code sequence), since they add up on the receiver end.

If there are two handsets, one with a received signal strength of say, 10 (disregarding exact units) and another one with a strength of 1, then we have total incoming signal strenghts of 0, 1, 10 and 11 (again, over-simplifying). That's pretty difficult to separate for a receiver as 4 different levels. Now if the ratio is 100:1, which is not unlikely with radios, the levels are 0, 1, 100 and 101; impossible to separate.

When the units are more or less equal in power, we get values 0, 1 and 2 (no, not 3). Much easier to separate and detect.

• Sort of. Extend your voting model to the simpler case of sinusoidal carriers (ie, classic narrowband radio), and think about the fact that it does work across huge power differences, provided that the codes are truly orthogonal and that the system remains linear. For a code receiver, linearity is a function of the instantaneous dynamic range of the pre-digital stages, in effect, if 10000 + 1 = 10001 or if it might compress or quantize to 10000. And as Marcus pointed out, orthogonality may be limited too. Jan 9, 2019 at 16:50

CDMA is very unique in comparison with other multiplexing schemes because it doesn't (even in the ideal case) completely remove interference from other users. In an ideal time based (i.e TDMA) or an ideal frequency based (i.e FDMA) you can effectively remove all interference from other users, whilst in a CDMA scheme all you are doing is effectively scaling down other users' interference by a factor of $$\N\$$, where $$\N\$$ is the length of the spreading codes.

So if you have a two users $$\a\$$ and $$\b\$$ both transmitting to a common receiver using a common power level of $$\P\$$ but the power levels being received are $$\P_a\$$ and $$\P_b\$$ respectively (because one is near and the other is far away) then in an ideal FDMA system and transmitting over unit channel gain then you would have the normal SNR formula of

$$SNR_a = \frac{P_a}{P_N}$$

for user $$\a\$$ and a formula of

$$SNR_b = \frac{P_b}{P_N}$$

for user $$\b\$$. $$\P_N\$$ is the noise power. So it's basically a pure multiplexing scheme and so provided the two SNR values above are above your receiver's sensitivity then you should be able to decode them just fine. In an ideal CDMA scheme however the interference from other users is not removed but instead just scaled back by a factor of $$\N\$$ so the SNR for user $$\a\$$ would be

$$SNR_a = \frac{P_a}{\frac{P_b}{N} + P_N}$$

and for user $$\b\$$ it's

$$SNR_b = \frac{P_b}{\frac{P_a}{N} + P_N}$$

Now, if your orthogonal spreading sequence length $$\N\$$ is long enough this isn't an issue as this SNR will effectively be the same as in the first case. If on the other hand $$\N\$$ is not very long and you have one device near and the other one far then you will have $$\P_a >> P_b\$$ if user $$\b\$$ is far away. This can then cause $$\SNR_b\$$ to fall below the receive sensitivity of the receiver and make it hard for you to receive packets from $$\b\$$. You can mitigate this near far problem to a great extent by using long perfectly orthogonal PN sequences. In a lot of cases though PN sequences that are not perfectly orthogonal are used, the interference from other users is then reduced by a factor slightly lower than the PN sequence length. This exacerbates the "near far" problem.