A control method and device of a galvanometer, a radar and a storage medium
By adjusting the slow-axis scanning speed of the galvanometer and the scanning speed of the ROI and sparse regions, the problem of elliptical trajectory adhesion of the 2D galvanometer under temperature or air pressure changes was solved, thus improving the scanning resolution and point cloud resolution.
Patent Information
- Application Number
- CN202310858565.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-07-12
AI Technical Summary
When the temperature or air pressure changes, the elliptical trajectory of the two-dimensional galvanometer is prone to sticking together, resulting in uneven scanning trajectory and affecting resolution.
By adjusting the slow-axis scanning speed of the galvanometer and allocating scanning speeds for the ROI region and sparse region, the slow-axis scanning travel within one fast-axis cycle is matched to 1/K of the ellipse height, where K is a positive integer, thus avoiding ellipse trajectory adhesion.
This technology prevents elliptical trajectories from sticking together when temperature or air pressure changes, improves scanning resolution, and ensures that the point cloud resolution is not lower than the design value.
Smart Images

Figure CN119310733B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of radar, and more specifically, to a method, apparatus, radar, and storage medium for controlling a galvanometer in the field of radar. Background Technology
[0002] Two-dimensional galvanometers are typically driven by a single coil, meaning that the same coil drives both the fast and slow axes.
[0003] When a sinusoidal signal drives the fast-axis resonant motion, the galvanometer will also produce a sinusoidal motion in the slow-axis direction. However, the amplitude of the motion in the slow-axis direction is smaller than that in the fast-axis direction, and there is a phase difference between the two. This results in a projection in space that resembles... Figure 1 The ellipse shown. When the slow axis moves slowly, the ellipses are staggered in the vertical direction, forming an ellipse like... Figure 2 The two-dimensional scanning trajectory diagram shown is an elliptical trajectory distributed in a spiral shape.
[0004] However, the inventors of this application have discovered that changes in temperature or air pressure can easily cause the elliptical trajectory to stick together. Summary of the Invention
[0005] This application provides a control method, device, radar, and storage medium for a galvanometer, which can prevent the elliptical trajectory from sticking together when the temperature or air pressure changes.
[0006] In a first aspect, a method for controlling a galvanometer is provided, the method comprising: determining a slow-axis scanning speed of the galvanometer; determining the elliptical height of an elliptical trajectory formed by the fast axis of the galvanometer scanning to a rated angle in a first direction in a second direction; determining a first slow-axis scanning speed for a region of interest (ROI) and a second slow-axis scanning speed for a sparse region when the slow-axis scanning speed is determined to be mismatched with the elliptical height; controlling the galvanometer to scan the ROI at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed, such that the slow-axis scanning stroke of the galvanometer within one fast-axis cycle matches 1 / K of the elliptical height, where K is a positive integer.
[0007] In the above technical solution, when it is determined that the slow-axis scanning speed of the galvanometer does not match the ellipse height, it indicates that the ellipse trajectory may stick together. In this case, the slow-axis scanning speed of the ROI region and the sparse region are adjusted accordingly. Specifically, a first slow-axis scanning speed is determined for the ROI region and a second slow-axis scanning speed for the sparse region. Then, the galvanometer is controlled to scan the ROI region at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed, so that the slow-axis scanning stroke of the galvanometer within one fast-axis cycle matches 1 / K of the ellipse height, where K is a positive integer. Since the ellipse trajectory can be evenly stretched when the slow-axis scanning stroke is 1 / K of the ellipse height within one fast-axis cycle, this embodiment uses the first slow-axis scanning speed to scan the ROI region and the second slow-axis scanning speed to scan the sparse region, ensuring that the slow-axis scanning stroke of the galvanometer matches 1 / K of the ellipse height within one fast-axis cycle. This helps to evenly stretch the ellipse trajectory, thus preventing it from sticking together when temperature or air pressure changes.
[0008] In conjunction with the first aspect, in some possible implementations, the ROI region corresponds to a preset parameter set; the method further includes: calculating multiple candidate scan runs based on the ellipse height and multiple K values; wherein, one of the candidate scan runs is: when K takes a positive integer, the product of 1 / K and the ellipse height; and determining the first target number of rows allocated to the ROI region and the second target number of rows allocated to the sparse region based on the multiple candidate scan runs and the preset parameter set corresponding to the ROI region.
[0009] Combining the first aspect and the above-described implementation methods, in some possible implementation methods, the preset parameter The set of parameters includes: the design resolution and design travel range of the ROI region. The step of determining the first target number of rows allocated to the ROI region and the second target number of rows allocated to the sparse region based on the plurality of candidate scan travels and the preset parameter set corresponding to the ROI region includes: obtaining the differences between the plurality of candidate scan travels and twice the design resolution; determining the first scan travel of the ROI region from the plurality of candidate scan travels; wherein the difference between the first scan travel and twice the design resolution is the smallest; determining the first target resolution of the ROI region based on the first scan travel; determining the first ideal number of rows of the ROI region based on the design travel range and the first target resolution; determining the second ideal number of rows of the sparse region based on the first ideal number of rows of the ROI region; calculating the edge resolution of the sparse region based on the first ideal number of rows, the first target resolution, and the second ideal number of rows, based on the principle of constant total travel; and calculating the first target number of rows and the second target number of rows based on the edge resolution and the first target resolution.
[0010] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of calculating the first target row number and the second target row number based on the edge resolution and the first target resolution includes: obtaining the differences between the plurality of candidate scan travels and twice the edge resolution respectively; determining the second scan travel of the sparse region among the plurality of candidate scan travels; wherein the difference between the second scan travel and twice the edge resolution is the smallest; determining the second target resolution of the sparse region based on the second scan travel; and calculating the first target row number and the second target row number based on the first target resolution and the second target resolution.
[0011] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of calculating the first target row number and the second target row number based on the first target resolution and the second target resolution includes: obtaining the first calculated row number of the ROI region by analyzing a system of equations based on the principle that the total number of rows and the total travel remain unchanged; wherein the system of equations includes: x+y=h, x*f1+y*f2=z, where x is the first calculated row number, y is the second calculated row number, h is the total number of rows, f1 is the first target resolution, f2 is the second target resolution, and z is the total travel; and determining the first target row number and the second target row number based on the first calculated row number.
[0012] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, the preset parameter set further includes: the minimum value of the design travel range of the ROI region and the maximum value of the design travel range; determining the first target number of rows and the second target number of rows based on the first calculated row count includes: comparing the first calculated row count with the maximum number of rows and the minimum number of rows respectively; wherein, the maximum number of rows is obtained based on the maximum value of the first target resolution and the design travel range, and the minimum number of rows is obtained based on the minimum value of the first target resolution and the design travel range; if the first calculated row count is greater than the maximum number of rows, the maximum number of rows is used as the first target number of rows; if the first calculated row count is less than the minimum number of rows, the minimum number of rows is used as the first target number of rows; if the first calculated row count is greater than or equal to the minimum number of rows and less than or equal to the maximum number of rows, the rounded first calculated row count is used as the first target number of rows; and determining the second target number of rows based on the first target number of rows and the total number of rows.
[0013] In conjunction with the first aspect and the above implementation, in some possible implementations, before comparing the first calculated row count with the maximum row count and the minimum row count respectively, the method further includes: Determine whether the first number of calculated rows is odd; if the first number of calculated rows is odd, perform even-firing processing on the first number of calculated rows so that the first number of calculated rows is even after even-firing processing; the step of comparing the first number of calculated rows with the maximum number of rows and the minimum number of rows respectively includes: comparing the first number of calculated rows after even-firing processing with the maximum number of rows and the minimum number of rows respectively.
[0014] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of calculating the edge resolution of the sparse region based on the principle of keeping the total travel constant, according to the first ideal number of rows, the first target resolution, and the second ideal number of rows, includes: using the quotient of the first target resolution divided by the default resolution of the scanned region as a first coefficient; calculating the first travel of the ROI region according to the first coefficient and the first ideal number of rows; calculating the first difference between the total travel of the scanned region and the first travel; and calculating the edge resolution of the sparse region according to the default resolution, the first difference, and the second ideal number of rows.
[0015] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining the first slow-axis scanning speed of the ROI region and the second slow-axis scanning speed of the sparse region includes: using the quotient of the first target resolution divided by the default resolution of the scanning region as a first coefficient; using the product of the first coefficient and the uniform scanning speed as the first slow-axis scanning speed; wherein the uniform scanning speed is the scanning speed when performing uniform scanning on the scanning region; determining the second travel distance of the ROI region based on the first slow-axis scanning speed and the first target number of rows; calculating the second difference between the total travel distance and the second travel distance; and determining the second slow-axis scanning speed based on the second difference and the second target number of rows.
[0016] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, the preset parameter set further includes: the minimum value of the design resolution and the maximum value of the design resolution. Determining the first target resolution of the ROI region based on the first scan travel includes: if half of the first scan travel is greater than the maximum value of the design resolution, using the maximum value of the design resolution as the first target resolution; if half of the first scan travel is less than the minimum value of the design resolution, using the minimum value of the design resolution as the first target resolution; and if half of the first scan travel is greater than or equal to the minimum value of the design resolution and less than or equal to the maximum value of the design resolution, using half of the first scan travel as the first target resolution.
[0017] Combining the first aspect and the above implementation methods, in some possible implementation methods, the statement based on the... Determining the first ideal number of rows in the ROI region based on the design travel range and the first target resolution includes: calculating the quotient obtained by dividing the design travel range by the first target resolution, and rounding the quotient to obtain the target quotient; if the target quotient is even, using the target quotient as the first ideal number of rows in the ROI region; if the target quotient is not even, performing even-ratio processing on the target quotient, and using the even-ratio processed target quotient as the first ideal number of rows.
[0018] Secondly, a control device for a galvanometer is provided, the device comprising: a first determining module for determining the slow-axis scanning speed of the galvanometer; a second determining module for determining the elliptical height of the elliptical trajectory formed by the fast axis of the galvanometer scanning to a rated angle in a first direction in a second direction; a scanning speed determining module for determining a first vertical scanning speed for the ROI region and a second vertical scanning speed for the sparse region when it is determined that the slow-axis scanning speed and the elliptical height do not match; and a scanning control module for controlling the galvanometer to scan the ROI region at the first vertical scanning speed and the sparse region at the second vertical scanning speed, such that the slow-axis scanning stroke of the galvanometer within one fast-axis cycle matches 1 / K of the elliptical height, where K is a positive integer.
[0019] Thirdly, a radar is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the radar to perform the methods described in the first aspect or any possible implementation thereof.
[0020] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0021] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of a scanning trajectory provided in an embodiment of this application; Figure 2 This is a schematic diagram of a two-dimensional scanning trajectory provided in an embodiment of this application; Figure 3 This is a schematic flowchart of a galvanometer control method provided in an embodiment of this application; Figure 4 This is a partial schematic diagram of a two-dimensional scanning trajectory provided in an embodiment of this application; Figure 5 This is a partial schematic diagram of another two-dimensional scanning trajectory provided in an embodiment of this application; Figure 6 This is a schematic diagram illustrating a uniform distribution of elliptical trajectories provided in an embodiment of this application; Figure 7 This is a schematic diagram illustrating the distribution of sparse regions and ROI regions provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a control device for a galvanometer provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a radar provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0024] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0025] Two-dimensional scanning of a two-dimensional galvanometer typically requires the superposition of two low-voltage drive signals: a fast-axis drive signal (for example, controlling the galvanometer to move around the vertical axis, corresponding to the Y-axis) and a slow-axis drive signal (for example, controlling the galvanometer to move around the horizontal axis, corresponding to the X-axis). Superimposing the two signals of the slow axis and the fast axis enables two-dimensional scanning of the galvanometer.
[0026] A two-dimensional galvanometer vibrates around its fast and slow axes to achieve two-dimensional deflection. A probe laser is directed at the galvanometer, which reflects the laser and then emits it outwards, covering both the vertical and horizontal field of view, thus achieving a two-dimensional scan of the field of view. Specifically, the galvanometer's vibration around its fast axis ensures the probe laser covers the horizontal field of view, while its vibration around its slow axis ensures it covers the vertical field of view. The galvanometer begins its movement along its slow and fast axes from its initial position. The probe laser, reflected by the galvanometer, is emitted to the upper left corner of the field of view. As the galvanometer moves along its slow axis to the next position, it completes one reciprocating motion along its fast axis; the time it takes for this reciprocating motion is one fast axis cycle. Similarly, as the galvanometer moves along its slow axis to the next position, it begins scanning the next line of the field of view by reciprocating motion along its fast axis, until the galvanometer reaches the bottom position along its slow axis, at which point it completes one reciprocating motion along its fast axis, thus completing one scan cycle. The starting position of the 2D galvanometer can be any position within the scanning cycle, such as the upper right corner, lower right corner, center position, etc.; the direction of movement along the fast axis and slow axis is also unrestricted, such as scanning from right to left along the fast axis, or scanning from bottom to top along the slow axis. The starting position of the 2D galvanometer and the direction of movement along the fast and slow axes do not affect the scanning pattern and scanning cycle of the 2D galvanometer.
[0027] Two-dimensional galvanometers are typically driven by a single coil, meaning that the same coil drives both the fast and slow axes.
[0028] When a sinusoidal signal drives the fast-axis resonant motion, the galvanometer will also produce a sinusoidal motion in the slow-axis direction. However, the amplitude of the motion in the slow-axis direction is smaller than that in the fast-axis direction, and there is a phase difference between the two. This results in a projection in space that resembles... Figure 1 The ellipse shown. When the slow axis moves slowly, the ellipses are staggered in the vertical direction, forming an ellipse like... Figure 2 The two-dimensional scanning trajectory diagram shown is an elliptical trajectory distributed in a spiral shape.
[0029] The inventors of this application discovered that the deflection angle achievable by a galvanometer in response to a fast-axis drive signal is affected by changes in temperature and air pressure. To ensure that the fast axis of the galvanometer always scans to the rated angle in the fast-axis direction, the fast-axis drive signal is continuously and dynamically adjusted using a phase-locked loop. This causes the elliptical height in the slow-axis direction of the formed elliptical trajectory to change continuously with the fast-axis drive signal. However, the response relationship between the galvanometer and the slow-axis drive signal is linear; if the slow-axis drive signal remains constant, the slow-axis scanning speed also remains constant. This leads to a mismatch between the constant slow-axis scanning speed and the changing elliptical height, potentially resulting in some adjacent elliptical trajectories in the two-dimensional scan trajectory map having excessively small intervals in the slow-axis direction, causing the elliptical trajectories to stick together. When elliptical trajectories stick together, it further causes the actual resolution of the point cloud in the slow-axis direction to be lower than the designed resolution.
[0030] Based on this, in order to solve the technical problem of elliptical trajectory adhesion mentioned above, this application provides a galvanometer control method that can prevent elliptical trajectory adhesion when the environment changes, such as temperature or air pressure.
[0031] The execution subject of the method provided in this application embodiment can be a radar, specifically the control and processing unit inside a lidar, or a terminal device communicating with the lidar. The terminal device can be a mobile terminal such as a smartphone, tablet, or wearable device, or a computer, cloud server, radar-assisted computer, or other equipment in various application scenarios. The following explanation uses a radar as the execution subject as an example: Figure 3 This is a schematic flowchart of a galvanometer control method provided in an embodiment of this application.
[0032] For example, such as Figure 3 As shown, the method includes: Step 101: Determine the slow axis scanning speed of the galvanometer.
[0033] Step 102: Determine the elliptical height in the second direction of the elliptical trajectory formed by the fast axis of the galvanometer when it scans to the rated angle in the first direction.
[0034] Step 103: If it is determined that the slow-axis scanning speed does not match the ellipse height, determine the first slow-axis scanning speed of the ROI region and the second slow-axis scanning speed of the sparse region.
[0035] Step 104: Control the galvanometer to scan the ROI region at the first slow axis scanning speed and the sparse region at the second slow axis scanning speed, so that the slow axis scanning stroke of the galvanometer matches 1 / K of the ellipse height within one fast axis cycle, where K is a positive integer.
[0036] exist Figure 3In the illustrated embodiment, when it is determined that the slow-axis scanning speed of the galvanometer does not match the ellipse height, it indicates that the ellipse trajectories may stick together. In this case, the slow-axis scanning speeds of the ROI region and sparse region are adjusted accordingly. Specifically, a first slow-axis scanning speed is determined for the ROI region and a second slow-axis scanning speed for the sparse region. The galvanometer is then controlled to scan the ROI region at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed. This ensures that the slow-axis scanning travel of the galvanometer within one fast-axis cycle matches 1 / K of the ellipse height, where K is a positive integer. Because when the slow-axis scanning travel is 1 / K of the ellipse height within one fast-axis cycle, the ellipse trajectories can be evenly spread out. Therefore, in this embodiment, the ROI region is scanned at a first slow axis scanning speed and the sparse region is scanned at a second slow axis scanning speed, so that the slow axis scanning stroke of the galvanometer matches 1 / K of the ellipse height within one fast axis cycle. This helps to ensure that the ellipse trajectory is evenly spread out, thereby avoiding the ellipse trajectory from sticking together when the temperature and air pressure change. This also prevents the actual resolution of the point cloud in the slow axis direction from being less than the design resolution, thus improving the actual resolution of the point cloud in the slow axis direction.
[0037] The following is about Figure 3 The specific implementation methods of each step in the illustrated embodiment are explained below: In step 101, the slow-axis scanning distance within one fast-axis cycle can be determined first. Then, the quotient of the slow-axis scanning distance divided by the fast-axis cycle is calculated to obtain the slow-axis scanning speed of the galvanometer. The fast-axis cycle can be a known parameter of the galvanometer; in this embodiment, the galvanometer specifically refers to a two-dimensional galvanometer. The slow-axis scanning distance within one fast-axis cycle can be determined by taking two adjacent elliptical trajectories along the slow-axis direction and using the distance between these two adjacent elliptical trajectories along the slow-axis direction as the slow-axis scanning distance.
[0038] For example, see [link / reference] Figure 4 , Figure 4 This is a partial schematic diagram of a two-dimensional scanning trajectory. (Example) Figure 4 As shown, it is possible to Figure 4 Points P1 and P2 are obtained by taking the leftmost points from two adjacent elliptical trajectories. The slow axis scan distance within one fast axis cycle can be calculated based on the Y-axis coordinates of points P1 and P2. However, this example only uses the leftmost point as an example. In actual implementation, the rightmost point or other points can also be used, as long as the x-coordinates of the points taken on the two adjacent elliptical trajectories are the same or nearly the same, or the time interval between the two points taken on the elliptical trajectories is one fast axis cycle.
[0039] Optionally, the slow-axis scanning stroke within a fast-axis cycle can be determined at preset time intervals for subsequent control procedures. In other words, steps 101 to 104 can be executed once at preset time intervals, which is equivalent to periodically determining whether the slow-axis scanning speed of the galvanometer matches the ellipse height, and periodically controlling the galvanometer according to the procedures in steps 101 to 104. The preset time interval can be set according to actual needs, such as one day, one week, or half a month.
[0040] Optionally, during the initialization process after each power-on of the radar, the slow axis scanning stroke within a fast axis cycle can be determined for subsequent control procedures.
[0041] Optionally, when a change in temperature or air pressure is detected, the slow-axis scanning speed of the galvanometer can be determined for subsequent control procedures. Detecting a change in temperature or air pressure can be understood as detecting a change in temperature or air pressure compared to the average temperature or air pressure over a given period. This period can be the current day, the current week, etc., and this embodiment does not specify a particular timeframe. Since changes in temperature or air pressure can easily lead to elliptical trajectory sticking, determining the slow-axis scanning speed of the galvanometer upon detecting a change in temperature or air pressure for subsequent control procedures can more effectively execute steps 101 to 104 when elliptical trajectory sticking is possible. This helps to avoid elliptical trajectory sticking to some extent while saving computational resources.
[0042] In step 102, the first direction can be understood as the fast axis direction, and the second direction can be understood as the slow axis direction. The rated angle can be preset, and its size is usually related to the optical requirements of the radar system. For example, it can be set to 27.5 degrees or other angle values. This embodiment does not specifically limit this. The galvanometer drive control can be achieved by phase-locking, so that the galvanometer always scans to the rated angle in the first direction. In specific implementation, the first direction can be a horizontal direction, and the second direction can be a vertical direction.
[0043] The method for determining the height of an ellipse is explained in detail below: For example, two points on an elliptical trajectory that differ by half a fast axis cycle can be selected. Then, the slow axis scan distance between these two points (e.g., the vertical distance between them) can be calculated based on their Y-axis coordinates. Theoretically, the slow axis scan distance between these two points is equal to the ellipse height plus the slow axis scan distance within half a fast axis cycle. Having obtained the slow axis scan distance within one fast axis cycle, the slow axis scan distance within half a fast axis cycle can be determined. Based on this, the ellipse height can be calculated.
[0044] To facilitate understanding, the method for determining the height of the ellipse described above will be explained below in conjunction with... Figure 4 and Figure 5 To explain, Figure 5 This is a partial schematic diagram of the two-dimensional scanning trajectory. Figure 5 In the above, two points on an elliptical trajectory that differ by half a period of the fast axis are selected as points P3 and P4, and then... Figure 4 Points P1 and P2 are taken on two adjacent elliptical trajectories. Assume the slow-axis scan distance between points P3 and P4 is Pitch. P3 -Pitch P4 The slow-axis scan travel between points P1 and P2 is Pitch. P1 -Pitch P2 The ellipse height ovality can be calculated using the following formula: ovality=Pitch P3 -Pitch P4 - (Pitch) P1 -Pitch P2 ) / 2 In step 103, the ROI region and sparse region can be two different types of regions within the scanning area of the galvanometer. The Region of Interest (ROI) is the radar's primary area of focus. As a region of primary focus within the scanning area, the ROI is typically located in the relatively central position within the entire scanning area, while the sparse region is typically located at the relatively edge position. The point cloud density of the ROI region is greater than that of the sparse region. Of course, the locations of the ROI and sparse regions can also be allocated based on point cloud information. For example, if the point cloud information indicates that high-priority targets are located at the edges of the scanning area, the ROI region can also be located at the edge of the scanning area.
[0045] In this embodiment, it can be first determined whether the slow-axis scanning speed determined in step 101 matches the ellipse height determined in step 102. Specifically, it can be determined whether the product of the slow-axis scanning speed and one fast-axis period is divisible by the ellipse height. If it is divisible by an integer, it can be determined that the slow-axis scanning speed matches the ellipse height; if it is not divisible by an integer, it can be determined that the slow-axis scanning speed does not match the ellipse height.
[0046] If the slow-axis scanning speed matches the ellipse height, it means that there is no adhesion between the ellipse trajectories, that is, the distribution is relatively uniform, and there is no need to continue with the subsequent steps.
[0047] If the slow-axis scanning speed does not match the ellipse height, it indicates that there is adhesion between the ellipse trajectories. To avoid adhesion between ellipse trajectories, this embodiment allocates and adjusts the slow-axis scanning speed for the ROI region and the sparse region to determine a first slow-axis scanning speed for the ROI region and a second slow-axis scanning speed for the sparse region. The first and second slow-axis scanning speeds are different. Thus, in step 104, the galvanometer is controlled to scan the ROI region at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed, so that the slow-axis scanning travel of the galvanometer within one fast-axis cycle matches 1 / K of the ellipse height, where K is a positive integer. Matching 1 / K of the ellipse height within one fast-axis cycle can be understood as: the slow-axis scanning travel of the galvanometer within one fast-axis cycle is as close as possible to 1 / K of the ellipse height, for example, it can be equal to 1 / K of the ellipse height.
[0048] For example, since the Region of Interest (ROI) is the area of interest, it is a key angular region of focus compared to sparse regions. Therefore, if it is not possible to simultaneously ensure that the slow-axis scan distance of the galvanometer within one fast-axis cycle is equal to 1 / K of the ellipse height for both the ROI and sparse regions, then priority can be given to ensuring that the slow-axis scan distance of the galvanometer within one fast-axis cycle in the ROI is equal to 1 / K of the ellipse height, while in the sparse region, the slow-axis scan distance of the galvanometer within one fast-axis cycle is as close as possible to 1 / K of the ellipse height. The closer it is to 1 / K of the ellipse height, the more uniformly the elliptical trajectories are spread out. This ensures that the elliptical trajectories are uniformly spread out during scanning in the ROI, which is beneficial for more accurate and detailed detection of objects in the central region in front.
[0049] To better understand the above statement that when the slow-axis scanning distance of the galvanometer within one fast-axis cycle is equal to 1 / K of the ellipse height, the ellipse trajectory can be uniformly stretched, please refer to [reference needed]. Figure 6 . Figure 6 Schematic diagrams of the elliptical trajectories for K=1, K=2, and K=3 are shown. Figure 6 It can be seen that the elliptical trajectories are evenly distributed, and the larger the value of K, the smaller the interval between two adjacent elliptical trajectories, that is, the elliptical trajectories are more densely packed, but they can still be evenly distributed in the slow axis direction.
[0050] In this embodiment, when the slow-axis scanning speed does not match the ellipse height, the uniform scanning speed of the scanning area is adjusted to variable-speed scanning. That is, the ROI region is scanned at a first slow-axis scanning speed, and the sparse region is scanned at a second slow-axis scanning speed. The first slow-axis scanning speed is usually lower than the default uniform scanning speed so that the region with low scanning speed is placed in the ROI region of focus. The second slow-axis scanning speed is usually higher than the default uniform scanning speed. These two new speeds, namely the first slow-axis scanning speed and the second slow-axis scanning speed, enable the slow-axis scanning travel within one fast-axis cycle to be close to 1 / K of the ellipse height, thereby solving the adhesion problem between ellipse trajectories and improving the actual resolution in the slow-axis direction.
[0051] In an exemplary embodiment, the ROI region corresponds to a preset set of parameters, and the first target number of rows allocated to the ROI region and the second target number of rows allocated to the sparse region can be determined in the following way: Based on the ellipse height and multiple K values, multiple candidate scan runs are calculated; where a candidate scan run is: when K takes a positive integer, the product of 1 / K and the ellipse height; based on the multiple candidate scan runs and the preset parameter set corresponding to the ROI region, the first target row number to be assigned to the ROI region and the second target row number to be assigned to the sparse region are determined.
[0052] The preset parameter set includes parameter values for multiple parameters of the ROI region. These parameter values can be designed according to product performance requirements and belong to the product's design parameters. For example, the preset parameter set may include: the design resolution of the ROI region (which can be denoted as idealresolution), the minimum design resolution (which can be denoted as minresolution), the maximum design resolution (which can be denoted as maxresolution), the design travel range of the ROI region (which can be denoted as idealanglezone), the minimum design travel range (which can be denoted as minanglezone), the maximum design travel range (which can be denoted as maxanglezone), the minimum design number of the ROI region (which can be denoted as minlineslimit), and the maximum design number of the ROI region (which can be denoted as maxlineslimit). Here, idealresolution can also be called the ideal design resolution, and idealanglezone can also be called the ideal design travel range.
[0053] All the resolutions mentioned above refer to the resolution in the slow axis direction, and the candidate scan travel refers to the scan travel in the slow axis direction.
[0054] For example, assuming the ellipse height is denoted as ovality, and there are four candidate scan routes when K takes the values 1, 2, 3, and 4, these four candidate scan routes can be represented as follows: The candidate scan range when K=1 is denoted as singleovality, and singleovality = ovality; The candidate scan route when K=2 is denoted as halfovality, where halfovality = ovality / 2; The candidate scan range when K=3 is denoted as thirdovality, and thirdovality = ovality / 3; When K=4, the candidate scan range is denoted as quarterovality, and quarterovality = ovality / 4; It should be noted that this embodiment only takes four positive integers K to obtain four candidate scan runs as an example. In the actual implementation, the specific value of K and the number of values can be set according to actual needs. This embodiment does not make specific limitations on this.
[0055] It is understandable that since multiple candidate scan paths are all products of the ellipse height and 1 / K, meaning that multiple candidate scan paths are divisible by the ellipticity, if the slow-axis scan path of the galvanometer within one fast-axis cycle is equal to any one of the aforementioned candidate scan paths, the elliptical trajectories can be uniformly stretched. Therefore, in this embodiment, if the slow-axis scan path of the galvanometer within one fast-axis cycle is equal to any one of the aforementioned candidate scan paths in both the ROI region and the sparse region, the elliptical trajectories in both the ROI region and the sparse region can be uniformly stretched.
[0056] Since the slow-axis scan travel distance equals the slow-axis resolution multiplied by the number of rows, to ensure that the slow-axis scan travel distance of the galvanometer within one fast-axis cycle is equal to or close to any of the candidate scan travel distances mentioned above in the ROI and sparse regions, this can be achieved by adjusting the number of rows and / or the slow-axis resolution in the ROI and sparse regions. Since the slow-axis resolution is related to the slow-axis scan speed, which is a directly controllable parameter, this embodiment can adjust the slow-axis scan travel distance by adjusting the slow-axis scan speed in the ROI and sparse regions to change the slow-axis resolution accordingly, thereby making it equal to or close to any of the candidate scan travel distances.
[0057] In this embodiment, the ROI region corresponds to its preset parameter set. In order to ensure that the first target number of rows allocated to the ROI region conforms to its preset parameter set, that is, to meet the product's design requirements for the ROI region, this embodiment can determine the first target number of rows allocated to the ROI region and the second target number of rows allocated to the sparse region based on multiple candidate scan strokes and the above-mentioned preset parameter set. This is to ensure that, while meeting the product design requirements, the galvanometer scans the ROI region with the first target number of rows at the first scan speed and the sparse region with the second target number of rows at the second scan speed. In this case, within one fast axis cycle, the slow axis scan stroke of the galvanometer matches 1 / K of the ellipse height, thereby making the elliptical trajectories of the ROI region and the sparse region evenly separated.
[0058] In an exemplary embodiment, the determination of the first target number of rows allocated to the ROI region and the second target number of rows allocated to the sparse region based on a set of preset parameters corresponding to multiple candidate scan passes and ROI regions includes the following steps S10 to S15: S10: Obtain the differences between multiple candidate scan strokes and twice the design resolution, and determine the first scan stroke of the ROI region among the multiple candidate scan strokes; among them, the difference between the first scan stroke and twice the design resolution is the smallest.
[0059] Specifically, the differences between multiple candidate scan passes and twice the design resolution can be calculated, resulting in multiple differences. These differences are then iterated through to select the smallest difference. The candidate scan pass with the smallest difference from twice the design resolution is then selected as the first scan pass. The aforementioned differences primarily characterize the degree of closeness of the multiple candidate scan passes to twice the design resolution; therefore, these differences can be specifically the absolute values of the differences.
[0060] For example, based on the description above, assuming that the multiple candidate scan runs are denoted as singleovality, halfovality, thirdovality, and quarterovality, and the design resolution is denoted as ideal resolution, then the absolute value of the difference between these four candidate scan runs and twice the design resolution can be expressed as follows: D1=abs(singleovality-idealresolution*2), D2=abs(halfovality-idealresolution*2), D3=abs(thirdovality-idealresolution*2), D4=abs(quarterovality-idealresolution*2), Where abs represents the absolute value. Among D1, D2, D3, and D4, when D1 is the smallest, singleovality is used as the first scan stroke; when D2 is the smallest, halfovality is used as the first scan stroke; when D3 is the smallest, thirdovality is used as the first scan stroke; and when D4 is the smallest, quarterovality is used as the first scan stroke.
[0061] It is understandable that, since the slow axis scan travel = slow axis resolution * number of lines, and the number of lines in one fast axis cycle is 2, the above idealresolution*2 can represent the slow axis scan travel within one fast axis cycle. Therefore, S10 is essentially about finding the candidate scan travel that is closest to idealresolution*2 among multiple candidate scan travels.
[0062] S11: Determine the first target resolution of the ROI region based on the first scan stroke.
[0063] The first scan travel is essentially the scan travel along the slow axis within a fast cycle, and the number of rows within a fast cycle is 2. Therefore, theoretically, the first target resolution can be represented by 1 / 2 of the first scan travel.
[0064] In an exemplary embodiment, if half of the first scan travel is greater than the maximum value of the design resolution (maxresolution), the maximum value of the design resolution is taken as the first target resolution. If half of the first scan travel is less than the minimum design resolution (minresolution), the minimum design resolution (minresolution) is taken as the first target resolution; if half of the first scan travel is greater than or equal to the minimum design resolution (minresolution) and less than or equal to the maximum design resolution (maxresolution), half of the first scan travel is taken as the first target resolution.
[0065] In this embodiment, the size of the first target resolution of the determined ROI region is limited to between the maximum and minimum values of the design resolution. This is beneficial to meet the design requirements of the ROI region while making the first target resolution twice as close as the first scan stroke.
[0066] S12: Determine the first ideal number of rows for the ROI region based on the designed travel range and the first target resolution.
[0067] Specifically, based on the relationship between travel, resolution, and number of rows, the theoretically designed travel range includes... The quotient obtained by dividing the design range by the first target resolution is the first ideal number of rows. In the specific implementation, the number of rows is an integer. Therefore, the first ideal number of rows can be obtained by rounding down the quotient of the design range divided by the first target resolution. For example, if the design range is denoted as idealanglezone, the first target resolution as optimizeresolution, and the first ideal number of rows as ideallines, then ideallines can be calculated using the following formula: ideallines = round(idealanglezone / optimizeresolution), where round represents rounding down.
[0068] In an exemplary embodiment, S12 can be implemented by: calculating the designed travel range divided by The quotient obtained from the first target resolution is rounded down to obtain the target quotient. If the target quotient is even, it is used as the first ideal row number of the ROI region. If the target quotient is not even, it is made even, and the even-numbered target quotient is used as the first ideal row number, so that the first ideal row number can be even.
[0069] In this embodiment, by ensuring that the first ideal row number is even, the elliptical trajectory obtained by scanning can be presented as a complete ellipse, avoiding the situation of half an ellipse.
[0070] It should be noted that this embodiment only takes an even number of the first ideal rows as an example. In specific implementations... The first ideal row number can also be an odd number. For example, in S12 above, the quotient obtained by dividing the design travel range by the first target resolution can be calculated, and the quotient can be rounded to obtain the target quotient. Then, the target quotient can be directly used as the first ideal row number. That is to say, at this time, regardless of whether the target quotient is odd or even, it can be directly used as the first ideal row number.
[0071] S13: Determine the second ideal number of rows for the sparse region based on the first ideal number of rows for the ROI region.
[0072] Specifically, based on the principle that the total number of lines in the scanned area remains unchanged, the difference between the total number of lines and the first ideal number of lines can be used as the second ideal number of lines. For example, if the total number of lines is denoted as totalLines and the first ideal number of lines is denoted as ideallines, then the second ideal number of lines is denoted as totalLines-ideallines.
[0073] S14: Based on the principle of keeping the total travel constant, calculate the edge resolution of the sparse region according to the first ideal number of rows, the first target resolution, and the second ideal number of rows.
[0074] Specifically, based on the principle of constant total travel, the first ideal number of rows, the first target resolution, the second ideal number of rows, and the edge resolution have the following relationship: First ideal line count * first target resolution + second ideal line count * edge resolution = total travel Since the first ideal row count, the first target resolution, the second ideal row count, and the total travel are all known quantities in the above formula, the edge resolution can be calculated based on the above formula.
[0075] In an exemplary embodiment, the above-described S14 can also be implemented using the following S20 to S23: S20: The quotient of the first target resolution divided by the default resolution of the scanned area is used as the first coefficient.
[0076] The default resolution is the default resolution in the slow axis direction. The default resolution can be determined based on the total travel of the scanning area in the slow axis direction and the total number of rows in the scanning area. For example, the quotient of the total travel divided by the total number of rows can be used as the default resolution. The default resolution can be denoted as defaultresolution.
[0077] For example, assuming the total travel of the scan area in the slow axis direction is 25°, and the total number of fast axis cycles required to scan the entire scan area is 63, since the total number of rows is twice the total number of fast axis cycles, the default resolution is 25 / 63 / 2. If the first target resolution is denoted as optimizeresolution and the first coefficient is denoted as m1, then m1 can be calculated using the following formula: m1=optimizeresolution / defaultresolution.
[0078] S21: Calculate the first stroke of the ROI region based on the first coefficient and the first ideal row number.
[0079] Specifically, the product of the first coefficient, the uniform scanning speed, and the first ideal number of rows can be used as the calculated first stroke. If the first ideal number of rows is denoted as ideallines, the first stroke as midZone1, and the uniform scanning speed as v, then midZone1 = m1 * v * ideallines. Here, the uniform scanning speed is the scanning speed when scanning the region at a constant speed, specifically referring to the speed at which the scan is performed uniformly along the slow axis. m1 * v can be understood as the first vertical scanning speed of the ROI region.
[0080] S22: Calculate the first difference between the total travel of the scanned area and the first travel.
[0081] If the total journey is denoted as totalZone, then the first difference can be totalZone-midZone1.
[0082] S23: Calculate the edge resolution of the sparse region based on the default resolution, the first difference, and the second ideal number of rows.
[0083] Specifically, the border resolution can be calculated by dividing the first difference by the second ideal number of rows, and then multiplying this quotient by the default resolution. Assuming the first difference is denoted as totalZone-midZone1, the default resolution as defaultresolution, and the second ideal number of rows as totalLines-ideallines, the border resolution can be calculated using the following formula: borderresolution=defaultresolution*[(totalZone-midZone1) / (totalLines-ideallines)] S15: Calculate the number of rows in the first target and the number of rows in the second target based on the edge resolution and the first target resolution.
[0084] In an exemplary embodiment, the implementation of S15 may include the following S30 to S32: S30: Obtain the difference between multiple candidate scan travels and twice the edge resolution, in multiple The second scan stroke that determines the sparse region among the candidate scan strokes; wherein the difference between the second scan stroke and twice the edge resolution is the smallest.
[0085] Specifically, the differences between multiple candidate scan passes and twice the edge resolution can be calculated, resulting in multiple differences. These differences are then iterated through to select the candidate scan pass with the smallest difference from twice the edge resolution, which is then used as the second scan pass. The aforementioned differences primarily characterize the degree of closeness between the multiple candidate scan passes and twice the edge resolution; therefore, these differences can be expressed as absolute values.
[0086] For example, based on the description above, assuming that the multiple candidate scan runs are denoted as singleovality, halfovality, thirdovality, and quarterovality, and the edge resolution is denoted as borderresolution, then the absolute value of the difference between these four candidate scan runs and twice the edge resolution can be expressed as follows: E1=abs(singleovality-borderresolution*2) E2=abs(halfovality-borderresolution*2) E3=abs(thirdovality-borderresolution*2) E4=abs(quarterovality-borderresolution*2) Where abs represents the absolute value. Among E1, E2, E3, and E4, when E1 is the smallest, singleovality is used as the second scan stroke; when E2 is the smallest, halfovality is used as the second scan stroke; when E3 is the smallest, thirdovality is used as the second scan stroke; and when E4 is the smallest, quarterovality is used as the second scan stroke.
[0087] It is understandable that, since the slow axis scan travel = slow axis resolution * number of lines, and the number of lines in one fast axis cycle is 2, the above borderresolution*2 can represent the slow axis scan travel within one fast axis cycle. In S30, this is equivalent to finding the candidate scan travel that is closest to borderresolution*2 among multiple candidate scan travels.
[0088] S31: Determine the second target resolution for the sparse region based on the second scan stroke.
[0089] The second scan travel is essentially the scan travel along the slow axis within one fast cycle. Since there are two lines in one fast cycle, theoretically, the second target resolution can be represented by half of the second scan travel. That is, the second target resolution = 1 / 2 * the second scan travel.
[0090] S32: Calculate the number of rows in the first target and the number of rows in the second target based on the first target resolution and the second target resolution.
[0091] Specifically, based on the principle that the total number of rows and the total travel in the scanned area remain unchanged, according to the first objective... Given the target resolution and the second target resolution, calculate the number of rows in the first target and the number of rows in the second target.
[0092] In an exemplary embodiment, the implementation of S32 above may include the following S40 to S41: S40: Based on the principle that the total number of rows and the total travel remain unchanged, the first number of calculated rows of the ROI region is obtained by analyzing the system of equations; where the system of equations includes: x+y=h, x*f1+y*f2=z, where x is the first number of calculated rows, y is the second number of calculated rows, h is the total number of rows, f1 is the first target resolution, f2 is the second target resolution, and z is the total travel.
[0093] It is understandable that in the above system of equations, h, f1, f2, and z are known quantities, while x and y are quantities to be solved. Therefore, by substituting the known quantities h, f1, f2, and z into the above system of equations, the values of x and y can be solved. The solved x value is the first row of calculations for the ROI region obtained from the analytical system of equations, and the solved y value is the second row of calculations for the sparse region obtained from the analytical system of equations.
[0094] S41: Determine the first target number of rows and the second target number of rows based on the first calculated row number.
[0095] For example, the most basic requirement for the number of rows is that the number of rows is an integer. However, when parsing the above system of equations, there may be cases where the number of the first calculated row is not an integer. Therefore, in this embodiment, the number of the first calculated row needs to be rounded down. Without considering the design requirements for the ROI region, The first calculated row number after rounding can be used as the first target row number, and then the difference between the total row number and the first target row number can be used as the second target row number.
[0096] In an exemplary embodiment, when determining the first target row number and the second target row number based on the first calculated row number, the design requirements for the ROI region need to be considered. Therefore, the implementation of S41 above may include the following S50 to S54: S50: Compare the first calculated number of rows with the maximum number of rows and the minimum number of rows respectively; wherein, the maximum number of rows is obtained based on the maximum value of the first target resolution and the design travel range, and the minimum number of rows is obtained based on the minimum value of the first target resolution and the design travel range.
[0097] Let the first target resolution be denoted as `optimizeresolution`, the maximum value of the designed travel range be denoted as `maxanglezone`, and the minimum value of the designed travel range be denoted as `minanglezone`. Based on this, the maximum number of lines, `maxlines`, can be calculated as `round(minanglezone / optimizeresolution)`, and the minimum number of lines, `minlines`, as `round`, can be calculated as `round(minanglezone / optimizeresolution)`, where `round` represents rounding. Considering that the calculated `maxlines` and `minlines` may not be even numbers, if `maxlines` or `minlines` is determined to be not even, it is evened to make the final `maxlines` and `minlines` even.
[0098] It should be noted that this embodiment only assumes that the final maxlines and minlines are even numbers. In actual implementations, the final maxlines and minlines can also be odd numbers, and this embodiment does not impose any specific restrictions on this.
[0099] S51: If the first number of calculated rows is greater than the maximum number of rows, the maximum number of rows will be used as the first target number of rows.
[0100] S52: If the first calculated row count is less than the minimum row count, the minimum row count will be used as the first target row count.
[0101] S53: If the first calculated row number is greater than or equal to the minimum row number and less than or equal to the maximum row number, the rounded first calculated row number is taken as the first target row number.
[0102] S54: Determine the second target number of rows based on the first target number of rows and the total number of rows.
[0103] Specifically, the difference between the total number of rows and the first target number of rows can be used as the second target number of rows.
[0104] In this embodiment, by limiting the first target number of rows to between the minimum and maximum number of rows, the first target number of rows can meet the design requirements for the ROI region.
[0105] In an exemplary embodiment, before S51 described above, it can be determined whether the first number of calculated rows is odd. If the first number of calculated rows is odd, it can be evened out so that the first number of calculated rows becomes even. Then, in S51, the evened-out first number of calculated rows is compared with the maximum number of rows and the minimum number of rows, respectively. This ensures that when the rounded-down first number of calculated rows is used as the first target number of rows, the first target number of rows is even. Since the total number of rows is also even, the second target number of rows obtained based on the difference between the total number of rows and the second target number of rows is also even.
[0106] In this embodiment, by ensuring that the final number of the first target rows and the number of the second target rows are even numbers, the elliptical trajectories obtained when scanning the ROI region and the sparse region are both complete elliptical trajectories.
[0107] It should be noted that this embodiment only assumes that the final number of the first calculated rows is even. In actual implementation, the final number of the first calculated rows can also be odd, meaning that the number of the first calculated rows does not need to be evened. This embodiment does not specifically limit whether the number of the first calculated rows is even or odd.
[0108] In an exemplary embodiment, the above-described determination of the first slow-axis scan speed of the ROI region and the second slow-axis scan speed of the sparse region includes the following steps S60 to S64: S60: The quotient of the first target resolution divided by the default resolution of the scanned area is used as the first coefficient.
[0109] For an introduction to the first coefficient, please refer to S20 above. To avoid repetition, it will not be repeated here.
[0110] S61: The product of the first coefficient and the uniform scanning speed is taken as the first slow axis scanning speed; wherein, the uniform scanning speed is the scanning speed when performing uniform scanning on the scanning area. Specifically, the uniform scanning speed refers to the speed at which the scanning is performed uniformly along the slow axis direction.
[0111] S62: Determine the second stroke of the ROI region based on the first slow axis scan speed and the first target row number.
[0112] Specifically, the product of the first slow-axis scan speed and the first target row number can be used as the second stroke. Let the first slow-axis scan speed be denoted as Vmid, the first target row number as midlines, and the second stroke as midZone2. Then, midZone2 = Vmid * midlines. This second stroke essentially represents the actual stroke of the ROI region.
[0113] S63: Calculate the second difference between the total travel and the second travel.
[0114] The second difference, obtained by subtracting the second journey from the total journey, actually represents the actual journey of the sparse region, which can be denoted as totalZone-midZone2.
[0115] S64: Determine the second slow axis scan speed based on the second difference and the second target row number.
[0116] Specifically, the second slow axis scan speed of the sparse region can be obtained by calculating the quotient of the second difference divided by the second target row number, that is, the quotient of the actual travel of the sparse region divided by the second target row number.
[0117] In an exemplary embodiment, the aforementioned sparse region may specifically include a first sparse region located above the ROI region and a second sparse region located below the ROI region. For example, see [reference needed]. Figure 7 , Figure 7 The scanning area is divided into three regions along the slow axis: region A, region B, and region C. Region B is the Region of Interest (ROI), region A is the first sparse region, and region C is the second sparse region.
[0118] For example, the slow-axis scanning speed of the first sparse region and the second sparse region can be the same, such as the second slow-axis scanning speed mentioned above. The slow-axis scanning speed of the ROI region is the first slow-axis scanning speed mentioned above. This ensures that the travel distance obtained by multiplying the slow-axis scanning speed of the ROI region by one fast-axis cycle is divisible by the ellipse height, so that the elliptical trajectories in the ROI region can be evenly spread out. The number of rows in the first sparse region and the second sparse region can also be the same, for example, the number of rows in both the first sparse region and the second sparse region can be half of the number of rows in the second target mentioned above.
[0119] For example, the slow-axis scanning speeds of the first sparse region and the second sparse region cannot be different. However, it is necessary to ensure that the travel distance obtained by multiplying the slow-axis scanning speed of the first and second sparse regions by one fast-axis cycle is divisible by the ellipse height as much as possible, so that the elliptical trajectories in the first and second sparse regions are stretched as evenly as possible. The number of rows in the first and second sparse regions can also be different, but it is necessary to ensure that the sum of the number of rows in the first and second sparse regions is equal to the second target number of rows mentioned above.
[0120] In this embodiment, when it is determined that the slow-axis scanning speed does not match the ellipse height, the number of rows and the slow-axis scanning speed of the ROI region and sparse region in the scanning area can be allocated and adjusted to obtain a first target row number and a first slow-axis scanning speed allocated to the ROI region, and a second target row number and a second slow-axis scanning speed allocated to the sparse region. By controlling the galvanometer to scan the ROI region at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed, the slow-axis scanning stroke of the galvanometer within one fast-axis cycle matches 1 / K of the ellipse height, thereby solving the problem of ellipse trajectory adhesion. At the same time, the first slow-axis scanning speed allocated to the ROI region is usually lower than the uniform scanning speed, and the second slow-axis scanning speed allocated to the sparse region is usually higher than the uniform scanning speed, so as to place the region with a low slow-axis scanning speed in the angular region of focus of the radar, i.e., the ROI region, enabling more accurate and detailed detection of objects in the central region in front.
[0121] Figure 8 This is a schematic diagram of the structure of a control device for a galvanometer provided in an embodiment of this application.
[0122] For example, such as Figure 8 As shown, the device includes: a first determining module 201, used to determine the slow-axis scanning speed of the galvanometer; a second determining module 202, used to determine the elliptical height of the elliptical trajectory formed by the fast axis of the galvanometer scanning to a rated angle in the first direction in the second direction; a scanning speed determining module 203, used to determine a first vertical scanning speed for the ROI region and a second vertical scanning speed for the sparse region when it is determined that the slow-axis scanning speed and the elliptical height do not match; and a scanning control module 204, used to control the galvanometer to scan the ROI region at the first vertical scanning speed and the sparse region at the second vertical scanning speed, such that the slow-axis scanning stroke of the galvanometer in one fast-axis cycle matches 1 / K of the elliptical height, where K is a positive integer.
[0123] It is not difficult to see that this embodiment is a device embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details and technical effects mentioned in the above method embodiments are still effective in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.
[0124] Figure 9 This is a schematic diagram of the structure of a radar provided in an embodiment of this application.
[0125] For example, such as Figure 9As shown, the radar includes a memory 301 and a processor 302. The memory 301 stores executable program code, and the processor 302 is used to call and execute the executable program code to perform a galvanometer control method.
[0126] This embodiment can divide the radar into functional modules according to the above method example. For example, each module can be assigned to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0127] When each functional module is divided according to its corresponding function, the radar may include: a first determining module, a second determining module, a scanning speed determining module, a scanning control module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0128] The radar provided in this embodiment is used to execute the above-described galvanometer control method, and therefore can achieve the same effect as the above implementation method.
[0129] When using an integrated unit, the radar may include a processing module and a storage module. The processing module is used to control and manage the radar's operations. The storage module supports the radar in executing program code and data.
[0130] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as represented in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0131] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a galvanometer control method in the above embodiment.
[0132] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a galvanometer control method as described in the above embodiment.
[0133] In addition, the radar provided in the embodiments of this application may specifically be a chip, component or module. The radar may include a connected processor and a memory. The memory is used to store instructions. When the radar is running, the processor can call and execute the instructions to make the chip execute a galvanometer control method in the above embodiments.
[0134] In this embodiment, the radar, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0135] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0136] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for controlling a galvanometer, characterized in that, The method includes: Determine the slow-axis scanning speed of the galvanometer; Determine the elliptical height in the second direction of the elliptical trajectory formed by the fast axis of the galvanometer when it scans to a rated angle in the first direction; If it is determined that the slow-axis scanning speed does not match the ellipse height, a first slow-axis scanning speed for the ROI region and a second slow-axis scanning speed for the sparse region are determined; the first slow-axis scanning speed is lower than the default uniform scanning speed, and the second slow-axis scanning speed is higher than the default uniform scanning speed. The galvanometer is controlled to scan the ROI region at the first slow-axis scanning speed and the sparse region at the second slow-axis scanning speed, such that the slow-axis scanning stroke of the galvanometer in one fast-axis cycle matches 1 / K of the ellipse height, where K is a positive integer.
2. The method according to claim 1, characterized in that, The ROI region corresponds to a preset set of parameters; the method further includes: Based on the ellipse height and multiple K values, multiple candidate scan routes are calculated; wherein, one of the candidate scan routes is: when K takes a positive integer, the product of 1 / K and the ellipse height; Based on the multiple candidate scan runs and the preset parameter set corresponding to the ROI region, the first target row number to be allocated to the ROI region and the second target row number to be allocated to the sparse region are determined.
3. The method according to claim 2, characterized in that, The preset parameter set includes: the design resolution and design travel range of the ROI region. Determining the first target row number allocated to the ROI region and the second target row number allocated to the sparse region based on the multiple candidate scan travels and the preset parameter set corresponding to the ROI region includes: The differences between the plurality of candidate scan travels and twice the design resolution are obtained, and the first scan travel of the ROI region is determined from the plurality of candidate scan travels; wherein, the difference between the first scan travel and twice the design resolution is the smallest; Based on the first scan path, determine the first target resolution of the ROI region; Based on the designed travel range and the first target resolution, determine the first ideal number of rows for the ROI region; Based on the first ideal number of rows in the ROI region, determine the second ideal number of rows in the sparse region; Based on the principle of keeping the total travel constant, the edge resolution of the sparse region is calculated according to the first ideal number of rows, the first target resolution, and the second ideal number of rows. The first target row number and the second target row number are calculated based on the edge resolution and the first target resolution.
4. The method according to claim 3, characterized in that, The step of calculating the first target row count and the second target row count based on the edge resolution and the first target resolution includes: The differences between the plurality of candidate scan paths and twice the edge resolution are obtained, and the second scan path of the sparse region is determined among the plurality of candidate scan paths; wherein the difference between the second scan path and twice the edge resolution is the smallest; Based on the second scan path, determine the second target resolution of the sparse region; The first target row count and the second target row count are calculated based on the first target resolution and the second target resolution.
5. The method according to claim 4, characterized in that, The step of calculating the first target row count and the second target row count based on the first target resolution and the second target resolution includes: Based on the principle that the total number of rows and the total travel remain unchanged, the first number of calculated rows for the ROI region is obtained by analyzing the system of equations; wherein, the system of equations includes: x+y=h, x*f1+y*f2=z, where x is the first number of calculated rows, y is the second number of calculated rows, h is the total number of rows, f1 is the first target resolution, f2 is the second target resolution, and z is the total travel. Based on the first calculated row count, determine the first target row count and the second target row count.
6. The method according to claim 5, characterized in that, The preset parameter set further includes: the minimum value and the maximum value of the design travel range of the ROI region; determining the first target number of rows and the second target number of rows based on the first calculated row count includes: The first calculated number of rows is compared with the maximum number of rows and the minimum number of rows, respectively; wherein, the maximum number of rows is obtained based on the maximum value of the first target resolution and the designed travel range, and the minimum number of rows is obtained based on the minimum value of the first target resolution and the designed travel range; If the first number of calculated rows is greater than the maximum number of rows, the maximum number of rows shall be taken as the first target number of rows; If the first number of calculated rows is less than the minimum number of rows, the minimum number of rows shall be taken as the first target number of rows; If the first number of calculated rows is greater than or equal to the minimum number of rows and less than or equal to the maximum number of rows, the rounded first number of calculated rows shall be used as the first target number of rows. The second target number of rows is determined based on the first target number of rows and the total number of rows.
7. The method according to claim 6, characterized in that, Before comparing the first calculated row count with the maximum row count and the minimum row count, the method further includes: Determine whether the number of the first calculated rows is odd; If the number of the first calculation rows is odd, the number of the first calculation rows is made even so that the number of the first calculation rows is even after the even-numbering process. The step of comparing the first calculated row count with the maximum row count and the minimum row count includes: The first calculated row number after the even-numbering process is compared with the maximum row number and the minimum row number, respectively.
8. The method according to claim 3, characterized in that, Based on the principle of constant total travel, the calculation of the edge resolution of the sparse region according to the first ideal number of rows, the first target resolution, and the second ideal number of rows includes: The first coefficient is the quotient of the first target resolution divided by the default resolution of the scanned area. Calculate the first travel distance of the ROI region based on the first coefficient and the first ideal row number; Calculate the first difference between the total travel of the scanned area and the first travel; The edge resolution of the sparse region is calculated based on the default resolution, the first difference, and the second ideal row number.
9. The method according to any one of claims 3 to 8, characterized in that, The determination of the first slow-axis scan speed for the ROI region and the second slow-axis scan speed for the sparse region includes: The first coefficient is the quotient of the first target resolution divided by the default resolution of the scanned area. The product of the first coefficient and the uniform scanning speed is taken as the first slow axis scanning speed; wherein, the uniform scanning speed is the scanning speed when the scanning area is scanned at a uniform speed. The second stroke of the ROI region is determined based on the first slow axis scan speed and the first target row number; Calculate the second difference between the total travel and the second travel; The second slow axis scan speed is determined based on the second difference and the second target number of rows.
10. The method according to any one of claims 3 to 8, characterized in that, The preset parameter set further includes: the minimum value of the design resolution and the maximum value of the design resolution. Determining the first target resolution of the ROI region based on the first scan travel includes: If half of the first scan travel is greater than the maximum value of the design resolution, the maximum value of the design resolution shall be taken as the first target resolution. If half of the first scan travel is less than the minimum value of the design resolution, the minimum value of the design resolution shall be taken as the first target resolution. If half of the first scan travel is greater than or equal to the minimum value of the design resolution and less than or equal to the maximum value of the design resolution, then half of the first scan travel is taken as the first target resolution.
11. The method according to any one of claims 3 to 8, characterized in that, The step of determining the first ideal number of rows in the ROI region based on the designed travel range and the first target resolution includes: Calculate the quotient obtained by dividing the designed travel range by the first target resolution, and round the quotient to obtain the target quotient; If the target quotient is even, the target quotient is used as the first ideal row number of the ROI region; If the target quotient is not even, the target quotient is made even, and the even-numbered target quotient is used as the first ideal row number.
12. A control device for a galvanometer, characterized in that, The device includes: The first determining module is used to determine the slow-axis scanning speed of the galvanometer; The second determining module is used to determine the elliptical height in the second direction of the elliptical trajectory formed by the fast axis of the galvanometer when it is scanned to a rated angle in the first direction. The scanning speed determination module is used to determine a first slow-axis scanning speed for the ROI region and a second slow-axis scanning speed for the sparse region when it is determined that the slow-axis scanning speed does not match the ellipse height; the first slow-axis scanning speed is lower than the default uniform scanning speed, and the second slow-axis scanning speed is higher than the default uniform scanning speed. The scanning control module is used to control the galvanometer to scan the ROI region at the first slow axis scanning speed and the sparse region at the second slow axis scanning speed, so that the slow axis scanning stroke of the galvanometer matches 1 / K of the ellipse height in one fast axis cycle, where K is a positive integer.
13. A radar, characterized in that, The radar includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the radar to perform the method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Scanning method and device and computer storage medium
CN116338624A
Lissajous dual-axial scan element and scan frequency generation method thereof
TW201416791A
