A Terahertz Detection Method and System Based on Artificial Intelligence
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-08-14
AI Technical Summary
然而,目前尚缺乏将AI Agent融入到太赫兹检测系统的决策层的系统架构和控制方式
[0058]1. This invention utilizes the language decomposition capabilities and pre-trained decision-making abilities of an AI Agent. It can not only generate a global scanning path through acquired natural language instructions, but also generate local scanning paths and optimized scanning methods for the optimization process. This allows for adjustments to the scanning path and scanning method based on the terahertz time-domain waveforms at each acquisition point during terahertz detection. Compared to the existing technology that pre-sets the path and then pre-programs the trajectory to control the movement of the robotic arm, this invention significantly simplifies the operation of terahertz detection. Furthermore, the globally covered and locally enhanced scanning method can significantly improve the detection rate and characterization accuracy of weak defects and complex areas without significantly increasing the total scanning time, making it better suited for complex detection scenarios.
Smart Images

Figure CN122567015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terahertz detection technology, specifically to a terahertz detection method and system based on artificial intelligence. Background Technology
[0002] Terahertz (THz) technology refers to electromagnetic wave technology with a frequency range between 0.1THz and 10THz. It features strong penetration, high resolution, and strong non-destructive testing capabilities for non-polar materials, and has broad application prospects in semiconductor testing, biomedical imaging, security inspection, materials analysis, and precision manufacturing. With the continuous maturation of terahertz source and detector technologies, the demand for its industrial and engineering applications is increasing daily.
[0003] When detecting samples using terahertz systems, it is necessary to combine precision mechanical structures such as 3D scanning platforms, six-axis robotic arms, and high-precision displacement platforms to move the terahertz probe, enabling multi-angle, high-precision scanning and detection of the target object. Currently, the path planning and control process of the robotic arm relies on the operator's experience to pre-set the path and then pre-program the trajectory to control the robotic arm's movement. This method is not only inefficient, but the pre-planned path and parameters cannot be adaptively adjusted according to the scanning situation during the scanning process, making it difficult to adapt to complex industrial scenarios.
[0004] In recent years, AI agent technology based on large-scale model architectures has developed rapidly. AI agents possess capabilities such as task decomposition, environmental perception, policy reasoning, path optimization, and autonomous decision-making. However, there is currently a lack of system architectures and control methods to integrate AI agents into the decision-making layer of terahertz detection systems. Summary of the Invention
[0005] One objective of this invention is to provide a terahertz detection method based on an artificial intelligence agent. This method generates a global scanning path based on input natural language commands. While controlling the robotic arm to move along the global scanning path, it can determine whether an optimization process is needed to enhance the detection capability of signal abnormal areas based on the terahertz time-domain waveform acquired by the terahertz probe. Then, it adjusts the scanning path or scanning method according to the detection results, thereby significantly improving the defect detection rate and overall detection efficiency of terahertz detection, which is beneficial for adapting to more complex detection scenarios.
[0006] This invention is achieved through the following technical solution:
[0007] A terahertz detection method based on artificial intelligence agents includes the following steps:
[0008] Obtain natural language instructions, extract detection targets and control parameters based on the natural language instructions, and generate a global scanning path based on the detection targets and control parameters;
[0009] The robotic arm equipped with a terahertz probe is controlled to move along the global scanning path to collect terahertz time-domain waveforms at the collection points on the global scanning path.
[0010] Based on the terahertz time-domain waveforms at the acquisition points, the abnormal signal regions are determined, and local scanning paths and optimized scanning methods are generated.
[0011] The robotic arm is controlled to move along the local scanning path to perform an optimization process. The optimized terahertz time-domain waveform of the acquisition point in the signal abnormal area is acquired using the optimized scanning method. Based on the optimized terahertz time-domain waveform, it is determined whether the optimization process has ended. If yes, the optimization process ends; if no, the local scanning path and / or optimized scanning method are adjusted and the optimization process continues.
[0012] In this technical solution, the control unit, i.e., the AI Agent, can employ any existing large language model, such as Qwen, LLaMA, GPT-4, or Claude, to acquire user-input natural language commands via a natural language interaction interface, and then extract detection targets and control parameters from these commands. For example, in some embodiments, the control parameters can be one or more of the following: scanning area parameters, area shape, area size, spatial coordinate range, scanning accuracy parameters, spatial resolution, step size, signal sampling accuracy, scanning mode parameters, grid scanning, spiral scanning, surface adaptive scanning, local enhancement scanning, scanning priority parameters, accuracy priority, speed priority, and full coverage priority. Simultaneously, detection targets can also be extracted from the natural language commands, such as thickness measurement, internal structure imaging, and delamination defects beneath metal.
[0013] Subsequently, a global scanning path for the robotic arm's movement is generated based on the detection target and control parameters. For example, for a command to measure the thickness of a uniform non-polar material, a transmission scanning method or an algorithm based on time-domain peak spacing analysis is preferred, combined with the control parameters in the command to generate a global scanning path. As another example, for a command to locate delamination defects beneath a metal layer, a reflection scanning imaging method is preferred, prioritizing the analysis of the time-domain window signal corresponding to a specific depth, combined with information such as step size and resolution in the command to generate a global scanning path. In this technical solution, the control unit can use existing models, such as a Transformer-based sequence-to-sequence path generation model or a reinforcement learning-based robotic arm scanning strategy generation model, to train the global scanning path generation model. In some embodiments, the generated global scanning path can be a three-dimensional spatial coordinate sequence, attitude compensation parameters, motion acceleration / deceleration curves, and a sampling trigger timetable. In one or more embodiments, a path optimization function may also be included, including minimum motion time, minimum vibration error, and maximum signal stability. By introducing optimization algorithms, the scanning trajectory can achieve higher execution efficiency and stability.
[0014] In this technical solution, after obtaining the global scanning path, the control module of the robotic arm is connected to control the robotic arm to move along the global scanning path and scan each acquisition point on the path. When the robotic arm moves to any acquisition point and its position stabilizes, the terahertz imaging unit acquires the terahertz time-domain waveform of the current acquisition point. Then, based on the terahertz time-domain waveform of each point, it is determined whether there are signal abnormalities in the scanning area.
[0015] If there are no signal anomaly areas on the global scan path, the detection can be completed directly and a corresponding detection report can be generated. If there are signal anomaly areas on the global scan path, a local scan path and optimized scanning method are generated for the signal anomaly areas. Then, the optimized scanning method is used to scan the signal anomaly areas along the local scan path to rescan the acquisition points therein in order to perform the optimization process.
[0016] During the optimization process, due to adjustments in the scanning method (e.g., scan step, terahertz probe angle, imaging mode), the terahertz time-domain waveforms at each acquisition point within the signal anomaly area are re-acquired. This process optimizes the terahertz time-domain waveform, and the completion of the optimization process is determined based on this optimized waveform. For example, can the optimized terahertz time-domain waveform confirm defect information data within the signal anomaly area, or can it correct deteriorated information data within the signal anomaly area? If the defect information data has been confirmed, and / or the deteriorated information data has been corrected, then the optimization process ends, and the original scanning method or the optimized scanning method can be used to continue completing the global scanning path. Otherwise, the local scanning path and optimized scanning method are further adjusted to scan the signal anomaly area again until the optimization process ends.
[0017] In this technical solution, the optimization process can be performed either during the execution of the global scan path or after the global scan path has been completed.
[0018] By utilizing the language decomposition capabilities and pre-trained decision-making abilities of the AI Agent, it is possible not only to generate a global scanning path from the acquired natural language instructions, but also to generate local scanning paths and optimized scanning methods for the optimization process. This allows for adjustments to the scanning path and method based on the terahertz time-domain waveforms at each acquisition point during terahertz detection. Compared to the existing technology of pre-setting paths and pre-programming trajectories to control the movement of the robotic arm, this method significantly simplifies the operation of terahertz scanning. Furthermore, the constructed global coverage and locally enhanced scanning method can significantly improve the detection rate and characterization accuracy of weak defects and complex areas without significantly increasing the total scanning time, making it better suited for complex detection scenarios.
[0019] In a preferred embodiment of the present invention, in order to significantly improve the generation efficiency of local scanning paths and optimized scanning methods, instead of directly judging based on terahertz time-domain waveforms, specific signal feature parameters are first extracted from terahertz time-domain waveforms, and then signal abnormal regions are determined based on the signal feature parameters, and local scanning paths and optimized scanning methods are generated.
[0020] Specifically, a first signal feature parameter is extracted based on the terahertz time-domain waveform, and an abnormal signal region is determined based on the first signal feature parameter, wherein the first signal feature parameter includes peak amplitude, signal-to-noise ratio, phase, and waveform distortion; a second signal feature parameter is extracted based on the optimized terahertz time-domain waveform, and the optimization process is determined based on the second signal feature parameter, wherein the extracted second signal feature parameter corresponds to the first signal feature parameter.
[0021] In this technical solution, for each acquisition point on the global or local scanning path, after obtaining or optimizing the terahertz time-domain waveform, feature parameters are extracted from the terahertz time-domain waveform.
[0022] In this technical solution, the extraction of signal feature parameters is accomplished using existing technologies. Peak amplitude refers to the peak amplitude of the primary reflection peak, secondary reflection peak, or other significant features extracted from the terahertz time-domain waveform. This is a direct basis for judging interface reflection intensity and identifying strong reflectors such as metals, voids, or strong absorbers. Signal-to-noise ratio (SNR) refers to the SNR value calculated at the current acquisition point. It is calculated as the ratio of the root mean square (RMS) value of the signal energy within the effective signal window to the RMS value of the noise energy in the no-signal area, expressed in decibels (dB). SNR is a core indicator for evaluating the data quality of a single acquisition point and the effectiveness of scanning conditions. Phase acquisition involves performing a Fast Fourier Transform (FFT) on the acquired terahertz time-domain waveform, a key indicator for calculating information such as sample refractive index and thickness. Waveform distortion is calculated by comparing the current waveform with a pre-stored baseline waveform template learned from a standard sample or a defect-free region, using correlation comparison or residual analysis to calculate its similarity or distortion. This indicator helps identify defects that are difficult to determine by a single peak value and cause changes in the overall waveform shape.
[0023] In this technical solution, a terahertz imaging unit is preferably used to extract signal feature parameters from the terahertz time-domain waveform and send the extracted signal feature parameters to the control unit. This effectively reduces the amount of data sent to the control unit and lowers the difficulty of analysis. Subsequently, the control unit performs online analysis and status classification of the signal feature parameters in real time. For example, it can determine the defect type and defect range within the abnormal signal region based on peak amplitude, phase, or waveform distortion. Alternatively, it can determine the signal degradation problem within the abnormal signal region based on the signal-to-noise ratio. Then, based on the specific problem, it generates a local scanning path and optimized scanning method for performing the optimization process.
[0024] In this technical solution, the simulated, unstructured terahertz time-domain signal is calculated in real time and transformed into a digital, structured feature information stream that includes time-domain amplitude, signal-to-noise ratio, phase, and waveform distortion measurement. This provides an intuitive and effective quantitative input for the AI Agent's decision-making, which helps to improve the generation efficiency of local scanning paths and optimized scanning methods, and significantly enhances the efficiency and accuracy of detection.
[0025] Further, based on at least one of the first signal characteristic parameters, namely peak amplitude, phase, and waveform distortion degree, the defect information data of the signal abnormal region is analyzed, and a first local scanning path and a first optimized scanning method are generated according to the defect information data. The robotic arm is controlled to move along the first local scanning path using the first optimized scanning method to perform the optimization process, obtain the optimized terahertz time-domain waveform of the acquisition point in the signal abnormal region, and extract the second signal characteristic parameter based on the optimized terahertz time-domain waveform. The defect information data is analyzed according to the second signal characteristic parameter until the defect information data is confirmed, at which point the optimization process ends.
[0026] In this technical solution, after acquiring the peak amplitude, phase, and waveform distortion of the acquisition points, the control unit analyzes the first signal characteristic parameters based on a pre-trained signal feature analysis model to determine defect information data such as the defect type, defect range, and defect degree of the abnormal signal region. Subsequently, the control unit generates a first local scan path and an optimized scan method based on a pre-trained optimization strategy library and the defect information data.
[0027] In this technical solution, during the optimization process based on the first local scan path and the optimized scan method, the optimized terahertz time-domain waveforms of each acquisition point in the signal anomaly region are obtained. The acquisition points on the first local scan path can be the same as or different from those on the global scan path.
[0028] After acquiring the optimized terahertz time-domain waveform, the second signal characteristic parameters are extracted and sent to the control unit. The control unit also analyzes the defect information data. Because the optimization strategy library uses a more targeted scanning method, it can obtain more accurate defect information data. For example, it can use a higher resolution scanning method to obtain clearer defect boundaries and further confirm the type of defect information data. After the defect information data is finally confirmed, the optimization process ends.
[0029] Furthermore, the waveform distortion degree is determined based on the difference between the terahertz time-domain waveform or the optimized terahertz time-domain waveform and the baseline waveform template. A first abnormal result is generated when the waveform distortion degree is greater than a first threshold. The difference between the peak amplitude of the current acquisition point and the peak amplitude of the adjacent acquisition points is obtained. A second abnormal result is generated when the peak amplitude difference is greater than a second threshold. The phase difference between the phase of the current acquisition point and the phase of the reference point is obtained. A third abnormal result is generated when the phase difference is greater than a third threshold. The defect information data of the abnormal area is analyzed based on the first abnormal result, the second abnormal result, and the third abnormal result.
[0030] In this technical solution, the waveform distortion degree is mainly based on the degree of difference between the terahertz time-domain waveform and the baseline waveform template. For example, if a new reflection peak appears in the acquired terahertz time-domain waveform, or the amplitude or position of the main peak exceeds the preset confidence interval, the waveform distortion degree will be greater than the first threshold and the first abnormal result will be generated.
[0031] In this technical solution, the peak amplitude characteristic is determined based on the difference between the peak amplitude of the current acquisition point and the peak amplitude of the adjacent acquisition points. If the difference is greater than the second threshold, for example, more than three times the standard deviation, and exceeds the fluctuation range that may be caused by the natural uniformity of the material, a second abnormal result is generated.
[0032] In this technical solution, the phase difference between the phase of the current acquisition point and the phase of the reference point is obtained. When the phase difference is greater than the third threshold, it indicates that the refractive index, thickness and other indicators of the material are abnormal, and a third abnormal result is generated.
[0033] Ultimately, the control unit outputs defect information data based on at least one of the first abnormal result, the second abnormal result, and the third abnormal result.
[0034] Furthermore, based on the signal-to-noise ratio (SNR) analysis of the acquisition points, the degradation information data of the signal abnormal region is analyzed, and a second local scanning path and a second optimized scanning method are generated according to the degradation information data. The robotic arm is controlled to move along the second local scanning path using the second optimized scanning method to perform the optimization process, acquire the optimized terahertz time-domain waveform of the acquisition points in the signal abnormal region, extract the SNR based on the optimized terahertz time-domain waveform, analyze the degradation information data according to the SNR, and the optimization process ends after the degradation information data is eliminated. The acquisition points of the global scanning path are then scanned using the second optimized scanning method that eliminates the degradation information data.
[0035] In this technical solution, after acquiring the signal-to-noise ratio (SNR) of the acquisition points, the control unit also analyzes the SNR based on a pre-trained signal feature analysis model to determine the degradation information data of signal abnormal areas. Subsequently, the control unit generates a second local scan path and an optimized scan method based on a pre-trained optimization strategy library and the degradation information data.
[0036] In this technical solution, during the optimization process based on the second local scan path and the optimized scan method, the optimized terahertz time-domain waveforms of each acquisition point in the signal anomaly region are obtained. The acquisition points on the second local scan path can be the same as or different from those on the global scan path.
[0037] After acquiring the optimized terahertz time-domain waveform, the signal-to-noise ratio (SNR) is extracted and sent to the control unit. The control unit analyzes the SNR to determine whether the SNR degradation has been resolved. In one or more embodiments, the second optimized scanning method may involve adjusting parameters such as the angle of the terahertz probe and the distance between the probe and the sample surface. If the SNR degradation has been resolved, the second optimized scanning method is used to continue scanning subsequent acquisition points on the global scanning path. Otherwise, a new second optimized scanning method and a second local scanning path are generated, and the scanning parameters are continuously optimized until the optimization process ends.
[0038] Furthermore, the signal-to-noise ratio (SNR) of the current acquisition point and the SNR of adjacent acquisition points are obtained. When the SNR of each acquisition point shows a monotonically decreasing trend and the cumulative decrease in SNR exceeds the fourth threshold, a fourth abnormal result is generated. When the difference between the SNR of the acquisition point and the average SNR of the surrounding acquisition points exceeds the fifth threshold, a fifth abnormal result is generated. Based on the fourth and fifth abnormal results, the deterioration information data of the abnormal area is analyzed.
[0039] In this technical solution, when the signal-to-noise ratio (SNR) at each acquisition point shows a monotonically decreasing trend and the cumulative decrease in SNR exceeds a fourth threshold, such as 5 dB, the SNR trend is determined to be deteriorating. When the difference between the SNR at the acquisition point and the average SNR of surrounding acquisition points exceeds a fifth threshold, the current acquisition point is determined to be in a low-quality scanning state. Based on this judgment, a fourth or fifth abnormal result is generated, triggering a signal quality optimization strategy. The control unit attempts to adjust the second optimized scanning method; for example, instructing the robotic arm to fine-tune the distance or angle between the probe and the sample surface to optimize coupling, or automatically reducing the scanning speed and increasing the signal averaging frequency in the abnormal signal region to improve data quality. Once the control unit determines that the deteriorated data has disappeared, the optimized parameters can be used to continue subsequent scans.
[0040] In this technical solution, based on the optimized scanning of abnormal peak amplitude, phase, and waveform distortion, the boundary and type of defects can be more accurately identified during local enhancement, effectively improving the detection rate, positioning accuracy, and overall efficiency of weak and diffuse defects. At the same time, based on the sudden decrease and deterioration trend of signal-to-noise ratio, the optimized scanning method can be identified locally, and the signal quality of global scanning can be further improved. The entire process is executed in a closed loop and can be iteratively optimized, significantly improving the targeting and effectiveness of detection.
[0041] Furthermore, a device capability knowledge base is established based on the physical parameters of the robotic arm and the terahertz imaging unit. The control parameters are compared and verified item by item with the physical parameters. A global scanning path is generated based on the detection target and the verified control parameters.
[0042] In this technical solution, a pre-defined equipment capability knowledge base is established based on the physical parameters of the robotic arm and terahertz imaging unit, along with a matching and verification mechanism. Before generating a global scanning path decision, the matching and verification mechanism compares the control parameters parsed from the natural language instructions with the control parameters in the equipment capability knowledge base item by item to determine whether the desired control parameters can be effectively executed by the robotic arm and terahertz imaging unit. If so, the global scanning path is subsequently generated based on the verified control parameters and the detection target; otherwise, feedback is sent to the user window in natural language, prompting the user to reset the control parameters.
[0043] In this technical solution, the setup of the equipment capability knowledge base and matching verification mechanism is not simply data verification. Instead, by taking the physical feasibility of the equipment as the core boundary condition for decision-making, it fundamentally prevents the generation of invalid or dangerous instructions, which is a key guarantee for the control system to safely and reliably control precision equipment.
[0044] Furthermore, when the robotic arm moves to the current acquisition point, it outputs a position stabilization signal. Based on the position stabilization signal, the terahertz imaging unit is controlled to acquire the terahertz time-domain waveform of the current acquisition point. After the acquisition is completed, the robotic arm moves to the next acquisition point.
[0045] In this technical solution, a hardware-level synchronization mechanism is adopted. Its control logic is as follows: when the robotic arm reaches the target acquisition point, it outputs a position stabilization signal. Then, the FPGA module receives the position stabilization signal and synchronously triggers the transmitter module of the terahertz imaging unit and the high-speed data acquisition card to complete the acquisition of the terahertz time-domain waveform at the current acquisition point. After the acquisition is completed, the robotic arm moves to the next acquisition point.
[0046] In this technical solution, nanosecond-level synchronous control is achieved through an FPGA module, avoiding millisecond-level delay errors caused by software triggering. The spatiotemporal relationship between motion, emission, and sampling is locked at the physical level, which helps to ensure high-precision and repeatable detection and solves the timing mismatch problem between the upper-level decision-making and the lower-level precision execution of the artificial intelligence agent.
[0047] Furthermore, after completing the scanning of all acquisition points along the global scanning path, a detection report is output, which includes an imaging map, abnormal area data, and optimized scanning methods.
[0048] Another object of the present invention is to provide a terahertz detection system based on an artificial intelligence agent, which employs the detection method described in any of the foregoing claims, the terahertz detection system comprising:
[0049] A robotic arm is used to carry a terahertz probe and move it along the global scanning path and the local scanning path.
[0050] The terahertz imaging unit is used to acquire or optimize the terahertz time-domain waveform of the acquisition point after the robotic arm reaches the acquisition point on the global scanning path or local scanning path.
[0051] The control unit is used to extract detection targets and control parameters based on natural language instructions, generate a global scanning path based on the detection targets and control parameters, determine signal abnormal regions based on the terahertz time-domain waveforms of the acquisition points, generate local scanning paths and optimized scanning methods, and determine whether the optimization process has ended based on the optimized terahertz time-domain waveforms acquired at the acquisition points in the signal abnormal regions.
[0052] In this technical solution, the control unit serves as the core decision-making layer, while the robotic arm and terahertz imaging unit act as the execution layer. The control unit employs an AI agent for data analysis and decision-making.
[0053] In some embodiments, the control unit has a large language model that allows users to input natural language commands and parse these commands to obtain detection targets and control parameters. For example, users can input natural language commands such as "scan the central area of the sample with a resolution of 0.1 mm", "detect internal defects within a 2 mm range around the solder joint", and "scan the curved area with high precision".
[0054] In some embodiments, the control unit has a global scan path generation model, which learns and internalizes a set of rules by analyzing historical data, domain literature, and expert experience to associate different types of detection targets with the most effective terahertz imaging methods. For example, for detection targets that image the internal structure of curved composite materials, the preferred imaging method is a curved adaptive scanning combined with synthetic aperture focusing technology algorithm.
[0055] In some embodiments, the control unit has a signal feature analysis model, which can learn from a training dataset, such as samples of known defects and their corresponding terahertz signals, to establish a mapping relationship from signal feature parameters to defect information data and deterioration information data, so as to obtain defect information data and deterioration information data based on the acquired signal feature parameters.
[0056] In some embodiments, the control unit has an optimization strategy library. Optimization strategies for different scenarios, such as local refinement and angle fine-tuning, along with their triggering conditions, are parameterized and stored in the optimization strategy library. These strategies can be validated a priori in a virtual simulation environment to evaluate their effectiveness and cost-efficiency in detecting different defects, such as the percentage increase in detection rate and the increase in time, providing a priority reference for real-time decision-making.
[0057] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0058] 1. This invention utilizes the language decomposition capabilities and pre-trained decision-making abilities of an AI Agent. It can not only generate a global scanning path through acquired natural language instructions, but also generate local scanning paths and optimized scanning methods for the optimization process. This allows for adjustments to the scanning path and scanning method based on the terahertz time-domain waveforms at each acquisition point during terahertz detection. Compared to the existing technology that pre-sets the path and then pre-programs the trajectory to control the movement of the robotic arm, this invention significantly simplifies the operation of terahertz detection. Furthermore, the globally covered and locally enhanced scanning method can significantly improve the detection rate and characterization accuracy of weak defects and complex areas without significantly increasing the total scanning time, making it better suited for complex detection scenarios.
[0059] 2. This invention calculates and transforms simulated, unstructured terahertz time-domain signals in real time into a digital, structured feature information stream that includes time-domain amplitude, signal-to-noise ratio, phase, and waveform distortion measurement. This provides an intuitive and effective quantitative input for AI Agent decision-making, which helps improve the generation efficiency of local scanning paths and optimized scanning methods, and significantly enhances the efficiency and accuracy of detection.
[0060] 3. Based on the optimized scanning of abnormal peak amplitude, phase, and waveform distortion, this invention can more accurately confirm the boundary and type of defects during local enhancement, effectively improving the detection rate, positioning accuracy, and overall efficiency of weak and diffuse defects. At the same time, based on the sudden decrease and deterioration trend of signal-to-noise ratio, it can locally confirm the optimized scanning method and further improve the signal quality of global scanning. The entire process is executed in a closed loop and can be iteratively optimized, significantly improving the targeting and effectiveness of detection.
[0061] 4. The device capability knowledge base and matching verification mechanism of this invention are not simply data verification, but rather prevent the generation of invalid or dangerous instructions by taking the physical feasibility of the device as the core boundary condition for decision-making. This is a key guarantee for the control system to safely and reliably control precision equipment.
[0062] 5. This invention employs a hardware-level synchronization mechanism to avoid millisecond-level delay errors caused by software triggering. It locks the spatiotemporal relationship between motion, emission, and sampling at the physical level, which helps to ensure high-precision and repeatable detection and solves the timing mismatch problem between the upper-level decision-making and the lower-level precise execution of the artificial intelligence agent. Attached Figure Description
[0063] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0064] Figure 1This is a flowchart of the terahertz detection method in a specific embodiment of the present invention;
[0065] Figure 2 This is a flowchart of the terahertz detection method in a specific embodiment of the present invention. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0067] In the description of this invention, it should be understood that the terms "front", "rear", "left", "right", "up", "down", "vertical", "horizontal", "high", "low", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the scope of protection of this invention.
[0068]
Example 1
[0069] like Figure 1 and Figure 2 The terahertz detection method based on artificial intelligence agents, as shown, includes the following steps:
[0070] Obtain natural language instructions, extract detection targets and control parameters based on the natural language instructions, and generate a global scanning path based on the detection targets and control parameters;
[0071] The robotic arm equipped with a terahertz probe is controlled to move along the global scanning path to collect terahertz time-domain waveforms at the collection points on the global scanning path.
[0072] Based on the terahertz time-domain waveforms at the acquisition points, the abnormal signal regions are determined, and local scanning paths and optimized scanning methods are generated.
[0073] The robotic arm is controlled to move along the local scanning path to perform an optimization process. The optimized terahertz time-domain waveform of the acquisition point in the signal abnormal area is acquired using the optimized scanning method. Based on the optimized terahertz time-domain waveform, it is determined whether the optimization process has ended. If yes, the optimization process ends; if no, the local scanning path and / or optimized scanning method are adjusted and the optimization process continues.
[0074] In some embodiments, the control parameters may be one or more of the following: scanning area parameters, area shape, area size, spatial coordinate range, scanning accuracy parameters, spatial resolution, step size, signal sampling accuracy, scanning mode parameters, grid scanning, spiral scanning, surface adaptive scanning, local enhancement scanning, scanning priority parameters, accuracy priority, speed priority, and full coverage priority.
[0075] In some embodiments, the generated global scan path can be a three-dimensional spatial coordinate sequence, attitude compensation parameters, motion acceleration / deceleration curves, and sampling trigger timetable. In one or more embodiments, a path optimization function may also be included, including minimum motion time, minimum vibration error, maximum signal stability, etc. By introducing optimization algorithms, the scan trajectory can have higher execution efficiency and stability.
[0076] In some preferred embodiments, an optimization process is performed during the execution of the global scan path.
[0077] In some preferred embodiments, a first signal feature parameter is extracted based on the terahertz time-domain waveform, and an abnormal signal region is determined based on the first signal feature parameter, wherein the first signal feature parameter includes peak amplitude, signal-to-noise ratio, phase, and waveform distortion; a second signal feature parameter is extracted based on the optimized terahertz time-domain waveform, and the optimization process is determined based on the second signal feature parameter, wherein the extracted second signal feature parameter corresponds to the first signal feature parameter.
[0078] In one or more embodiments, for terahertz time-domain waveforms, peak amplitude, signal-to-noise ratio (SNR), phase, and waveform distortion need to be extracted and output to the control unit to determine whether the acquisition point is abnormal. For optimized terahertz time-domain waveforms, since the optimization process is already determined, the extracted second signal feature parameters match the first signal feature parameters. For example, if the SNR is abnormal in the first signal feature parameters, then the optimization process focuses on optimizing the SNR extracted from the terahertz time-domain waveform. In one or more embodiments, the second signal feature parameters can also completely correspond to the first signal feature parameters, including peak amplitude, SNR, phase, and waveform distortion, which is beneficial for detecting new defects after the SNR problem is solved.
[0079] In some preferred embodiments, a device capability knowledge base is established based on the physical parameters of the robotic arm and the terahertz imaging unit. The control parameters are compared and verified item by item with the physical parameters. A global scanning path is generated based on the detection target and the verified control parameters. In one or more embodiments, the verification items of the matching verification mechanism include: mechanical constraint verification, robotic arm travel range, joint angle limits, repeatability accuracy, terahertz system constraint verification, focal length range, spot size, upper limit of transmission power, sampling system constraint verification, ADC sampling frequency, and maximum data throughput. In some embodiments, if a mismatch exists, the resolution can be automatically reduced and the scanning mode adjusted, or the user can be prompted to modify the parameters.
[0080] In some preferred embodiments, when the robotic arm moves to the current acquisition point, it outputs a position stabilization signal. Based on the position stabilization signal, the terahertz imaging unit is controlled to acquire the terahertz time-domain waveform of the current acquisition point. After the acquisition is completed, the robotic arm moves to the next acquisition point.
[0081] In some preferred embodiments, after scanning all acquisition points on the global scanning path, a detection report is output, which includes an imaging map, abnormal area data, and optimized scanning method.
[0082] In one or more embodiments, for defect detection, the imaging map can simultaneously generate a depth profile and a three-dimensional reflection intensity map. For material analysis, the imaging map can generate a refractive index distribution map or an absorption coefficient map.
[0083] In one or more embodiments, abnormal region data can be labeled on the imaging map, and preliminary classification suggestions can be given based on its characteristics, such as suspected stratification or suspected voids.
[0084] In one or more embodiments, adaptive replanning events triggered during the scanning process are recorded, and subsequent detection suggestions can be given based on pre-learned knowledge, such as suggesting that a certain area be re-examined at a higher frequency.
[0085]
Example 2
[0086] Based on Example 1, the defect information data of the abnormal signal region is analyzed based on at least one of the first signal characteristic parameters, namely peak amplitude, phase, and waveform distortion degree of the acquisition point, and a first local scanning path and a first optimized scanning method are generated according to the defect information data.
[0087] The robotic arm is controlled to move along the first local scanning path using a first optimized scanning method to perform an optimization process, acquire the optimized terahertz time-domain waveform of the acquisition point in the signal abnormal region, extract the second signal feature parameters based on the optimized terahertz time-domain waveform, analyze the defect information data according to the second signal feature parameters, and the optimization process ends after the defect information data is confirmed.
[0088] The waveform distortion degree is determined based on the difference between the terahertz time-domain waveform or the optimized terahertz time-domain waveform and the baseline waveform template. A first abnormal result is generated when the waveform distortion degree is greater than a first threshold. The difference between the peak amplitude of the current acquisition point and the peak amplitude of the adjacent acquisition points is obtained. A second abnormal result is generated when the peak amplitude difference is greater than a second threshold. The phase difference between the phase of the current acquisition point and the phase of the reference point is obtained. A third abnormal result is generated when the phase difference is greater than a third threshold.
[0089] Based on the first, second, and third abnormal results, analyze the defect information data of the abnormal area.
[0090] In some preferred embodiments, once the defect information data is initially determined, a relevant optimization strategy is triggered. For example, the control unit will automatically generate a higher resolution local fine scan path centered on the abnormal acquisition point, such as reducing the step size to 1 / 5 of the original plan, as the first local scan path to accurately delineate the geometry and boundaries of the defect. The execution queue of the optimization process can also be dynamically inserted into the execution queue of the global scan path for priority execution, so as to complete the local enhanced detection during the detection process.
[0091]
Example 3
[0092] Based on the above embodiments, the degradation information data of the signal abnormal area is analyzed based on the signal-to-noise ratio of the acquisition points, and a second local scanning path and a second optimized scanning method are generated according to the degradation information data;
[0093] The control robot arm moves along the second local scanning path using the second optimized scanning method to perform the optimization process, acquires the optimized terahertz time-domain waveform of the acquisition points in the signal abnormal region, extracts the signal-to-noise ratio based on the optimized terahertz time-domain waveform, analyzes the degradation information data based on the signal-to-noise ratio, and the optimization process ends after the degradation information data is eliminated. The second optimized scanning method that eliminates the degradation information data is then used to scan the acquisition points of the global scanning path.
[0094] The signal-to-noise ratio (SNR) of the current acquisition point and the SNR of adjacent acquisition points are obtained. When the SNR of each acquisition point shows a monotonically decreasing trend and the cumulative decrease in SNR exceeds the fourth threshold, a fourth abnormal result is generated. When the difference between the SNR of the acquisition point and the average SNR of the surrounding acquisition points exceeds the fifth threshold, a fifth abnormal result is generated. Based on the fourth and fifth abnormal results, the deterioration information data of the abnormal area is analyzed.
[0095]
Example 4
[0096] Based on the above embodiments, a terahertz detection system based on artificial intelligence agents includes:
[0097] A robotic arm is used to carry a terahertz probe and move it along the global scanning path and the local scanning path.
[0098] The terahertz imaging unit is used to acquire or optimize the terahertz time-domain waveform of the acquisition point after the robotic arm reaches the acquisition point on the global scanning path or local scanning path.
[0099] The control unit is used to extract detection targets and control parameters based on natural language instructions, generate a global scanning path based on the detection targets and control parameters, determine signal abnormal regions based on the terahertz time-domain waveforms of the acquisition points, generate local scanning paths and optimized scanning methods, and determine whether the optimization process has ended based on the optimized terahertz time-domain waveforms acquired at the acquisition points in the signal abnormal regions.
[0100]
Example 5
[0101] To intuitively demonstrate the workflow of this invention, this embodiment takes the internal defect detection of aerospace carbon fiber composite panels as an example, showing step by step how to achieve end-to-end intelligent detection from task reception to result delivery. The detection target is to perform high-precision, adaptive internal non-destructive testing on a carbon fiber composite panel with dimensions of 100mm × 100mm × 3mm, focusing on identifying two types of defects: delamination and debonding, and automatically generating a structured report.
[0102] S0: Pre-training and building of the model and database before detection begins. Specifically, when building the global scan path generation model, the AI Agent autonomously learns and summarizes patterns by analyzing a historical database containing sample data from over 1000 different materials and defects. For example, when the target is carbon fiber delamination, the system prioritizes the reflective scanning imaging mode and automatically sets the focus on two signal characteristic parameters: peak amplitude and phase. When building the signal feature analysis model, the AI Agent internalizes a set of judgment rules through machine learning training. For example, when the main reflection peak shows an abnormal delay (>1.5 nanoseconds), it likely corresponds to deep debonding; when the waveform distortion is significantly increased (>0.3), it indicates the possible presence of interface discontinuities or microcracks. When building the optimization strategy library, a series of optimization strategies are predefined and validated to address common problems encountered in scanning. For example, in the quality optimization strategy, when the real-time signal-to-noise ratio (SNR) is below 15dB, the scanning speed is automatically reduced and the number of single-point signal averaging times is increased; for example, in the anomaly focusing strategy, when an abnormal peak is detected, a higher resolution local fine scan is immediately initiated around the abnormal point; and for example, in the edge adaptation strategy, when the acquisition point is close to the sample boundary or curved surface, the surface tracking scanning mode is automatically switched to keep the terahertz beam perpendicular to the surface.
[0103] The selection, establishment, and pre-training of AI agents, their models, and databases can be implemented using existing technologies, and this invention does not impose specific limitations.
[0104] S1: During inspection, the user inputs: Please scan the 10mm×10mm area in the center of this carbon fiber board at a resolution of 0.1mm, focusing on finding delamination and debonding defects.
[0105] S2: The AI Agent uses its natural language processing capabilities to deconstruct the above instructions into precise parameters that can be executed by the machine:
[0106] Spatial parameters: Region: Central rectangle, Coordinates: (-5mm, 5mm, -5mm, 5mm), Height: 0mm;
[0107] Accuracy parameters: Scan step size: 0.1mm;
[0108] Target parameters: Defect type: [delamination, debonding], Correlated features: [peak delay, waveform distortion];
[0109] Mode parameters: Imaging mode: Reflective scan.
[0110] S3: The system compares the structured parameters with the built-in equipment capability knowledge base item by item to perform a physical feasibility check.
[0111] The target area (±5mm) is within the working range of the robotic arm (±200mm);
[0112] The scanning plane height (z=0mm) is greater than the minimum focusing distance (0.5mm);
[0113] The sampling density required for 0.1mm resolution does not exceed the maximum throughput of the data acquisition card;
[0114] Once all constraints are met, the task is marked as safe to execute. If any constraint is not met, the system will automatically adjust the parameters or prompt the user to make corrections, fundamentally preventing equipment damage or detection failures caused by exceeding parameter limits.
[0115] S4: Based on the validated parameters, the path planning algorithm takes into account both time efficiency and motion stability to generate a serpentine coverage scan path and calculates the motion speed, acceleration, and terahertz trigger timetable for each point.
[0116] S5: The planned instructions are sent to the execution layer. After the robotic arm moves to a planned point and stabilizes, its controller immediately sends a position lock hard-wire signal to the FPGA module. The FPGA then synchronously triggers the terahertz pulse emission and the start of the high-speed data acquisition card.
[0117] S6: After scanning begins, the system enters a "sensing-decision" cycle. At the acquisition point (-3.2mm, 1.5mm), the system acquires a terahertz time-domain waveform and calculates a set of feature vectors in real time:
[0118] Peak amplitude: 1.2V, signal-to-noise ratio: 18dB, phase difference: 0.12rad, waveform distortion: 0.25.
[0119] This set of quantified features is uploaded to the AI Agent decision-making module in real time.
[0120] S7: After receiving the feature vector, the AI Agent starts the analysis:
[0121] Judgment: The current peak amplitude (1.2V) is slightly lower than the preset normal material reference (1.5V), and there is a slight phase shift. Based on the pre-learned model, it is preliminarily judged that there may be a slight anomaly or slight change in material properties at this point.
[0122] Decision: Trigger the abnormal focus strategy in the optimization strategy library.
[0123] Execution: The AI Agent immediately generates a high-priority subtask to perform a fine re-examination scan with a resolution of 0.05mm on a 2mm×2mm area centered at (-3.2mm, 1.5mm). This instruction is dynamically inserted into the execution queue.
[0124] After the robotic arm performs a detailed local scan, the new data shows that the features have returned to the normal range. The AI Agent determines this as a false alarm or an acceptable natural fluctuation, so it exits the replanning process and commands the system to continue executing the original large-scale scanning task.
[0125] S8: After all scans are completed, the system automatically calls the pre-learned imaging algorithm to reconstruct the time-domain signal data of the entire domain into a two-dimensional C-scan image and a three-dimensional depth profile of the internal structure, intuitively displaying the internal condition of the material.
[0126] The terms "first," "second," etc., used in this invention (e.g., first local scan path, second local scan path, etc.) are merely for clarity of description and are not intended to limit any order or emphasize importance. Furthermore, the term "connection" used in this invention, unless otherwise specified, can refer to a direct connection or an indirect connection via other components.
[0127] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A terahertz detection method based on artificial intelligence agents, characterized in that, Includes the following steps: Obtain natural language instructions, extract detection targets and control parameters based on the natural language instructions, and generate a global scanning path based on the detection targets and control parameters; The robotic arm equipped with a terahertz probe is controlled to move along the global scanning path to collect terahertz time-domain waveforms at the collection points on the global scanning path. Based on the terahertz time-domain waveforms at the acquisition points, the abnormal signal regions are determined, and local scanning paths and optimized scanning methods are generated. The robotic arm is controlled to move along the local scanning path to perform an optimization process. The optimized terahertz time-domain waveform of the acquisition point in the signal abnormal area is acquired using the optimized scanning method. Based on the optimized terahertz time-domain waveform, it is determined whether the optimization process has ended. If yes, the optimization process ends; if no, the local scanning path and / or optimized scanning method are adjusted and the optimization process continues.
2. The terahertz detection method based on artificial intelligence agents according to claim 1, characterized in that, Based on the terahertz time-domain waveform, first signal feature parameters are extracted, and signal abnormal regions are determined according to the first signal feature parameters. The first signal feature parameters include peak amplitude, signal-to-noise ratio, phase, and waveform distortion. The second signal feature parameter is extracted based on the optimized terahertz time-domain waveform, and the optimization process is determined based on the second signal feature parameter. The extracted second signal feature parameter corresponds to the first signal feature parameter.
3. The terahertz detection method based on artificial intelligence agents according to claim 2, characterized in that, Based on at least one of the first signal characteristic parameters, namely peak amplitude, phase, and waveform distortion, the defect information data of the abnormal signal region is analyzed, and a first local scanning path and a first optimized scanning method are generated according to the defect information data. The control robot arm moves along the first local scanning path using a first optimized scanning method to perform an optimization process, acquires the optimized terahertz time-domain waveform of the acquisition point in the signal abnormal region, extracts the second signal feature parameters based on the optimized terahertz time-domain waveform, analyzes the defect information data based on the second signal feature parameters, and the optimization process ends after the defect information data is confirmed.
4. The terahertz detection method based on artificial intelligence agents according to claim 3, characterized in that, The waveform distortion degree is determined based on the difference between the terahertz time-domain waveform or the optimized terahertz time-domain waveform and the baseline waveform template. A first abnormal result is generated when the waveform distortion degree is greater than a first threshold. The difference between the peak amplitude of the current acquisition point and the peak amplitude of the adjacent acquisition points is obtained. A second abnormal result is generated when the peak amplitude difference is greater than a second threshold. The phase difference between the phase of the current acquisition point and the phase of the reference point is obtained. A third abnormal result is generated when the phase difference is greater than a third threshold. Based on the first, second, and third abnormal results, analyze the defect information data of the abnormal area.
5. The terahertz detection method based on an artificial intelligence agent according to claim 2, characterized in that, Based on the signal-to-noise ratio analysis of the acquisition points, the degradation information data of the abnormal signal region is used to generate a second local scanning path and a second optimized scanning method according to the degradation information data. The robotic arm is controlled to move along the second local scanning path using the second optimized scanning method to perform the optimization process, acquire the optimized terahertz time-domain waveform of the acquisition points in the signal abnormal region, extract the signal-to-noise ratio based on the optimized terahertz time-domain waveform, analyze the degradation information data based on the signal-to-noise ratio, and the optimization process ends after the degradation information data is eliminated. The second optimized scanning method that eliminates the degradation information data is then used to scan the acquisition points of the global scanning path.
6. The terahertz detection method based on artificial intelligence agents according to claim 5, characterized in that, The signal-to-noise ratio (SNR) of the current acquisition point and the SNR of adjacent acquisition points are obtained. When the SNR of each acquisition point shows a monotonically decreasing trend and the cumulative decrease in SNR exceeds the fourth threshold, a fourth abnormal result is generated. When the difference between the SNR of the acquisition point and the average SNR of the surrounding acquisition points exceeds the fifth threshold, a fifth abnormal result is generated. Based on the fourth and fifth abnormal results, the deterioration information data of the abnormal area is analyzed.
7. A terahertz detection method based on an artificial intelligence agent according to any one of claims 1 to 6, characterized in that, A device capability knowledge base is established based on the physical parameters of the robotic arm and the terahertz imaging unit. The control parameters are compared and verified item by item with the physical parameters. A global scanning path is generated based on the detection target and the verified control parameters.
8. A terahertz detection method based on an artificial intelligence agent according to any one of claims 1 to 6, characterized in that, When the robotic arm moves to the current acquisition point, it outputs a position stabilization signal. Based on the position stabilization signal, the terahertz imaging unit is controlled to acquire the terahertz time-domain waveform of the current acquisition point. After the acquisition is completed, the robotic arm moves to the next acquisition point.
9. A terahertz detection method based on an artificial intelligence agent according to any one of claims 1 to 6, characterized in that, After completing the scanning of all acquisition points along the global scanning path, a detection report is output, which includes an imaging map, abnormal area data, and optimized scanning methods.
10. A terahertz detection system based on artificial intelligence agents, characterized in that, The terahertz detection method based on an artificial intelligence agent according to any one of claims 1 to 9, wherein the terahertz detection system comprises: A robotic arm is used to carry a terahertz probe and move it along the global scanning path and the local scanning path. The terahertz imaging unit is used to acquire or optimize the terahertz time-domain waveform of the acquisition point after the robotic arm reaches the acquisition point on the global scanning path or local scanning path. The control unit is used to extract detection targets and control parameters based on natural language instructions, generate a global scanning path based on the detection targets and control parameters, determine signal abnormal regions based on the terahertz time-domain waveforms of the acquisition points, generate local scanning paths and optimized scanning methods, and determine whether the optimization process has ended based on the optimized terahertz time-domain waveforms acquired at the acquisition points in the signal abnormal regions.