Analysis of Multiple-Access Discrimination Techniques for the Development of a PSD-Based VLP System

There are several technologies and techniques available when developing indoor positioning systems (IPS). Recently, the development of positioning systems based on optical signals has aroused great interest, mainly those using visible light from the lighting infrastructure. In this work, we analyze which techniques give better results to lay the foundations for the development of a Visible Light Positioning system (VLP). Working only with a receiver, it is analyzed what the result of determining the position of different emitters is when they emit simultaneously and without any synchronism. The results obtained by Frequency Division Multiple Access (FDMA) (with digital bandpass filters, I/Q demodulation, and FFT) and Code Division Multiple Access (CDMA) are compared. The interference between signals when emitted simultaneously from multiple emitters is analyzed as well as the errors they cause and how these effects can be mitigated. As a result of the research, the advantages and disadvantages using different multiple-access determination techniques are determined. In addition, advantages and disadvantages of using FDMA and CDMA techniques as well as hardware requirements that make one more feasible than the other are presented. The system behavior, in terms of errors, is established using FDMA and different configurations such as: I/Q, RMS, or FFT. The work also determines the error rates that can be obtained with the different FDMA and CDMA configurations, considering different error scenarios and integration time. Synthetic emulations and empirical tests were performed, which concluded that IPS systems based on optical signals and PSD sensors can achieve very high measurement accuracies and a high measurement rate. Obtained positioning errors in a room of 3 m height are less than 1 cm when working in noisy environments.


Introduction
Different applications have been developed based on Indoor Positioning Systems (IPS) to assist people [1] to locate users in large indoor environments in both professional and leisure activities [2,3]. They are also used in logistic applications for intelligent factories [4] to perform different tasks such as moving objects within an environment [5].
It can be seen that IPS is already well established in daily activities [6][7][8][9]. It is a fact that, knowing the user position in indoor activities, provides new capacities to applications with significant added value. the causes of these non-linearities. They indicated other digital processing steps might be able to compensate for these non-linearities.

Background
Our research group has worked in the development of optical IPS systems for more than a decade, carrying out work based on measuring the phase shift of the signal on arrival at detectors and determining the angle of arrival of the signal.
Focusing in IPS based on PSD, we have proposed an IPS [22] based on the angle of arrival (AoA) where we show some preliminary results of such a system. The following is an outline of the IPS proposed in [22]: knowing the impact point on the PSD, we can obtain the equation of the LOS to the emitter from the calibrated optical system. Knowing this line and knowing that our emitter is always moving in the same plane, the position of the emitter is given by the intersection of this line with that plane. A diagram of the positioning system can be seen in Figure 1.
The main advantages of IPS based on PSD sensor are accuracy, precision, range, and obtaining the impact point on the sensor surface with continuous resolution. The main disadvantages in the development of IPS systems based on the optical signal are related to multipath effect due to NoLOS signals and distortions of the PSD and lens.
Regarding the distortion, in [23], the sources of error due to electronic components were studied in a PSD-based system, providing a solution to correct these errors. In [24], the geometric model and calibration of an IPS PSD-based system were developed.
On the other hand, joint-effort research has been done on optical signal reflection models to try to quantify and measure the effect of multipath on the development of IPS. The optical signal reflection model reported in [25] allows modeling how the multipath affects the measurement techniques based on AoA and PoA. In [26], a procedure was proposed to measure the signal value that impacts into the PSD (detector) surface as a result of MP. In [27], position errors due to MP were characterized by working with AoA and PoA techniques, to complement the previous works.
In addition, it has been studied which technique is more optimal to use in multipath environments using the PSD as a detector [27]. As a result, it was concluded that, with the use of AoA and being careful in the deployment of the LED emitters and focal length of the sensor optics, the results were much better than using phase differential of arrival (PDoA) [28][29][30] since the multipath received were compensated partially given the principle of function of the PSD.
Considering those background results as initial conditions, in this paper, we study the positioning of an agent that incorporates a single PSD, which receives the signal from several LEDs used for lighting. The problem to be solved is the error-free discrimination of the AoA received from each of the emitters, without affecting the reception of other signals simultaneously. Note that the PSD is a continuous sensor that generates currents proportional to the strength of the signals it receives and the impact point on its surface. Therefore, multiple signals from different emitters might affect the positioning as currents corresponding to each emitter will be mixed, generating a single output current.
De Lausnay et al. [31] gave an overview of the current state-of-the-art studies on visible light positioning systems classified according to the multiple access technology use. They showed the results for the sensors commonly used in positioning, such as photodiodes or image sensors. Regarding photodiodes, they showed the advantages and disadvantages of the use of Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), or Code Division Multiple Access (CDMA), which are mainly used with PoA or ToA proposals. With respect to image sensors, they only mentioned Spatial Division Multiple Access (SDMA), because image sensors have a low sampling rate. VLP based on image sensors does not use TDMA, FDMA, or CDMA because the frame rates of smartphones cameras range from 30 to 120 fps, which is below the required values. In our case, the PSD sensor is a photodiode that continually obtains the impact point on the sensor surface from the light of a emitter. This allows us to use AoA techniques with high frequencies (i.e., 100 kHz), thus TDMA, FDMA, and CDMA techniques can be used.
In this work, several multiple-access discrimination techniques for the development of a PSD-based VLP system are analyzed using different types of signals and signal processing. It is more convenient to use these techniques to receive several signals simultaneously and without synchronism in a single detector, to be able to discriminate the AoA of each one of them with the minimum possible error.
The behavior of each technique is analyzed in different scenarios, varying the test configuration, the SNR, the number of simultaneous emitters, etc. Experimental tests with real signals were carried out. The goal of the empirical systems is to work with different signals received simultaneously.

