System state self-tuning device for realizing intelligent optimization of target quantity
Through the improved firefly self-tuning algorithm and quick sorting mechanism, the problem of low efficiency in large-scale complex systems in the existing technology is solved, and the effect of quickly obtaining the optimal adjustment plan and improving the self-tuning efficiency is achieved.
Patent Information
- Application Number
- CN202510184643.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-24
AI Technical Summary
The prior art is inefficient when solving the problem of optimization of large-scale complex systems, it is difficult to quickly obtain the optimal adjustment solution, and it is easy to fall into local optimal solutions.
The improved firefly self-tuning algorithm is used, combined with the fast sorting mechanism, and the convergence and optimization performance of the self-tuning is evaluated in real time, quickly obtain the optimal adjustment plan, and convert the firefly position into the actual adjustment amount without knowing the specific objective function.
It realizes the rapid acquisition of optimal adjustment solutions, improves the efficiency of system state self-tuning, avoids the trap of local optimal solutions, and is compatible with more application scenarios.
Smart Images

Figure CN120197641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of space communication and navigation, and in particular to a system state self-tuning device for realizing intelligent optimization of target quantities. Background Art
[0002] The optimization problem refers to finding the optimal value of an objective function under certain constraints. Traditional optimization methods are not efficient. Especially when the search range is large, many iterations are required to find the optimal solution. If the search step size is not properly selected, the optimal solution may be missed. With the improvement of computing power and the cross-integration of interdisciplinary disciplines, intelligent optimization algorithms have become an important tool for solving the optimization problems of large-scale complex systems.
[0003] Currently, intelligent optimization algorithms mainly include machine learning algorithms, heuristic algorithms, swarm intelligence optimization algorithms, etc. The performance of machine learning algorithms depends to a large extent on the quality of input data, and can only optimize for specific types of data or problems, and the algorithm implementation is very complex. Heuristic algorithms require a large amount of computing resources and are prone to getting trapped in local optimal solutions rather than global optimal solutions during the algorithm iteration process. Swarm intelligence optimization algorithms simulate the collective behavior of organisms in nature, and the entire swarm jumps out of local optima for global search. Compared with machine learning algorithms and heuristic algorithms, swarm intelligence optimization algorithms are simpler and easier to implement.
[0004] The firefly self-tuning algorithm is a swarm intelligence optimization algorithm that simulates the behavior of fireflies emitting light and attracting each other in nature. The position of each firefly in the population corresponds to a different adjustment scheme, and the brightness of the firefly represents the effect of the adjustment scheme. The implementation steps of the existing firefly self-tuning algorithm usually include: 1. Randomly initialize the positions of fireflies; 2. Calculate the brightness of fireflies using the objective function; 3. Compare the brightness of fireflies with that of other fireflies and determine the movement relationship; 4. Update the positions of fireflies according to the movement relationship; 5. Repeat steps 2 to 4 until the maximum number of iterations is reached. Finally, all fireflies will converge near the firefly with the highest brightness.
[0005] Based on the existing algorithms, how to quickly obtain the optimal adjustment scheme, combine it with the micro-control hardware system, realize self-tuning for the system that needs state adjustment, and solve the defects of traditional optimization methods in solving the optimization problems of large-scale complex systems has important practical significance. Summary of the Invention
[0006] The technical problem solved by the present invention is: overcoming the deficiencies of the prior art, providing a system state self-tuning device for realizing intelligent optimization of target quantities, real-time evaluating the convergence and optimization performance of self-tuning, quickly obtaining the optimal adjustment scheme, converting the firefly position into an actual adjustment amount, without the need to know the specific objective function, and completing the optimization according to the adjustment object to return the target quantity.
[0007] The technical solution of the present invention is: a system state self-tuning device for realizing intelligent optimization of a target quantity, including a micro control system and a system to be adjusted;
[0008] The micro control system loads and runs the firefly self-tuning algorithm to generate the position data x of n fireflies, where i ranges from 1 to n; the following process is iteratively executed: convert the position data x of the fireflies into an adjustment quantity adapted to the system to be adjusted, input it into the system to be adjusted, receive the target quantity output by the system to be adjusted, generate the brightness value I of the fireflies according to the target quantity i and record it in an array, sort the brightness values I of the fireflies recorded in the array through the quicksort algorithm i to obtain a sorting result, determine the movement relationship, and update the position data x of the fireflies i ; after the iteration ends, use the position data corresponding to the firefly with the highest brightness value in the sorting result as the optimal solution, convert it into an adjustment quantity adapted to the system to be adjusted, and input it into the system to be adjusted; i i i i
[0009] The system to be adjusted receives the adjustment quantity, adjusts its own state, and outputs the target quantity.
[0010] Further, the micro control system includes a memory unit, a processor unit, a DAC register unit, and an ADC register unit; the memory unit stores the firefly self-tuning algorithm; the processor unit converts the position data x of the fireflies into adjustment quantity data according to the firefly self-tuning algorithm, and then through the DAC register unit, converts the adjustment quantity data into an output analog voltage signal; i i
[0011] An amplification bias module and a sensor module are optionally provided between the micro control system and the system to be adjusted;
[0012] When the system to be adjusted needs to amplify the output analog voltage signal, provide a DC bias, and convert it into a non-voltage physical quantity, the output analog voltage signal passes through the amplification bias module and the sensor module, and then is converted into an adjustment quantity adapted to the system to be adjusted and input into the system to be adjusted; the target quantity output by the system to be adjusted passes through the sensor module and the amplification bias module, is converted into an input analog voltage signal, the ADC register unit converts the input analog voltage signal into target quantity data, and then converts the target quantity data into the brightness value I of the fireflies i and record it in an array;
[0013] When the system to be adjusted does not need to amplify the output analog voltage signal, provide a DC bias, or convert it to a non-voltage physical quantity, the output analog voltage signal is directly used as the adjustment quantity of the system to be adjusted and input to the system to be adjusted; the target quantity output by the system to be adjusted is directly converted into target quantity data through the ADC register unit, and then the target quantity data is converted into the brightness value I of the firefly i and recorded in the array.
[0014] Furthermore, the self-tuning device includes a real-time monitoring module that displays the adjustment quantity and target quantity corresponding to the optimal state adjustment scheme in the sorting result in real time.
[0015] Furthermore, the micro control system includes a GPIO register unit, and the processor unit controls the display of the real-time monitoring module by configuring the GPIO register unit.
[0016] Furthermore, the quicksort algorithm rearranges the array elements through a partitioning operation. The partitioning operation is to select the first element of the array as the reference value, so that the elements smaller than the reference value are all on the left side of the reference value, and the elements larger than the reference value are all on the right side of the reference value. The partitioning operation is recursively repeated on the sub-arrays on the left and right sides of the reference value, and finally the brightness value I corresponding to the state adjustment scheme from the worst to the best in this round of iteration is obtained i Sorting result.
[0017] Furthermore, the position data x of the initial n fireflies i is randomly generated within the preset search domain through initialization parameters.
[0018] Furthermore, the position data x of the firefly is updated through the following position update formula i , where the position data of the firefly with the highest brightness is not updated; the position update formula is:
[0019] x i (t + 1) = x i (t) + β0exp(-γr ij 2 )(x j (t) - x i (t)) + αδ t ε i ,
[0020] where t is the number of iterations in this round, β0 is the maximum attraction, γ is the light absorption coefficient, r ij is the distance from firefly i to firefly j, x j is the position of firefly j, α is the random term coefficient, δ is the attenuation coefficient, and ε i is the random walk vector.
[0021] Further, the self-tuning device includes a downloader, and the firefly self-tuning algorithm is downloaded to the memory unit of the micro control system through the downloader.
[0022] Further, the system to be adjusted is a laser path alignment system, which includes a laser, an optical lens, a coupling interface and an optical fiber; the adjustment amount is the pitch and yaw azimuth of the optical lens, and the target amount is the laser power entering the optical fiber from the coupling interface; the sensor module includes a piezoelectric ceramic installed at the optical lens and a photoelectric detection device installed at the optical fiber; the output analog voltage of the micro control system is connected to the piezoelectric ceramic, and the telescopic length of the piezoelectric ceramic is controlled by the output analog voltage to adjust the pitch and yaw azimuth of the optical lens; the photoelectric detection device converts the laser power entering the optical fiber from the coupling interface into an input analog voltage, and the input analog voltage is connected to the micro control system; the micro control system generates an optimal adjustment amount for controlling the pitch and yaw azimuth of the optical lens, so that the laser power entering the optical fiber from the coupling interface in the laser path alignment system is maximized.
[0023] Further, the system to be adjusted is an optical parametric oscillation system, which includes a laser, an optical resonator and a nonlinear optical crystal; the adjustment amount is the length of the optical resonator and the temperature of the nonlinear optical crystal, and the target amount is the power of the laser output by the optical parametric oscillation system; the sensor module includes a piezoelectric ceramic installed at the optical resonator, a Peltier element installed at the nonlinear optical crystal and a photoelectric detection device; the output analog voltage of the micro control system is connected to the piezoelectric ceramic, and the telescopic length of the piezoelectric ceramic is controlled by the output analog voltage to adjust the length of the optical resonator; the output analog voltage of the micro control system is connected to the Peltier element, and the temperature of the Peltier element is controlled by the output analog voltage to adjust the temperature of the nonlinear optical crystal; the photoelectric detection device converts the power of the output laser generated by the optical parametric oscillation system into an input analog voltage, and the input analog voltage is connected to the micro control system; the micro control system generates an optimal adjustment amount for controlling the length of the optical resonator and the temperature of the nonlinear optical crystal, so that the power of the output laser generated by the optical parametric oscillation system is maximized.
[0024] The advantages of the present invention compared with the prior art are as follows:
[0025] (1) The present invention adds a quick sorting mechanism to the existing firefly self-tuning method, sorts the brightness of fireflies in each iteration, obtains all adjustment schemes from the worst to the best at the same time, evaluates the optimization performance of self-tuning in real time, and can obtain the optimal adjustment scheme in advance when the number of iterations does not reach the maximum number of iterations, effectively improving the efficiency of system state self-tuning.
[0026] (2) The present invention downloads the improved firefly self-tuning algorithm to the micro control system, converts the position data of the firefly into the actual adjustment amount, adjusts the state of the system to be adjusted, and completes the optimization according to the target amount returned by the system to be adjusted. Compared with the existing methods, the present invention does not need to know the specific objective function of the system to be adjusted and can be compatible with more application scenarios.
[0027] (3) The system state self-tuning device provided by the present invention, compared with the existing methods, has a simple and intuitive algorithm principle, requires very few parameters to be set, has a low hardware implementation cost, does not require a large amount of data sets related to professional knowledge to train the model, and can effectively perform global search through the random walk mechanism to avoid being trapped in local optimal solutions. Description of the Drawings
[0028] Figure 1 It is a schematic diagram of the hardware composition of the system state self-tuning device;
[0029] Figure 2 It is a schematic diagram of the hardware composition of an embodiment of the system state self-tuning device;
[0030] Figure 3 It is a schematic diagram of the experimental test results of the firefly position data distribution;
[0031] Figure 4 It is a schematic diagram of the change curve of the returned worst target value with the number of iterations;
[0032] Figure 5 It is a schematic diagram of the change curve of the returned optimal target value with the number of iterations. Detailed Embodiments
[0033] In order to better understand the technical solution of the present invention, the following combines the drawings to specifically elaborate on the specific embodiments of the present invention.
[0034] As Figure 1 shown, the components of the self-tuning device proposed by the present invention include: a downloader, a micro control system, an amplification and bias module, a sensor module, a system to be adjusted, and a real-time monitoring module. The micro control system among them includes a bus, a memory unit, a processor unit, a DAC register unit, an ADC register unit, a GPIO register unit, and input / output ports.
[0035] The downloader is used to download the firefly self-tuning algorithm program to the memory unit of the micro control system. The micro control system is the main body of the system state self-tuning device: the bus of the micro control system is used to connect the processor unit and other supporting components for the transmission of instructions and data; the memory unit is used to store the firefly self-tuning algorithm program; the processor unit reads and executes the firefly self-tuning algorithm program from the memory unit; the DAC register unit is used to implement the conversion of digital data into an output analog voltage signal; the ADC register unit is used to implement the conversion of an external input analog voltage signal into digital data; the GPIO register unit is used to implement the level setting of digital signals; the input / output port provides an interface for electrical signals and external devices. The amplification bias module amplifies the amplitude of the analog voltage signal and provides a DC bias. The sensor module is used to implement the conversion between the analog voltage signal and the non-voltage physical quantity signal. The system to be adjusted accepts the adjustment amount output by the micro control system, and inputs the target amount into the micro control system as the optimization basis of the firefly self-tuning algorithm after waiting for the action time to end. The real-time monitoring module is used to display the adjustment amount and target amount corresponding to the optimal solution of the self-tuning process in real time.
[0036] The steps for the above self-tuning device to realize the system state self-tuning of intelligent optimization of the target amount include:
[0037] Step (1): After the power-on cycle, the micro control system enters the download mode, downloads the firefly self-tuning algorithm program to the memory unit of the micro control system through the downloader, the micro control system enters the working mode, and the processor unit reads and executes the firefly self-tuning algorithm program from the memory unit through the bus.
[0038] Step (2): The processor unit randomly generates the position data x of n fireflies within the preset search domain range A according to the initialization parameters of the firefly self-tuning algorithm program. i The initialization parameters of the firefly self-tuning algorithm program include: the firefly population size n, the maximum number of iterations MaxGeneration, the search domain range A, the maximum attraction β0, the light absorption coefficient γ, the random term coefficient α, and the attenuation coefficient δ.
[0039] Step (3): The processor unit converts the position data x of the fireflies into adjustment amount data according to the firefly self-tuning algorithm program, and the processor unit configures the DAC register unit through the bus to convert the adjustment amount data into an output analog voltage signal. i
[0040] Step (4): Convert the output analog voltage signal in step (3) into an adjustment amount suitable for the system to be adjusted through an amplification and biasing module and a sensor module, and input the adjustment amount into the system to be adjusted to change the state of the system to be adjusted. In practical applications, if it is not necessary to amplify the analog voltage, provide a DC bias, or convert it into a non-voltage physical quantity, the two ends of the amplification and biasing module and the sensor module are directly connected and short-circuited with wires.
[0041] Step (5): After waiting for the preset action time to end, the system to be adjusted outputs a target quantity, and the target quantity is converted into an input analog voltage signal through a sensor module and an amplification and biasing module. In practical applications, if it is not necessary to convert the target quantity into an analog voltage, and it is not necessary to amplify the analog voltage and provide a DC bias, the two ends of the sensor module and the amplification and biasing module are directly connected and short-circuited with wires.
[0042] Step (6): The processor unit of the micro control system configures the ADC register unit through the bus, converts the input analog voltage signal corresponding to the target quantity in step (5) into target quantity data, and then converts the target quantity data into the brightness value I of the firefly according to the firefly self-tuning algorithm program. i And record it in the array arr.
[0043] Step (7): As Figure 1 shown, the processor unit of the micro control system calls the quicksort algorithm to sort the brightness value I of the firefly recorded in the array arr in step (6) according to the firefly self-tuning algorithm program. i The quicksort algorithm rearranges the array elements through a partitioning operation, that is, selects the first element of the array arr as the reference value, ensures that the elements smaller than the reference value are all on the left side of the reference value, and the elements larger than the reference value are all on the right side of the reference value. The partitioning operation is continued recursively on the sub-arrays on the left and right sides of the reference value. Finally, the sorting result of the brightness value I i corresponds to the state adjustment plan from the worst to the best in this round of iteration.
[0044] Step (8): As Figure 1 shown, the processor unit of the micro control system configures the GPIO register unit through the bus and outputs a digital signal to set the real-time monitoring module. The real-time monitoring module displays the adjustment amount and the target quantity corresponding to the optimal state adjustment plan selected through sorting in step (7) in real time.
[0045] Step (9): The processor unit of the micro control system, according to the firefly self-tuning algorithm program, based on the brightness value I in step (7). iThe sorting result determines the movement relationship of fireflies, that is, the firefly with lower brightness moves towards the firefly with higher brightness, and the position data of the fireflies is updated using the position update formula written in the firefly self-tuning algorithm program. The position data of the firefly with the highest brightness is not updated. The position update formula is:
[0046] x i (t + 1) = x i (t) + β0exp(-γr ij 2 )(x j (t) - x i (t)) + αδ t ε i ,
[0047] where t is the number of iterations in this round, ε i is the random walk vector, r ij is the distance from firefly i to firefly j, and other parameters are defined in step (2).
[0048] Step (10): The processor unit of the micro control system determines whether the iteration in this round reaches the maximum number of iterations MaxGeneration in step (2) according to the firefly self-tuning algorithm program. If the judgment result is "yes", the iteration ends; if the judgment result is "no", steps (3), (4), (5), (6), (7), (8), (9), and (10) are continued.
[0049] Step (11): After the iteration ends, the processor unit of the micro control system selects the position data x i corresponding to the firefly with the highest brightness value I i in the sorting result in step (7) as the optimal solution, and converts the adjustment amount corresponding to the optimal solution into an output analog voltage signal through the configuration of the DAC register unit, and after passing through the amplification and bias module and the sensor module, it is converted into an adjustment amount adapted to the system to be adjusted and connected to the system to be adjusted. In practical applications, if there is no need to amplify the analog voltage, provide a DC bias, or convert to a non-voltage physical quantity, the two ends of the amplification and bias module and the sensor module are directly connected and short-circuited with wires.
[0050] The following gives an embodiment of the technical solution of the present invention and an explanation of the technical effect:
[0051] As Figure 2As shown, the downloader is a UART downloader, the micro control system is the EVAL-ADuC7020 development module produced by Analog Device, the system to be adjusted is the EVAL-ADuC7020MKZ development module produced by Analog Device, the real-time monitoring module is the Nokia5110LCD monitoring display screen produced by Nokia. The EVAL-ADuC7020 development module and the EVAL-ADuC7020MKZ development module use a 32-bit bus to transmit instructions and data. The processor unit is an ARM7TDMI processor, the memory unit is a Flash memory with a capacity of 62KB, and DAC registers and ADC registers with a sampling rate of 1MS / s and a resolution of 12 bits are used. The GPIO register of the EVAL-ADuC7020 module is connected to the LCD monitoring display screen through 8 digital signal ports. In this embodiment, it is not necessary to amplify the analog voltage, provide a DC bias, or convert the analog voltage into a non-voltage physical quantity. Both ends of the amplification bias module and the sensor module are directly connected and short-circuited with wires.
[0052] In this embodiment, the steps for the self-tuning device to achieve the system state self-tuning of the intelligent optimization of the target quantity are as follows:
[0053] Step (1): After the power-on cycle, as Figure 2 shown, the micro control system EVAL-ADuC7020 enters the download mode. The firefly self-tuning algorithm program is downloaded to the Flash memory of the micro control system EVAL-ADuC7020 through the UART serial downloader. The ARM7TDMI processor of the micro control system EVAL-ADuC7020 reads and executes the firefly self-tuning algorithm program from the Flash memory through the bus. After the power-on cycle, as Figure 2 shown, the system to be adjusted EVAL-ADuC7020MKZ enters the download mode. The test function program is downloaded to the Flash memory of the system to be adjusted EVAL-ADuC7020MKZ through the UART serial downloader. The ARM7TDMI processor of the system to be adjusted EVAL-ADuC7020MKZ reads and executes the test function program from the Flash memory through the bus.
[0054] The test function in the program is: F(p,q) = exp(-(p - 4) 2 -(q - 4) 2 ) + exp(-(p + 4) 2 -(q - 4) 2 ) + 1.5exp(-p 2 -(q + 4) 2 ) + 2.0exp(-p 2 -q 2), where p and q represent the adjustment data, and F(p, q) represents the target data.
[0055] Step (2): As Figure 2 shown, the ARM7TDMI processor of the micro control system EVAL-ADuC7020 sets the initial parameters according to the firefly self-tuning algorithm program: the firefly population size n = 50, the maximum number of iterations MaxGeneration = 100, the search domain range A = [-5, +5], the maximum attractiveness β0 = 1.0, the light absorption coefficient γ = 1.0, the random term coefficient α = 0.2, and the attenuation coefficient δ = 0.97. As Figure 2 shown, the ARM7TDMI processor of the micro control system EVAL-ADuC7020 randomly generates the position data of n fireflies within the search domain range A, and the position data includes two coordinate data with the range of A.
[0056] Step (3): As Figure 2 shown, the ARM7TDMI processor of the micro control system EVAL-ADuC7020 converts the position data of the fireflies into adjustment data according to the firefly self-tuning algorithm program. The ARM7TDMI processor of the micro control system EVAL-ADuC7020 configures the DAC register through the bus and converts the adjustment data into an analog voltage signal.
[0057] Step (4): Output the analog voltage signal in Step (3) from the DAC0 port and DAC1 port of the micro control system EVAL-ADuC7020 as Figure 2 shown, and connect them to the ADC0 port and ADC1 port of the system to be adjusted EVAL-ADuC7020MKZ respectively through wire direct connection and short connection.
[0058] Step (5): As Figure 2 shown, the ARM7TDMI processor of the system to be adjusted EVAL-ADuC7020MKZ configures the ADC register through the bus, converts the input analog voltage signals connected to the ADC0 port and ADC1 port in Step (4) into adjustment data p and q. Within the preset action time, the ARM7TDMI processor of the system to be adjusted EVAL-ADuC7020MKZ calculates the corresponding target data according to the test function F(p, q), configures the DAC register through the bus to convert the target data into an analog voltage signal, and the analog voltage signal is output from the DAC0 port of the system to be adjusted EVAL-ADuC7020MKZ and connected to the ADC0 port of the micro control system EVAL-ADuC7020 as Figure 2 shown through wire direct connection and short connection.
[0059] Step (6): AsFigure 2 The ARM7TDMI processor of the micro control system EVAL-ADuC7020 shown configures the ADC register through the bus, converts the input analog voltage signal of the ADC0 port of the micro control system EVAL-ADuC7020 in step (5) into target quantity data, and then converts the target quantity data into the brightness data of fireflies according to the firefly self-tuning algorithm program.
[0060] Step (7): As Figure 2 The ARM7TDMI processor of the micro control system EVAL-ADuC7020 shown sorts the brightness data of the fireflies in step (6) according to the firefly self-tuning algorithm program, calls the quicksort algorithm, records the brightness data in an array, and rearranges the array elements through a partitioning operation, that is, selects the first element of the array as the reference value, ensures that the elements smaller than the reference value are on the left of the reference value, and the elements larger than the reference value are on the right of the reference value. The partitioning operation is continued recursively for the sub-arrays on the left and right of the reference value. Finally, the sorting result of the brightness data corresponds to the state adjustment plan from the worst to the best in this round of iteration.
[0061] Step (8): As Figure 2 The ARM7TDMI processor of the micro control system EVAL-ADuC7020 shown configures the GPIO register through the bus, uses the eight channels of GPIO0~GPIO7 to output digital signals, configures the LCD monitoring display screen according to the SPI (Serial Peripheral Interface) protocol, and the LCD monitoring display screen displays the adjustment quantity and target quantity corresponding to the optimal state adjustment plan selected by sorting in this round of iteration in step (7) in real time.
[0062] Step (9): As Figure 2 The ARM7TDMI processor of the micro control system EVAL-ADuC7020 shown determines the movement relationship of the fireflies according to the sorting result of the brightness data of this round of iteration in step (7) according to the firefly self-tuning algorithm program, that is, the fireflies with low brightness move towards the fireflies with high brightness, and updates the position data of the fireflies using the position update formula. The position data of the firefly with the highest brightness is not updated.
[0063] Step (10): As Figure 2 The ARM7TDMI processor of the micro control system EVAL-ADuC7020 shown judges whether the maximum number of iterations MaxGeneration has been reached in this round of iteration according to the firefly self-tuning algorithm program: If the judgment result is "yes", the iteration ends; if the judgment result is "no", continue to execute steps (3), (4), (5), (6), (7), (8), (9), and (10).
[0064] Step (11): After the iteration ends, as Figure 2 shown, the ARM7TDMI processor of the micro control system EVAL-ADuC7020 selects the position data of the firefly with the highest brightness in the sorting result in step (7) as the optimal solution according to the firefly self-tuning algorithm program. The adjustment amount corresponding to the optimal solution is converted into an analog voltage signal by configuring the DAC register, and the analog voltage signal is output from the DAC0 port and the DAC1 port of the micro control system EVAL-ADuC7020 as shown in Figure 2 and is directly connected and short-circuited through a wire and then respectively connected to the system to be adjusted EVAL-ADuC7020MKZ.
[0065] Figure 3 shown is a schematic diagram of the experimental test results of the firefly position distribution. The position data of the fireflies corresponding to the iteration times t of 0, 5, 10, 20, 50, and 100 respectively are shown. The position data includes two coordinate data of X and Y. As shown in Figure 3 as the iteration time t increases, the positions of 50 fireflies continuously converge to the position of coordinates X = 0 and Y = 0, and the convergence range continuously shrinks. The position of coordinates X = 0 and Y = 0 corresponds to the optimal solution (maximum value) of the test function F(p, q) in this embodiment.
[0066] Figure 4 shown is a schematic diagram of the change curve of the returned worst objective value with the iteration times. When the maximum iteration times MaxGeneration is set to 100 and the firefly population size n is set to 5, 10, 25, 50, and 100 respectively, the returned objective quantities (brightness data) are sorted using the quick sorting mechanism in the firefly self-tuning algorithm in step (7) to obtain the change curve of the returned worst objective value corresponding to the iteration times t from 0 to 100 as shown in Figure 4 The proximity of the worst objective value to the maximum value 2.00 of the test function F(p, q) is used to characterize the range of the firefly position distribution. The closer the worst objective value is to the maximum value 2.00, the smaller the range of the firefly position distribution. Figure 4 The results shown indicate that as the iteration times t increases, the range of the firefly position distribution continuously converges and shrinks; as the population size n increases, the convergence speed of the firefly position distribution range accelerates; when the population size n reaches more than 25, the convergence speed of the firefly position distribution range tends to be stable.
[0067] Figure 5 shown is a schematic diagram of the change curve of the returned optimal objective value with the iteration times. When the maximum iteration times MaxGeneration is set to 100 and the firefly population size n is set to 5, 10, 25, 50, and 100 respectively, the returned objective quantities (brightness data) are sorted using the quick sorting mechanism in the firefly self-tuning algorithm in step (7) to obtainFigure 5 The change curve of the returned optimal objective value corresponding to the iteration times t from 0 to 100 as shown. The degree of optimization of the target quantity after the system state self-tuning is characterized by the proximity of the optimal objective value to the maximum value 2.00 of the test function F(p,q). The closer the optimal objective value is to the maximum value 2.00, the higher the degree of optimization of the target quantity after the system state self-tuning in this round of iteration. Figure 5 The results shown indicate that as the iteration times t increase, the degree of optimization of the target quantity continuously improves; as the population size n increases, the speed of improvement of the degree of optimization of the target quantity accelerates; when the population size n reaches more than 25, the speed of improvement of the degree of optimization of the target quantity tends to be stable. As Figure 5 shown, before the iteration times t = 10, the returned optimal objective value of the system to be adjusted is already very close to the maximum value 2.00 of the test function F(p,q). It shows that the system state self-tuning device and method for realizing the intelligent optimization of the target quantity provided by the present invention can obtain the optimal adjustment scheme in advance when the iteration times t do not reach the maximum iteration times MaxGeneration.
[0068] The following gives two specific application embodiments of the technical solution of the present invention:
[0069] System to be adjusted Example 1: Laser path alignment system.
[0070] The composition of the laser path alignment system includes a laser, an optical lens, a coupling interface, and an optical fiber. The working process of the laser path alignment system is that the laser emits laser light, the optical lens reflects the laser light, changes the path direction of the laser light, and by adjusting the pitch and yaw azimuth of the optical lens, the path of the laser light is aligned to the coupling interface, and the laser light enters the optical fiber from the coupling interface. Taking the laser path alignment system as the system to be adjusted, the adjustment quantity is the pitch and yaw azimuth of the optical lens, and the target quantity is the power of the laser light entering the optical fiber from the coupling interface. The sensor module includes a piezoelectric ceramic installed on the back of the optical lens and a photoelectric detection device installed at the rear end of the optical fiber. The output analog voltage of the micro control system is connected to the piezoelectric ceramic, and the pitch and yaw azimuth of the optical lens can be adjusted by controlling the telescopic length of the piezoelectric ceramic through the output analog voltage. The photoelectric detection device converts the power of the laser light entering the optical fiber from the coupling interface into an input analog voltage, and the input analog voltage is connected to the micro control system. The system state self-tuning device for realizing the intelligent optimization of the target quantity can directly complete the optimization according to the returned target quantity by using the micro control system, can quickly generate the optimal adjustment quantity data for controlling the pitch and yaw azimuth of the optical lens, and finally maximize the power of the laser light entering the optical fiber in the laser path alignment system.
[0071] System to be adjusted Example 2: Optical parametric oscillation system.
[0072] The composition of an optical parametric oscillation system includes a laser, an optical resonator, and a nonlinear optical crystal. The working process of the optical parametric oscillation system is as follows: the laser emits laser light, which enters the optical resonator and undergoes resonance inside. The resonant laser interacts with the nonlinear optical crystal to generate output laser light with different wavelengths. By adjusting the length of the optical resonator and the temperature of the nonlinear optical crystal, the interaction between the resonant laser and the nonlinear optical crystal can be affected, and ultimately the power of the output laser can be changed. Taking the optical parametric oscillation system as the system to be adjusted, the adjustment quantities are the length of the optical resonator and the temperature of the nonlinear optical crystal, and the target quantity is the power of the output laser. The sensor module includes a piezoelectric ceramic installed on the optical resonator, a Peltier element installed at the bottom of the nonlinear optical crystal, and a photoelectric detection device. The output analog voltage of the micro control system is connected to the piezoelectric ceramic, and the length of the piezoelectric ceramic can be adjusted by controlling the output analog voltage to control the expansion and contraction length of the piezoelectric ceramic, thereby adjusting the length of the optical resonator. The output analog voltage of the micro control system is connected to the Peltier element, and the temperature of the nonlinear optical crystal can be adjusted by controlling the output analog voltage to control the temperature of the Peltier element. The photoelectric detection device converts the power of the output laser generated by the optical parametric oscillation system into an input analog voltage, and the input analog voltage is connected to the micro control system. The system state self-tuning device for realizing intelligent optimization of the target quantity can directly complete the optimization according to the returned target quantity by using the micro control system, quickly generate the optimal adjustment quantity data for controlling the length of the optical resonator and the temperature of the nonlinear optical crystal, and ultimately maximize the power of the output laser generated by the optical parametric oscillation system.
[0073] It can be understood that the present invention is described through embodiments. Those skilled in the art know that without departing from the spirit and scope of the present invention, various changes or equivalent replacements can be made to these features and embodiments. Additionally, under the teaching of the present invention, these features and embodiments can be modified to adapt to specific situations without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments that can fall within the scope of the claims of this application belong to the scope protected by the present invention.
[0074] The content not detailedly described in the specification of the present invention belongs to the well-known technology of those skilled in the art.
Claims
1. A system state self-tuning device for realizing intelligent optimization of target quantity, characterized in that: Including micro-control systems and systems to be adjusted; The microcontrol system loads and runs the firefly self-tuning algorithm to generate position data x of n fireflies. i , i is 1 to n; iteratively execute the following process: the firefly position data x i Convert it into the adjustment amount that is suitable for the system to be adjusted, input it into the system to be adjusted, receive the target amount output by the system to be adjusted, and generate the brightness value I of the firefly according to the target amount i And record it in an array, and use the quick sort algorithm to sort the brightness values of the fireflies recorded in the array. i Sort, get the sorting results, determine the movement relationship, and update the firefly position data x i ; After the iteration is completed, the position data corresponding to the firefly with the highest brightness value in the sorting result is taken as the optimal solution, converted into the adjustment amount suitable for the system to be adjusted, and input into the system to be adjusted; The system to be adjusted receives the adjustment amount, adjusts its own state, and outputs the target amount.
2. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 1, characterized in that: The microcontrol system includes a memory unit, a processor unit, a DAC register unit and an ADC register unit; the memory unit stores the firefly self-tuning algorithm; the processor unit converts the firefly position data x into i Convert it into adjustment data, and then convert it into an output analog voltage signal through a DAC register unit; An amplification bias module and a sensor module are optionally provided between the micro-control system and the system to be adjusted; When the system to be adjusted needs to amplify the output analog voltage signal, provide DC bias, and convert it to a non-voltage physical quantity, the output analog voltage signal is converted into an adjustment quantity adapted to the system to be adjusted through the amplification bias module and the sensor module, and then input into the system to be adjusted; the target quantity output by the system to be adjusted is converted into an input analog voltage signal through the sensor module and the amplification bias module, and the ADC register unit converts the input analog voltage signal into target quantity data, and then converts the target quantity data into the brightness value I of the firefly. i And record it into an array; When the system to be adjusted does not need to amplify the output analog voltage signal, provide DC bias, or convert it to a non-voltage physical quantity, the output analog voltage signal is directly used as the adjustment quantity of the system to be adjusted and input into the system to be adjusted; the target quantity output by the system to be adjusted is directly converted into target quantity data through the ADC register unit, and then the target quantity data is converted into the brightness value I of the firefly. i And record it in an array.
3. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 2, characterized in that: The self-tuning device includes a real-time monitoring module, which displays the adjustment amount and target amount corresponding to the optimal state adjustment scheme in the sorting result in real time.
4. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 3 is characterized in that: The microcontrol system includes a GPIO register unit, and the processor unit controls the display of the real-time monitoring module by configuring the GPIO register unit.
5. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 1, characterized in that: The quick sort algorithm rearranges the array elements through a partition operation, wherein the partition operation selects the first element of the array as the reference value, so that the elements smaller than the reference value are all located on the left side of the reference value, and the elements larger than the reference value are all located on the right side of the reference value, and the partition operation is repeated on the subarrays on the left and right sides of the reference value in a recursive manner, and finally the brightness value I corresponding to the state adjustment scheme from the worst to the best in this round of iteration is obtained. i Sort the results.
6. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 1, characterized in that: The initial position data x of n fireflies i , randomly generated within the preset search domain by initializing parameters.
7. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 1, characterized in that: Update the firefly's position data x using the following position update formula i , the position data of the firefly with the highest brightness is not updated; the position update formula is: x i (t+1)=x i (t)+β0exp(-γr ij 2 )(x j (t)-x i (t))+αδ t ε i , Where t is the number of iterations, β0 is the maximum attraction, γ is the light absorption coefficient, and r ij is the distance from firefly i to firefly j, x j is the position of firefly j, α is the random term coefficient, δ is the decay coefficient, ε i is the random walk vector.
8. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 1, characterized in that: The self-tuning device comprises a downloader, through which the firefly self-tuning algorithm is downloaded to the memory unit of the microcontrol system.
9. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 2, characterized in that: The system to be adjusted is a laser path alignment system, including a laser, an optical lens, a coupling interface and an optical fiber; the adjustment amount is the pitch, yaw and azimuth of the optical lens, and the target amount is the laser power entering the optical fiber from the coupling interface; the sensor module includes a piezoelectric ceramic installed at the optical lens and a photoelectric detection device installed at the optical fiber; the output analog voltage of the microcontrol system is connected to the piezoelectric ceramic, and the telescopic length of the piezoelectric ceramic is controlled by the output analog voltage to adjust the pitch, yaw and azimuth of the optical lens; The photoelectric detection device converts the laser power entering the optical fiber from the coupling interface into an input analog voltage, and the input analog voltage is connected to the microcontroller system; the microcontroller system generates the optimal adjustment amount for controlling the pitch, yaw and roll azimuth of the optical lens, so that the laser power entering the optical fiber from the coupling interface in the laser path alignment system is maximized.
10. The system state self-tuning device for realizing intelligent optimization of target quantity according to claim 2, characterized in that: The system to be adjusted is an optical parametric oscillator system, comprising a laser, an optical resonant cavity and a nonlinear optical crystal; the adjustment amount is the length of the optical resonant cavity and the temperature of the nonlinear optical crystal, and the target amount is the power of the laser output by the optical parametric oscillator system; the sensor module comprises a piezoelectric ceramic installed at the optical resonant cavity, a Peltier element installed at the nonlinear optical crystal and a photoelectric detection device; the output analog voltage of the microcontrol system is connected to the piezoelectric ceramic, and the telescopic length of the piezoelectric ceramic is controlled by the output analog voltage to adjust the length of the optical resonant cavity; the output analog voltage of the microcontrol system is connected to the Peltier element, and the temperature of the Peltier element is controlled by the output analog voltage to adjust the temperature of the nonlinear optical crystal; the photoelectric detection device converts the power of the output laser generated by the optical parametric oscillator system into an input analog voltage, and the input analog voltage is connected to the microcontrol system; the microcontrol system generates an optimal adjustment amount for controlling the length of the optical resonant cavity and the temperature of the nonlinear optical crystal, so that the power of the output laser generated by the optical parametric oscillator system is maximized.