Quick switching multi-array light source control system and method for defect detection

By designing a fast switching multi-array light source control system, using FPGA processing module and PID algorithm to achieve rapid control and precise adjustment of light sources, the problems of slow response speed and unstable light in traditional light source control systems are solved, and the overall performance of the system and the service life of the light source are improved.

CN119946935APending Publication Date: 2025-05-06GUANGZHOU HEYISIHUI ELECTRONIC INFORMATION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510086533.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Traditional light source control systems have slow response speeds and cannot meet the demand for high-speed shutdown of light sources in high-speed imaging and machine vision. In addition, light sources will experience light decay during long-term use, resulting in unstable light intensity.

Method used

A fast switching multi-array light source control system is designed, including power supply module, light source controller module and human-computer interaction module. The closed-loop control system is formed using FPGA processing module, light source module and feedback module to achieve rapid control and precise adjustment of light sources, and efficient human-computer interaction is achieved through PID algorithm and EtherCAT bus.

Benefits of technology

It improves the response speed and adjustment accuracy of the light source, extends the service life of the light source, reduces energy consumption, and maintains the stability of light. It is suitable for defect detection and other applications that require high-precision light source control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946935A_ABST
    Figure CN119946935A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of light source controllers, and discloses a fast switching multi-array light source control system and method for defect detection. The system comprises a power supply module, a light source controller module and a man-machine interaction module, the power supply module is respectively connected to the light source controller module and the man-machine interaction module, and the man-machine interaction module is connected with the light source controller module; the power supply module is used for supplying power to the light source controller module and the man-machine interaction module; the man-machine interaction module is used for generating a control instruction, sending the control instruction to the light source controller module and visually displaying light source parameters in the light source controller module; and the light source controller module is used for generating light conforming to the control instruction. By means of the fast switching multi-array light source control system for defect detection, the precise adjustability and stability of the light sources can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of light source controllers, and in particular to a fast switching multi-array light source control system and method for defect detection. Background Art

[0002] As an indispensable part of modern production and life, light sources have been widely used in many fields such as lighting, display, industrial detection, medical equipment, image processing, etc. Especially in application scenarios such as precision manufacturing, intelligent monitoring and scientific experiments, the quality and performance of light sources directly affect the working effect and stability of the system.

[0003] With the advancement of science and technology, production and life have put forward higher requirements for the control accuracy of light sources, especially the precise control of light intensity. In many industrial production and scientific research experiments, the stability and adjustment ability of the light source directly determine the quality of the final product. For example, in automated production inspection, stable and adjustable light intensity helps to improve the recognition accuracy of the image processing system; in medical equipment, precise light intensity can provide better imaging effects and help doctors make accurate judgments on the condition.

[0004] However, with the rapid development of image processing technology, especially in the fields of high-speed imaging and machine vision, higher requirements are placed on the response speed of light sources. Due to its slow response speed, the traditional light source control system cannot meet the requirements of these applications for high-speed light source shutdown, which limits the overall performance of the system to a certain extent. Fast shutdown can not only improve the responsiveness of the system, but also extend the service life of the light source and reduce unnecessary energy consumption. Therefore, the development of a multi-light source control system that can achieve high-speed control, accurately adjust the light intensity, and has the advantages of fast response and long life has become a technical problem that needs to be solved in the current field of light source control.

[0005] In addition, traditional light sources will experience light decay during long-term use, that is, the brightness of the light source gradually decreases as the use time increases. This phenomenon will cause unstable light intensity, thus affecting the normal operation of the system. Although the light decay problem is relatively minor, it still needs to be considered and solved to maintain long-term light stability. Therefore, how to slow down light decay and maintain light stability is also an important problem in light source control technology. Summary of the invention

[0006] The purpose of the embodiments of the present invention is to provide a fast switching multi-array light source control system and method for defect detection, which can improve the precise adjustability and stability of the light source.

[0007] To solve the above technical problems, one embodiment of the present invention provides a fast switching multi-array light source control system for defect detection, the system comprising: a power supply module, a light source controller module and a human-computer interaction module;

[0008] The power supply module is connected to the light source controller module and the human-computer interaction module respectively, and the human-computer interaction module is connected to the light source controller module;