Signal Determination Techniques in a Single Detector Based LPS
The PSD sensor allows us to calculate the signal reception point on the PSD surface based on the four electric currents generated at each PSD anode. PSD sensor is a type of photodiode that consists of four anodes and a common cathode. Figure 2 shows the model of a pin-cushion two-dimensional PSD. The PSD sensor allows us to calculate the signal reception point on the PSD surface based on the four electric currents generated at each PSD anode according to Equations (1) and (2) x = L X 2 (I X2 + I Y1 ) − (I X1 + I Y2 ) where I X1 , I X2 , I Y1 , and I Y2 are the electrical currents from the PSD sensor anode pins and L X , y, L Y are the sensor dimensions. The aim here is to obtain the signal reception point on the PSD surface of each of the emitters. Different techniques that can be used for this purpose are analyzed below, choosing the most suitable one for the empirical tests.
In the next sections, we analyze FDMA and CDMA techniques used in IPS based on PSD. The use of TDMA has been ruled out due to it needs for synchronism between the emitters and the receiver.

Frequency-Division Multiple Access (FDMA)
When implementing this technique in a real system, there are some aspect that must be taken into account. From the example shown in Figure 3a,b, with ideal signals generated by computer, it seems at first sight that it would be easy to separate the signal of each of the emitters. However, in real systems, the signal from the emitters will not be a perfect delta, but, depending on the design of the emitter, that delta will have a significant frequency bandwidth, and harmonics will appear at multiples of the center frequency. On the other hand, the bandwidth of the PSD sensor is not infinite, but behaves as an order 1 low-pass filter, with a surface area that fixed the cut-off frequency (in the case of a 9 × 9 mm 2 PSD, the bandwidth is around 200 kHz). The detection of each emission must be discriminated from the rest of emitters avoiding interferences among emitted signals. In FDMA, each emitter uses a different frequency signal. Therefore, the BW must be divided by the number of different frequencies, which in turn limits the number of emitters. When choosing the different frequencies to be used by each of the emitters, the following aspects must be taken into account:

•
The number of available frequencies depends on the width of the filter that can be implemented. The narrower is the filter, the more frequencies can be used, but the delay and the complexity of implementing the filter in a real system increase. • frequencies that are not multiple of others should be chosen to avoid, as much as possible, interferences due to harmonics.

•
The bandwidth of the emitted signal should not overlap with emitters on adjacent frequencies.
After knowing the limitations of the number of simultaneous emitters, the next step is to know how to implement the detection of each emitter. The objective is to know the root mean square (RMS) value of each emitter for each of the four channels of the PSD. The RMS value is used to avoid the influence of noise, which can be considered as white Gaussian noise with a null average. If the RMS value is obtained for a certain amount of signal, the noise is averaged and its effect is compensated as far as possible. The longer is the averaging time, the smaller is the noise influence, but the longer it takes to obtain a new measurement. Once the four values RMS have been obtained, the point of incidence on the surface of the PSD of the emitted signal by each of the emitters can be obtained.
Next, we propose three different methods to obtain the RMS value of each emitter.

Discrimination Using Band-Pass Filters
This technique consists in the implementation of a bandpass filter for each of the system's emitters. The signal received by each channel of the PSD, m t (t), is passed through a bank of filters. The output of each filter corresponds to the signal filtered for each one of the frequencies of the emitters. Once the filtered signal is obtained, some signal periods are used to calculate the RMS value. The number of cycles will be a function of the signal-to-noise ratio available.
A diagram of this technique for each channel of the PSD can be seen in Figure 4. With this technique, it would be necessary to design and implement four equal bandpass filters (BPF) (one filter for each channel of the PSD) for each emitter of the positioning system.
To obtain the RMS value of each emitted signal, it would be necessary to wait to acquire an integer number of periods of that signal. However, if the number of periods is high enough, the difference between using an integer number of periods or taking a part of the final period is insignificant. This method is useful to be able to use a fixed number of samples for all the emitters without having to change the number of samples for each emitter.

