A method and device for calculating optimal placement angle of PCB insertion loss test

CN122813637APending Publication Date: 2026-09-25NANJING TESTING YUAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610988372.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]有鉴于此,本公开提供了一种PCB板插损测试最佳摆放角度计算方法及装置,以解决如何在复杂的测试场景下,通过自动化算法精准计算最佳摆放角度,以兼顾测试高覆盖率与机台防撞安全性的问题

Benefits of technology

[0009]本公开还提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现上述任一种PCB板插损测试最佳摆放角度计算方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122813637A_ABST
    Figure CN122813637A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of PCB testing, and discloses a PCB board insertion loss test optimal placement angle calculation method and device. The target position mapping and effective test point statistics performed for each candidate placement angle in the preset angle set provide a quantitative evaluation benchmark for the relative position relationship between the test equipment and the PCB board to be tested. While ensuring the test point coverage rate, the mechanism avoids the adaptation uncertainty and local coverage deficiency caused by manual experience adjustment or fixed angle testing. The mechanism realizes the automatic calculation of the test posture of the complex structure PCB board, and improves the automation level and overall test efficiency of the test equipment. In the screening and derivation process of the target placement angle, the dynamic mapping physical interference reference point is used to provide a space collision avoidance prediction for the pressing action, which reduces the interference of the test action caused by space interference during multi-probe concurrent testing, and improves the physical safety of the machine in complex test scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of printed circuit board (PCB) testing technology, specifically to a method and apparatus for calculating the optimal placement angle for PCB insertion loss testing. Background Technology

[0002] With the continuous improvement of PCB manufacturing precision, high-frequency and high-speed circuit boards place more stringent requirements on the automation level and safety of insertion loss testing. During PCB insertion loss testing, the placement angle between the probes of the testing equipment and the PCB board directly affects the accuracy of the test results and the safety of the testing process. Traditionally, the placement angle of the PCB board is mostly adjusted manually based on experience or by fixing the angle during testing. Due to its simplicity and ease of implementation, it is widely used in conventional PCB testing.

[0003] However, modern PCB structures are becoming increasingly complex and densely packed with points. Traditional methods relying on manual operation or fixed angles are inefficient and cannot adapt to the structural differences of different PCB types, resulting in insufficient test coverage and even physical collisions between probes and the PCB, damaging the testing equipment. Therefore, how to accurately calculate the optimal placement angle using automated algorithms in complex testing scenarios to balance high test coverage with equipment collision safety has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, this disclosure provides a method and apparatus for calculating the optimal placement angle for PCB board insertion loss testing, in order to solve the problem of how to accurately calculate the optimal placement angle through automated algorithms in complex testing scenarios, so as to balance high test coverage and machine collision safety.

[0005] This disclosure provides a method for calculating the optimal placement angle for PCB board insertion loss testing, the method including: Acquire test point data of the PCB board under test, calibration data of the test equipment, and anti-collision constraints of the equipment; For each candidate placement angle in the preset angle set, obtain the target mapping position of the test point data of the PCB board under test under the current candidate placement angle; By combining the target mapping position and calibration data, the physical interference reference points of each test axis of the test equipment under the current candidate placement angle are determined respectively; Calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation, and count the number of valid test points that have not caused spatial interference under the current candidate placement angle; The candidate placement angles are sorted according to the number of valid test points corresponding to each candidate placement angle. The candidate placement angle corresponding to the largest number of points is determined as the target placement angle, and a control command is output to instruct the test equipment to perform the test action of the PCB board under test according to the target placement angle.

[0006] This disclosure also provides a device for calculating the optimal placement angle for PCB board insertion loss testing, the device comprising: The data acquisition module is used to acquire test point data of the PCB board under test, calibration data of the test equipment, and anti-collision constraint conditions of the equipment; The position mapping module is used to obtain the target mapping position of the test point data of the PCB board under test under the current candidate placement angle for each candidate placement angle in the preset angle set; The benchmark determination module is used to determine the physical interference benchmark points of each test axis of the test equipment under the current candidate placement angle by combining the target mapping position and calibration data; The interference calculation module is used to calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation and count the number of valid test points that have not caused spatial interference under the current candidate placement angle. The instruction output module is used to sort the candidate placement angles according to the number of valid test points corresponding to each candidate placement angle, determine the candidate placement angle corresponding to the maximum number of points as the target placement angle, and output control instructions to instruct the test equipment to perform test actions on the PCB board under test according to the target placement angle.

[0007] This disclosure also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of calculating the optimal placement angle for PCB board insertion loss testing as described above.

[0008] This disclosure also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the above-described method for calculating the optimal placement angle for PCB board insertion loss testing.

[0009] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for calculating the optimal placement angle for PCB board insertion loss testing.

[0010] In the PCB board insertion loss testing optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, by performing target position mapping and effective test point statistics for each candidate placement angle in the preset angle set, a quantitative evaluation benchmark is provided for the relative positional relationship between the test equipment and the PCB board under test. This ensures test point coverage while avoiding the adaptation uncertainty and insufficient local coverage caused by manual experience adjustment or fixed angle testing. This mechanism realizes automated calculation of the test posture for complex PCB board structures, improving the automation level of the test equipment and the overall testing efficiency.

