Laser crystal temperature control method based on BP neural network

Optimizing the PID control parameters through the BP neural network solves the problem of inflexible control methods of the existing laser crystal temperature control system, achieving precise control of the laser crystal temperature and flexible adaptability of the system.

CN118589282APending Publication Date: 2024-09-03NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410726473.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The control method of the existing laser crystal temperature control system is inflexible and cannot effectively adapt to the temperature control needs of different lasers. Moreover, the heating part has not been optimized and has poor versatility.

Method used

The laser crystal temperature control method based on BP neural network is used, combined with the PID controller and temperature sensor, and the PID control parameters are optimized through the adaptive adjustment of the BP neural network to achieve closed-loop control of the laser crystal temperature.

Benefits of technology

It achieves precise control of the laser crystal temperature, improves the flexibility and adaptability of the temperature control system, and can quickly adjust PID parameters to achieve the best temperature control effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118589282A
    Figure CN118589282A
Patent Text Reader

Abstract

The invention discloses a laser crystal temperature control method based on a BP neural network, and belongs to the technical field of solid laser crystal temperature control. The laser crystal temperature control method based on the BP neural network comprises the following steps: constructing a laser crystal temperature control device comprising a temperature set value, a PID (Proportion Integration Differentiation) controller, an H bridge, a TEC (Thermoelectric Cooler), a laser crystal and a temperature sensor; setting the temperature of the laser crystal; subtracting the temperature set value of the laser crystal from the actual value acquired by the temperature sensor; the difference result is input into a PID controller, and the PID controller and the BP neural network act together to control the H bridge to output current to the TEC so as to control the temperature of the laser crystal; the actual temperature of the laser crystal is collected, the actual temperature of the laser crystal is read through a temperature sensor, and the actual temperature is returned to be subtracted from a temperature set value to control the temperature of the laser crystal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of solid laser crystal temperature control, and in particular relates to a laser crystal temperature control method based on BP neural network. Background Art

[0002] With the continuous updating of laser crystal and frequency doubling crystal development technology, solid laser devices and related fields are constantly developing, and solid lasers are increasingly used in scientific research and education, military manufacturing, bioengineering, medicine and other fields. And as the application fields of solid lasers become more and more popular, various related industries have higher and higher performance requirements for various technical indicators of lasers. In solid lasers, laser crystals and frequency doubling crystals are the core components of lasers. Laser crystals generally use Nd:YAG (i.e., neodymium-doped yttrium aluminum garnet) or Nd:YVO4 (i.e., neodymium-doped yttrium vanadate). Frequency doubling crystals generally use BBO (barium metaborate crystal), LBO (lithium triborate crystal), KTP (potassium titanyl phosphate), etc. The use of laser crystals and frequency doubling crystals can achieve relatively good frequency doubling conversion efficiency, and can be made into different types of all-solid lasers such as near-infrared, green, blue to ultraviolet light. Now solid lasers have been widely used in many fields such as mechanical manufacturing, material processing, spectroscopy, wafer inspection, display, medical detection and analysis, laser printing, data storage, etc. In scientific research, different laser crystals or frequency-doubling crystals are often used to obtain lasers of different wavelengths and powers.

[0003] Through preliminary research, it was found that most temperature control systems for laser crystals or frequency doubling crystals at home and abroad use the TEC plus air cooling mode, but basically they can only store a set of PID control values, and only optimize the cooling effect, not the heating part. In addition, generally one refrigeration device only corresponds to one type of laser, and its versatility is poor.

[0004] The current status of related research at home and abroad is analyzed and summarized. Most temperature control systems have inflexible control methods, and different crystal temperature controls cannot be well adapted. It is necessary to manually adjust PID parameters according to the laser application environment. Therefore, the present invention proposes a laser crystal temperature control method based on BP neural network. Summary of the invention

[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a laser crystal temperature control method based on a BP neural network, which solves the problems in the prior art.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] A laser crystal temperature control method based on BP neural network comprises the following steps:

[0008] S1, constructing a laser crystal temperature control device including a temperature setpoint, a PID controller, an H-bridge, a TEC, a laser crystal, and a temperature sensor;