Discrimination Using FFT
From the Discrete Fourier Transform (DFT) of the signal of each of the four channels of the PSD, it is possible to discriminate between the emitters of the LPS and to obtain the signal reception point on the PSD surface for each one of them. To obtain the DFT of the signal, the Fast Fourier Transform (FFT) algorithm is used. Once the FFT of the signal for each channel has been calculated, the sample modules corresponding to the frequencies of the emitters are obtained. For example, in Figure 3b, one can clearly see in the FFT the modules of the samples that correspond to the frequencies of 50, 70, and 90 kHz.
Depending on the sampling frequency and acquisition time, the bandwidth of each FFT sample will be different: where L is the total number of samples of the signal. The longer is the acquisition time, the lower is the ∆ f , and therefore less noise is "introduced" into the desired sample. The sample k i for the frequency f i of the emitter i is calculated: This technique is especially suitable for microprocessor-based systems (sequential execution) because it allows discriminating a high number of emitters by performing only four FFT, one for each channel of the PSD, without the need to implement four filters for each emitter. One of the disadvantages is the need to take a high acquisition time to have a narrow bandwidth. In the case where the signal from the emitter is not a delta or a higher bandwidth is needed, more than one sample can be used around the desired frequency.

Discrimination Using IQ Demodulator
Using an IQ demodulation, it is possible to obtain, from the received signal, the module and the phase of each of the signals of the system's emitters. Each received signal is multiplied by a sinusoidal signal and by the same sinusoidal signal displaced π/2 rad, for each of the frequencies used by the emitters, obtaining the signals in-phase I(t) and quadrature Q(t). Each of these signals is passed through a low-pass filter (LPF) to obtain only the low-frequency components. The module or RMS value is calculated with that resulting signal.
An overview of the IQ demodulator is shown in Figure 5. The received signal is m t (t) and s(t)is the sinusoidal signal frequency f i . The LPF blocks correspond to low-pass filters to obtain only the low-frequency information.
In Equation (5), the equation of the received signal when only the signal from an emitter is received in the absence of noise is shown.
The expression of the sinusoidal signal generated by the receiver is Therefore, the signals in-phase and quadrature, I(t) and Q(t), are As can be seen, the I(t) and Q(t) signals are composed of two components. A continuous component and another component at twice the frequency. The information to obtain is in the continuous component. By applying a low-pass filter, the information is obtained: The module A r and phase φ i of the resulting signal can be obtained with the following expressions: In this work, it is only necessary to obtain the RMS value of the signal to compute the signal reception point on the PSD surface.
If instead of receiving the signal from only one emitter, the signals of N emitters are received, replicas of the signals are produced at the frequencies of f i − f r and f i + f r where f r is the sine wave signal generated in the receiver. To be able to discriminate without interference the signal from each emitter, the low-pass filter used must be less than half the minimum separation between simultaneous frequencies, or in its absence, less than half the smallest separation between a fundamental frequency and one of the harmonics of the other frequencies.
An example with three emitters is shown below. Signal m t (t) is composed by the sum of the signals of three emitters of frequencies 50, 70, and 90 kHz. Figure 6 shows the FFT of the I(t) signal. It can be seen that there is one component in continuous and another component in 100 kHz, besides the components of the other two emitters at frequencies of (70 − 50), (70 + 50), (90 − 50), and (90 + 50) kHz. Once the low pass filter is applied, the RMS value of the emitter working at 50 kHz can be obtained. It should be noted that the RMS value obtained is multiplied by the filter gain factor. Since the same filter is used for all four channels of the PSD, this effect is not relevant. To implement this system, two multipliers and two low pass filters should be used for each emitter and channel of the PSD. In this case, the digital low pass filter would be the same for all the emitters.
One of the advantages of this technique is that an RMS value per sample of the input signal can be obtained. It is not necessary to wait for an integer number of signal periods to obtain the RMS value.

Code-Division Multiple Access (CDMA)
The CDMA technique is implemented using a binary phase-shift keying (BPSK) modulation because the PSD has a finite bandwidth as well as to drive away, as far as possible, continuous and low-frequency noise. Therefore, the following aspects must be taken into account when deciding on the sequence parameters:

•
The chip frequency has to be the same as sinusoidal frequency. This means that each chip modulates an integer period of the sine signal • The chip frequency and sinusoidal frequencies must be less than or equal to half the sensor's bandwidth BW. This ensures that the filter accepts frequencies from the main lobe of power spectral density of the signal m(t) which is where most of the signal strength is concentrated.