[0011] Furthermore, by combining the calibration data of the testing equipment to determine the physical interference reference points of each test axis, and constructing a spatial interference calculation mechanism based on the equipment's anti-collision constraints, the interference risk of the physical equipment is transformed into geometric spatial distance verification. During the selection and derivation of the target placement angle, the dynamically mapped physical interference reference points provide spatial anti-collision prediction for the downward pressing action, reducing the interference of spatial interference on the test action during multi-probe concurrent testing and improving the physical safety of the equipment in complex testing scenarios. Attached Figure Description

[0012] To more clearly illustrate the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a method for calculating the optimal placement angle for PCB board insertion loss testing, provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of a PCB board insertion loss testing optimal placement angle calculation device provided in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0014] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this disclosure.

[0015] During PCB insertion loss testing, the angle between the probes of the testing equipment and the PCB board directly affects the accuracy of the test results and the safety of the testing process. An improper angle may cause the probes to collide with the PCB board, damaging the equipment, or poor contact at the test points, affecting the accuracy of the insertion loss data.

[0016] In related technologies, the placement angle of PCB boards is mostly adjusted manually based on experience or tested at a fixed angle, which has the following shortcomings: manual adjustment is inefficient, relies on the operator's experience, and has poor consistency; fixed angle testing cannot adapt to the structural differences of different types of PCB boards, resulting in insufficient test coverage; it lacks accurate geometric calculations and anti-collision verification, leading to a high risk of collision; and it does not combine calibration configurations with dynamic adjustments, making it difficult to guarantee calculation accuracy.

[0017] Therefore, there is an urgent need for an automated, high-precision, and highly secure solution for calculating the optimal placement angle for PCB board insertion loss testing, in order to solve the problems of low efficiency, insufficient coverage, and poor security in existing technologies.

[0018] To address the aforementioned issues, various embodiments of this disclosure provide a method for calculating the optimal placement angle for PCB board insertion loss testing. The method includes: acquiring test point data of the PCB board under test, calibration data of the testing equipment, and anti-collision constraints of the equipment; for each candidate placement angle in a preset angle set, acquiring the target mapping position of the test point data of the PCB board under test at the current candidate placement angle; combining the target mapping position and calibration data, determining the physical interference reference points of each test axis of the testing equipment at the current candidate placement angle; calculating the relative spatial distance between the physical interference reference points of each test axis, determining whether the relative spatial distance meets the spatial distance requirements in the anti-collision constraints of the equipment to complete the spatial interference calculation, and counting the number of effective test points where no spatial interference occurs at the current candidate placement angle; sorting the effective test points according to the number of each candidate placement angle, determining the candidate placement angle corresponding to the largest number as the target placement angle, and outputting a control command instructing the testing equipment to perform the test action of the PCB board under test according to the target placement angle.

[0019] It should be noted that, in the description of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this disclosure are used to distinguish similar objects and are not used to describe a particular order or sequence.

[0020] To enable those skilled in the art to better understand the present disclosure, the present disclosure will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for calculating the optimal placement angle for PCB board insertion loss testing, provided in an embodiment of this disclosure.

[0022] It is understood that the method provided in this embodiment can be executed by an execution entity, which can be the internal control system of the TDR impedance tester, or a host computer, computer equipment, or server (hereinafter collectively referred to as the system for simplicity) that is communicatively connected to the tester. The process of this method may include the following steps: Step S101: Obtain the test point data of the PCB board under test, the calibration data of the test equipment, and the anti-collision constraint conditions of the equipment.

[0023] In this embodiment, the PCB board under test typically has a complex circuit structure and intensive testing requirements.

[0024] First, acquire test point data. Test point data represents the target location information and attribute information on the PCB board that needs to be tested for electrical performance (such as insertion loss).

[0025] Acquire calibration data of the test equipment. The calibration data characterizes the spatial relative positions and characteristic parameters of the various physical components inside the test equipment in the physical space.

[0026] Obtain the equipment anti-collision constraints. The equipment anti-collision constraints are the spatial distance requirements or safety thresholds set between the moving parts of the test equipment to avoid physical interference when the equipment performs multi-axis motion.

[0027] In a specific embodiment, the input parameters received by the system include a test point pair list, a calibration file path, and a collision avoidance distance threshold D. The test point pair list contains multiple test point pairs, each containing two sets of endpoint coordinates, network numbers, and index information. For example, test point pair 1 contains: A1(100,200), A2(150,250), B1(300,200), B2(350,250), with network numbers A1=A2="Net1", B1=B2="Net2", and index = 1.

[0028] The test point pair list contains multiple test point pairs, and each test point pair contains two sets of endpoint coordinates, network number, and index information.

[0029] Step S102: For each candidate placement angle in the preset angle set, obtain the target mapping position of the test point data of the PCB board under test at the current candidate placement angle.

[0030] In this embodiment, since the placement posture of the PCB board on the testing machine affects the test coverage, the system constructs a preset angle set, which is the range of rotation angles that the PCB board is allowed to be placed in the test plane.

[0031] Each angle in the set is taken as the current candidate placement angle, and the physical distribution of the PCB board in that orientation is simulated in the computer's virtual space.

[0032] Specifically, the target mapping position of the test point data under the current candidate placement angle is obtained. This target mapping position represents the new spatial position of the original point coordinates under the current attitude. This process completes the simulation calculation of test attitude coordinates from multiple angles in virtual space.

