# OVSF Codes

12 Mar 2014 Category: RadioaccessAs we know, the channelization codes for physical channels in UMTS should be orthogonal. Otherwise the reciever would not be able to decode the data correctly.

## Spreading Factor

3GPP adopts Hamamard Codes, a.k.a. Walsh Codes, to generate channelisation codes as below figure(from WCDMA for UMTS HSPA Evolution and LTE 5th Edition). In UMTS, we usally call them OVSF(**O**rthogonal **V**ariable **S**preading **F**actor) codes.

## Orthogonal

It’s easy to understand why the codes with the same Spreading Factor(SF) are orthogonal.

For instance, C_{4,3} and C_{4,4} are orthogonal since the product(bit by bit) is 0.

C

_{4,3}(1) * C_{4,4}(1) + C_{4,3}(2) * C_{4,4}(2) + C_{4,3}(3) * C_{4,4}(3) + C_{4,3}(4) * C_{4,4}(4) = 1 * 1 + (-1) * (-1) + 1 * (-1) + (-1) * 1 = 0

Assume there are two channels to transmit data. Let’s say signal on one channel is *x* while signal on the other channel is *y*. And *x* is spread by channelization code C_{4,3} and *y* is spread by code C_{4,4}. So the final data to receiver is:

x

CC_{4,3}+ y_{4,4}

Receiver should be aware of these two channelization codes in advance, from for example control channels etc. Thus it could respectively decode the original data by multipying received data by each channelization code. That is:

(xC

_{4,3}+ yC_{4,4}) * C_{4,3}= xCC_{4,3}_{4,3}+ yCC_{4,4}_{4,3}= x*C_{4,3}^{2}

That’s why we say ideally there is no inter-channel intereference once they are spread by channelization codes.

## Non-orthogonal

In *WCDMA for UMTS HSPA Evolution and LTE 5th Edition*, it says below words without detailed explanation.

There are certain restrictions as to which of the channelization codes can be used for a transmission from a single source. Another physical channel may use a certain code in the tree if no other physical channel to be transmitted using the same code tree is using a code that is on an underlying branch, i.e. using a higher spreading factor code generated from the intended spreading code to be used. Neither can a smaller spreading factor code on the path to the root of the tree be used.

Still, take C_{2,2} and C_{4,4} as example. But here is the problem, C_{4,4} is a four-dimensional vector meanwhile C_{2,2} is only two dimensional. How to linealy multiply these two vectors?

One of my colleagues told me, in Linear Algebra, the missing bits would be filled with “0” in case two different dimensional vectors multiply. Thus the product of C_{2,2} and C_{4,4} should be “2” instead of “0”.

It’s more clear to draw an illustrator when the signal is one bit as “1”. Because the chip duration T_{chip} is fixed as 1/3840000 second. The spreading data with C_{4,4} is longer than C_{2,2}.

If the input data is (1, -1) and spread by C_{2,2}. Then the output will be exactly the same as “1” spread by C_{4,4}.

That’s why certain code and its children codes are not orthogonal. And it is impossible for receiver to decode the original channel data respectively.