•
The phase of the sine φ 0 has to be 0 degrees with respect to the code, so that the symbol transitions happen in the crossing of the sine by 0, reducing the distortion by the BW limitation. Figure 7 shows the first chips of a 1023-chip (10-bit) long Kasami sequence, together with the modulated signal in BPSK. A chip frequency of 50 kHz is used. In this work, we use Pseudo Random (PN) sequences and more specifically Kasami sequences [32] due to the good properties of cross-correlation and autocorrelation, and the number of sequences available, suitable to the number of users in the system.   Figure 8b shows the FFT module of the modulated signal in BPSK. It can be seen that the main lobe of c(t) has been shifted to the sine frequency, which is equal to the chip frequency, achieving the greatest amount of information in the available bandwidth and being able to avoid continuous or low-frequency noise. Once the signal is received in the receiver, a correlation with the same sequence modulated in BPSK would be performed to obtain a correlation peak. This peak is the value that would be obtained to calculate the signal reception point on the PSD surface.
The expression in discrete time to calculate the periodic correlation of two signals m i (t) and m j (t) is defined as: where L is the size of the sequence. When i = j, the autocorrelation function is obtained, and, when i = j, the cross-correlation function is obtained instead. Applying the correlation properties, the correlation function can be written from the FFT values of the signals according to: where • is a point-to-point multiplication and conj is the conjugated function. Figure 9 shows the autocorrelation function of a 10-bit Kasami sequence modulated in BPSK, with a chip frequency of 50 kHz and a sampling frequency of 2 Msamples/s. One of the sequences used in the correlation is shifted 10 ms. Autocorrelation zoom (b) Figure 9. The 10-bit Kasami sequence autocorrelation function modulated in BPSK: (a) total size of the autocorrelation function; and (b) extended area centered on the correlation peak One of the main problems of CDMA is Multiple Access Interference (MAI) due to non-zero cross-correlations. There are algorithms to mitigate this effect as much as possible. In our work, we use the cancellation of interference by subtraction explained in [33]. There are two strategies: Successive Interference Cancellation (SIC) and Parallel Interference Cancellation (PIC).
After analyzing the two strategies, it is proposed to implement the option PIC, since it allows a parallel implementation appropriate for hardware systems such as FPGA, and also provides excellent results.
As a summary, the steps for carrying out MAI reduction using PIC are shown below: • Correlate the received signal m t (t) with each of the sequences used by the system (different emitters) m i (t) and obtain the correlation peakÂ i and the associated offsetτ i to each sequence i.

•
For each i sequence, obtain a newm t i (t) signal by subtracting from the received signal m t (t) the contributions received from the rest of the j sequences, where j = i. With this subtraction, the signal from the emitter i is filtered from the rest of the sequences. The signalm j (t) that is subtracted from the received signal becomes the sequence j after passing through the channel and being received by the receiver, that is, the convolution of m j (t) with the response of the channel h(t). Them j (t) signals should be weighted by the peak of theÂ j correlation of the received signal m t (t) with the j sequences and divided by theÂ AC j autocorrelation of the j sequence. This would leave the expression:m wherem • Use them t i (t) signal as a received signal and go back to the first step. This means correlate again the sequences, determine the delays, and obtain a subtractive signal. This process could be carried out during several iterations until the amplitude and delay estimates do not vary significantly from one iteration to the next.

•
For eachm t i (t) signal after q iterations, the value ofÂ i andtau i is obtained for each i sequence.
In the PSD-based positioning system, this MAI interference produces an offset or bias at the signal reception point on the PSD surface. This offset is due to the differences in RMS value that MAI produces in each of the four channels of the PSD. The offset depends on:

•
The delay between sequences. Since there is no synchronism, it is not possible to know beforehand the delay that an emitter will have with respect to the rest of the emitters. The closer the correlation peaks are to each other, the bigger is the interference. Since the correlation peak is not a perfect delta, when measuring the peak value, small interferences between agents produce an offset in the calculation of the signal reception point on the PSD surface.

•
The relative signal strength between one emitter and another. If the difference between the signal strength received by one emitter and another is significant, it could be the case that the autocorrelation peak is lower than the cross-correlation, producing errors in the calculation.

•
The type of sequences used. Each type of sequence has a different behavior and is more or less affected by the MAI. As already mentioned in this case, Kasami sequences are used.

•
Length of the codes. The higher is the number of bits, the higher is the peak of the correlation and the easier it is to detect it. In contrast, more computing time is required to carry out the correlations.  Table 1. Therefore, when using codes there are multiple related parameters that make it very difficult to analyze, estimate or correct the offsets produced by the MAI.

Error Analysis in Emitters' Position Determination
This section shows the results of simulations and experimental tests analyzing the different parameters that affect the computation of the impact point on the PSD surface and will compare the different multiple-access discrimination techniques.
The influence of the noise is analyzed according to the size of the signal and the technique used. Interference between different emitters is also analysed.
As a summary, Figure 10 shows a general scheme of the simulator, composed by the following steps: • Initial configuration: The general system parameters are configured, such as sampling frequency, type of modulation, number of emitters, and both emitter and receiver characteristics.