[0033] In a specific embodiment, the target mapping position can be obtained through coordinate transformation operations. After the system initializes the angle statistics dictionary for data recording, it iterates in reverse order through each angle from 0 to 180 degrees as a candidate placement angle. For each angle, each test point pair is copied, and rotation calculations are performed on all endpoints of the copied test point pair based on a preset rotation matrix to obtain the transformed coordinate data as the target mapping position.

[0034] Step S103: Combining the target mapping position and calibration data, determine the physical interference reference point of each test axis of the test equipment under the current candidate placement angle.

[0035] In this embodiment, the testing device includes multiple test axes that can move independently and collaboratively. The test axes are physical motion mechanisms in the testing device that perform detection actions.

[0036] After obtaining the target mapping position at the current candidate placement angle, and combining it with the calibration data of the test equipment obtained above, the physical interference reference point for each test axis is determined. The physical interference reference point characterizes the geometric reference position that the test axis needs to be positioned in the current placement posture and reflects the physical space occupation characteristics.

[0037] By integrating the dynamically mapped test point coordinates with the static equipment calibration parameters, the physical interference reference point of each test axis at the current candidate placement angle is derived. This physical interference reference point provides a spatial position reference for subsequent spatial interference calculation and motion control.

[0038] In a specific embodiment, the system can assign test points to the A-axis and B-axis based on the endpoint coordinate characteristics and network number of the target mapping location. Then, the center calculation module is invoked to calculate the center and radius of the circles corresponding to the two endpoints of the A-axis and B-axis, respectively, as physical interference reference points. The geometric accuracy of the target circle center coordinates is verified using a preset triangle congruence criterion. The distance between the target circle center and the corresponding endpoint is calculated and compared with the initial radius. If the error exceeds 20 (i.e., the distance deviation exceeds 20 units), the center calculation is deemed abnormal, and an exception message is thrown for system capture and processing.

[0039] Step S104: Calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation and count the number of valid test points that have not experienced spatial interference under the current candidate placement angle.

[0040] In this embodiment, once the physical interference reference points for each test axis are determined, the physical safety assessment phase begins.

[0041] Based on the relative spatial distances between the physical interference reference points derived above, spatial interference calculations are performed in conjunction with the applied equipment anti-collision constraints. Spatial interference calculations refer to the internal software deduction process of calculating the spatial occupancy dimension or approximation distance of moving parts and determining whether the distance meets the spatial distance requirements (i.e., safe anti-collision distance) in the equipment anti-collision constraints.

[0042] If the spatial distance requirement is met (i.e., no interference risk is triggered), the test point is deemed valid for the current candidate placement angle. The system iterates through all test point data under the current orientation, counting the number of valid test points without spatial interference. This number represents the total number of points that can safely perform the test at a specific angle. This statistical count quantitatively reflects the actual test coverage for the current candidate placement angle.

[0043] In a specific embodiment, the system calculates the maximum distance between the centers of the circles on axis A and axis B in a specified direction, substitutes it into the collision avoidance distance verification formula, and determines whether the distance meets the collision avoidance distance threshold D. If the condition is met, the system counts the number of valid test point pairs at the current angle and records the index of the valid test point.

[0044] Step S105: Sort the candidate placement angles according to the number of valid test points corresponding to each candidate placement angle, determine the candidate placement angle corresponding to the maximum number of points as the target placement angle, and output a control command to instruct the test equipment to perform the test action of the PCB board under test according to the target placement angle.

[0045] In this embodiment, after completing the traversal simulation and spatial interference calculation of all candidate postures in the preset angle set, a mapping table of each candidate placement angle and the number of corresponding effective test points is generated in memory.

[0046] Based on the number of valid test points corresponding to each candidate placement angle, a preset sorting and filtering logic is executed to determine the target placement angle. The target placement angle is the optimal spatial orientation that meets the maximum number of valid test points and specific sorting rules after filtering.

[0047] After obtaining the target placement angle, it is converted into a device control protocol that can be recognized by the underlying hardware, and a control command is output to instruct the test equipment to perform the test actions of the PCB board under test according to the target placement angle.

[0048] After receiving the instruction, the actuator of the testing equipment positions the PCB board according to the deduced target posture and carries out the test.

[0049] In a specific embodiment, the system sorts the angle statistics dictionary in descending order of the logarithm of valid test points and ascending order of the absolute angle value, and filters the set of candidate placement angles corresponding to the maximum number of values. It determines the number of candidate placement angles corresponding to the maximum number of values; if there is only one, it is directly used as the target placement angle; if the set contains multiple angles, to avoid the influence of a single angle deviation on the result, the median of the set is taken as the target placement angle (i.e., the optimal placement angle) after sorting by the absolute angle value in ascending order.

[0050] For example, assuming that after the traversal is completed, the number of valid test point pairs at angles of 60 degrees, 70 degrees, and 80 degrees is the maximum value of 5, after sorting in ascending order by absolute angle value, the median of 70 degrees is taken as the optimal placement angle.

[0051] Finally, the system outputs the optimal placement angle and the corresponding list of valid test point indices.

[0052] In the PCB board insertion loss testing optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, by performing target position mapping and effective test point statistics for each candidate placement angle in the preset angle set, a quantitative evaluation benchmark is provided for the relative positional relationship between the test equipment and the PCB board under test. This ensures test point coverage while avoiding the adaptation uncertainty and insufficient local coverage caused by manual experience adjustment or fixed angle testing. This mechanism realizes automated calculation of the test posture for complex PCB board structures, improving the automation level of the test equipment and the overall testing efficiency.