[0009] The power supply module is used to supply power to the light source controller module and the human-computer interaction module;

[0010] The human-computer interaction module is used to generate control instructions, send the control instructions to the light source controller module, and visualize the light source parameters in the light source controller module;

[0011] The light source controller module is used to generate light that complies with the control instruction.

[0012] In addition, the light source controller module is composed of an FPGA processing module, a light source module, and a feedback module connected in sequence and end to end;

[0013] The FPGA processing module is used to exchange data with the human-computer interaction module and to send control instructions of the human-computer interaction module to the light source module;

[0014] The light source module is used to generate light according to the control instruction;

[0015] The feedback module is used to generate a feedback signal according to the light, and send the feedback signal to the FPGA processing module;

[0016] The FPGA processing module is also used to update the control instruction according to the feedback signal transmitted by the feedback module.

[0017] In addition, the FPGA processing module includes: an EtherCAT unit, an operation processing unit, a storage unit, and a PWM output unit;

[0018] The EtherCAT unit is connected to the operation processing unit;

[0019] The operation processing unit is respectively connected to the operation processing unit, the storage unit and the PWM output unit;

[0020] The EtherCAT unit is used to establish a data communication connection between the FPGA processing module and the human-computer interaction module;

[0021] The storage unit is used to store preset setting parameters;

[0022] The processing unit is used to receive the control instruction transmitted by the EtherCAT unit, to accelerate the transmission speed of the control instruction according to the preset setting parameters in the storage unit, and to update the control instruction according to the feedback signal;

[0023] The PWM output unit is used to generate a pulse signal according to the control instruction, and send the pulse signal to the light source module.

[0024] In addition, the light source module includes: an LED driving unit, a fast shut-off unit and an LED light-emitting unit;

[0025] The LED driving unit is connected to the PWM output unit, and is respectively connected to the fast shut-off unit and the LED light-emitting unit;

[0026] The LED driving unit is used to provide a stable power supply to the LED light-emitting unit according to the pulse signal;

[0027] The fast shut-off unit is used to quickly cut off the stable power provided by the LED driving unit to the LED light-emitting unit;

[0028] The LED light-emitting unit is used to convert the stable power supply from electrical energy to light energy.

[0029] In addition, the fast-off unit includes: an EMI filter circuit, a capacitor C1, a resistor R1, a resistor R2, a diode D1, a transistor Q1 and a transistor Q2;

[0030] The power supply module is connected to two ends of the EMI filter circuit;

[0031] The capacitor C1 is connected in parallel with the EMI filter circuit, and one end of the capacitor C1 is connected to the E pole of the transistor Q1, and the other end of the capacitor C1 is grounded;

[0032] The B pole of the transistor Q1 is connected to the PWM output unit, and the C pole of the transistor Q1 is connected to the anode of the diode D1;

[0033] The cathode of the diode D1 is connected to the E pole of the transistor Q2;

[0034] The C pole of the transistor Q2 is connected to the resistor R2, and the other end of the resistor R2 is grounded;

[0035] The B pole of the transistor Q2 and the C pole of the transistor Q1 are connected to the resistor R1 , and the other end of the resistor R1 is grounded.

[0036] In addition, the human-computer interaction module includes: a display unit, a core processing unit and an EtherCAT unit, wherein the EtherCAT unit in the human-computer interaction module and the EtherCAT unit in the FPGA processing module have the same function and can be regarded as equivalent;

[0037] The display unit is connected to the core processing unit, and the core processing unit is further connected to the EtherCAT unit;

[0038] The display unit is used to display a visual interface, use the visual interface to guide technicians to operate, and is also used to display and modify the monitoring parameters of the light source module;

[0039] The core processing unit is used to convert the technician's operating steps into control instructions and send the control instructions to the EtherCAT unit. It is also used to visualize the monitoring parameters sent by the EtherCAT unit and send the composition structure to the display unit.

[0040] In addition, the monitoring parameters in the display unit include at least the position, working state, actual power, actual light intensity, and target light intensity of the LED light emitting unit.

[0041] In addition, the operation processing unit includes a dual-loop structure PID algorithm, wherein the outer loop PID control formula of the dual-loop structure PID algorithm is expressed as:

[0042] e lux ( t ) =L set -L actual ( t)

[0043]

[0044] In the formula, I target (t) is the output of the outer loop, indicating the target current, e lux (t) is the error in light intensity, L set is the target light intensity, L actual (t) is the actual light intensity, K p1 , K i1 , K d1 are the proportional, integral and differential coefficients of the outer loop, t represents time, and τ represents the integral of time;

[0045] e current (t) = I target (t)-I actual (t)

[0046]

[0047] Among them, I target (t) is the output of the inner loop, which represents the duty cycle of the PWM signal, e current (t) is the current error, I actual (t) is the actual current, K p2 , K i2 , K d2 are the proportional, integral and differential coefficients of the inner loop respectively.

[0048] In addition, the human-computer interaction module can be connected to multiple light source controller modules at the same time.

[0049] A specific embodiment of the present invention further provides a method for controlling the fast switching multi-array light source control system for defect detection, characterized in that the method comprises:

[0050] Utilizing the FPGA processing module, outputting a pulse signal according to a set target light intensity;

[0051] Using the light source module, according to the pulse signal, the LED light emitting unit is driven to start working;

[0052] Using the feedback module, collecting the operating parameters of the system, wherein the operating parameters of the system include light intensity and current passing through the light source module;

[0053] Using the arithmetic processing unit, performing a pulse adjustment operation based on the dual-loop structure PID algorithm on the working parameters to obtain a pulse output duty cycle, and adjusting the pulse signal according to the pulse output duty cycle to obtain an updated pulse signal;

[0054] According to the update pulse signal, the LED light emitting unit is driven to start working.

[0055] In the embodiment of the present invention, the fast control of the light source is realized by firstly fast shut-off module and FPGA, and the PID algorithm is introduced to construct a closed-loop control system to ensure the precise adjustment and stability of the light source; at the same time, the system is equipped with a detector to quickly identify the optimal lighting conditions, and a humanized interaction module is designed to achieve efficient human-computer interaction. Therefore, the present invention provides a fast switching multi-array light source control system and method for defect detection, which can improve the precise adjustment and stability of the light source. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] One or more embodiments of the present invention are exemplarily described by the images in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0057] Figure 1 A schematic diagram of the structure of a fast switching multi-array light source control system for defect detection provided by an embodiment of the present invention;

[0058] Figure 2 A schematic diagram of the structure of a light source controller of a fast switching multi-array light source control system for defect detection provided by an embodiment of the present invention;

[0059] Figure 3 A schematic diagram of the structure of a fast-break unit and some peripheral circuits of a fast-switching multi-array light source control system for defect detection provided by an embodiment of the present invention;

[0060] Figure 4 A schematic diagram of the structure of a human-computer interaction module of a fast switching multi-array light source control system for defect detection provided by an embodiment of the present invention;

[0061] Figure 5 A flowchart of a fast switching multi-array light source control method for defect detection provided by an embodiment of the present invention.

[0062] Reference numerals:

[0063] 100, power supply module; 200, human-computer interaction module; 300, light source controller group; 310, FPGA processing module; 320, feedback module; 330, light source module. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present application more obvious, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0065] An embodiment of the present application relates to a fast switching multi-array light source control system for defect detection, such as Figure 1 As shown, it mainly includes: power supply module, light source controller module and human-computer interaction module;

[0066] The power supply module is connected to the light source controller module and the human-computer interaction module respectively, and the human-computer interaction module is connected to the light source controller module;

[0067] The power supply module is used to supply power to the light source controller module and the human-computer interaction module;

[0068] The human-computer interaction module is used to generate control instructions, send the control instructions to the light source controller module, and visualize the light source parameters in the light source controller module;

[0069] The light source controller module is used to generate light that complies with the control instruction.

[0070] In detail, in the embodiment of the present invention, the light source controller module is composed of an FPGA processing module, a light source module, and a feedback module connected in sequence and end to end;

[0071] The FPGA processing module is used to exchange data with the human-computer interaction module and to send control instructions of the human-computer interaction module to the light source module;

[0072] The light source module is used to generate light according to the control instruction;

[0073] The feedback module is used to generate a feedback signal according to the light, and send the feedback signal to the FPGA processing module;

