Implementation of Linux-based software-based and networked radar terminal systems

Source: Internet
Author: User
Implementation of Linux-based software-based and networked radar terminal systems
[Date:] Source: Electronic Technology Application Author: Qian Bo, Qian pu, Wang desheng [Font:Large Medium Small]

 

The existing radar terminal system uses a large number of high-speed dedicated chips. However, the chip upgrade is very fast, and many chips have been eliminated. Even if they have not completely disappeared, the price is very expensive, causing great inconvenience to system maintenance and upgrade. With the continuous development of computer, software and network technologies, it is possible to implement the software and network of the New Generation radar terminal system. Based on this technical background, this article studies and provides the specific implementation of the system.
1. Overall Implementation Scheme
1.1 Linux-based operating system
Traditional radar display systems are based on Windows. However, Windows faces many problems, such as closed source code, virus attacks, and hacker intrusion. Linux is a free, open-source, and networked operating system. Its kernel is independent and highly configurable. Linux has better network functions and security than Windows. Therefore, the Linux-based system solution is more appropriate.
1.2 System Implementation Scheme
The system consists of a pre-processing machine, a primary display machine, and an online display machine, as shown in figure 1.

The main functions of the preprocessing machine are to collect, compress, and transmit radar videos, receive secondary information and control information, and store all information. Main display machine function: receives, decompress, and displays compressed videos, receives and displays secondary information, and performs man-machine operations to send secondary information and control information to the network. The Network display machine is similar to the master display machine, but has no control function. For the sake of simplicity, this article does not discuss the implementation of the network display machine.
2. Implementation of the preprocessing Machine System
The Preprocessing machine completes data collection, compression, and transmission. The following describes these three aspects.
2.1 radar video acquisition card based on PCI bus
This is the only hardware implementation part in the system and is also essential. It transmits the collected data to the computer. For the specific implementation of this part, refer to [1].
2.2 Wavelet Compression Technology
When the radar sampling rate is very high, no compression is performed before network transmission, and the bandwidth is insufficient.
Frame-based compression technology is not suitable for scenarios that require real-time radar videos because it introduces a fixed latency. However, one-dimensional wavelet compression can compromise both efficient compression and real-time requirements.
The idea of wavelet compression is to divide a one-dimensional digital sequence into two parts: rough scale and details, each occupying half of the storage space. This process can always be recursive; because the echo signal is relatively smooth, the details are mainly noise, so only the rough scale is retained, as shown in 2.

The decomposition and synthesis of different scale coefficients are shown in 3.
  
H (k) and g (k) are a set of Coupled Image filters derived from two-scale equations. Aki is the (coarse) scale coefficient of the I layer. Layer I is decomposed recursively into a larger part of ak (I + 1) and a detailed part dk (I + 1) of the I + 1 layer ).
The decomposition process is equivalent to subsampling after the input sequence and the filter convolution, and only the even points are retained. The synthesis process is equivalent to interpolation (adding 0) The sequence first, then convolution and addition with the filter.
Figure 4 shows an example of using the db1 wavelet recursion to compress a radar echo three times. The compression is close to the original 1/8.

The system uses the (9, 7) Dual-orthogonal wavelet fast lifting algorithm, and 1 ~ Layer-4 scale decomposition. For more information about the implementation of wavelet compression, see [2].
2.3 Network Transmission
Common network protocols are UDP and TCP. UDP is a connectionless protocol, and TCP is a connectionless protocol. In addition, the TCP protocol also adjusts the packet order on the receiver, because different packets may arrive at different routes. However, reliability is costly. TCP consumes more CPU resources than UDP, and the network utilization is inferior to UDP. If the network is in good condition and a large volume of data needs to be transmitted continuously, you can consider UDP. Generally, communication is point-to-point, that is, unicast. In this way, multiple clients must establish connections with the same server, which doubles the network load.
The broadcast mode can be used in special cases. Currently, it is only supported by UDP. It is very easy to implement broadcast. You only need to set the destination IP address to the IP address of this subnet. This one-to-multiple method affects hosts that do not need to receive data. All hosts on the subnet that do not participate in Broadcast Reception must also process the Datagram Protocol until the UDP layer discards the data, it may even cause a broadcast storm.
Unicast and broadcast are two extremes. Multicast provides a compromise. Multicast datagram is only received by the host interested in the datagram (the host is added to the multicast group) and does not affect other hosts on the subnet. Currently, UDP supports multicast.
In the system, a video is multicast. The control command connection channel between the master display machine and the preprocessing machine requires reliable connection and less traffic, therefore, the connection-oriented TCP protocol is adopted.
3. Implementation of the primary Display System
The main display machine consists of various display modules and network modules. The display module includes the PPI and AR modules. The PPI display technology is the most complex. How to integrate the display module and network module is the key to system efficiency.
3.1 Radar Video PPI display
3.1.1 Coordinate Transformation and dead address

