Digital radar to analog image scanning line compensation method and device and storage medium
By compensating for the number of digital scan lines in the host computer and performing azimuth signal frequency multiplication in the slave computer, the problems of large error angle and high resource consumption in image conversion of digital radar under ship motion state are solved, achieving a longer image conversion distance and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CSSC MARINE TECH CO LTD
- Filing Date
- 2023-07-25
- Publication Date
- 2026-05-12
AI Technical Summary
When digital radar converts images to analog format while a ship is in motion, there are problems such as large error angles caused by motion and high resource consumption, especially the image missing corners or rotation phenomena caused by the small number of digital scan lines.
The number of digital scan lines is compensated by the host computer to maintain 1024 lines, and the azimuth signal frequency is multiplied by the slave computer to achieve image compensation and reduce resource consumption.
It reduces hardware resource consumption, increases image conversion distance, lowers component selection costs, and reduces image error angles.
Smart Images

Figure CN117031408B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of radar signal processing, specifically to a method, apparatus, and storage medium for compensating scan lines in digital radar images converted to analog images, applicable to application scenarios where digital radar images are converted to analog format while a ship is in motion. Background Technology
[0002] Marine radar is a device used for ship navigation, environmental monitoring, and collision avoidance assistance. During operation, a directional antenna radiates and receives electromagnetic waves. By rotating the antenna, it completes 360° detection of the surrounding environment and transmits signals in analog mode: trigger signal, bow signal, true north signal (optional), azimuth signal, and video signal. The radar processing unit converts these analog signals into digital network format video data, which is then displayed on a control terminal. Specifically, the trigger signal indicates pulse generation, the bow signal indicates the antenna has rotated to its zero position, the true north signal indicates the antenna has rotated to true north, the azimuth signal indicates the antenna's position during rotation, and the video signal represents the analog video image at that current azimuth.
[0003] Compared to traditional radar, digital radar integrates the radar information processing unit within the transceiver, replacing traditional trigger signals, bow signals, north signals, azimuth signals, and analog video signals. It directly outputs radar images in digital network format. The digital network interface replaces the analog interface, simplifying device connections and greatly facilitating debugging and maintenance. However, it also introduces compatibility issues. For example, devices such as electronic charts that use older radar analog interfaces cannot directly receive digital network video signals. This necessitates the conversion of digital navigation radar network format images back to analog format, creating new application scenarios.
[0004] Because a digital radar network scan line typically generates only 1000-1800 data packets per antenna rotation cycle, while an analog azimuth pulse signal generates 4096 pulses per antenna rotation cycle, this means that not every analog azimuth corresponds to a digital scan line. Therefore, during the digital-to-analog conversion process, the digital scan line needs to be frequency-multiplied to achieve a count of 4096 pulses. For example, a common digital radar scan line generates 1024 data packets per cycle, requiring a 4x frequency multiplication to cover all analog azimuth signals.
[0005] When the ship is turning or swaying, the north signal will be shifted in time due to the ship's movement. This causes the number of azimuth pulses between two north pulses to change dynamically. Specifically, when the ship is turning clockwise, the second north signal arrives earlier, resulting in fewer azimuth pulses between adjacent north signals (less than 4096). When the ship is turning counterclockwise, the second north signal arrives later, resulting in more azimuth pulses between adjacent north signals (more than 4096).
[0006] Traditional analog signals, where each azimuth pulse corresponds to approximately 0.088° (360 / 4096≈0.088°), require 24 azimuth pulses to introduce an error angle of 0.088°*24-2.11°. However, when digital scan lines are used to convert analog signals, due to the quadruple frequency operation, only 6 digital scans are needed to introduce an error angle of 2.11°. This error manifests on the image as a small missing angle at true north when the ship rotates clockwise; the faster the rotation, the larger the missing angle. Conversely, when the ship rotates counterclockwise, a small angle of rotation occurs when it passes the north direction on the image; the faster the rotation, the larger the rotation angle.
[0007] It is worth noting that when using analog signals to transmit images, the arrival time of the true north signal still changes in moving scenes. However, due to the large number of azimuth pulses and the small angle corresponding to each pulse, a larger number are needed to produce a noticeable missing angle or rotation on the image. In contrast, digital format has fewer scan lines and involves a 4x frequency multiplication process. Each digital scan line corresponds to an azimuth of 0.088° * 4 = 0.352°. Even if the ship rotates slowly, losing just a few scan lines can have a significant impact.
[0008] To address the above issues, existing methods interpolate the 1024 digital scan lines sent by the transceiver to 4096 lines, and then convert them to analog signals at a 1:1 ratio. This interpolation operation is typically performed by the host computer software, which forwards the interpolated data to the slave computer, where it converts it back to an analog signal at a 1:1 ratio. This method requires selecting the interpolation position based on the scan line azimuth growth, and since each digital scan line is 1-2K in size, the slave computer needs a large amount of memory to buffer the entire scan, sometimes even requiring external DDR memory, resulting in significant resource consumption. Summary of the Invention
[0009] To address the aforementioned technical problems, this invention provides a digital radar to analog image scan line compensation method, device, and storage medium. By compensating for the number of digital scan lines, it ensures that the number of digital scan line data packets for the two most recent identical azimuths is 1024. Then, the lower-level computer performs azimuth signal frequency multiplication, thereby achieving image compensation under ship motion conditions.
[0010] The technical objective of this invention is achieved through the following technical solution:
[0011] A method for compensating scan lines in digital radar images converted to analog images, the method comprising the following steps:
[0012] S1. The host computer obtains the true north position of the current digital scan line based on the data sent by the digital radar.
[0013] S2. If the length of the scan line orientation storage queue where the current digital scan line is located is less than n and n≥4, store the due north position of the current digital scan line into the scan line orientation storage queue; if the length of the scan line orientation storage queue where the current digital scan line is located is greater than or equal to n, proceed to the next step.
[0014] S3. The host computer obtains the first 4 digital scan lines of the current digital scan line issued by the digital radar, and stores the due north position of the first 4 digital scan lines of the current digital scan line in a queue data structure.
[0015] S4. Calculate the step size between the north-north positions of the four preceding digital scan lines of the current digital scan line. Step size = north-north position of the next digital scan line - north-north position of the previous digital scan line. Calculate the median of the step size between the north-north positions of the four preceding digital scan lines and use the median as the theoretical step increment for compensation of the current digital scan line.
[0016] S5. Compensation Judgment: If the step size of the current digital scan line in the due north position is greater than 0 and does not exceed the set compensation judgment value, then digital scan line compensation is performed.
[0017] S6. During digital scan line compensation, the step size of the north position of each compensated digital scan line is the theoretical step increment, and the north position of the compensated digital scan line is smaller than the north position of the current digital scan line.
[0018] S7. Insert the compensated digital scan line north position into the front of the current digital scan line north position in the scan line orientation storage queue where the current digital scan line north position is located.
[0019] Iteratively scan the scan line orientation storage queue where the current digital scan line is located, obtain the north orientation of the compensated digital scan line and the north orientation of the current digital scan line, and send them to the lower-level machine;
[0020] S8. The lower-level machine generates an analog format signal based on the received digital scan lines, multiplies the azimuth pulse by 1:4, and outputs 4096 pulses.
[0021] Furthermore, in step S5, if the step size of the north-north position of the current digital scan line is greater than the set compensation judgment value, the scan line is ignored; if the step size of the north-north position of the current digital scan line is less than or equal to 0, a modulo correction is performed before compensation judgment.
[0022] Furthermore, during the modulus correction in step S5, the step size of the current digital scan line due north is corrected by +4096.
[0023] Further, in step S6, the north position of the compensated digital scan line = the north position of the previous digital scan line of the current digital scan line + theoretical step increment * (i+1), i = 0, 1.
[0024] Furthermore, the compensation determination value = n * theoretical step increment.
[0025] Furthermore, in step S7, during iterative scanning, the north-north position of the 5th digital scan line in the scan line orientation storage queue is taken each time, and the north-north position of the first digital scan line is removed. The iterative scanning continues until the length of the scan line orientation storage queue does not exceed 4.
[0026] The present invention also provides a digital navigation radar to analog image conversion device for ship navigation, including a digital radar, a host computer, and a slave computer. The host computer processes the north-north orientation of the digital scan lines obtained from the digital radar according to the above-described digital radar to analog image scan line compensation method and sends it to the slave computer.
[0027] The present invention also provides a computer-readable storage medium storing a computer program, which executes steps S1-S7 of the above-described digital radar to analog image scan line compensation method when the computer program is run.
[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0029] 1. The method of the present invention keeps the scan line bundle sent from the host computer to the slave computer at 1024 lines. After receiving the scan lines sent by the host computer, the slave computer only needs to perform frequency multiplication processing on the corresponding azimuth pulses to achieve the output of 4096 azimuth pulses. Compared with the host computer sending 4096 scan lines, the data volume is small, the storage occupation is low, and the consumption of hardware resources can be reduced to 1 / 4.
[0030] 2. The rotation cycle of a digital radar is approximately 2.4 seconds. If 4096 digital scan lines are transmitted, each scan line occupies approximately 2.4 / 4096 = 585 microseconds. Theoretically, this time window can achieve a maximum conversion distance of 300m / microsecond * 585 microseconds / 2 ≈ 47 nanoseconds. If 1024 digital scan lines are transmitted, the maximum conversion distance can be 47 * 4 = 188 nanoseconds.
[0031] 3. The analog video signal needs to be output through a DA converter chip and the timing control is performed by the lower-level computer. The 1024 scan lines per digital radar rotation cycle reduce the rate requirement of the DA chip, and the chip can be controlled at 1 / 4 of the clock frequency, which reduces the cost of component selection and facilitates timing synthesis. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the digital radar to analog image scanning compensation method in an embodiment of the present invention. Detailed Implementation
[0033] The technical solution of the present invention will be further described below with reference to specific embodiments:
[0034] The digital scan line network consists of two parts: azimuth and data. The azimuth range is from 0 to 4095. Each rotation cycle contains 1024 data packets, therefore the azimuth interval is 4. The azimuth sequence sent by the digital radar can be represented as 0, 4, 8, 12, 16, ... 4088, 4092, 0, 4, ... Since the starting azimuth is not fixed, it can also be represented as 1, 5, 9, 13, ... 4093, 1, 5, 9, ... This embodiment takes azimuth 0 as the starting point as an example and provides a digital radar to analog image scan line compensation method, such as... Figure 1 As shown, the method includes the following steps:
[0035] S1. The host computer obtains the true north position of the current digital scan line based on the data sent by the digital radar.
[0036] S2. If the length of the scan line azimuth storage queue (vectorBufSweepNorth.size()) of the current digital scan line is less than n, and n ≥ 4, store the true north position of the current digital scan line into the scan line azimuth storage queue; if the length of the scan line azimuth storage queue of the current digital scan line is greater than or equal to n, proceed to the next step. Taking n = 4 as an example, since the scan lines of the digital radar are sent to the host computer one by one, the initial number of digital scan lines stored is less than 4, making it impossible to perform the compensation judgment operation. At this time, it is necessary to first store the true north position of the sent current digital scan line in the scan line azimuth storage queue until the length of the scan line azimuth storage queue of the current digital scan line is greater than or equal to 4 before proceeding to the next step. For ease of execution of subsequent steps, assume that the true north position data of the current digital scan line is 52.
[0037] S3. The host computer obtains the due north positions of the first four digital scan lines of the current digital scan line from the digital radar. It stores the due north positions of the first four digital scan lines of the current digital scan line in the scan line azimuth storage queue using a queue data structure. The due north position data of the first four digital scan lines are represented as Nor0=28, Nor1=32, Nor2=36, Nor3=40, respectively. The due north positions of the four digital scan lines are added to the scan line azimuth storage queue vectorBufSweepNorth.
[0038] S4. Calculate the step size between the north positions of the previous four digital scan lines for the current digital scan line. Step size = north position of the next digital scan line - north position of the previous digital scan line. Calculate the median of the step size between the north positions of the previous four digital scan lines and use this median as the theoretical step increment for compensation of the current digital scan line. Specifically:
[0039] delta01=Nor1-Nor0=32-28=4;
[0040] delta12=Nor2-Nor1=36-32=4;
[0041] delta23=Nor3-Nor2=40-36=4;
[0042] referenceStep = mid(delta01, delta12, delta23) = 4; that is, the final theoretical step increment referenceStep = 4.
[0043] S5. Compensation Judgment: If the step size of the current digital scan line in the north direction is greater than 0 and does not exceed the set compensation judgment value, then digital scan line compensation is performed.
[0044] If the step size of the current digital scan line's north position is greater than the set compensation judgment value, it means the digital radar is reversed, and the scan line is ignored; if the step size of the current digital scan line is less than or equal to 0, it means the current digital scan line has passed the north position or the digital radar is reversed, and correction is required. After modulo correction, compensation judgment is performed. During modulo correction, the step size of the current digital scan line's north position is increased by 4096 to correct the north position of the current digital scan line.
[0045] The step size of the north position of the current digital scan line is thisStep = 52 - Nor3 = 52 - 40 = 12. In this embodiment, the compensation judgment value is 4 * referenceStep = 16. That is, if the step size of the current digital scan line is greater than 16, it means that the change is too large and there is a reversal, and the digital scan line needs to be ignored; if the step size of the north position of the current digital scan line is greater than 0 and less than 16, digital scan line compensation is required.
[0046] S6. During digital scan line compensation, the step size of the north position of each compensated digital scan line is the theoretical step increment, and the north position of the compensated digital scan line is smaller than the north position data of the current digital scan line.
[0047] Insert the north position of the compensated digital scan line into the front of the north position of the current digital scan line in the storage queue of the north position of the current digital scan line.
[0048] for(i=0;referenceStep*(i+1) <thisStep&&i<2;i++)
[0049] vectorBufSweepNorth.pushback((referenceStep*(i+1)+Nor3)%4096);
[0050] Finally: vectorBufSweepNorth.pushback(NorthCurrent)
[0051] The process involves two loops. First, 40+4=44 is used as a compensation for the north position of the digital scan line and inserted before the north position of the current digital scan line. Second, 40+8=48 is used as a compensation for the north position of the digital scan line and inserted before the north position of the current digital scan line. Finally, the north position of the current digital scan line is enqueued.
[0052] S7. At this time, the length of the storage queue vectorBufSweepNorth, which stores the location of the current digital scan line, is 7, and the content is {28,32,36,40,44,48,52}.
[0053] Iteratively scan the scan line orientation storage queue of the current digital scan line. During each iteration, retrieve the north position of the 5th digital scan line in the orientation queue and retrieve the north position of the first digital scan line. The length of the scan line orientation storage queue should not exceed 4. Obtain the compensated north position of the digital scan line and the current north position of the digital scan line and send them to the lower-level computer. Specifically:
[0054] Send 44, dequeue 28; send 48, dequeue 32; send 52, dequeue 36; at this point, the scan line orientation storage queue is {40, 44, 48, 52}, and the iteration ends. In the next compensation determination, 40, 44, 48, and 52 are used as the four scan lines preceding the true north of the next current digital scan line.
[0055] S8. The lower-level machine generates an analog format signal based on the received digital scan lines, multiplies the azimuth pulse by 1:4, and outputs 4096 pulses.
[0056] This embodiment also provides a digital navigation radar to analog image conversion device for ship navigation, including a digital radar, a host computer, and a slave computer. The host computer obtains the north direction of the digital scan line from the digital radar according to the above method, processes it, and sends it to the slave computer. The host computer is such as a computer, and the slave computer is such as a radar information processing unit or other hardware processing equipment.
[0057] This embodiment also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium, such as a USB flash drive, a portable hard drive, or an optical disc, is a medium that can store program code. When the computer program runs, it executes steps S1-S7 in the digital radar to analog image scan line compensation method of the above embodiment.
[0058] This embodiment is merely a further explanation of the present invention and is not intended to limit the present invention. Those skilled in the art can make non-inventive modifications to this embodiment as needed after reading this specification, but such modifications are protected by patent law as long as they are within the scope of the claims of the present invention.
Claims
1. A method for compensating scan lines in digital radar images converted to analog images, characterized in that, The method includes the following steps: S1. The host computer obtains the true north position of the current digital scan line based on the data sent by the digital radar. S2. If the length of the scan line orientation storage queue where the current digital scan line is located is less than n and n≥4, store the due north position of the current digital scan line into the scan line orientation storage queue; if the length of the scan line orientation storage queue where the current digital scan line is located is greater than or equal to n, proceed to the next step. S3. The host computer obtains the first 4 digital scan lines of the current digital scan line issued by the digital radar, and stores the due north position of the first 4 digital scan lines of the current digital scan line in a queue data structure. S4. Calculate the step size between the north-north positions of the four preceding digital scan lines of the current digital scan line. Step size = north-north position of the next digital scan line - north-north position of the previous digital scan line. Calculate the median of the step size between the north-north positions of the four preceding digital scan lines and use the median as the theoretical step increment for compensation of the current digital scan line. S5. Compensation Judgment: If the step size of the current digital scan line in the due north position is greater than 0 and does not exceed the set compensation judgment value, then digital scan line compensation is performed. S6. During digital scan line compensation, the step size of the north position of each compensated digital scan line is the theoretical step increment, and the north position of the compensated digital scan line is smaller than the north position of the current digital scan line. S7. Insert the compensated digital scan line north position into the front of the current digital scan line north position in the scan line orientation storage queue where the current digital scan line north position is located. Iteratively scan the scan line orientation storage queue where the current digital scan line is located, obtain the north orientation of the compensated digital scan line and the north orientation of the current digital scan line, and send them to the lower-level machine; S8. The lower-level machine generates an analog format signal based on the received digital scan lines, multiplies the azimuth pulse by 1:4, and outputs 4096 pulses.
2. The digital radar to analog image scan line compensation method according to claim 1, characterized in that, In step S5, if the step size of the north-north position of the current digital scan line is greater than the set compensation judgment value, the scan line is ignored; if the step size of the north-north position of the current digital scan line is less than or equal to 0, a modulo correction is performed before compensation judgment.
3. The digital radar to analog image scan line compensation method according to claim 2, characterized in that, When performing modulus correction in step S5, the step size of the current digital scan line due north is corrected by +4096.
4. The digital radar to analog image scan line compensation method according to claim 1, characterized in that, In step S6, the north position of the compensated digital scan line = the north position of the previous digital scan line of the current digital scan line + theoretical step increment * (i+1), i = 0, 1.
5. The digital radar to analog image scan line compensation method according to claim 1, characterized in that, The compensation determination value = n * theoretical step increment.
6. The digital radar to analog image scan line compensation method according to claim 1, characterized in that, In step S7, during iterative scanning, the north-north position of the 5th digital scan line in the scan line orientation storage queue is taken each time, and the north-north position of the first digital scan line is removed. Iterative scanning continues until the length of the scan line orientation storage queue does not exceed 4.
7. A digital navigation radar to analog image conversion device, characterized in that, For ship navigation, including digital radar, host computer, and slave computer, wherein the host computer processes the north orientation of the digital scan line obtained from the digital radar according to any one of claims 1-6 and sends it to the slave computer.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed, performs steps S1-S7 of the method according to any one of claims 1-6.