[0074] The FPGA processing module is also used to update the control instruction according to the feedback signal transmitted by the feedback module.

[0075] Specifically, refer to Figure 1 The structural schematic diagram of the high-speed multi-light source control system provided for an embodiment of the present invention includes a power module 100, a human-computer interaction module 200, and a light source controller group 300, wherein the light source controller group includes light source controllers 1 to n, and the light source controller includes the FPGA processing module 310, the feedback module 320 and the light source module 330; wherein the human-computer interaction module 200 is electrically connected to the FPGA processing module 310, the feedback module 320 is electrically connected to the light source module 330, the FPGA processing module 310 is electrically connected, the FPGA processing module 310 is electrically connected to the light source module 330, the power module 100 is electrically connected to other modules, and the light source controller group is electrically connected in sequence.

[0076] Specifically, in this embodiment, the human-computer interaction module 200 and the light source controller group form a one-master-multiple-slave communication mode based on the EtherCAT bus, forming a data interaction bus, wherein the human-computer interaction module 200 serves as the host, and the light source controller in the light source controller group 300 serves as the slave, allowing multiple light source controllers to be mounted on the bus;

[0077] The light source controller group 300 forms a bus based on EtherCAT. Each light source controller 1 to n is in an equal position and plays the role of a slave in the bus. The human-computer interaction module plays the role of a host. The human-computer interaction module realizes high-speed control of the light source controller by sending setting parameters. The setting parameters include working status and target light intensity.

[0078] In detail, in the embodiment of the present invention, the operation processing unit includes a dual-loop structure PID algorithm, wherein the outer loop PID control formula of the dual-loop structure PID algorithm is expressed as:

[0079] e lux (t) = L set -L actual (t)

[0080]

[0081] In the formula, I target (t) is the output of the outer loop, indicating the target current, e lux (t) is the error in light intensity, L set is the target light intensity, L actual (t) is the actual light intensity, K p1 , K i1 , K d1 are the proportional, integral and differential coefficients of the outer loop, t represents time, and τ represents the integral of time;

[0082] e current (t) = I target (t)-I actual (t)

[0083]

[0084] Among them, I target (t) is the output of the inner loop, which represents the duty cycle of the PWM signal, e current (t) is the current error, I actual (t) is the actual current, K p2 , K i2 , K d2 are the proportional, integral and differential coefficients of the inner loop respectively.

[0085] Specifically, in the embodiment of the present invention, the FPGA processing module 310 controls the light source module 330 through PWM, and uses a dual-loop PID algorithm based on the light intensity and current information collected by the feedback module to adjust the PWM duty cycle in real time; the PID algorithm adopts a dual-loop structure, firstly using the feedback light intensity as the outer loop control variable to adjust the target current output by the light source, and the outer loop PID control formula is as follows:

[0086] e lux (t) = L set -L actual (t)

[0087]

[0088] In the formula, I target (t) is the output of the outer loop, indicating the target current, e lux (t) is the error in light intensity, L set is the target light intensity, L actual (t) is the actual light intensity, K p1 , K i1 , K d1 are the proportional, integral and differential coefficients of the outer loop, t represents time, and τ represents the integral of time;

[0089] Then the feedback current is used as the inner loop control variable to adjust the duty cycle of the PWM signal. The inner loop PID control formula is as follows:

[0090] e current (t) = I target (t)-I actual (t)

[0091]

[0092] Among them, I target (t) is the output of the inner loop, which represents the duty cycle of the PWM signal, e current (t) is the current error, I actual (t) is the actual current, K p2 , K i2 , K d2 are the proportional, integral and differential coefficients of the inner loop respectively.

[0093] Further, refer to Figure 2 A schematic diagram of the structure of a light source controller provided by an embodiment of the present invention.

[0094] In detail, in an embodiment of the present invention, the FPGA processing module includes: an EtherCAT unit, an operation processing unit, a storage unit, and a PWM output unit;

[0095] The EtherCAT unit is connected to the operation processing unit;

[0096] The operation processing unit is respectively connected to the operation processing unit, the storage unit and the PWM output unit;

[0097] The EtherCAT unit is used to establish a data communication connection between the FPGA processing module and the human-computer interaction module;

[0098] The storage unit is used to store preset setting parameters;