[0009] S2, setting the laser crystal temperature;

[0010] S3, subtracting the laser crystal temperature setting value from the actual value collected by the temperature sensor;

[0011] S4, inputting the difference result into the PID controller, the PID controller and the BP neural network work together to control the H-bridge output current to the TEC to control the temperature of the laser crystal;

[0012] S5, collect the actual temperature of the laser crystal, read the actual temperature of the laser crystal through the temperature sensor, return to S3 and make a difference with the temperature setting value to control the temperature of the laser crystal.

[0013] Furthermore, the BP neural network outputs parameters to the PID controller according to the operating state of the laser crystal temperature control device to directly perform closed-loop control on the laser crystal temperature.

[0014] Furthermore, the control algorithm in the PID controller uses a position PID algorithm, and the formula is:

[0015]

[0016] Where, e(k) is the temperature difference of k samples; K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, u(k) is the calculated PWM pulse width.

[0017] Furthermore, the BP neural network includes an input layer, a hidden layer and an output layer;

[0018] The output of the input layer is:

[0019] o i (1) (k) = x i

[0020] The input of the hidden layer is:

[0021]

[0022] The output of the hidden layer is:

[0023] o j (2) (k) = f[d j (2) (k)]

[0024] In the formula, i is the input layer node, k is the current iteration number, M is the total number of input layer nodes, j is the hidden layer node, ω ji (2) is the hidden layer weight coefficient, d j (2) (k) is the input of the hidden layer, o j (2) (k) is the output of the hidden layer, f(x) is the activation function of the hidden layer; the superscripts (1), (2), and (3) represent the input layer, hidden layer, and output layer, respectively;

[0025] f(x) is the hyperbolic tangent function:

[0026]

[0027] The input to the output layer is:

[0028]

[0029] The output of the output layer is:

[0030] o l (3) (k) = g[d l (3) (k)]

[0031] o1 (3) (k) = K p

[0032] o2 (3) (k) = K i

[0033] o3 (3) (k) = K d

[0034] In the formula, w lj (3) is the weight coefficient of the output layer, Q is the total number of nodes in the hidden layer, l is the number of nodes in the output layer, d l (3) (k) is the input of the output layer, o l (3) (k) is the output of the output layer, and g(x) is the activation function of the output layer:

[0035]

[0036] The PID controller output u(k) is obtained by the position PID algorithm.

[0037] Furthermore, in order to measure the performance of the neural network, the output of the neural network is compared with the expected result to obtain the performance score of the network, where the quadratic output error is used as the performance indicator function:

[0038]

[0039] In the formula, r(k) is the expected output result, y(k) is the output of the neural network, and E(k) is the square of the output error; if the error is less than or equal to the preset value, the algorithm ends, otherwise the error is transmitted in the reverse direction, and the weights are modified layer by layer according to the gradient descent method.

[0040] Furthermore, the gradient descent method is used to modify the network weight coefficient according to the learning rate η, so that it converges quickly to the global minimum. The weight update calculation formula is:

[0041] w lj (3) (k+1)=w lj (3) (k)+ηδ l (3) o j (2) (k)

[0042] δ l (3) =e(k)*g'[d l (3) (k)]

[0043] g'(x)=g(x)[1-g(x)]

[0044] In the formula, δ l (3) is the local gradient of the output layer.

[0045] The hidden layer connection weights are updated as:

[0046] w ji (2) (k+1)=w ji (2) (k)+ηδ j (2) o i (1) (k)

[0047] δ j (2) =f'[d j (2) (k)]∑ l δ l (3) w lj (2) (k)

[0048] f'(x)=1-f 2 (x)

[0049] In the formula, δ j (2) is the local gradient of the hidden layer; let k = k + 1, restart the calculation, if the performance indicator function E(k) meets the set value, the learning ends, otherwise, continue learning.

[0050] A laser crystal temperature control system based on BP neural network, comprising:

[0051] Device construction module: build a laser crystal temperature control device including temperature setpoint, PID controller, H-bridge, TEC, laser crystal and temperature sensor;

[0052] Temperature setting module: set the laser crystal temperature;