[0053] Furthermore, by combining the calibration data of the testing equipment to determine the physical interference reference points of each test axis, and constructing a spatial interference calculation mechanism based on the equipment's anti-collision constraints, the interference risk of the physical equipment is transformed into geometric spatial distance verification. During the selection and derivation of the target placement angle, the dynamically mapped physical interference reference points provide spatial anti-collision prediction for the downward pressing action, reducing the interference of spatial interference on the test action during multi-probe concurrent testing and improving the physical safety of the equipment in complex testing scenarios.

[0054] In one possible implementation of step S102 above, obtaining the target mapping position of the test point data of the PCB board under test at the current candidate placement angle includes: The current candidate placement angle is converted into the corresponding radian value, and coordinate transformation is performed on the test point data based on the preset rotation matrix to obtain the target mapping position of the test point data under the current candidate placement angle.

[0055] In this embodiment, considering that actual PCB boards typically have the physical properties of double-sided wiring or double-sided testing, the system first obtains preset flip-side identification features as an optional preprocessing method before performing coordinate system derivation. The flip-side identification features mentioned here are data identifiers indicating whether the current probe needs to operate on the front or back of the PCB board, such as the Boolean status bit isFanMian. This identification feature can be configured by the operator when the task is issued, or obtained from a digital status bit (such as a Boolean variable) parsed from the upstream engineering file, used to clearly indicate whether the current probe needs to operate on the front or back of the PCB board.

[0056] If the flipping indicator signifies that the PCB is currently in a test state requiring flipping (e.g., the status bit is true), then the actual exposed surface of the PCB on the physical test bench is a mirror image of the original design surface. To eliminate this spatial misalignment, the system performs mirror mapping in virtual space. Specifically, the system automatically iterates through all test point data, extracts the maximum coordinate value along a preset dimension (usually the horizontal axis or X-axis representing the board width), and dynamically defines it as the current reference width of the PCB. Here, the preset dimension is a specific coordinate axis direction in the test plane coordinate system, such as the X-axis; the reference width is a value representing the overall span of the PCB along that preset dimension, such as the maximum X-coordinate of the PCB.

[0057] Subsequently, the system constructs a virtual symmetrical benchmark based on this benchmark width and performs mirroring processing on the test point data.

[0058] In a specific embodiment, the system receives input parameters including a flip identifier (isFanMian). If the received flip identifier isFanMian is false, the horizontal mirroring process is skipped and the angle traversal calculation is performed directly. If the flip identifier isFanMian is true, the maximum X coordinate of all endpoints is obtained as the reference width (i.e., the PCB board width), and horizontal mirroring is performed on each endpoint. The calculation method is: X coordinate of the mirrored rear end point = PCB board width - original X coordinate, while the Y coordinate remains unchanged.

[0059] Through this process, the system generates mirror test point data corresponding to the physical flip state, while the coordinates of the dimensions that have not been flipped remain unchanged.

[0060] After completing the mirroring process (if flipping is not required, the original test point data will be used), the system initiates geometric rotation calculations for the current candidate placement angle. The system converts the current candidate placement angle (usually in degrees) into the corresponding radian value parameter.

[0061] Subsequently, the system constructs a preset rotation matrix corresponding to the radian value. By performing matrix multiplication on the spatial coordinate vector and the rotation matrix, the spatial position of each test endpoint on the PCB board after rotating by that angle is calculated. This allows the system to calculate the coordinate data of each test endpoint at the target angle, thus obtaining the target mapping position of the test point data at the current candidate placement angle. The preset rotation matrix is ​​a mathematical calculation matrix used to implement two-dimensional planar coordinate rotation transformation.

[0062] In the PCB board insertion loss test optimal placement angle calculation method and apparatus of this disclosure, by introducing a flip-side marking feature and performing mirroring based on a reference width, the testing equipment has the function of switching between testing tasks for the front and back sides of the PCB board. This reduces the process of manually recreating coordinate maps for the back side in traditional testing, improving system compatibility and testing efficiency. Simultaneously, by using the maximum coordinate value extracted from the test data itself to establish the reference width, coordinate deviations caused by manual input errors are avoided, enhancing the algorithm's adaptability to different board sizes. Transforming spatial rotation into matrix operations of radian values ​​and a preset rotation matrix provides a mathematical framework for multi-angle traversal calculations. This matrix calculation mode ensures the accuracy of coordinate derivation calculations and reduces errors caused by approximate estimations.

[0063] In one possible implementation of step S102 above, a coordinate transformation operation is performed on the test point data based on a preset rotation matrix to obtain the target mapping position of the test point data under the current candidate placement angle, including: Extract the original x-coordinate and original y-coordinate of the test point to be converted; The rotated target x-cosθ and target y-cosθ are calculated based on the formulas X'=X×cosθ-Y×sinθ and Y'=X×sinθ+Y×cosθ. Where X is the original x-coordinate, Y is the original y-coordinate, θ is the radian value corresponding to the current candidate placement angle, X' is the target x-coordinate, and Y' is the target y-coordinate.

[0064] In this embodiment, the system first copies each test point pair, and then performs rotation calculations on all endpoints of the copied test point pair based on the rotation matrix. The test point pair mentioned here refers to a test unit containing two sets of endpoint coordinates, network numbers, and index information; the rotation matrix is ​​a mathematical model constructed based on trigonometric functions to describe the rotation transformation of planar coordinates.

