With the advancement in the cellular technology and convergence of wireless technologies, now it is the need to combine two messages having different data rates in an orthogonal manner. Take an example, the date rate of user 1 is r1 and of user 2 is r2 and we have to spread the user 1 message by spreading factor s1 and that of user 2 by s2, so that we can produce and overall chip rate of ρ. we can use Walsh Hadamard sequences if the spreading factors are powers of 2. The result so obtained is referred to as Orthogonal Variable Spreading factor and is showed in figure 1.
For OVSF the orthogonality requirement can be stated mathematically as (for the given figure)
This is, code 1, of duration T1 is orthogonal to all subsequences of code 2, of the same length, and offset by a multiple of T1, the length of code 1.
Now, as we know, OVSF is important in terms of WCDMA and LTE, the question is how we will generate OVSF codes? We can generate OVSF codes by following algorithm.
Suppose we want to generate OVSF codes of length n1 and n2, where n1 < n2, then:
- Construct Hn1 by usual Walsh-Hadamard algorithm.
- Choose one row of matrix Hn1 as the code length of 2n1. Let Hn1‘ represent the Hadamard matrix with the selected row removed.
- Continue the Walsh- Hadamard algorithm with Hn1‘: that is
Then continue until desired Hn2‘ is constructed.
- Choose any row of Hn2‘ as the spreading code of length 2n2
- If a third code is needed, then continue in a similar manner.
A matlab function can be downloaded from the given below links. The usage is given below.
% x = ovsf(y,z)
%x, the output cell array having required OVSF codes
%y, number of codes required
%z, array having length of each code to the base 2 i.e. 2.^2 = 4
%example y = 3 z = [4 2 3]
%this will give a cell array with [1×4] [1×8] [1×16]
%length = 2.^n , enter n in length of array
%The code is not optimized yet, user is free to optimize
%do not forget to leave a comment
Author : Ashwini Patankar