Prologue
In any article devoted to
FPGA , in the comments sooner or later the thought appears, they say, "a funny thing, put together a simple project, flashed LEDs, and what to do with this useful - I will not put my mind to it." Someone under the FPGA creates games, someone porting the standard processors of the old days, but all this is positioned primarily as an 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 the FPGA finds its harmonious use exclusively for peaceful and socially useful purposes (no mechanisms for speculation on the exchange, voyeurism or killing one’s own kind). However, as it will be possible to notice from the further story, a significant part of the narration will be devoted to the subject area and the level of system design.
A brief background is as follows - one large domestic enterprise received a mandate (not sure if it was an order, so let's just call it “an order”) to create a navigation system for one domestic airport. In principle, they had the experience of creating such systems, but they required special knowledge of a number of technologies, and therefore experts in the development of devices based on FPGA were involved. Actually, the story and will be conducted from the point of view of such a specialist, many other questions may well be missed for ignorance ...
Formulation of the problem
The main task of the system is to “monitor” all ground objects traveling across the airport, to consolidate information, display on the operator’s workplace, and possibly other services that automate movement control. Further development of the system assumed its use for [legitimate] flying objects in the vicinity of the airport. The standard solution of this problem is the
ADS-B technology, which assumes that each aircraft has a special transceiver (transponder) transmitting 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 act as such data. Recently, there is a tendency to install such transponders on ground machines of airport services. The disadvantage of this 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 trust them. Even if we discard the possibility of deliberate distortion of data, their accuracy is not particularly great and may be critical for ground vehicles. Another frequently used option is active radar, which illuminates all objects in the immediate vicinity. The disadvantage of this technology is the impossibility of identifying objects, as well as the relationship between the size of the object and the size / brightness of the mark on the radar.

Recently, a hybrid technology that combines the advantages of these two approaches, based on the so-called multilateration (MLAT), is becoming more common. 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 aircraft, in small aircraft is more and more difficult) constantly sends on the air (in fact, on request, but now it does not matter) the messages in the standard ADS-B Mode-S. These messages can be received by a single receiver and then we have to be content with their internal content. MLAT uses many receivers with known coordinates. In this case, we have additional information in the form of a message receiving time from each of the receivers. We do not know the absolute time of sending a message by plane, but we know the difference in the arrival times of messages relative to the receiver chosen as the base one. If we assume that radio waves propagate in the air evenly and straightforwardly (quite possible assumption for our task), we get the difference in distances from the aircraft to the receivers relative to the base. On the basis of these data, armed with a compass and a ruler (better still a computer with a 3D accelerator), it is easy to establish the coordinates of the aircraft relative to the receivers, and then recalculate them to standard ones.
')
Initially, MLAT technology was used for older types of transponders that do not support ADS-B Mode-S mode (only Mode-A, the implementation of which is noticeably simpler). Now all this is integrated into a common system called ADS-X (Extended ADS). This kind of system was chosen for use. It should be noted that in the world (and in Russia), of course, there are similar systems operated by Western manufacturers, but there was a desire (including a politically determined one) to create a domestic system of this kind.
There are three types of system architecture:
- Independent receivers with their own clock sources;
- Receivers with a common clock signal;
- A common receiver that receives analog signals from antennas.
The first type of architecture is universal in terms of placement on the ground; however, the problem of synchronization of clocks of receivers is acute for it. Modern GPS modules have the accuracy of the formation of time marks of the order of 100-200 ns. As you know, radio waves propagate at the speed of light (300,000 km / s). Thus, the measurement error of 100 ns will give us an estimate of the positioning error of 30 m. It is quite enough for air traffic control, but not suitable for ground vehicles - here at least 3-5 m of accuracy is required. As a result, this architecture requires use more sophisticated technology to synchronize clock receivers.
The second and third type of architecture is free from a similar problem, however, it requires a direct connection of receivers (antennas) with the information processing center, which leads to restrictions on the area covered by the system. In addition, there are problems of "adding" delays in the delivery of signals by wire, but they can be solved by calibrating the system relative 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 option of the system architecture.
Design of the receiver structure
The immediate task of the device being created is to receive an analog signal from receiving antennas, detect ADS-B frames in it, and calculate delays between receiving the same frame by different antennas. In the future, the collected information for each received frame is transmitted to the higher system.
The ADS-B Mode-S format frame (also called squitter, from English. Squitter) consists of 56 or 112 data bits with a preceding preamble. The 8 µs preamble contains two pairs of pulses going some distance from each other, followed by the information part, in which each data bit is encoded with a transition 0 => 1 or 1 => 0.