[0099] The processing unit is used to receive the control instruction transmitted by the EtherCAT unit, to accelerate the transmission speed of the control instruction according to the preset setting parameters in the storage unit, and to update the control instruction according to the feedback signal;

[0100] The PWM output unit is used to generate a pulse signal according to the control instruction, and send the pulse signal to the light source module.

[0101] In detail, in an embodiment of the present invention, the light source module includes: an LED driving unit, a fast shut-off unit and an LED light-emitting unit;

[0102] The LED driving unit is connected to the PWM output unit, and is respectively connected to the fast shut-off unit and the LED light-emitting unit;

[0103] The LED driving unit is used to provide a stable power supply to the LED light-emitting unit according to the pulse signal;

[0104] The fast shut-off unit is used to quickly cut off the stable power provided by the LED driving unit to the LED light-emitting unit;

[0105] The LED light-emitting unit is used to convert the stable power supply from electrical energy to light energy.

[0106] In detail, in an embodiment of the present invention, the FPGA processing module includes a storage unit, a PWM output unit, an operation processing unit, and an EtherCAT unit, and the light source module includes a fast-break unit, an LED light-emitting unit, and an LED driving unit.

[0107] Among them, the EtherCAT unit adopts standard Ethernet communication interface standard connection to connect to an external high-speed bus. The storage unit is used to store preset setting parameters. In conjunction with the storage unit, efficient and fast control signal transmission can be achieved, and the characteristics of parallel operation of the core computing unit can be combined to achieve high-speed control.

[0108] In detail, in the embodiment of the present invention, the fast shutdown unit includes: an EMI filter circuit, a capacitor C1, a resistor R1, a resistor R2, a diode D1, a transistor Q1 and a transistor Q2;

[0109] The power supply module is connected to two ends of the EMI filter circuit;

[0110] The capacitor C1 is connected in parallel with the EMI filter circuit, and one end of the capacitor C1 is connected to the E pole of the transistor Q1, and the other end of the capacitor C1 is grounded;

[0111] The B pole of the transistor Q1 is connected to the PWM output unit, and the C pole of the transistor Q1 is connected to the anode of the diode D1;

[0112] The cathode of the diode D1 is connected to the E pole of the transistor Q2;

[0113] The C pole of the transistor Q2 is connected to the resistor R2, and the other end of the resistor R2 is grounded;

[0114] The B pole of the transistor Q2 and the C pole of the transistor Q1 are connected to the resistor R1 , and the other end of the resistor R1 is grounded.

[0115] Specifically, refer to Figure 3 A schematic diagram of a fast-break unit and some of its peripheral circuit structures is provided for an embodiment of the present invention.

[0116] The fast-break unit includes an EMI filter circuit, a capacitor C1, resistors R1, R2, transistors Q1, Q2, and a diode D1;

[0117] The power module input, EMI filter circuit, and capacitor C1 are connected in parallel in sequence; the E pole of the transistor Q1 is electrically connected to the positive output end of the EMI filter circuit, the B pole is electrically connected to the PWM output unit of the FPGA module, and the C pole is electrically connected to the positive pole of the diode D1; the C pole of the transistor Q2 is electrically connected to the resistor R2, the B pole is electrically connected to the resistor R1, and the E pole is electrically connected to the cathode of the diode D1 and the positive input end of the LED drive unit.

[0118] In detail, in an embodiment of the present invention, the human-computer interaction module includes: a display unit, a core processing unit and an EtherCAT unit, wherein the EtherCAT unit in the human-computer interaction module and the EtherCAT unit in the FPGA processing module have the same function and can be regarded as equivalent;

[0119] The display unit is connected to the core processing unit, and the core processing unit is further connected to the EtherCAT unit;

[0120] The display unit is used to display a visual interface, use the visual interface to guide technicians to operate, and is also used to display and modify the monitoring parameters of the light source module;

[0121] The core processing unit is used to convert the technician's operating steps into control instructions and send the control instructions to the EtherCAT unit. It is also used to visualize the monitoring parameters sent by the EtherCAT unit and send the composition structure to the display unit.

[0122] Specifically, refer to Figure 4 The human-computer interaction module 200 periodically inquires the monitoring parameters of each light source in the light source controller group, and displays the monitoring parameters on the display unit in real time.

