## 6 Mutual Interference Compensation  
As mentioned in Section 2, immunity to mutual interference is one of the key features of CDMA systems. This immunity is determined by the cross-correlation properties of spreading codes. In telecommunication systems, a number of known families of spreading codes exist, each solving a specific task of separating signals in common channels. Orthogonal Walsh-Hadamard codes [35] are widely used for synchronous CDMA systems, such as downlink of CDMA2000, where a single transmitter (a base station) takes care of phase synchronization of the transmitted signals. Unfortunately, not all of them preserve orthogonality when shifted against each other. Other known families of codes are _Gold codes_[36] and _m-sequences_[37]. They are appropriate when synchronicitybetween the multiple transmitters cannot be established (uplinks, CW-radars). In this case at least the deterministic _signal to interference ratio_ (SIR) should be guaranteed for all the users of the system. The \"receiver\" and \"transmitter\" of our system are synchronized by design, since the sensor and the laser are integral parts of the same unit. However, we cannot synchronize multiple range-finder units which may appear operating on the same place. At any moment an interfering projection may appear at the given sensor's view area, and we should be able to filter it. A similar problem has been studied in [38], where several sensors are connected into a network. These sensors \"wake-up\" and transmit the captured data asynchronously. In order to avoid MAI (_multiple access interference_), the authors proposed a set of _cyclic orthogonal codes_ for spreading. These codes were derived from Walsh-Hadamard matrix of size \(N\times N\), where \(N=2^{k}\). As found from observations, the rows of such matrix can be combined into some finite number of non-unique sets of \(k+1\) rows which preserve mutual orthogonality at any phase shift. Taken as spreading codes, they can safely accommodate \(k+1\) users of asynchronous CDMA system. Similarly, we can find appropriate subsets of codes meeting the requirement determined by our design: we need zero _periodic correlation_ of given user's modulation sequence with another user's sequence represented in original unipolar form, as it is used to strobe the laser. For further analysis, we consider that interfering devices are identical, _i.e._, having the same intensity of laser illumination \(l\), the same exposure time and the same length of modulation sequence \(N\). Then the above criteria could be formalized as follows:  
\[R_{v,u}\big{(}\tau\big{)}=\sum_{i=0}^{N-1}v_{i}u_{i+\tau}=0,\forall\tau \tag{7}\]  
where \(v\) is a given user's modulation sequence in bipolar form {-1;+1}, \(u\) is an interfering user's modulation sequence in unipolar form {0;1} and \(\tau\) is a cyclical phase shift. Considering \(u\) and \(v\) as continuous periodic functions having the same period \(T\) and delay \(\tau\) between each other, the above criteria could also be presented like this:  
\[R_{v,u}\big{(}\tau\big{)}=\int_{0}^{T}v(t)u(t+\tau)dt=0,\forall\tau \tag{8}\]  
Since our design is limited to a maximal sequence length of 32 bits, we searched the Walsh-Hadamard matrices of size from \(4\times 4\) to \(32\times 32\) with the quite simple algorithm and have found some regularity in distribution of rows fulfilling the criteria (7). We have also found that from a \(N=2^{k}\) size matrix one can choose only \(k\) rows meeting our requirement. The first row is never selected since it contains only \(+1\)-s. The second row is always selected because it contains the repeated pattern of {-1;+1} which can be combined with any other. Then the 3 rd or 4 th row can be selected. After that for each \(k\) from 3 to given size of matrix \(2^{k}\) one additional row could be chosen from the range of \([2^{k}-2^{k}/2+1,\,2^{k}]\) in combination with previously selected rows.