## 4 Cooperative Stochastic Transmission Planning
### Array Theory Concepts  
The term beamforming derives from the fact that early spatial filters were designed to form pencil beams in order to improve the reception of a signal radiated from a specific angular location [59], also for transmitting a signal to a target in a narrow angular direction avoiding the waste of power by sending signals to other undesired directions. Electromagnetic waves and also acoustical waves were used in sending signals, and beamforming is the term that names the phenomenon by which the interference of a number of diferent signals provides a given radiation pattern. If in some angular directions the interference increases the signal level relative to a single radiator, we say that we have a positive interference or beamforming gain.  
In radiofrequency communications, the signal is sent using electromagnetic waves and beamforming is achieved by interference of the signals received (beamforming in reception) or emitted (beamforming in emission). The interferences are produced by the superposition of the waves coming from a large number of antennas which are usually located in a regular spatial stencil. These radiating structures are called antenna arrays.  
The precise location and current feed of every antenna in an antenna array permits the constructive and destructive interferences at particular angles, thus tailoring a specific radiation pattern, in emission and reception, and providing an improved directivity or gain compared with omnidirectional antennas or radiators [59]. Almost omnidirectional antennas are usually used in array implementations to avoid undesired nulls of the radiation pattern. The antennas of motes are almost omnidirectional antennas, thus are well suited for beamforming applications.  
The signal coming from an array of identical antennas located at positions \(x_{k}\), \(y_{k}\) (planar distribution) can be written as,  
\[s\propto\left[AF\right]_{N}=\sum_{k=1}^{N}a_{k}e^{i(2\pi f_{k}t-x_{k}\cos\varphi \sin\theta+y_{k}\sin\varphi\sin\theta-a_{k})},|a_{k}|\leq 1 \tag{2}\]  
where \(a_{k}\) is related to the current feed of the \(k\) antenna, and \(AF\) is the array factor. The oscillator is the same for every antenna, thus there is no frequency deviation between different antennas.  
For a WSN in a planar distribution constituted by \(N\) motes, we have different oscillators, one for each mote. Also, synchronization mismatches exist, therefore when every mote tries to send the same signal trying to imitate the beamforming of an antenna array we say that we have CB or DCB, and a more appropiate expression to describe the beamforming gain is above (Equation (1)). For an ideal WSN perfectly synchronized deployed along a line, we would have Equation (3) having an ideal Gain \(G\) = (\(AF\))\({}_{N}\) = \(N\), for \(a_{k}\) = 1, the same as an uniform linear array. Also, an ideal WSN perfectly synchronized deployed along a planar distribution \(N_{x}\times N_{y}\) would have an ideal Gain, \(G\) = (\(AF\))\({}_{N_{x}\times N_{y}}\) = \(N_{x}\times N_{y}\), for \(a_{k}\) = 1, the same as a uniform two-dimensional array given in Equation (4).  
Beamforming is a comment term employed in RAdio Detection And Ranging (RADAR), and Sound Navigation And Ranging (SONAR) technologies. At the begining of RADAR technology, beamforming was achieved using large parabolic reflectors, later on with the development of electronics the use of arrays using electronic steering was extended [59].