[0065] Specifically, during the calculation of the rotation matrix, the system converts the current candidate placement angle into its corresponding radian value. Then, it extracts the original x-coordinate (X) and y-coordinate (Y) of the test point to be converted. Combining these with the converted radian value, it calculates the target x-coordinate (X') and target y-coordinate (Y') of the rotated endpoint based on the formulas X'=X×cosθ-Y×sinθ and Y'=X×sinθ+Y×cosθ. After the calculation, the system retains the coordinates of the rotated endpoint to two decimal places.

[0066] In a specific calculation embodiment, the system traverses angle i in reverse order from 180 degrees to 0 degrees; taking the current angle i = 90 degrees as an example, the system first converts 90 degrees into radians π / 2. Assume that the test point pair to be converted includes an endpoint A1, whose original x-coordinate X is 100 and original y-coordinate Y is 200. Based on the above formula, the rotated target x-coordinate X' = 100 × 0 - 200 × 1 = -200.00, and the target y-coordinate Y' = 100 × 1 + 200 × 0 = 100.00, that is, the rotated endpoint coordinates are (-200.00, 100.00).

[0067] It is understandable that the above rotation calculation process is performed on the copied test point pairs to avoid overwriting or modifying the original data.

[0068] In the PCB board insertion loss test optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, the rotation calculation of the test point relative to the endpoint coordinates is realized by converting the angle into radians and combining it with trigonometric functions to calculate the rotation matrix. The use of geometric algorithms such as rotation matrices ensures the calculation accuracy during the placement angle conversion process and improves the accuracy of the test data. Simultaneously, by copying the test point pairs for calculation, the original data is prevented from being modified, ensuring the independence and stability of the data during the 0-180 degree traversal, laying a geometric data foundation for subsequent physical interference reference point deduction and spatial interference measurement.

[0069] In one possible implementation of step S103 above, the test point data includes a first test endpoint group and a second test endpoint group that are distributed in pairs. Determine the physical interference reference points for each test axis of the testing equipment at the current candidate placement angle, including: Based on the symmetry of the fixed point coordinates, calculate the initial center coordinates and initial radius of the fixed reference circle; Calculate the projection position of the fixed point coordinates onto the line segment formed by the moving point coordinates, and adjust the target position of the moving test probe by combining the endpoint spacing in the target mapping position. Based on the offset of the current candidate placement angle, combined with the initial center coordinates and the initial radius, the target center coordinates corresponding to the target mapping position are calculated and used as the physical interference reference point; The geometric accuracy of the target circle's center coordinates is verified using a pre-defined triangle congruence criterion.

[0070] In this embodiment, before determining the physical interference reference point, as an optional implementation, the system can execute the test axis allocation logic based on the endpoint coordinate characteristics and network number: For the test point data under the current attitude, the system extracts and calculates the sum of coordinate values ​​of the first and second test endpoint groups constituting the test loop along a specified coordinate axis direction (i.e., the X-axis direction). The system assigns the set of endpoints with the smaller sum of coordinate values ​​to the first test axis of the test equipment (e.g., the A-axis), and assigns the set of endpoints with the larger sum of coordinate values ​​to the second test axis (e.g., the B-axis). If the network numbers of the two sets of endpoints are inconsistent, an adjustment mechanism is triggered, and the test endpoints assigned to the second test axis are sequentially adjusted. This optional allocation mechanism helps to automatically complete the physical assignment of the left and right test axes.

[0071] After clarifying the relationship between test points and test axes, the system reads the coordinates of fixed points, moving points, and camera capture points from the calibration configuration of the corresponding axis type. Fixed points refer to static reference points on the testing machine used for coordinate positioning; moving points refer to points on the probe module that move with the mechanical mechanism; and camera capture points refer to the central reference position of the vision alignment component. Calibration data refers to calibration parameters characterizing the spatial relative relationships of the physical components within the testing equipment. Physical interference reference points refer to the geometric reference centers of circles that are required for positioning when the test axis performs its probing actions and reflect the characteristics of physical space occupancy.

[0072] When deriving the physical interference reference point, the system calculates the initial center and initial radius of the fixed reference circle based on the symmetry of the fixed points. The initial center is the midpoint of the two symmetrical fixed points, and the initial radius is the average distance between multiple points. Subsequently, the system calculates the projection of the fixed points onto the moving probe segment and adjusts the target position of the moving test probe based on the distance between the test point pairs. Based on this, the system calculates the angular offset of the current candidate placement angle and derives the coordinates of the target circle center as the physical interference reference point. The system verifies the center calculation results using the triangle congruence SSS criterion to ensure calculation accuracy.

[0073] In a specific embodiment, the system reads the feature point coordinates of the AD axis from the calibration file. For example, the fixed point pFixed is (1000, 2000), from which the center pO of the fixed reference circle is calculated to be (2000, 2000), and the initial radius Rr is 1000. Based on the distance and angle offset of the test point pair, the system calculates the target circle center CenterA1 corresponding to the endpoint of the A axis as (1800, 1800) and CenterA2 as (1900, 1900). Similarly, the center B axis CenterB1 is calculated as (2800, 1800) and CenterB2 as (2900, 1900). The system verifies the calculation accuracy by checking whether the distance between CenterA1 and the rotated endpoint of A1 is equal to Rr. If the error exceeds 20, an exception is thrown.

