Spatial positioning system for aviation (use FPGA)
In any FPGA article, in the comments, sooner or later, the thought appears, they say "a cool thing, put together a simple project, blinked with LEDs, and I won’t know what to do with it useful." Someone creates games under FPGA, someone portes standard processors of the old days, but all this is positioned primarily as entertainment and technology development. Indeed, the FPGA technology in the application "for home, for family" is too expensive and clearly redundant. Today I will try to talk about a system in which FPGA finds its harmonious use exclusively for peaceful and socially useful purposes (no mechanisms for stock speculation, voyeurism, or the killing of their own kind). However, as can be seen from the subsequent story, a significant part of the narrative will be devoted to the subject area and the level of system design.
A brief background is as follows - one large domestic company received a mandate (not sure if this was an order, so we will simply call it “mandate”) to create a navigation system for one domestic airport. In principle, they had experience in creating such systems, however, they required special knowledge in a number of technologies, and therefore specialists in developing devices based on FPGA were involved. Actually, the story will be conducted from the point of view of such a specialist, many other questions may well be lost due to ignorance ...
Formulation of the problem
The main objective of the system is to “monitor” all ground objects traveling through the airport, bring together information, display on the operator’s workplace, and, possibly, other services that automate control over the safety of movement. Further development of the system involved its use for [legally] flying objects in the vicinity of the airport. The standard solution to this problem is ADS-B technology., assuming that each aircraft has a special transceiver (transponder) that transmits various data on the air at a frequency of 1090 MHz in a special format using amplitude modulation. The coordinates of the aircraft can also serve as such data. Recently, there has been a tendency to install such transponders on ground vehicles of airport services. The disadvantage of such a system is that the coordinates are determined by the object itself (based on GPS / GLONASS / Galileo or more ancient technologies), and the navigation system can only be trusted. Even if you discard the possibility of intentional data corruption, their accuracy is not very high and can be critical for ground vehicles. Another commonly used option is active radars that illuminate all objects in the immediate vicinity.
Recently, hybrid technology, combining the advantages of these two approaches, based on the so-called multilateration (MLAT), is becoming more widespread. For a more detailed description, I will send everyone to a good amateur resource, and I will briefly tell the general idea. Every modern civilian aircraft (true for large airliners, it is becoming more and more complicated in small aircraft) constantly broadcasts (actually on request, but now it doesn’t matter) messages in the ADS-B Mode-S standard. These messages can be received by a single receiver and then it remains for us to be content with their internal content. MLAT uses multiple receivers with known coordinates. In this case, we get additional information in the form of the time the message was received from each of the receivers. The absolute time of sending a message by plane is unknown to us, however, the difference in the time of arrival of messages relative to the receiver selected by the base is known. If we assume that the radio waves on the air propagate uniformly and rectilinearly (quite a possible assumption for our problem), we get the difference in distance from the plane to the receivers relative to the base. Based on these data, armed with a pair of compasses and a ruler (preferably a computer with a 3D accelerator, it is easy) to determine the coordinates of the aircraft relative to the receivers, and then recalculate them to standard ones.
Initially, the MLAT technology was used for older types of transponders that do not support ADS-B Mode-S mode (exclusively Mode-A, the implementation of which is noticeably simpler). Now all this is being integrated into a common system called ADS-X (Extended ADS). It was this kind of system that was chosen for use. It should be noted that in the world (and in Russia), of course, there are similar exploited systems of Western manufacturers, however, there was a desire (including politically-driven) to create a domestic system of this kind.
Three types of system architecture can be distinguished:
- Independent receivers with their own clock sources;
- Receivers with a common clock;
- A common receiver receiving analog signals from antennas.
The first type of architecture is universal from the point of view of location on the ground, but for it the problem of synchronizing the clocks of receivers is acute. Modern GPS modules have an accuracy of forming timestamps of the order of 100-200 ns. As you know, radio waves propagate at the speed of light (300,000 km / s). Thus, an error of time measurement of 100 ns will give us an estimate of a positioning error of 30 m. It is quite enough for air traffic control, but not suitable for ground vehicles - accuracy of at least 3-5 m is required here. As a result, the implementation of this architecture requires Use more sophisticated technologies to synchronize receiver clocks.
The second and third type of architecture eliminated a similar problem, however, it requires direct connection of receivers (antennas) with the information processing center, which leads to restrictions on the area covered by the system. In addition, here there are problems of “adding” delays in the delivery of signals by wire, but they can be solved by calibrating the system with respect to transmitters with known coordinates. Since our task is to build a local system for the airport, as well as due to the presence of some infrastructure, the customer chose the third version of the system architecture.
Design receiver structure
The immediate task of the created device is to obtain an analog signal from the receiving antennas, detect ADS-B frames in it, and calculate the delays between the reception of the same frame by different antennas. Subsequently, the collected information for each received frame is transmitted to a higher system.
A frame of the ADS-B Mode-S format (they are also called squitter - from the English squitter) consists of 56 or 112 bits of data with the previous preamble. A preamble of 8 μs duration contains two pairs of pulses traveling at some distance from each other, followed by the information part in which each data bit is encoded by the transition 0 => 1 or 1 => 0.
A first look at this picture makes you want to set the comparator and sample the result at the highest possible frequency (at least 1-2 GHz if desired), recording the exact moment the frame starts. Unfortunately, this solution will not [normally] work and there are many reasons for this:
- when transferring the signal to the RF frequency (1090 MHz) and vice versa, the waveform is significantly distorted, the pulses become far from rectangular;
- signals from different sources will have different power, which means that there is a problem of choosing the level at which the comparator should operate;
- in conditions of a large number of transponders working nearby, it is very likely that two (or more) squitters overlap each other - this is a completely normal situation and receivers should be able to receive such signals in some cases;
- interference on the air and re-reflection, distorting the shape of the received signals;
- and finally, such a solution leaves out the problem of directly receiving and decoding messages for the purpose of identification - from which object this squitter was sent.
In this regard, a different approach was used, which allows us to more accurately establish the difference in the time of their reception by the forms of the received signals. Mathematical modeling showed that the sampling frequency in this case can be relatively low, in our case it was chosen equal to 12 MHz, that is, 12 samples per one bit of transmitted data (recall, the duration of 1 bit is 1 μs).
In the old days, I wrote an article about general approaches to the development of equipment. In principle, nothing has changed fundamentally since then. Initially, as mentioned above, the idea of calculating delays was tested on a mathematical model, after receiving positive results, a functional diagram of the device was developed.
One of the requirements for the system is scalability - the ability to increase the number of receive channels without significantly changing the architecture of the device. It was planned that one device will be able to serve up to 32 receiving channels (16 with redundancy).
The signals received from the antennas are transferred to a low frequency in the AM demodulation units, the number of which is equal to the number of receiving channels. Next, data is digitized using multichannel ADCs with a relatively low sampling frequency (tens of MHz). Such ADCs have many analog data inputs and a high-speed serial or serial-parallel digital interface, within which information from all channels is transmitted packed into frames. This allows you to significantly save on PCB tracing and on the resources of input / output elements of microcircuits that implement the interface with the ADC.
As an information processing device, it is most convenient (in this case) to use FPGA, which allows you to immediately solve a set of problems - an interface with an ADC, data buffering in high-speed internal memory, DSP processing and complex control algorithms implemented on an embedded processor. In fact, the question of choosing a hardware platform is not easy. According to general estimates, there is a chance that you can have time to do all the processing on a good DSP, but I did not want to risk it. Moreover, in any case, you also need to support the interface with the ADC, which means installing FPGA, most likely, one way or another would have to.
The received signals are buffered and sent to the ADS-B frame reception units. The number of blocks corresponds to the number of received channels. In them, the preamble is detected, the data is extracted and their checksums are checked. A number of measures are also being taken to receive frames superimposed on each other, in the event that one of them has a noticeably greater power. Received frames with time stamps are transmitted for further processing.
At the same time, another procedure is performed - the calculation of the exact delay (with an accuracy of less than one sampling interval) according to the forms of the received signals. For all received frames, their position in the buffer is established, after which they are sent in pairs (relative to a channel selected by the master) for processing combined to within one sampling interval. After intensive digital processing in both the time and spectral regions, the output gives a number in fractions of the sampling frequency - how far the frames are from each other in time. For example, the following picture shows two implementations of the signal, spaced half the sampling interval from each other (for convenience, they are combined in time and the marks indicate the moments when they were sampled). The unit for calculating the exact delay when applying such signals to the input will give a value of 0.5 (or -0.5, depending on which of the signals came earlier), i.e. half the sampling interval.
At the end of this procedure, you can prepare the final information for each frame: the data contained in the frame and the reception delay for each channel. The complexity of the general procedure for managing frame processing lies in the fact that different channels at the same (close) time can receive frames from different objects - depending on whose transmitter is more powerful and who will be located relative to the antennas. Ultimately, the collected information is sent to a superior system for further processing and calculation of the spatial position of objects.
As you can see, the resulting text does not contain a single line of code. Going into any nuances of implementation is a long and difficult matter. To give the code, in my opinion, is completely meaningless, because any single piece looks corny, and no one will read too much volume anyway. Therefore, in this article I focused on the main ideas and a general structure description. Maybe in the future one more part will be written, revealing the details of the implementation of some individual elements. Well, now it's time to end ...
As an epilogue
As part of the first stage of development
Unfortunately, a sad event happened last fall - a private airliner crashed at Vnukovo Airport , and even with a very high-status passenger. One of the factors that happened was the lack of a modern navigation system at the airport, such as the one described above. This event led to paradoxical consequences for the project - somewhere high above it was decided that creating your own system was too long and unwarranted, and therefore a decision was made to purchase ready-made receivers (and maybe other components of the system - I don’t own the question) Western partners, and the current development was closed.