[0053] Temperature comparison module: subtract the laser crystal temperature setting value from the actual value collected by the temperature sensor;

[0054] Temperature control module: The difference result is input to the PID controller. The PID controller and the BP neural network work together to control the H-bridge output current to the TEC to control the temperature of the laser crystal.

[0055] And, the feedback module: collects the actual temperature of the laser crystal, reads the actual temperature of the laser crystal through the temperature sensor, returns the temperature comparison module and makes a difference with the temperature setting value to control the temperature of the laser crystal.

[0056] A computer storage medium stores a readable program, and when the program is run, the above-mentioned laser crystal temperature control method can be executed.

[0057] An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0058] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned laser crystal temperature control method.

[0059] A computer program product includes computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the above-mentioned laser crystal temperature control method.

[0060] Beneficial effects of the present invention:

[0061] The present invention controls the temperature of the laser crystal by controlling the TEC current, so that the temperature of the laser crystal is maintained at a set temperature; through self-learning and adjustment of the BP neural network, its stable state corresponds to the PID controller parameters with the best temperature control effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 is a flow chart of the temperature control method of the present invention;

[0064] Figure 2 is a schematic diagram of a neural network;

[0065] Figure 3 It is a schematic structural diagram of the laser crystal temperature control device of the present invention;

[0066] Figure 4 It is a schematic diagram of the adaptive PID control structure based on BP neural network of the present invention;

[0067] Figure 5 It is a flow chart of the laser crystal temperature control device of the present invention;

[0068] Figure 6 It is a temperature control effect data diagram of the present invention. DETAILED DESCRIPTION

[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] like Figure 1 As shown, a laser crystal temperature control method based on BP neural network includes the following steps:

[0071] S1, construct a laser crystal temperature control device;

[0072] like Figure 3As shown, the laser crystal temperature control device includes: a temperature setting value, a PID controller, an H-bridge, a heat sink, a TEC, a laser crystal, a temperature sensor and a temperature detection circuit; the temperature setting value and the actual temperature value collected by the temperature sensor are subtracted, and the difference is input into the PID controller, and the PID controller controls the H-bridge to output current to the TEC, thereby controlling the temperature of the laser crystal.

[0073] S2, setting the laser crystal temperature;

[0074] S3, subtracting the laser crystal temperature setting value from the actual value; wherein the actual value is acquired by the temperature sensor and the temperature detection circuit;

[0075] S4, inputs the difference result to the PID controller, and the PID controller controls the H-bridge to output current to the TEC to control the temperature of the laser crystal.

[0076] like Figure 4 As shown, the PID controller directly performs closed-loop control on the laser crystal temperature, and the three input parameters K p , K i , K d The BP neural network adjusts the parameters of the PID controller (i.e., the BP neural network output parameter K) according to the operating status of the laser crystal temperature control device. p , K i , K d ,) to achieve the best temperature control effect; through the self-learning and adjustment of the BP neural network, its stable state corresponds to the PID controller parameters of the best temperature control effect.

[0077] The control algorithm in the PID controller uses the position PID algorithm, and the formula is:

[0078]

[0079] Where, e(k) is the temperature difference of k samples; K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, u(k) is the calculated PWM pulse width.

[0080] like Figure 2 As shown, the BP neural network has three layers: input layer, hidden layer, and output layer;

[0081] The output of the input layer is:

[0082] o i (1) (k) = x i (2)

[0083] The input of the hidden layer is:

[0084]

[0085] The output of the hidden layer is:

[0086] o j (2) (k) = f[d j (2) (k)](4)

[0087] In the above formula, i is the input layer node, k is the current iteration number, M is the total number of input layer nodes, j is the hidden layer node, ω ji (2) is the hidden layer weight coefficient, d j (2) (k) is the input of the hidden layer, o j (2) (k) is the output of the hidden layer, f(x) is the activation function of the hidden layer; the superscripts (1), (2), and (3) represent the input layer, hidden layer, and output layer, respectively;

[0088] f(x) is the hyperbolic tangent function:

[0089]

[0090] The input to the output layer is:

[0091]

[0092] The output of the output layer is:

[0093]