[0074] In the PCB board insertion loss testing optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, by reading the underlying calibration configuration including fixed points, moving points, and camera capture points, the derivation of the reference point can reflect the actual physical calibration state of the equipment. The initial center and radius are calculated by combining the symmetry relationship of the fixed points, and the target position is dynamically adjusted using the projection points and the distance between the test endpoints, providing an alignment calculation logic adaptable to different test point spans. Furthermore, the triangle congruence criterion is introduced to geometrically verify the derived target center coordinates, effectively identifying errors in the center calculation process. This mechanism improves the reliability of the physical interference reference point derivation.

[0075] In one possible implementation of step S104 above, each test axis of the testing equipment includes a first test axis and a second test axis. The relative spatial distance between the physical interference reference points of each test axis is calculated, and it is determined whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, in order to complete the spatial interference calculation, including: Calculate the maximum distance between the physical interference reference point corresponding to the first test axis and the physical interference reference point corresponding to the second test axis of the test equipment in a preset direction; The maximum distance, the running radius of each test axis, and the distance difference between the camera capture point and the fixed point of each test axis in the preset direction are substituted into the preset anti-collision verification formula for calculation. Determine whether the calculated result is greater than the collision distance threshold in the equipment collision avoidance constraint conditions; If the distance is greater than the anti-collision distance threshold, the test point corresponding to the current candidate placement angle is determined to be calculated by spatial interference. The anti-collision verification formula is: (distanceX-(RA+RB))+CDA+CDB>D, where distanceX is the maximum distance, RA and RB are the operating radii of the first and second test axes respectively, CDA and CDB are the distance differences between the camera capture point and the fixed point corresponding to the first and second test axes in the preset direction, and D is the anti-collision distance threshold.

[0076] In this embodiment, after determining the physical interference reference points for each test axis, the system performs spatial interference calculations. The preset direction mentioned here refers to a specific axis in the machine coordinate system where physical interference is likely to occur, such as the X direction; the running radius RA / RB refers to the physical movement radius of the test axis within the working envelope plane; the distance difference CDA / CDB refers to the positional offset of the camera's capture point relative to the fixed point in the preset direction. The anti-collision distance threshold D refers to the minimum spatial spacing that must be maintained to ensure the safe operation of the test axes.

[0077] The system calculates the maximum distance *distanceX* between the physical interference reference point of the first test axis (e.g., axis A) and the physical interference reference point of the second test axis (e.g., axis B) in a preset direction. Then, it extracts the operating radius and distance difference for each test axis and substitutes them into the collision avoidance verification formula for calculation. If the calculation result is greater than the collision avoidance distance threshold *D*, the test point is determined to have passed the spatial interference measurement at the current candidate placement angle.

[0078] In a specific embodiment, the system calculates the maximum distance X between the center of axis A and the center of axis B in the X direction to be 1000. Given that RA is 1000, RB is 1000, CDA is 500, and CDB is 500, this value is substituted into the formula: (1000 - (1000 + 1000)) + 500 + 500 = 500. Since the calculated value of 500 is greater than the preset anti-collision distance threshold D (50.0), the system determines that the test point is valid at the current angle.

[0079] In the PCB board insertion loss testing optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, a collision avoidance verification formula combining the characteristics of the central axis distance, operating radius, and camera capture point distance is introduced, transforming the interference risk during multi-axis operation into a quantifiable geometric judgment. This calculation process comprehensively considers the structural envelope size and position compensation parameters, providing an objective basis for spatial interference assessment. By using this preset formula to calculate the points at each candidate placement angle, points that meet physical safety requirements can be selected, reducing the probability of collisions during testing and providing technical assurance for equipment operation.

[0080] In one possible implementation of step S105 above, determining the candidate placement angle corresponding to the maximum quantity value as the target placement angle includes: Determine the number of candidate placement angles corresponding to the maximum value; If there is only one candidate placement angle corresponding to the maximum quantity value, then that candidate placement angle shall be taken as the target placement angle. If there are multiple candidate placement angles corresponding to the maximum quantity value, then the median of the sorted candidate placement angles is taken as the target placement angle.

[0081] In this embodiment, after completing the statistics and sorting of the number of valid test points, the system needs to further determine the unique target placement angle. Specifically, the system first determines the number of candidate placement angles that reach the maximum number of valid test points after sorting. If the maximum number of candidate placement angles corresponds to only one candidate placement angle, it means that the coverage under this posture has a unique advantage, and the candidate placement angle is directly used as the target placement angle; if there are multiple candidate placement angles that have reached the same maximum number of candidates (i.e., multiple angles can reach the maximum safe test coverage), in order to avoid mechanical movement bias or potential boundary interference risks caused by edge angles, the system extracts these multiple candidate placement angles, sorts them according to a specific rule (such as ascending order of absolute angle value), and takes the median angle value as the final target placement angle.

[0082] In the PCB board insertion loss test optimal placement angle calculation method and apparatus of the above embodiments of this disclosure, the median screening mechanism under multi-peak conditions effectively filters out the risk of random selection caused by multiple solutions. This mechanism ensures that the final output target placement angle is as close as possible to the center of the safe posture range, further improving the fault tolerance and physical stability of the machine when performing test actions in complex workspaces.