A very important step in the display process is to convert coordinates. The radar video data obtained by the data acquisition card uses the distance and azimuth coordinates, but the memory of the general graphics card uses the columns as coordinates. Therefore, the polar coordinates must be converted to the x-y Cartesian coordinates, polar Coordinates and natural Cartesian coordinates are:
  
For real-time computing, the current computer hardware conditions cannot meet the real-time requirements. It can be calculated in advance, and the look-up table method is used during the conversion to exchange space for time. The conversion table can only calculate the First quadrant, And the other quadrant is determined based on the symmetry of the azimuth code.
The so-called dead address refers to the phenomenon that some areas are inaccessible from the point where the PPI shows the center of the long-distance display, which is similar to the diffraction pattern. The larger the radius, the more obvious the pattern. 5.

You need to "fill" These inaccessible points. Separate existing vertices with duplicates (that is, multiple (p-θ) points mapped to the same (x-y) Coordinate, based on the recent rule, force the recurrence point to "Dead address. For example, the two vertices M1 (P 1, θ 1) and M2 (P 2, θ 2) in polar coordinates are all M3 (x1, y1), while M4 (x2, y2) is an "Dead address" and M3 and M4 are very close to each other. In this case, M1 => M3 and M2 => M4 are forcibly specified.
In the system, the scanning radius is 512 pixels and the scanning line is 4096 scanned lines per week. Practice has proved that all dead addresses can be associated with adjacent azimuth distance codes to eliminate pattern patterns. As you can imagine, the larger the scanning radius, the larger the dead zone away from the center of the center. The Reuse points that can be used are usually not found nearby, and the solution must be improved.
In the most extreme case, the scanning radius is 1024 at the center of the circumference. Divide the circle with a radius of 1024 into a concentric circle with a radius of 512 and the remaining outer ring. The preceding solution can be used for internal small circles. 512 ~ In Part 2, the resolution of the azimuth is doubled, that is, the resolution is 1023 in a week and then supplemented. The specific algorithm is as follows:
(1) obtain a set of all x-y coordinate points of the outer ring.
(2) round all the p-θ points in the outer ring to the nearest x-y coordinate point according to the conversion formula. Some x-y values are associated with multiple p-θ points, while some do not.
(3) traverse the x-y without the association of p-θ. For each of these x-y points, find all x-y points in a square with a self-centered side and a side length of 4, if we find that more than one p-θ is associated with an x-y point, We will assign a p-θ to the x-y without the p-θ Association. At the same time, the x-y point of p-θ is given, and the P-θ given is removed from its p-θ associated linked list.
(4) Start from 512 ~ 1023, θ from 0 ~ In the order of 8191, the corresponding x-y is written to the disk file.
Programming results show that this algorithm can quickly complete all dead addresses.
Correspondingly, the original coordinate conversion table should be replaced by two tables with dead addresses (one is within 512 radius and the other is 512 ~ 1023.
3.1.2 Xu hui Simulation
The traditional radar system uses the long afterglow tube as the PPI display. The advantage is that the target brightness is strong and the attenuation is slow. The noise is weak on the display and the attenuation is fast. This highlights the target. If it is a moving target, it will produce a tail effect, making the moving target more vivid and easy to be discovered. When using a common Monitor, a software implementation mechanism must be provided to simulate the afterglow. One method is to perform cyclic Pseudo-Random Access to points in the PPI scan area, and then perform attenuation and write data. The principle is: vertices that traverse by pseudo-random sequence can be considered to be evenly distributed, while the current scan area only accounts for a small portion of the whole PPI area, therefore, the number of points that fall into the pseudo-random sequence in the current scan area is also very small, and there are a lot of points that are far away from the random sequence in the current area. Therefore, after the stability, the result will be the darker the scanning line.
For the PPI scanning area with a radius of 512 pixels, its external cut rectangle is 1024 × 1024. Use the first 10 bits of the 20-bit pseudo-random sequence to correspond to the X coordinate point of the rectangle area, the last 10 bits correspond to the Y coordinate point, and then remove the pixels inside the circle and the rectangle. Each time the PPI scans a radius line, a random point is read cyclically, and then written after attenuation. The points and ranges of each attenuation can be set as needed. A random table with X and Y coordinates can be generated in advance and stored in the hard disk as a data file. The program reads the table once during initialization.
3.1.3 hierarchical display of secondary information
In a broad sense, secondary information includes Track, status monitoring, and other non-primary video information. The Overlay function is used in the software solution. Currently, common graphics cards support this function.
Overlay is a transparent slice in front of the monitor, as shown in figure 6. When you need to display Overlay, you can also see that the Overlay part and the Primary Surface are not blocked by Overlay. When Overlay is not displayed, the original Primary Surface content remains unchanged. That is to say, the contents of Primary Surface and Overlay are physically separated. Whether Overlay is displayed is determined by the pixel color on the Primary Surface. When pixels in certain areas on the Primary Surface are set to a special color, these areas display the content on Overlay. This filtering Color is called the Color Key. This display mechanism is completely completed by the CPU of the video card, so when the Overlay function is used, the program will not have obvious performance loss. Different video cards may have different Color keys.

Overlay has multiple modes. The most common modes are YV12_OVERLAY and y: U: V =. The system adopts this mode.
One feature of YUV Overlay is that U and V can be properly fixed, and the color type can be approximately fixed. Changing Y is equivalent to changing the brightness. The test also shows that displaying videos on Overlay is less CPU resources than displaying videos on Primary Surface. Compared with the RGB display mode on the Primary Surface, these features are suitable for displaying a video at a time using the PPI.
The implementation of one-time and two-time hierarchical display is as follows: first, fill in a special Color Key for all pixels on the Primary Surface located in the PPI scan area, this ensures that a video is visible on the Overlay associated with the Primary Surface. The secondary information needs to be displayed, and the hidden Color of the Color Key must be filled on the Primary Surface layer; when you do not need to display secondary information, you only need to write the original secondary information on the Primary Surface with the Color Key.
3.2 network-based display Application Framework Structure
Because the frame package receiving Network Multicast is a blocking operation, and the main thread of the GUI program cannot have blocking operations, the network receiving part should be placed in the sub-thread or sub-process.
The system first selects the sub-thread mode. The test shows that the display part is uneven in this mode. This is because the CPU scheduling object is a process. The threads in the process compete for the time slice allocated by the CPU to the process at the same time. Therefore, the main thread occupies the CPU for a certain period of time, in another period, the sub-threads in the Network occupy the CPU. Although the network receives packets without packet loss, the uneven receipt speed leads to uneven display. The system tried the sub-process method again and found that the display effect was improved, but the improvement was not great.
Imagine that if two CPUs run the parent process and child process in parallel, the overall running efficiency will be greatly improved. Because, the CPU almost does not need to be repeatedly switched between different processes.
The system selects the Intel Pentium 4 processor with hyper-threading function. If the operating system supports SMP (hyper-threading Multiple Processing), one CPU is equivalent to two CPUs, and the two processes can be processed in parallel. In fact, the kernel of Linux2.4 supports SMP. The kernel version selected by the system is 2.6.8. You can manually compile the kernel and use the SMP function. Run the same program with the new kernel. The display is smooth and the fastest display speed is within one lap and 2 seconds. The performance has been significantly improved. The flexible customization feature of Linux kernel plays a key role in the system.
Figure 7 is the network display program framework on the primary display machine.

Both equality and load are considered equally for the parent and child processes. Linux has many mechanisms for inter-process communication: pipelines, message queues, and shared memory. Select the shared memory mode in the system, because this is the fastest way to communicate between processes. In the Framework, the secondary information enters the primary display through the I/O port. because of its low data rate, the system uses a timed Method for access updates.
This article demonstrates the implementation feasibility of Linux-based software-based and networked radar terminal systems, puts forward a set of feasible implementation solutions, and expounds the key technologies in the solutions. The promotion of this scheme is of revolutionary significance to the current domestic radar terminal system.
References
1 Li Qing. Radar Video Acquisition Scheme Based on PCI Bus. Electronic Technology Application, 2004; 30 (11)
2. Image Encoding basics and wavelet compression technology. Beijing: Tsinghua University Press, 2004
3 W. Richard Steven S. Unix Network Programming (Volume 1 and volume 2). Beijing: Tsinghua University Press, 2001

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.