[0123] In detail, in the embodiment of the present invention, the monitoring parameters in the display unit at least include the position, working state, actual power, actual light intensity, and target light intensity of the LED light-emitting unit.

[0124] In detail, in the embodiment of the present invention, the human-computer interaction module can be connected to multiple light source controller modules at the same time.

[0125] In an embodiment of the present invention, the monitoring parameters include the position, working status, actual power, actual light intensity, and target light intensity of the LED light-emitting unit, and changes to the setting parameters are allowed; the human-computer interaction module (host) and the light source controller (slave) communicate using the EtherCAT bus, allowing multiple slaves to access the bus.

[0126] In the embodiment of the present invention, the fast control of the light source is realized by firstly fast shut-off module and FPGA, and the PID algorithm is introduced to construct a closed-loop control system to ensure the precise adjustment and stability of the light source; at the same time, the system is equipped with a detector to quickly identify the optimal lighting conditions, and a humanized interaction module is designed to achieve efficient human-computer interaction. Therefore, the present invention provides a fast switching multi-array light source control system for defect detection, which can improve the precise adjustment and stability of the light source.

[0127] Further, see Figure 5 As shown, the embodiment of the present invention also provides a method for utilizing Figure 1 The control method performed by the fast switching multi-array light source control system for defect detection includes:

[0128] S1, using the FPGA processing module to output a pulse signal according to the set target light intensity;

[0129] S2, using the light source module to drive the LED light-emitting unit to start working according to the pulse signal;

[0130] S3. Using the feedback module to collect the operating parameters of the system, wherein the operating parameters of the system include light intensity and current passing through the light source module;

[0131] S4, using the arithmetic processing unit to perform a pulse adjustment operation on the working parameter based on the dual-loop structure PID algorithm to obtain a pulse output duty cycle, and adjusting the pulse signal according to the pulse output duty cycle to obtain an updated pulse signal;

[0132] S5. According to the update pulse signal, drive the LED light-emitting unit to start working.

[0133] Those skilled in the art can understand that the above-mentioned embodiments are specific examples for realizing the present embodiment, and in actual applications, various changes can be made thereto in form and details without departing from the spirit and scope of the present embodiment.

Claims

1. A fast switching multi-array light source control system for defect detection, characterized in that: The system comprises: a power supply module, a light source controller module and a human-computer interaction module; The power supply module is connected to the light source controller module and the human-computer interaction module respectively, and the human-computer interaction module is connected to the light source controller module; The power supply module is used to supply power to the light source controller module and the human-computer interaction module; The human-computer interaction module is used to generate control instructions, send the control instructions to the light source controller module, and visualize the light source parameters in the light source controller module; The light source controller module is used to generate light that complies with the control instruction.

2. The fast switching multi-array light source control system for defect detection according to claim 1, characterized in that: The light source controller module is composed of an FPGA processing module, a light source module, and a feedback module connected in sequence and end to end; The FPGA processing module is used to exchange data with the human-computer interaction module and to send control instructions of the human-computer interaction module to the light source module; The light source module is used to generate light according to the control instruction; The feedback module is used to generate a feedback signal according to the light, and send the feedback signal to the FPGA processing module; The FPGA processing module is also used to update the control instruction according to the feedback signal transmitted by the feedback module.

3. The fast switching multi-array light source control system for defect detection according to claim 2, characterized in that: The FPGA processing module includes: an EtherCAT unit, an operation processing unit, a storage unit, and a PWM output unit; The EtherCAT unit is connected to the operation processing unit; The operation processing unit is respectively connected to the operation processing unit, the storage unit and the PWM output unit; The EtherCAT unit is used to establish a data communication connection between the FPGA processing module and the human-computer interaction module; The storage unit is used to store preset setting parameters; The processing unit is used to receive the control instruction transmitted by the EtherCAT unit, to accelerate the transmission speed of the control instruction according to the preset setting parameters in the storage unit, and to update the control instruction according to the feedback signal; The PWM output unit is used to generate a pulse signal according to the control instruction, and send the pulse signal to the light source module.