•
Generation of emitted signal: The signal that is emitted by each of the emitters is generated according to the type of modulation and technique used.

•
Channel: This stage simulates the behavior of the channel from the moment the signal is emitted by the emitters until it is finally received by the PSD sensor.
• Obtaining the impact point: In this stage, the impact point is obtained from the signal of each of the the Table channels of the PSD. Depending on the modulation used, the RMS value is obtained differently.

Initial configuration
Emitted signal generation Channel Obtain impact point Depending on the parameter to be analyzed, one configuration or another is chosen. In each of the next sections, both the set-up and the tests carried out are detailed.
It should be noted that the shown errors (e) are the impact point errors in the PSD surface. To calculate positioning errors (E), the impact point errors must be multiplied by a factor of H/ f : where H is the height of the environment and f is the focal length. Figure 11 shows a diagram that represents the correspondence between errors on the surface of the PSD and positioning errors.

Behavior of the Different Techniques in Noisy Environments
In this section, our aim is to observe the behavior of each technique in a noisy environment. To isolate the rest of the effects, a single emitter and a single receiver are used. Environments with different noise levels are simulated and errors in the calculation of the impact point are compared using different signal lengths with the following techniques: FDMA with filters, FDMA with FFT, FDMA with IQ, and CDMA modulated in BPSK.

Test Scenario
The emitter is located in the z = 3 m plane, at the coordinates (0, 0, 3) m, with its surface vector perpendicular to the z = 3 m plane. The emitter is modulated with a frequency of 50 kHz. Therefore, when analyzing FDMA, the emitter outputs a 50 kHz tone, and, when analyzing CDMA, the emitter outputs a 50 kHz chip frequency sequence modulated in BPSK with a 50 kHz sine signal.
The receiver moves to different points on the z = 0 m plane maintaining the same orientation in all tests. The receiver moves to positions on the z = 0 m plane shown in Figure 12. These 10 positions were chosen because, with them, by means of symmetry, the effects can be observed on practically the entire surface of the sensor. The receiver receives the data with a sampling frequency of f s = 1 Msample/s. In total, 11 noise scenarios were simulated with an SNR between 57 and 107 dBHz in 5 dBHz steps, considering a bandwidth of f s /2 Hz. Appendix A describes how the noise signal was generated. For example, considering a bandwidth f s /2, in the cases of 57 and 107 dBHz, SNR in dB calculated as SNR = 10log10(Ps/Pn), is 0 and 50 dB, respectively.
Two different signal lengths were simulated, corresponding to 8-and 10-bit Kasami sequences. Therefore, a new position of the point of impact was calculated each time: where L is the number of bits in the sequence and S c the samples per chip, which in this case is 1M/50k = 20 samples per chip.
In the case of FDMA, it would not be necessary to use so many samples to obtain the RMS value, but, since we wanted to compare these techniques, we used the same number of samples.

Results
For each of the techniques, Tables 2 and A1-A7 show the average, maximum, and standard deviation values for each of the receiver position indices as well as for each of the SNRs analyzed. The results in general terms can be said to be very similar for all three techniques and it can be seen that the error is approximately half when using 1023 signal periods (10 bits) than when using 255 periods (8 bits).
To observe more visually the results obtained, a comparison is shown of the mean value, standard deviation, and maximum error value in Figures 13 and A1b,c, respectively. The figures show for each receiver position index and for each SNR value the errors for each of the three techniques (CDMA-BPSK, FDMA, FDMA-IQ, and FDMA-FFT) in the two signal sizes used (8 and 10 bits). The value of the error is represented by a different color. To better observe the differences, the value of log10(error) is shown.   From the values observed in the tables and figures, two important conclusions can be drawn. Firstly, it can be seen that the error decreases as the size/length of the signal increases. This is logical because, as it is Gaussian noise with a zero average, by averaging more samples, its effect is reduced. The second conclusion that can be drawn is that the differences among the four types of techniques are not very significant. Therefore, it can be said that the four techniques behave very similarly in noisy scenarios with only one emitter. Therefore, the noise is not an influential parameter for deciding on one technique or another.
To see more visually the effect of noise in determining the impact point, Figure 14a,b show, as an example, the case of FDMA with IQ for the equivalent signal sizes of 8 and 10 bits, for the signal-to-noise ratios of 67, 77, and 102 dBHz. In Figure 14a,b, it can be seen how the point cloud gets smaller as the SNR increases. If we compare Figure 14a,b, we can see, as commented above, that the dispersion of the points is more significant if the length of the signal to be processed is shorter. The rest of the techniques are similar. It should be noted that, in a real environment, with the emitter located at 3 m, the SNR of the signal is around 77-82 dBHz, depending on the emitted signal strength, lens, etc.