[0094] In the above formula, w lj (3) is the weight coefficient of the output layer, Q is the total number of nodes in the hidden layer, l is the number of nodes in the output layer, d l (3) (k) is the input of the output layer, o l (3) (k) is the output of the output layer, and g(x) is the activation function of the output layer:

[0095]

[0096] The PID controller output u(k) is obtained by the position PID algorithm.

[0097] In order to measure the performance of the neural network, the output of the neural network is compared with the expected result to obtain the performance score of the network, and the square of the output error is used as the performance indicator function:

[0098]

[0099] In the formula, r(k) is the expected output result, y(k) is the output of the neural network, and E(k) is the square of the output error. If the error is less than or equal to the preset value, the algorithm ends, otherwise the error is transmitted in the reverse direction, and the weights are modified layer by layer according to the gradient descent method.

[0100] The gradient descent method is used to modify the network weight coefficient according to the learning rate η, so that it converges quickly to the global minimum. The weight update calculation formula is:

[0101]

[0102] In the formula, δ l (3) is the local gradient of the output layer.

[0103] The hidden layer connection weights are updated as:

[0104]

[0105] In the formula, δ j (2) is the local gradient of the hidden layer.

[0106] Let k=k+1, return the weight to the step of formula (2) and start the calculation again. If the performance indicator function E(k) meets the set value, the learning ends, otherwise, the learning continues.

[0107] like Figure 4 As shown, after the BP neural network has finished learning, it outputs K p , K i , K d The laser crystal temperature control device calculates the temperature difference according to the set laser crystal temperature and the sampled laser crystal temperature, substitutes it into the position PID algorithm formula (1), and outputs u(k), that is, the PWM pulse width, so as to control the laser crystal temperature.

[0108] S5, collect the actual temperature of the laser crystal, read the actual temperature of the laser crystal through the temperature sensor, return to S3 and make a difference with the temperature setting value to control the temperature of the laser crystal.

[0109] In order to verify the accuracy of the temperature control method of the present invention, the present invention makes a specific experimental verification; the experimental steps are:

[0110] 1) Determine the structure of the BP neural network, that is, determine the number of layers of the input layer, hidden layer and output layer and the number of nodes in the corresponding layer, and select the initial value ω ji (2) (0) and w lj (3) (0) Then select the appropriate learning efficiency η and take the sampling time k = 1;

[0111] 2) Sample r(k) and c(k) and calculate the error at that moment: e(k) = r(k) - c(k);

[0112] 3) Normalize r(k), c(k), and e(k) as input values ​​of the BP neural network;

[0113] 4) Calculate the input and output of each layer of the neuron nodes in the BP neural network respectively, and the neuron nodes in the network output layer finally output the three control parameters K required for PID control p , K i , K d ;

[0114] 5) Calculate the output u(k) of the PID controller;

[0115] 6) Online adjustment of the weights ω of each layer ji (2) (k) and w lj (3) (k);

[0116] 7) Set k=k+1 and return to step 2).

[0117] The experimental results are as follows Figure 6 As shown, when the set temperature is 20°C, after being controlled by the laser crystal temperature control system, the actual temperature of the laser crystal fluctuates between 19.997-20.001°C within 1 hour, and the temperature control accuracy can reach 0.004°C.

[0118] The method of the present invention may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, processor, or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.

[0119] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A laser crystal temperature control method based on BP neural network, characterized in that: The following steps are involved: S1, constructing a laser crystal temperature control device including a temperature setpoint, a PID controller, an H-bridge, a TEC, a laser crystal, and a temperature sensor; S2, setting the laser crystal temperature; S3, subtracting the laser crystal temperature setting value from the actual value collected by the temperature sensor; S4, inputting the difference result into the PID controller, the PID controller and the BP neural network work together to control the H-bridge output current to the TEC to control the temperature of the laser crystal; S5, collect the actual temperature of the laser crystal, read the actual temperature of the laser crystal through the temperature sensor, return to S3 and make a difference with the temperature setting value to control the temperature of the laser crystal.

2. A laser crystal temperature control method based on BP neural network according to claim 1, characterized in that: The BP neural network outputs parameters to the PID controller according to the operating state of the laser crystal temperature control device to directly perform closed-loop control on the laser crystal temperature.