[0083] In one embodiment, a PCB board insertion loss testing optimal placement angle calculation device 200 is provided, which corresponds one-to-one with the PCB board insertion loss testing optimal placement angle calculation method in the above embodiments. For example... Figure 2 As shown, the device includes: The data acquisition module 201 is used to acquire the test point data of the PCB board under test, the calibration data of the test equipment, and the anti-collision constraint conditions of the equipment; The position mapping module 202 is used to obtain the target mapping position of the test point data of the PCB board under test under the current candidate placement angle for each candidate placement angle in the preset angle set; The reference determination module 203 is used to combine the target mapping position and calibration data to determine the physical interference reference point of each test axis of the test equipment under the current candidate placement angle; Interference calculation module 204 is used to calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation and count the number of valid test points that have not caused spatial interference under the current candidate placement angle. The instruction output module 205 is used to sort the candidate placement angles according to the number of valid test points corresponding to each candidate placement angle, determine the candidate placement angle corresponding to the maximum number of points as the target placement angle, and output a control instruction to instruct the test equipment to perform the test action of the PCB board under test according to the target placement angle.

[0084] In one embodiment, the position mapping module 202 is specifically used to convert the current candidate placement angle into the corresponding radian value, and perform coordinate transformation calculation on the test point data based on the preset rotation matrix to obtain the target mapping position of the test point data under the current candidate placement angle.

[0085] In one embodiment, the position mapping module 202 is further used to extract the original abscissa and original ordinate of the test point to be converted; The rotated target x-cosθ and target y-cosθ are calculated based on the formulas X'=X×cosθ-Y×sinθ and Y'=X×sinθ+Y×cosθ. Where X is the original x-coordinate, Y is the original y-coordinate, θ is the radian value corresponding to the current candidate placement angle, X' is the target x-coordinate, and Y' is the target y-coordinate.

[0086] In one embodiment, the calibration data includes pre-calibrated coordinates of fixed points, coordinates of moving points, and coordinates of camera capture points; the reference determination module 203 is specifically used to calculate the initial center coordinates and initial radius of the fixed reference circle based on the symmetry of the fixed point coordinates. Calculate the projection position of the fixed point coordinates onto the line segment formed by the moving point coordinates, and adjust the target position of the moving test probe by combining the endpoint spacing in the target mapping position. Based on the offset of the current candidate placement angle, combined with the initial center coordinates and the initial radius, the target center coordinates corresponding to the target mapping position are calculated and used as the physical interference reference point; The geometric accuracy of the target circle's center coordinates is verified using a pre-defined triangle congruence criterion.

[0087] In one embodiment, each test axis of the testing equipment includes a first test axis and a second test axis. The interference calculation module 204 is specifically used to calculate the maximum distance between the physical interference reference point corresponding to the first test axis and the physical interference reference point corresponding to the second test axis in a preset direction. The maximum distance, the running radius of each test axis, and the distance difference between the camera capture point and the fixed point of each test axis in the preset direction are substituted into the preset anti-collision verification formula for calculation. Determine whether the calculated result is greater than the collision distance threshold in the equipment collision avoidance constraint conditions; If the distance is greater than the anti-collision distance threshold, the test point corresponding to the current candidate placement angle is determined to be calculated by spatial interference. The anti-collision verification formula is: (distanceX-(RA+RB))+CDA+CDB>D, where distanceX is the maximum distance, RA and RB are the operating radii of the first and second test axes respectively, CDA and CDB are the distance differences between the camera capture point and the fixed point corresponding to the first and second test axes in the preset direction, and D is the anti-collision distance threshold.

[0088] In one embodiment, the instruction output module 205 is specifically used to determine the number of candidate placement angles corresponding to the maximum quantity value; If there is only one candidate placement angle corresponding to the maximum quantity value, then that candidate placement angle shall be taken as the target placement angle. If there are multiple candidate placement angles corresponding to the maximum quantity value, then the median of the sorted candidate placement angles is taken as the target placement angle.

[0089] It should be noted that the PCB board insertion loss test optimal placement angle calculation device provided in the above embodiments is only illustrated by the division of the above program modules when implementing the corresponding PCB board insertion loss test optimal placement angle calculation method. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the above device can be divided into different program modules to complete all or part of the processing described above. In addition, the device provided in the above embodiments and the corresponding Figure 1 The embodiments of the methods shown belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0090] This disclosure also provides an electronic device having the above-described features. Figure 2 The device shown is for calculating the optimal placement angle for PCB board insertion loss testing.

[0091] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure.

[0092] The following is a detailed reference. Figure 3 The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present disclosure. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 301, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 302 or a program loaded from memory 308 into random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device. The processor 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0093] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0094] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 309, or installed from a memory 308, or installed from a ROM 302. When the computer program is executed by the processor 301, it performs the functions defined in the PCB board insertion loss test optimal placement angle calculation method of embodiments of this disclosure.

[0095] Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0096] This disclosure also provides a computer-readable storage medium. The methods described above according to this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the method for calculating the optimal placement angle for PCB board insertion loss testing shown in the above embodiments is implemented.