Interference Analysis of the Different System Emitters
In this section, we analyze how each of the techniques works while obtaining the point of impact of several emitters emitting simultaneously.
After analyzing the FDMA technique, it can be said that as long as the number of emitters is not excessively high (in this system, it is not intended that more than four emitters be emitted simultaneously), there is no interference between the different emitters. This is because the emitters being used are emitting a very clean signal. This, together with the narrow filters that have been implemented means that there is practically no interference between emitters. The possible interference that could appear would be due to harmonics; thus, if the frequencies used are chosen correctly, this effect should not have any influence.
As for the CDMA technique, it has been observed that it does present interference due to MAI. As mentioned above, there are several variables that influence MAI interference, such as the number of simultaneous emitters, their positions, the position of the receiver, gaps between the different emitters, etc. Therefore, this section shows some examples of the effect of MAI in different scenarios and how the PIC algorithm manages to reduce its effects.

Test Scenario
Since there is an infinite number of possible parameter combinations, a configuration with three emitters is considered as an example.
The emitters were placed on the plane of the ceiling at the height of 3 m above the floor, oriented vertically downwards, at the points shown in Figure 15. The receiver was placed on the floor, co-planar with the plane of the floor, at the coordinates (0, 0, 0) m.  Figure 16 shows the impact points on the surface of the PSD, for a sequence length of 8 and 10 bits. The points without applying PIC are shown with crosses and the points applying PIC are shown with blades.  Figure 16. Impact points on the PSD of the five emitters using CDMA-BPSK before and after applying the PIC correction with sizes of: (a) 10 bits; and (b) 8 bits. Figure 16 shows the effect of the MAI on the detection of the point of impact. The MAI causes a shift from the actual point. To reduce this effect, the PIC algorithm was implemented.

Results
In Figure 16, it can be seen how the PIC algorithm significantly reduces the displacement of the point of impact due to MAI. It can also be seen clearly how this offset depends on the size of the signal and, therefore, on the code used. Figure 17 shows several examples where the effect of MAI and its correction with the PIC algorithm can be seen visually. Nine different tests were carried out in which the number of simultaneous emitters was varied from 2 to 10. The emitters were randomly positioned within the FoV of the receiver and a zero offset was set between the transmission of each of the sequences. In all cases, 10-bit Kasami code was used.
It can be seen in all cases how this displacement or offset is greatly reduced in the determination of the impact point. However, it should be noted that the correction is not total. This is mainly due to the following causes: • Only one iteration of the algorithm was used. It was found that increasing the number of iterations improves the correction very little, and, conversely, greatly increases complexity, resources, and execution time.

•
It is very difficult to model correctly the signal that is used to perform the subtractions. Ideally, it should be the convoluted sequence with the channel. In this case, the channel was modeled experimentally, but there are always small differences or errors. In the simulation, a small noise was added to model this lack of accuracy in modeling.

•
In practical examples, the time lag with which the sequence arrives at the PSD will hardly be an integer number of samples. This is because, to simplify the implementation of the receiving system, the correlation is made and the peak and peak position are obtained. That position will be an integer number of samples. Therefore, there is a resolution of 1/ f s s. This situation means that, when performing the subtraction, the correct signal is not exactly subtracted, since in the simulator when moving the signals if non-integer samples have been taken into account. To reduce this effect as much as possible, there are techniques such as Early-Late [34], in which two correlations are made, one forward and one backward in a given delta. Using Early-Late, the signal offset accurately measured below the sample can be obtained. That algorithm was implemented getting the lag quite close to the correct one, but it presents a problem with its execution time, complexity, and resource consumption. It should be noted that once, the time lag below the sample has been obtained, it needs to be applied to the signal. To achieve the desired offset, the signal would have to be oversampled and interpolated at a higher sampling rate than f s , an integer number of samples would have to be shifted, and, finally, downsampling would have to be performed. After the tests, it was decided not to implement it in the final system, since the improvement it provided was not comparable with the complexity required to carry it out.

•
This simulation was carried out in the absence of noise. If noise were added (receiver, emitter, or channel noise), it would be more challenging to obtain the remaining signal with which to properly correct.

•
As the number of emitters increases, there is more interference due to MAI, and, therefore, it is more complicated to correct.
Let us summarize the different configuration settings after performing the synthetic analysis using one single emitter. The results obtained, in terms of position determination error, are similar in all the analyzed configurations and are a function of the available SNR.
The error results integrating 1023 signal cycles (or sequences of 1023 symbols in the case of CDMA) reduces at the half the error of 255 signal cycles case. When working simultaneously with multiple emitters (multiple-access to the channel), it is concluded that any of the techniques used in FDMA present interferences between signals that are not significant for the positioning determination; however, working with CDMA, the MAI interferences are significant and cannot be assumed in these systems.
In the case of CDMA multiple-access, a correction must be used based on the PIC algorithm, which is capable of mitigating interference errors as long as the number of different sequences does not exceed four. If this number is exceeded, the errors must be taken into account. Besides, it should be considered that the PIC algorithm requires some execution time that may not allow the system to work in real-time.