The first look at this picture makes you want to put a comparator and sample the result at the maximum possible frequency (at least 1-2 GHz if desired), recording the exact time of the frame start. Unfortunately, this solution will not work [normally] and there are many reasons for this:
- when the signal is transferred to the RF frequency (1090 MHz) and back, the waveform is significantly distorted, the pulses are far from rectangular;
- signals from different sources will have different power, which means there is a problem of choosing the level by which the comparator should work;
- in the conditions of a large number of transponders working alongside, a situation is quite likely when two (or more) squitters overlap each other - this is quite a normal situation and receivers should be able to receive such signals in some cases;
- interference in the air and reflections that distort the shape of the received signals;
- and finally, such a solution leaves behind the brackets the problem of directly receiving and decoding messages with the purpose of identifying from which object the given squitter was sent.
In this regard, a different approach was used, which allows to more accurately determine the difference in time of their reception by the forms of received signals. Mathematical modeling showed that the sampling frequency in this case may be relatively low, in our case it was chosen equal to 12 MHz, that is, 12 samples per bit of transmitted data (remember, the length of 1 bit is 1 ÎĽs).
In ancient times, I wrote
an article about general approaches to the development of equipment. In principle, nothing fundamentally has changed since that time. Initially, as mentioned above, the very idea of ​​calculating delays was tested on the mathematical model, after receiving positive results, a functional diagram of the device was developed.

One of the system requirements is scalability - the ability to increase the number of reception channels without significantly changing the device architecture. It was planned that one device will be able to serve up to 32 receiving channels (16 with redundancy).
The signals arriving from the antennas are transferred to a low frequency in 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 rate (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 the trace of the printed circuit board and on the resources of the I / O elements of the 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 solving a complex of tasks right away - 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 in a good DSP you can also manage to do all the processing, but did not want to risk it. Moreover, in any case, you also need to support the interface with the ADC, which means you would have to install the FPGA one way or another.
The received signals are buffered and sent to ADS-B frame receive blocks. The number of blocks corresponds to the number of received channels. They detect the preamble, extract the data and check their checksums. Also taken a number of measures to receive superimposed frames, in the event that one of them has a noticeably greater power. The 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) from 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 any channel selected by the master), combined with an accuracy of one sampling interval, for processing. After intensive digital processing in both the time and the spectral regions, the output is a number in fractions of the sampling frequency — how far the frames are separated from each other. For example, in the following picture, two signal implementations are shown, separated from each other by half of the sampling interval (for convenience of perception, they are combined in time and the points indicate when they were sampled). The unit for calculating the exact delay when these signals are fed to the input will produce 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 summary information for each frame: the data contained in the frame and reception delays for each channel. The complexity of the overall frame processing control procedure also lies in the fact that different channels can receive frames from different objects at the same (near) time - depending on which transmitter is more powerful and who will be located relative to the antennas. In the end, the collected information is sent to the higher-level system for further processing and calculating the spatial position of objects.
As you can see, the resulting text does not contain a single line of code. Going into any implementation nuances is a long and difficult affair. To give the code, in my opinion, the occupation is completely meaningless, for any single piece looks trite, and too much nobody will read too much. Therefore, in this article I focused on the basic ideas and the general structural description. Maybe in the future will be written another part, revealing the details of the implementation of some individual elements. Well, now it's time to finish ...
As an epilogue
In the framework of the first stage of development
, a prototype of the system described above, containing only 4 channels
, was created
from the radio components found in the trash can . When testing “on the table,” the error in measuring delays with a strong signal level was less than 2 ns and gradually decreased with a deterioration of the signal-to-noise ratio. When testing in real conditions, the error was about 10 ns, which, according to colleagues, is about 2-3 times better than that of a similar purchasing system. Taking into account that the estimated cost of the product being developed from scratch
due to the fact that the developers lived in the barracks on bread and water was in the region of the serial samples of competitors, all this inspired bright prospects for successful completion of the project.
Unfortunately, last fall there was a sad event - a private airliner
crashed at Vnukovo airport, and even with a very high-profile passenger. One of the factors of the incident was the lack of a modern navigation system at the airport, like the one described above. This event led to paradoxical consequences for the project - somewhere high up, it was decided that it was too long and unguaranteed to create its own system, and therefore it was decided to purchase ready-made receivers (and possibly other components of the system - I do not own the question) at the western partners, and the current development was closed.