4. The fast switching multi-array light source control system for defect detection according to claim 3, characterized in that: The light source module comprises: an LED driving unit, a fast shut-off unit and an LED light-emitting unit; The LED driving unit is connected to the PWM output unit, and is respectively connected to the fast shut-off unit and the LED light-emitting unit; The LED driving unit is used to provide a stable power supply to the LED light-emitting unit according to the pulse signal; The fast shut-off unit is used to quickly cut off the stable power provided by the LED driving unit to the LED light-emitting unit; The LED light-emitting unit is used to convert the stable power supply from electrical energy to light energy.

5. The fast switching multi-array light source control system for defect detection according to claim 4, characterized in that: The fast-off unit includes: an EMI filter circuit, a capacitor C1, a resistor R1, a resistor R2, a diode D1, a transistor Q1 and a transistor Q2; The power supply module is connected to two ends of the EMI filter circuit; The capacitor C1 is connected in parallel with the EMI filter circuit, and one end of the capacitor C1 is connected to the E pole of the transistor Q1, and the other end of the capacitor C1 is grounded; The B pole of the transistor Q1 is connected to the PWM output unit, and the C pole of the transistor Q1 is connected to the anode of the diode D1; The cathode of the diode D1 is connected to the E pole of the transistor Q2; The C pole of the transistor Q2 is connected to the resistor R2, and the other end of the resistor R2 is grounded; The B pole of the transistor Q2 and the C pole of the transistor Q1 are connected to the resistor R1 , and the other end of the resistor R1 is grounded.

6. The fast switching multi-array light source control system for defect detection according to claim 5, characterized in that: The human-computer interaction module comprises: a display unit, a core processing unit and an EtherCAT unit, wherein the EtherCAT unit in the human-computer interaction module and the EtherCAT unit in the FPGA processing module have the same function and can be regarded as equivalent; The display unit is connected to the core processing unit, and the core processing unit is further connected to the EtherCAT unit; The display unit is used to display a visual interface, use the visual interface to guide technicians to operate, and is also used to display and modify the monitoring parameters of the light source module; The core processing unit is used to convert the technician's operating steps into control instructions and send the control instructions to the EtherCAT unit. It is also used to visualize the monitoring parameters sent by the EtherCAT unit and send the composition structure to the display unit.

7. The fast switching multi-array light source control system for defect detection according to claim 6, characterized in that: The monitoring parameters in the display unit include at least the position, working state, actual power, actual light intensity, and target light intensity of the LED light emitting unit.

8. The fast switching multi-array light source control system for defect detection according to claim 7, characterized in that: The operation processing unit includes a dual-loop structure PID algorithm, wherein the outer loop PID control formula of the dual-loop structure PID algorithm is expressed as: e lux ( t ) =L set -L actual ( t) In the formula, I target ( t ) is the output of the outer loop, indicating the target current, e lux ( t ) is the error in light intensity, L set is the target light intensity, L actual ( t ) is the actual light intensity, K p1 , K i1 , K d1 are the proportional, integral and differential coefficients of the outer loop, t represents time, and τ represents the integral of time; e current ( t ) =I target ( t ) -I actual ( t ) Among them, I target ( t ) is the output of the inner loop, indicating the duty cycle of the PWM signal, e current ( t ) is the current error, I actual ( t is the actual current, K p2 , K i2 , K d2 are the proportional, integral and differential coefficients of the inner loop respectively.

9. The fast switching multi-array light source control system for defect detection according to claim 8, characterized in that: The human-computer interaction module can be connected to a plurality of light source controller modules at the same time.

10. A method performed by using the fast switching multi-array light source control system for defect detection according to any one of claims 1 to 9, characterized in that: The method comprises: Utilizing the FPGA processing module, outputting a pulse signal according to a set target light intensity; Using the light source module, according to the pulse signal, the LED light emitting unit is driven to start working; Using the feedback module, collecting the operating parameters of the system, wherein the operating parameters of the system include light intensity and current passing through the light source module; Using the arithmetic processing unit, performing a pulse adjustment operation based on the dual-loop structure PID algorithm on the working parameters to obtain a pulse output duty cycle, and adjusting the pulse signal according to the pulse output duty cycle to obtain an updated pulse signal; According to the update pulse signal, the LED light emitting unit is driven to start working.