[0097] A portion of this disclosure can be applied to computer program products, such as computer program instructions, which, when executed by a computer, can invoke or provide methods and / or technical solutions according to this disclosure through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0098] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for calculating the optimal placement angle for PCB board insertion loss testing, characterized in that, The method includes: Acquire test point data of the PCB board under test, calibration data of the test equipment, and anti-collision constraints of the equipment; For each candidate placement angle in the preset angle set, obtain the target mapping position of the test point data of the PCB board under test under the current candidate placement angle; By combining the target mapping position with the calibration data, the physical interference reference point of each test axis of the test equipment under the current candidate placement angle is determined respectively; Calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation, and count the number of effective test points where no spatial interference occurred under the current candidate placement angle; The candidate placement angles are sorted according to the number of valid test points corresponding to each candidate placement angle. The candidate placement angle corresponding to the largest number of points is determined as the target placement angle, and a control command is output to instruct the test equipment to perform the test action of the PCB board under test according to the target placement angle.

2. The method according to claim 1, characterized in that, The step of obtaining the target mapping position of the test point data of the PCB board under test at the current candidate placement angle includes: The current candidate placement angle is converted into the corresponding radian value, and a coordinate transformation operation is performed on the test point data based on a preset rotation matrix to obtain the target mapping position of the test point data under the current candidate placement angle.

3. The method according to claim 2, characterized in that, The step of performing coordinate transformation operations on the test point data based on a preset rotation matrix to obtain the target mapping position of the test point data under the current candidate placement angle includes: Extract the original x-coordinate and original y-coordinate of the test point to be converted; The rotated target x-cosθ and target y-cosθ are calculated based on the formulas X'=X×cosθ-Y×sinθ and Y'=X×sinθ+Y×cosθ. Where X is the original horizontal coordinate, Y is the original vertical coordinate, θ is the radian value corresponding to the current candidate placement angle, X' is the target horizontal coordinate, and Y' is the target vertical coordinate.

4. The method according to claim 1, characterized in that, The calibration data includes pre-calibrated fixed point coordinates, moving point coordinates, and camera capture point coordinates; determining the physical interference reference points for each test axis of the testing equipment at the current candidate placement angle includes: Based on the symmetry of the fixed point coordinates, calculate the initial center coordinates and initial radius of the fixed reference circle; Calculate the projection position of the fixed point coordinates onto the line segment formed by the moving point coordinates, and adjust the target position of the moving test probe in combination with the endpoint spacing in the target mapping position. Based on the offset of the current candidate placement angle, combined with the initial center coordinates and the initial radius, the target center coordinates corresponding to the target mapping position are calculated and used as the physical interference reference point; The geometric accuracy of the target circle center coordinates is verified by using a preset triangle congruence criterion.

5. The method according to claim 4, characterized in that, Each test axis of the testing equipment includes a first test axis and a second test axis. The calculation of the relative spatial distance between the physical interference reference points of each test axis, and the determination of whether the relative spatial distance meets the spatial distance requirements in the equipment's anti-collision constraint conditions, to complete the spatial interference calculation, includes: Calculate the maximum distance between the physical interference reference point corresponding to the first test axis and the physical interference reference point corresponding to the second test axis of the test equipment in a preset direction; The maximum distance, the running radius of each test axis, and the distance difference between the camera capture point and the fixed point of each test axis in the preset direction are substituted into the preset anti-collision verification formula for calculation. Determine whether the calculation result is greater than the anti-collision distance threshold in the equipment anti-collision constraint conditions; If the distance is greater than the anti-collision distance threshold, then the test point corresponding to the current candidate placement angle is determined to have passed the spatial interference calculation. The anti-collision verification formula is: (distanceX-(RA+RB))+CDA+CDB>D, where distanceX is the maximum distance, RA and RB are the operating radii of the first test axis and the second test axis, respectively, CDA and CDB are the distance differences between the camera capture point and the fixed point corresponding to the first test axis and the second test axis in the preset direction, and D is the anti-collision distance threshold.

6. The method according to claim 1, characterized in that, The step of determining the candidate placement angle corresponding to the maximum quantity value as the target placement angle includes: Determine the number of candidate placement angles corresponding to the maximum value; If there is only one candidate placement angle corresponding to the maximum quantity value, then the candidate placement angle shall be taken as the target placement angle. If there are multiple candidate placement angles corresponding to the maximum quantity value, then the median of the sorted candidate placement angles is taken as the target placement angle.

7. A device for calculating the optimal placement angle for PCB board insertion loss testing, characterized in that, The device includes: The data acquisition module is used to acquire test point data of the PCB board under test, calibration data of the test equipment, and anti-collision constraint conditions of the equipment; The position mapping module is used to obtain the target mapping position of the test point data of the PCB board under test under the current candidate placement angle for each candidate placement angle in the preset angle set. The reference determination module is used to combine the target mapping position with the calibration data to determine the physical interference reference point of each test axis of the test equipment under the current candidate placement angle; The interference calculation module is used to calculate the relative spatial distance between the physical interference reference points of each test axis, determine whether the relative spatial distance meets the spatial distance requirements in the equipment anti-collision constraint conditions, so as to complete the spatial interference calculation and count the number of effective test points where no spatial interference occurs under the current candidate placement angle. The instruction output module is used to sort the candidate placement angles according to the number of valid test points corresponding to each candidate placement angle, determine the candidate placement angle corresponding to the maximum number of points as the target placement angle, and output a control instruction to instruct the test equipment to perform the test action of the PCB board under test according to the target placement angle.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the method for calculating the optimal placement angle for PCB board insertion loss testing as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the method for calculating the optimal placement angle for PCB board insertion loss testing as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for calculating the optimal placement angle for PCB board insertion loss testing as described in any one of claims 1 to 6.