1 Overall implementation plan
1.1 Based on Linux operating system
The traditional radar display system is based on Windows. However, Windows faces many problems, such as closed source, easy to be invaded by viruses and hackers. Linux is a free, open source, networked operating system. Its kernel is independent and highly configurable. Linux's network functions and security are better than Windows. Therefore, the system solution based on Linux is more appropriate.
1.2 System implementation plan
The system consists of a preprocessor, a main display machine and a network display machine, as shown in Figure 1.
The main functions of the preprocessor are: acquisition, compression and transmission of radar video, receiving secondary information and control information and storing all information. The main display machine functions: receiving, decompressing and displaying compressed video, receiving and displaying secondary information, human-machine control operation, and sending secondary information and control information to the network. The network display machine is similar to the main display machine, but without the control function. For simplicity, this article does not discuss the implementation of the network display machine.
2 Implementation of the preprocessor system
The preprocessor completes data acquisition, compression and transmission. The following will introduce these three aspects.
2.1 Radar video acquisition card based on PCI bus
This is the only hardware implementation part of the system and is also indispensable. It transmits the collected data to the computer. The specific implementation of this part can be found in reference [1].
2.2 Wavelet compression technology
When the radar sampling rate is very high, the bandwidth is not enough if compression processing is not performed before network transmission.
Frame-based compression technology is not suitable for occasions with real-time requirements for radar video because it will introduce a fixed delay. One-dimensional wavelet compression can achieve a compromise between efficient compression and real-time requirements.
The idea of wavelet compression is to divide the one-dimensional digital sequence into two parts: coarse scale and detail, each occupying half of the storage space. This process can be recursively continued; because the echo signal is relatively smooth and the detail part is mainly noise, only the coarse scale part is retained, as shown in Figure 2.
The decomposition and synthesis of different scale coefficients are shown in Figure 3.
Where h(k) and g(k) are a set of conjugate mirror filters derived from two-scale equations. aki is the (coarse) scale coefficient of the i-th layer. The i-th layer is recursively decomposed into the larger scale part ak(i+1) and the detail part dk(i+1) of the i+1 layer. [page]
The decomposition process is equivalent to convolving the input sequence with the filter and then subsampling it to keep only the even points; the synthesis process is equivalent to first interpolating the sequence (adding 0), then convolving with the filter and adding it.
Figure 4 is an example of using the db1 wavelet to recursively compress a radar echo three times, and the compression is close to 1/8 of the original.
The system uses the (9,7) biorthogonal wavelet fast lifting algorithm, and performs 1 to 4 scale decompositions according to actual needs. The implementation details of wavelet compression can be found in reference [2].
2.3 Network transmission
The commonly used network protocols are UDP and TCP. UDP is a connectionless protocol; TCP is a connection-oriented protocol. In addition, the TCP protocol also needs to adjust the order of packets at the receiver, because different packets may arrive via different routes. However, reliability comes at a price. TCP occupies more CPU resources than UDP, and the network utilization rate is not as good as UDP. If the network condition is good and large amounts of data need to be transmitted continuously, UDP can be considered. In general, the communication method is point-to-point, which is the so-called unicast method. In this method, multiple clients must establish connections with the same server separately, which leads to an exponential increase in network load.
In special cases, the broadcast method can be used. It is currently only supported by the UDP protocol. Broadcast is very easy to implement. You only need to set the destination IP address to the address of the subnet. This one-to-many approach will affect hosts that do not need to receive. All hosts on the subnet that do not participate in the broadcast reception must also complete the protocol processing of the datagram until the UDP layer discards it, and may even cause a broadcast storm.
Unicast and broadcast are two extremes. Multicast provides a compromise solution. Multicast datagrams are only received by hosts that are interested in the datagram (the host joins the multicast group) and will not affect other hosts on the subnet. Currently, UDP provides support for multicast.
In the system, a video is multicast; the control command connection channel between the main display machine and the preprocessor uses a connection-oriented TCP protocol because it requires a reliable connection and the communication volume is relatively small.
3 Implementation of the main display system
The main display machine is mainly composed of various display modules and network modules. The display module includes PPI and AR modules. Among them, the PPI display technology is the most complex. How to integrate the display module and the network module is the key to the efficiency of the system.
3.1 Radar video PPI display
3.1.1 Coordinate transformation and dead address
A very important step in the display process is to transform the coordinates. The radar video data obtained by the data acquisition card uses distance and azimuth as coordinates, but the memory of the general graphics card uses rows and columns as coordinates, so the polar coordinates must be converted into xy rectangular coordinates, and the polar coordinates and natural rectangular coordinates are converted to: If real-time calculation is required, the current computer hardware conditions cannot meet the real-time requirements. It can be calculated in advance, and the table lookup method is used during conversion to exchange space for time. The conversion table can only calculate the first quadrant, and the other quadrants are determined according to the symmetry of the azimuth code. The so-called dead address refers to the fact that some areas far away from the display center in the PPI display can never be accessed, resulting in a phenomenon similar to diffraction patterns. The larger the radius, the more obvious this pattern is. As shown in Figure 5.
It is necessary to "fill" these points that cannot be accessed. Separate some of the original duplicate points (i.e., multiple (ρ-θ) points are mapped to the same (xy) coordinates), and forcibly change the duplicate points to "dead address" points based on the principle of the closest. For example, the two points M1 (ρ1, θ1) and M2 (ρ2, θ2) in polar coordinates, after conversion to rectangular coordinates, the corresponding points are both M3 (x1, y1), while point M4 (x2, y2) is a "dead address" and M3 and M4 are very close. At this time, it is forced to stipulate that M1=>M3 and M2=>M4.
In the system, when there is no eccentricity, the scanning radius is 512 pixels, and there are 4096 scanning lines in a circle. Practice has proved that all dead addresses can be associated with adjacent azimuth distance codes to eliminate patterns. It can be imagined that the larger the scanning radius, the larger the dead area away from the center of the circle, and usually no duplicate points that can be used can be found near it, so the solution must be improved.
Consider the most extreme case, where the eccentricity is on the circumference, and the maximum scanning radius is 1024. Divide the circle with a radius of 1024 into concentric circles with a radius of 512 and the remaining outer ring. The previous solution can be used for the small inner circle. The azimuth resolution of the part from 512 to 1023 is doubled, that is, 8192 points per circle, and then the points are supplemented. The specific algorithm is as follows:
(1) Get the set of all xy coordinate points of the outer ring.
(2) Round all ρ-θ points in the outer ring to the nearest xy coordinate point according to the conversion formula. Some xy points will be associated with multiple ρ-θ points, while some will not be associated with any ρ-θ point.
(3) Traverse those xy points that are not associated with ρ-θ. For each such xy point, search for all xy points in a square with a side length of 4 centered on itself. If it is found that an xy point is associated with more than one ρ-θ, one of the ρ-θ points is assigned to the xy point that is not associated with ρ-θ. At the same time, given the xy point of ρ-θ, remove the given ρ-θ from its ρ-θ association list.
(4) Write the corresponding xy to the disk file in the order of ρ from 512 to 1023 and θ from 0 to 8191.
The programming calculation results show that this algorithm can quickly fill all dead addresses.
Accordingly, the original coordinate conversion table should be replaced by two tables that have filled dead addresses (one is within a radius of 512, and the other is 512 to 1023). [page]
3.1.2 Afterglow simulation
Traditional radar systems use long afterglow tubes as PPI displays. Its advantages are: the target brightness is strong and decays slowly; the noise brightness is weak on the display and decays quickly. This makes the target stand out. If it is a moving target, a tailing effect will occur, making the moving target more vivid and easier to detect. When using ordinary displays, a software implementation mechanism must be provided to simulate afterglow. One method is to perform cyclic pseudo-random access to the points in the PPI scanning area, read them out, decay them, and then write them. The principle is: the points traversed by the pseudo-random sequence can be approximately considered to be uniformly distributed, and the current scanning area only occupies a very small part of the entire PPI area, so the number of pseudo-random sequence points falling into the current scanning area is also small, and the number of random sequence points far away from the current area is large, so after stabilization, it can produce an afterglow effect that becomes darker the farther away from the current scanning line.
For a PPI scanning area with a radius of 512 pixels, its circumscribed rectangle is 1024×1024. The first 10 bits of the 20-bit pseudo-random sequence correspond to the X coordinate points of the rectangular area, and the last 10 bits correspond to the Y coordinate points, and then the pixels outside the circle and inside the rectangle are removed. Every time PPI scans a radius line, a section of random points is read out cyclically, and then written after attenuation. The number of points and amplitude of each attenuation can be set as needed. The random table of X and Y coordinates can be generated in advance and stored in the hard disk in the form of a data file, and read in once when the program is initialized.
3.1.3 Hierarchical display of secondary information
Broadly speaking, secondary information includes all non-primary video information such as track and status monitoring. In the software solution, the Overlay function is used to achieve this. Currently, all common graphics cards support this function.
Overlay is like a transparent slice in front of the display, as shown in Figure 6. When you need to display Overlay, you can see the Overlay part and the part of the Primary Surface that is not blocked by Overlay at the same time. When you don't need to display Overlay, remove Overlay, and the original Primary Surface content remains unchanged, that is, the content of Primary Surface and Overlay are physically separated. Whether to display Overlay is determined by the color of the pixels on the Primary Surface. When the pixels in certain areas of the Primary Surface are set to a special color, these areas display the content on Overlay. This filtering color is called Color Key. This display mechanism is completely completed by the CPU of the graphics card, so when using the Overlay function, the program will not have a significant performance loss. Different graphics cards may have different Color Keys.
Overlay has multiple modes, the most commonly used is YV12_OVERLAY, Y:U:V=4:2:2. This system adopts this mode.
A feature of YUV Overlay is that by properly fixing U and V, the color type can be approximately fixed, and changing Y is equivalent to changing the brightness. Tests also show that displaying video on Overlay takes up less CPU resources than displaying on Primary Surface. Compared with the RGB display method on Primary Surface, these characteristics are very suitable for PPI display of primary video.
The implementation method of primary and secondary layered display is: first fill all pixels in the PPI scanning area on Primary Surface with a special Color Key, so as to ensure that the primary video on Overlay associated with Primary Surface is visible; fill the place where secondary information needs to be displayed with other colors different from Color Key on Primary Surface layer; when secondary information does not need to be displayed, just write the original secondary information on Primary Surface again with Color Key color.
3.2 Networked display application framework structure
Since receiving video frame packets from 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 a child thread or child process.
The system first selected the child thread mode, and the experiment showed that the display part was uneven in this mode. This is because the object of CPU scheduling is the process, and the threads in the process compete for the time slice allocated by the CPU to the process at the same time, so the main thread will occupy the CPU for a period of time, and the child thread of the network part will occupy the CPU for another period of time. Although network reception will not lose packets, the uneven reception speed causes uneven display. The system also tested the child process mode and found that the display effect has improved, but the improvement is not significant.
Imagine that if there are two CPUs, running the parent process and the child process in parallel, the overall operation efficiency will be greatly improved. Because the CPU almost does not need to switch repeatedly between different processes.
The system uses the Intel Pentium 4 processor with hyperthreading function. If the operating system can support SMP (Symmetric Multiple Processing), then one CPU is equivalent to two CPUs, and two processes can be processed in parallel. In fact, the Linux 2.4 kernel supports SMP. The kernel version selected by the system is 2.6.8. The kernel is manually compiled and the SMP function is selected. When the same program is run with the new kernel, the display is very smooth, and the fastest display speed reaches one circle within 2 seconds, and the performance has been significantly improved. The flexible customization feature of the Linux kernel plays a key role in the system.
Figure 7 is the framework of the network display program on the main display machine.
Taking equality into consideration, the parent and child processes try to share the load equally. Linux has many mechanisms for implementing inter-process communication: pipes, message queues, shared memory, etc. The shared memory method is selected in the system because it is the fastest way to communicate between processes. In the framework, secondary information enters the main display machine through the I/O port. Due to its relatively low data rate, the system uses a timed method to access and update.
This paper demonstrates the feasibility of the software-based and networked radar terminal system based on Linux, and proposes a set of practical implementation solutions, and makes necessary elaborations on the key technologies in the solution. The promotion of this solution has revolutionary significance for the current domestic radar terminal system.
Previous article:Design of radio frequency card water control terminal
Next article:Design of portable weather instrument based on MSP430 microcontroller
Recommended ReadingLatest update time:2024-11-23 11:53
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- 【phyBOARD-i.MX 8M Plus Development Board】Part 2: Powering on the Development Board and Evaluating the Development Environment
- 22 Ways to Prevent EMI When Designing Power Supplies
- 【NXP Rapid IoT Review】Hello Touch
- RISC-V MCU Application Development Series Tutorial CH32V103
- Communication between Yitong Chuanglian MODBUS to PROFIBUS gateway and Honeywell DCS system
- Let's take a look
- 【TI Wireless】Micro Dual-Mode Wireless Receiver
- PWM and PFM
- Let’s talk about whether Huawei can survive in the end.
- Can the network cable be directly soldered to the PCB without a crystal plug or can the network cable be plugged into the circuit board with terminals?