in other words, what the difference between the array factor and the angle of the beam, codebooks are specified in a matrix, where each column is a weight vector corresponding to one beam pattern.
I suggest that you compute the array response vector for your phased array, as a function of the angle of arrival/departure. Then you pick a number of equally spaced angles in the range of interest (e.g., -pi to pi). You then compute the array response for these angles and use these vectors in your codebook matrix.
but, if i have the codebook matrix (as in IEEE 802.3c), i guess or pick number of equally angles to compute the array response according to codebook matrix
If someone has already defined the codebook matrix, then each codeword corresponds to the different beams that should be generated. These beams might correspond to the array response for a particular angle, but that depend on the structure of the array.
It is not certain that each beam corresponds to a certain angle. But if it does, I think you can compute the array response for a ULA a large number of angles and then compute inner products with the vectors in the codebook. The angle that gives their largest inner product (in magnitude) is the angle that best describes the codebook vector.
Emil Björnson , I have one query. I have generated DFT matrix codebook where each column generates beam at particular direction. Also, i know the user location coordinate and my objective is to select beams from generated codebook, which is directing towards users location. Any idea, on how to select those required beams from codebook? Is it anyhow related with inner products or is there some way?