3. The laser crystal temperature control method based on BP neural network according to claim 2, characterized in that: The control algorithm in the PID controller uses the position PID algorithm, and the formula is: Where, e(k) is the temperature difference of k samples; K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, u(k) is the calculated PWM pulse width.

4. The laser crystal temperature control method based on BP neural network according to claim 3 is characterized in that: The BP neural network includes an input layer, a hidden layer and an output layer; The output of the input layer is: about i (1) (k)=x i The input of the hidden layer is: The output of the hidden layer is: o j (2) (k)=f[d j (2) (k)] In the formula, i is the input layer node, k is the current iteration number, M is the total number of input layer nodes, j is the hidden layer node, ω ji (2) is the weight coefficient of the hidden layer, d j (2) (k) is the input of the hidden layer, o j (2) (k) is the output of the hidden layer, f(x) is the activation function of the hidden layer; the superscripts (1), (2), and (3) represent the input layer, hidden layer, and output layer, respectively; f(x) is the hyperbolic tangent function: The input to the output layer is: The output of the output layer is: o l (3) (k)=g[d l (3) (k)] o1 (3) (k)=K p o2 (3) (k)=K i o3 (3) (k)=K d In the formula, w lj (3) is the weight coefficient of the output layer, Q is the total number of nodes in the hidden layer, l is the number of nodes in the output layer, d l (3) (k) is the input of the output layer, o l (3) (k) is the output of the output layer, and g(x) is the activation function of the output layer: The PID controller output u(k) is obtained by the position PID algorithm.

5. The laser crystal temperature control method based on BP neural network according to claim 4, characterized in that: In order to measure the performance of the neural network, the output of the neural network is compared with the expected result to obtain the performance score of the network, where the square of the output error is used as the performance indicator function: In the formula, r(k) is the expected output result, y(k) is the output of the neural network, and E(k) is the output error squared; If the error is less than or equal to the preset value, the algorithm ends. Otherwise, the error is transmitted in the opposite direction and the weights are modified layer by layer according to the gradient descent method.

6. The laser crystal temperature control method based on BP neural network according to claim 5, characterized in that: The gradient descent method is used to modify the network weight coefficient according to the learning rate η, so that it converges quickly to the global minimum. The weight update calculation formula is: In lj (3) (k+1)=in lj (3) (k)+ηδ l (3) about j (2) (k) d l (3) =e(k)*g'[d l (3) (k)] g'(x)=g(x)[1-g(x)] In the formula, δ l (3) is the local gradient of the output layer. The hidden layer connection weights are updated as: In ji (2) (k+1)=in ji (2) (k)+ηδ j (2) about i (1) (k) d j (2) =f'[d j (2) (k)]∑ l d l (3) w lj (2) (k) f'(x)=1-f 2 (x) In the formula, δ j (2) is the local gradient of the hidden layer; let k = k + 1, restart the calculation, if the performance indicator function E(k) meets the set value, the learning ends, otherwise, continue learning.

7. A laser crystal temperature control system based on BP neural network, characterized in that: include: Device construction module: build a laser crystal temperature control device including temperature setpoint, PID controller, H-bridge, TEC, laser crystal and temperature sensor; Temperature setting module: set the laser crystal temperature; Temperature comparison module: subtract the laser crystal temperature setting value from the actual value collected by the temperature sensor; Temperature control module: The difference result is input to the PID controller. The PID controller and the BP neural network work together to control the H-bridge output current to the TEC to control the temperature of the laser crystal. And, the feedback module: collects the actual temperature of the laser crystal, reads the actual temperature of the laser crystal through the temperature sensor, returns the temperature comparison module and makes a difference with the temperature setting value to control the temperature of the laser crystal.

8. A computer storage medium storing a readable program, characterized in that: When the program is running, the laser crystal temperature control method described in any one of claims 1 to 6 can be executed.

9. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the laser crystal temperature control method according to any one of claims 1 to 6.

10. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the laser crystal temperature control method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Quantum magnetic balance current monitoring device and method based on back propagation

    CN119438674A