Experimental Tests in Real Environments
In this section, different tests performed in a real environment are shown to decide which technique is more suitable for use in the LPS system.
Firstly, we analyze the interference results using FDMA and CDMA. Then, we analyze the error in the determination of impact points using FDMA, under different SNR and integration time conditions.
The set-up of the experimental test is shown in Figure 18, one of the emitters used in the experimental tests is shown in Figure 19, and the receiver is shown in Figure 20.

Interference Results Using FDMA and CDMA
Three emitters were placed on the same plane 3 m away from the PSD sensor, 90 cm apart. A 9 mm × 9 mm PSD sensor with an 8 mm focal length lens was used. The acquisition was made at 1 MHz.
The techniques of CDMA-BPSK and FDMA-IQ were analyzed. In the case of CDMA-FDMA, a chip frequency of 5 kHz and 8-and 10-bit Kasami sequences (255 and 1023 chips, respectively) were used. In the case of FDMA, each emitter emitted at 6, 8, and 10 kHz.
Firstly, for both CDMA-BPSK and FDMA-IQ, the signal from each emitter was acquired separately, to avoid possible interference between emitters. The impact points obtained in the PSD, for the 10-bit case, are shown in Figure 21.  It can be seen that practically the same points of impact were obtained with both techniques, with differences in the surface of the PSD of around 5 µm. In this scenario, the SNR was around 66 dB. Figure 22 shows the points of impact using the FDMA technique, when all three emitters emit simultaneously and when they emit independently. In this case, the interference can be assumed to be practically zero. The same procedure was done for CDMA-BPSK, and the results are shown in Figure 23 for 8-and 10-bit sequences. The distance shown in Figure 23 is the distance between BPSK, emitting the three emitters simultaneously and correcting the interferences with PIC algorithm respect to BPSK emitting the three signals independently (no simultaneously). It can be observed whether or not there is interference between emitters. Before making the correction, there were different offsets for the same emitter. This is due to the differences between the emission and sampling frequencies that are set and the real frequencies, as well as the jitter of the clocks. These differences cause minimal signal mismatches that alter the obtaining of the correlation peak and modify the MAI interference. Once PIC was applied, the effects were significantly corrected. The larger is the signal size, the better is the correction and the less it is affected by noise.
After analyzing the results, it can be said that, using the FDMA technique, there are no interferences between emitters. It was also seen that applying the PIC algorithm is able to greatly reduce MAI interference in CDMA, but it is necessary to implement the algorithm by increasing the complexity of processing in the receiver. Therefore, after analyzing the results described thus far, it can be said that the best option in our particular system is the implementation through FDMA, since the interference between the different emitters is practically zero. Among the three options, the IQ demodulator option was chosen, since it allows obtaining the RMS sample by sample without having to wait for an integer number of periods of the signal.

Error in the Determination of Impact Points Using FDMA, under Different SNR and Integration Time Conditions
In this section, we analyze the FDMA-IQ technique in a noisy scenario considering different integration times in the receiver. With this, we intend to estimate which errors in the estimation of the reception point of the signals on the surface of the PSD depend on the rate of desired measurements per second and the SNR of the environment.
The simulations were carried out in a scenario with three emitters located in the positions shown in Figure 24, in the plane of the ceiling, 3 m from the floor, and oriented vertically downwards. Each emitter sent a sinusoidal signal at 50, 70, and 90 kHz (different frequency each one). The receiver was located at the coordinates (0, 0, 0). A sampling frequency of 1 Msamples/s was used. The simulations were performed by varying the SNR from 23 to 73 dB in 5 dB steps. We used band pass filters with 1 kHz bandwidth. For each SNR value, the signal reception point on the PSD surface was obtained depending on the signal integration time. Knowing the sampling frequency and the integration time of the processed signal, it is possible to obtain the range of data per second that we can obtain. Table 3 shows the different values of the signal integration time (or the number of periods/samples) used, as well as the range of position measurements per second. From the simulation, Figure 25 shows the value of the mean, standard deviation, and maximum error in the determination of the reception point on the PSD surface, for each of the three emitters. The error is measured as the Euclidean distance between the actual point and the obtained point. The values are shown as a function of the SNR and the signal integration time. Table 4 shows the results of the simulation.  Table 5 shows the results of experimental tests. It shows the error in function of the signal length (in samples) and SNR. To carry out the empirical tests, we considered the same setup used in previous section with three emitters using FDMA. We implemented the IQ demodulation in the receiver to be able to compare with the simulations results. To analyze two different SNR scenarios, the three emitters were configured with different signal strengths to obtain a SNR in the receiver of 60 and 66 dB. Figure 26 shows the first samples of the empirical tests in both SNR scenarios. The simulation results are given in Table 4. These data show that simulation and empirical results have very similar values, validating the simulation procedure.   Figure 25 shows how the errors become smaller as the SNR increases. The same happens when the integration time to process is increased. These figures allow knowing the error according to the SNR and the signal integration time. Therefore, if the SNR of the received signal is known or can be estimated a priori, with the information in Figure 25, the number of samples (integration time) that must be used to be below a certain error can be established. In the same way, if a certain range of measurements per second is needed, inversely proportional to the size of the signal, it is possible to know what SNR the received signal must have to be below a certain error. For example, to obtain that certain SNR, the emission signal strength could be increased.

Conclusions
This paper analyzes LPS systems with different techniques of discrimination of signals received in a detector, coming from different emitters. The advantages and disadvantages of each of them have been discussed.
FDMA (with three possible implementations: band-pass filters, FFT, and IQ demodulation) and CDMA techniques have been analyzed. The use of TDMA has been ruled out because it needs synchronism between emitters and receiver.
Several simulations were carried out in which the error in the determination of the reception point of the signals on the surface of the PSD was compared (previous step to determine the AoA). First, it was possible to verify that, using only one emitter in a noisy environment, all the techniques analyzed performed correctly, with similar results. It was found that, as the signal capture time increased, or when the number of chips in sequences increased, the error decreased because the noise was averaged.
It was studied how the system determines the different signals from each emitter, proving that with FDMA there is no interference as long as the width of the band pass filters does not overlap in adjacent filters and the number of emitters is not excessively high (in this system, it is not intended that more than four emitters be emitted simultaneously). The scalability of the system is maintained as long as the selection of frequency in a larger area is correctly distributed to not capture emitted signals with the same frequency. Even with only two emitters, we can perfectly obtain the position in planar motion. Additionally, the current BW of the system allows increasing more frequency values.
However, when CDMA is used there is MAI interference between the signals of the different emitters. This interference causes an offset in the determination of the reception point of the signals on the PSD surface. MAI interference depends on many parameters such as type of sequence used, length, phase shift, emitted signal strength, etc. To compensate for the effects of MAI, the PIC algorithm has been implemented achieving a large reduction in the offset produced by the interference. Simulations and experimental tests show the effect of the MAI and how the PIC algorithm succeeds in reducing its effects.
Since the interferences between emitters are practically nonexistent in the FDMA technique (without applying any additional processing), and considering that the PIC algorithm is recursive and needs a relatively long time to be executed (although it manages to eliminate the interferences between sequences), the technique that seems to be more appropriate to be used is FDMA in the development of our LPS.
The use of a particular FDMA implementation in the receiver system depends on its hardware. If FPGA/VLSI is used, the best implementation is IQ demodulation because allows to obtain a signal module value from each input sample. Additionally, the hardware implementation can include a digital filter. On the other hand, if a microcontroller is used, the best option is the FFT implementation because microcontrollers work in sequential mode compared with digital filtering, which requires high computer load and long time. However, if FFT implementation is used, the microcontroller program only must call the FFT function four times, one for each channel of the PSD. Another option with the microcontroller is to use the Goertzel algorithm to obtain the magnitude of signal frequencies, which is the fastest option.
Using FDMA, simulations in a realistic environment and empirical tests were performed. In these tests, the PSD received the signals of three emitters in different SNR conditions. For each SNR, the impact point was obtained as a function of the signal integration time. Obtained results allow knowing which integration time would be necessary to use according to the SNR of the received signal.
The results indicate that it is possible, under normal working conditions, to make more than 50 AoA determinations of different signals per second. In this case with a SNR of 60 dB, the error in the impact point is 3 µm, therefore the positioning error obtained using Equation (17)

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. Noise Signal Generation
Since we work with electronic systems, there are always noise components. This noise can be noise from the receiver, the channel, or the transmitter itself. All the noises are added up to a single noise component. The noise considered was white Gaussian noise. To simulate different scenarios, the signal-to-noise ratio value SNR was used. Depending on the received signal and the SNR to be analyzed, a different noise signal was generated.
Therefore, the following strategy was followed when introducing noise to the simulations: 1.
The signal received by each of the four channels of the PSD was obtained in the absence of noise.

2.
The total signal power P s received by the PSD was calculated, that is, the sum of the four signals of the four channels of the PSD.

3.
The noise power spectral density N 0 was calculated as: From the bandwidth BW and N 0 , the noise power was calculated:

5.
For each channel of the PSD, white Gaussian noise was generated with a noise power of one quarter of the total power. The generated noise was calculated from the following expression noise = P n 4 randn (A3) where randn is Matlab's function for generating random numbers with a normal distribution. 6.
Finally, each of the four noise signals was added with the signal of each of the four channels.

Appendix B. Results Tables of the Behavior of the Different Techniques in Noisy Environments
This appendix shows the simulation results described in Section 4.1.