Method, device and equipment for regulating and controlling storage array fan and readable medium

文档序号:238679 发布日期:2021-11-12 浏览:18次 中文

阅读说明:本技术 一种存储阵列风扇调控的方法、装置、设备及可读介质 (Method, device and equipment for regulating and controlling storage array fan and readable medium ) 是由 于鑫 于 2021-07-25 设计创作,主要内容包括:本发明提供了一种存储阵列风扇调控的方法、装置、设备及可读介质,该方法包括:获取温度传感器的温度值和需要调节的PID参数值;设置人工鱼群的初始参数并将需要调节的PID参数值映射到人工鱼的个体状态向量并形成人工鱼群;计算人工鱼群中各个人工鱼个体状态向量的适应度值,选取适应度值最大的人工鱼个体进行存储;更新人工鱼群的状态,并在每次更新后计算人工鱼群中各个人工鱼个体状态向量的适应度值并最终选取适应度值最大的人工鱼个体更新存储;根据最终选取的适应度值最大的人工鱼个体对应的PID参数值和温度值获取系统输出最优的PWM值并根据PWM值调控风扇。通过使用本发明的方案,能够在有效降低风扇功耗的前提下,解决系统散热问题。(The invention provides a method, a device, equipment and a readable medium for regulating and controlling a storage array fan, wherein the method comprises the following steps: acquiring a temperature value of a temperature sensor and a PID parameter value to be adjusted; setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school; calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage; updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store; and acquiring a system output optimal PWM value according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulating and controlling the fan according to the PWM value. By using the scheme of the invention, the problem of system heat dissipation can be solved on the premise of effectively reducing the power consumption of the fan.)

1. A method for regulating and controlling a storage array fan is characterized by comprising the following steps:

acquiring a temperature value of a temperature sensor and a PID parameter value to be adjusted;

setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school;

calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage;

updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store;

and acquiring a system output optimal PWM value according to the finally selected PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value, and regulating and controlling the fan according to the PWM value.

2. The method of claim 1, wherein the initial parameters of the artificial fish school comprise scale of the artificial fish school, perceived distance, maximum step size of movement, crowdedness, maximum number of iterations.

3. The method of claim 2, wherein setting initial parameters of the artificial fish swarm and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish swarm comprises:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

4. The method of claim 2, wherein the updating the state of the artificial fish swarm, and after each updating, calculating the fitness value of each state vector of the artificial fish in the artificial fish swarm and finally selecting the artificial fish with the largest fitness value to update and store comprises the following steps:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

5. The method of claim 4, wherein the predetermined behavior comprises foraging behavior, tailgating behavior, crowd behavior, and random behavior.

6. A storage array fan conditioning apparatus, the apparatus comprising:

the acquisition module is configured to acquire a temperature value of the temperature sensor and a PID parameter value required to be adjusted;

the mapping module is configured to set initial parameters of the artificial fish school, map PID parameter values to be adjusted to individual state vectors of the artificial fish and form the artificial fish school;

the calculation module is configured to calculate the fitness value of each state vector of the artificial fish in the artificial fish swarm, and the artificial fish individual with the largest fitness value is selected to be stored;

the updating module is configured to update the state of the artificial fish school, calculate the fitness value of each state vector of the artificial fish in the artificial fish school after each update, and finally select the artificial fish with the maximum fitness value to update and store;

and the adjusting module is configured to obtain an optimal PWM value output by the system according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulate and control the fan according to the PWM value.

7. The apparatus of claim 6, wherein the initial parameters of the artificial fish school comprise scale of the artificial fish school, perceived distance, maximum step size of movement, crowdedness, maximum number of iterations.

8. The apparatus of claim 7, wherein the mapping module is further configured to:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

9. A computer device, comprising:

at least one processor; and

a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 5.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.

Technical Field

The field relates to the field of computers, and more particularly to a method, apparatus, device and readable medium for storage array fan regulation.

Background

With the development of cloud storage and big data, the requirements on the bandwidth and the speed of data storage are increased year by year, and the universal storage array is gradually developed. When the storage array works under high pressure, the temperature of devices such as a CPU memory, a storage disk and the like is often rapidly increased, the existing system heat dissipation problem is the focus problem of the storage array industry, and how to rapidly dissipate heat under the precondition of effectively controlling the power consumption of the system is an urgent problem to be solved.

At present, the traditional storage array fan regulation and control mainly depends on a PID control algorithm, parameters need to be manually debugged at different environmental temperatures, a large amount of human resources are wasted, meanwhile, the parameters cannot be guaranteed to be the optimal solution of the PID control algorithm, and the optimal fan control strategy cannot be guaranteed.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a readable medium for regulating and controlling a storage array fan, which can automatically adjust PID parameters according to temperature, liberate a large amount of human resources, solve the problem of system heat dissipation on the premise of effectively reducing fan power consumption, and improve core competitiveness of a product.

In view of the above, an aspect of the embodiments of the present invention provides a method for regulating a storage array fan, including the following steps:

acquiring a temperature value of a temperature sensor and a PID parameter value to be adjusted;

setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school;

calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage;

updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store;

and acquiring a system output optimal PWM value according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulating and controlling the fan according to the PWM value.

According to one embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the perception distance, the maximum step size of movement, the crowdedness and the maximum iteration number.

According to one embodiment of the invention, setting initial parameters of the artificial fish swarm and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish swarm comprises the following steps:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

According to one embodiment of the invention, updating the state of the artificial fish swarm, calculating the fitness value of each artificial fish individual state vector in the artificial fish swarm after each updating, and finally selecting the artificial fish individual with the largest fitness value to update and store comprises the following steps:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

According to one embodiment of the invention, the preset behaviors include foraging behavior, rear-end behavior, crowd behavior, and random behavior.

In another aspect of the embodiments of the present invention, there is also provided a storage array fan control apparatus, including:

the acquisition module is configured to acquire a temperature value of the temperature sensor and a PID parameter value required to be adjusted;

the mapping module is configured to set initial parameters of the artificial fish school, map PID parameter values to be adjusted to individual state vectors of the artificial fish and form the artificial fish school;

the calculation module is configured to calculate the fitness value of each state vector of the artificial fish in the artificial fish swarm, and the artificial fish individual with the largest fitness value is selected to be stored;

the updating module is configured to update the state of the artificial fish school, calculate the fitness value of each state vector of the artificial fish in the artificial fish school after each update, and finally select the artificial fish with the largest fitness value to update and store;

and the adjusting module is configured to obtain the optimal PWM value output by the system according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally and regulate and control the fan according to the PWM value.

According to one embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the perception distance, the maximum step size of movement, the crowdedness and the maximum iteration number.

According to one embodiment of the invention, the mapping module is further configured to:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

In another aspect of an embodiment of the present invention, there is also provided a computer apparatus including:

at least one processor; and

a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of any of the methods described above.

In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of any one of the above-mentioned methods.

The invention has the following beneficial technical effects: according to the method for regulating and controlling the storage array fan, the temperature value of the temperature sensor and the PID parameter value to be regulated are obtained; setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school; calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage; updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store; according to the technical scheme that the system outputs the optimal PWM value and regulates and controls the fan according to the PWM value and the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, the PID parameter can be automatically regulated according to the temperature, a large amount of human resources are liberated, the problem of system heat dissipation can be solved on the premise of effectively reducing the power consumption of the fan, and the core competitiveness of the product is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.

FIG. 1 is a schematic flow chart diagram of a method of storage array fan regulation according to one embodiment of the present invention;

FIG. 2 is a schematic diagram of an apparatus for fan regulation of a storage array according to one embodiment of the present invention;

FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present invention;

fig. 4 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.

In view of the above, a first aspect of embodiments of the present invention provides an embodiment of a method for storage array fan regulation. Fig. 1 shows a schematic flow diagram of the method.

As shown in fig. 1, the method may include the steps of:

s1 obtains the temperature value of the temperature sensor and the PID parameter value to be adjusted.

S2 setting the initial parameters of the artificial fish school and mapping the PID parameter values to be adjusted to the individual state vector of the artificial fish and forming the artificial fish school.

Setting initial parameters of the artificial fish school, wherein the initial parameters comprise the scale N of the artificial fish school, the perceived distance Visual, the maximum Step length of movement, the congestion degree delta, the maximum iteration number Gen _ max and the like, and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish, namely X ═ K (K ═ max)P,Ki,Kd) And randomly generating N artificial fish individuals within the range of the perception distance Visual to form an initial fish school.

S3, calculating the fitness value of each state vector of each artificial fish in the artificial fish school, and selecting the artificial fish with the maximum fitness value for storage.

Calculating the adaptability value of each artificial fish individual state vector, comparing the adaptability values, selecting the artificial fish individual with the maximum adaptability value as the optimal artificial fish individual, and storing the state anda fitness value. The minimum performance index of ITAE can consider a large initial error less, emphasize the regulation time and reflect the rapidity and the accuracy of a control system, and because the artificial fish school is the largest problem, the fitness function of the invention is FT 1/J (ITAE), and the formula is as follows:

s4, updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store.

Simulating artificial fish to respectively execute foraging behavior, rear-end collision behavior, clustering behavior and random behavior, updating the positions of the artificial fish, after updating the positions of the artificial fish, calculating the fitness value of each artificial fish individual state vector in the artificial fish swarm after updating the positions, selecting the artificial fish individual with the maximum fitness value after updating the positions, comparing the artificial fish individual with the maximum fitness value after updating the positions with the fitness value of the artificial fish individual with the maximum fitness value before updating the positions, if the fitness value of the artificial fish individual with the maximum fitness value after updating the positions is larger than the fitness value of the artificial fish individual with the maximum fitness value before updating the positions, storing the artificial fish individual with the maximum fitness value after updating the positions, repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

S5, obtaining the optimal PWM value output by the system according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulating and controlling the fan according to the PWM value.

According to the technical scheme, the PID parameters can be automatically adjusted according to the temperature, a large amount of human resources are liberated, the problem of system heat dissipation can be solved on the premise of effectively reducing the power consumption of the fan, and the core competitiveness of the product is improved.

In a preferred embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the sensing distance, the maximum step size of movement, the crowdedness and the maximum number of iterations.

In a preferred embodiment of the present invention, setting initial parameters of the artificial fish swarm and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish swarm comprises:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

In a preferred embodiment of the present invention, updating the state of the artificial fish swarm, calculating the fitness value of each artificial fish individual state vector in the artificial fish swarm after each update, and finally selecting the artificial fish individual with the largest fitness value to update and store comprises:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

In a preferred embodiment of the invention, the predetermined behavior comprises foraging behavior, rear-end behavior, crowd behavior and random behavior.

When foraging is executed, the state of the artificial fish is set as XiIn the sensing range (d)ij≦ Visual) randomly selecting a state XjIf the fitness value of the state is greater thanIf the current state is one step forward, otherwise, the state X is selected again randomlyj. When the clustering behavior is executed, the state of the artificial fish is set as XiExploring the number n of fish schools in the current sensing rangefAnd a central position XCE.g. FT (X)C)/nf>δFT(Xi) If the food is more in the center of the fish school, the food is moved further towards the center of the fish school, wherein delta represents the crowding degree and is generally between 0 and 1, otherwise, the foraging is performed. Setting the state of the artificial fish as X when the rear-end collision is executediExploring individual fish school FT in current perception rangemaxLargest artificial fish individual XmaxIf FTmax/nf>δFTiWhen the direction is not crowded, the direction is XmaxThe direction is further, otherwise, foraging is performed. When performing random behavior, a state is randomly selected within the sensing range and then moved to that state, i.e. XiNext state of (2) Xi/nextComprises the following steps: xi/next=Xi+ r Visual, where r is [ -1,1]The random number of (2).

According to the technical scheme, the PID parameters can be automatically adjusted according to the temperature, a large amount of human resources are liberated, the problem of system heat dissipation can be solved on the premise of effectively reducing the power consumption of the fan, and the core competitiveness of the product is improved.

It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.

Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.

In view of the above, according to a second aspect of the embodiments of the present invention, there is provided a device for regulating fans of a storage array, as shown in fig. 2, the device 200 includes:

the acquisition module is configured to acquire a temperature value of the temperature sensor and a PID parameter value required to be adjusted;

the mapping module is configured to set initial parameters of the artificial fish school, map PID parameter values to be adjusted to individual state vectors of the artificial fish and form the artificial fish school;

the calculation module is configured to calculate the fitness value of each state vector of the artificial fish in the artificial fish swarm, and the artificial fish individual with the largest fitness value is selected to be stored;

the updating module is configured to update the state of the artificial fish school, calculate the fitness value of each state vector of the artificial fish in the artificial fish school after each update, and finally select the artificial fish with the largest fitness value to update and store;

and the adjusting module is configured to obtain the optimal PWM value output by the system according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally and regulate and control the fan according to the PWM value.

In a preferred embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the sensing distance, the maximum step size of movement, the crowdedness and the maximum number of iterations.

In a preferred embodiment of the present invention, the mapping module is further configured to:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

In a preferred embodiment of the present invention, the update module is further configured to:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

In a preferred embodiment of the invention, the predetermined behavior comprises foraging behavior, rear-end behavior, crowd behavior and random behavior.

In view of the above object, a third aspect of the embodiments of the present invention provides a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor implementing the method of:

acquiring a temperature value of a temperature sensor and a PID parameter value to be adjusted;

setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school;

calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage;

updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store;

and acquiring a system output optimal PWM value according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulating and controlling the fan according to the PWM value.

In a preferred embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the sensing distance, the maximum step size of movement, the crowdedness and the maximum number of iterations.

In a preferred embodiment of the present invention, setting initial parameters of the artificial fish swarm and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish swarm comprises:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

In a preferred embodiment of the present invention, updating the state of the artificial fish swarm, calculating the fitness value of each artificial fish individual state vector in the artificial fish swarm after each update, and finally selecting the artificial fish individual with the largest fitness value to update and store comprises:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

In a preferred embodiment of the invention, the predetermined behavior comprises foraging behavior, rear-end behavior, crowd behavior and random behavior.

In view of the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. FIG. 4 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer readable storage medium S31 stores a computer program S32 that when executed by a processor performs the method of:

acquiring a temperature value of a temperature sensor and a PID parameter value to be adjusted;

setting initial parameters of the artificial fish school, mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish school;

calculating the fitness value of each artificial fish individual state vector in the artificial fish school, and selecting the artificial fish individual with the maximum fitness value for storage;

updating the state of the artificial fish school, calculating the fitness value of each artificial fish individual state vector in the artificial fish school after each updating, and finally selecting the artificial fish individual with the maximum fitness value to update and store;

and acquiring a system output optimal PWM value according to the PID parameter value and the temperature value corresponding to the artificial fish individual with the maximum fitness value selected finally, and regulating and controlling the fan according to the PWM value.

In a preferred embodiment of the invention, the initial parameters of the artificial fish school comprise the scale of the artificial fish school, the sensing distance, the maximum step size of movement, the crowdedness and the maximum number of iterations.

In a preferred embodiment of the present invention, setting initial parameters of the artificial fish swarm and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish and forming the artificial fish swarm comprises:

setting initial parameters of the artificial fish school and mapping PID parameter values to be adjusted to individual state vectors of the artificial fish;

and randomly generating a corresponding number of artificial fish individuals within the sensing distance of the artificial fish school to form the artificial fish school.

In a preferred embodiment of the present invention, updating the state of the artificial fish swarm, calculating the fitness value of each artificial fish individual state vector in the artificial fish swarm after each update, and finally selecting the artificial fish individual with the largest fitness value to update and store comprises:

simulating the artificial fish to respectively execute preset behaviors and then updating the positions of the artificial fish;

responding to the position of the updated artificial fish, calculating the fitness value of each artificial fish individual state vector in the updated artificial fish group, and selecting the artificial fish individual with the maximum fitness value after the position is updated;

comparing the fitness value of the artificial fish individual with the maximum fitness value after the position is updated with the fitness value of the artificial fish individual with the maximum fitness value before the position is updated;

responding to the situation that the fitness value of the artificial fish individual with the maximum fitness value after the position is updated is larger than the fitness value of the artificial fish individual with the maximum fitness value before the position is updated, and storing the artificial fish individual with the maximum fitness value after the position is updated;

and repeating the steps to the maximum iteration times, and finally selecting the artificial fish individual with the maximum fitness value.

In a preferred embodiment of the invention, the predetermined behavior comprises foraging behavior, rear-end behavior, crowd behavior and random behavior.

Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.

Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.

Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.

In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.

It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.

The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:无极调控风扇及其应用的无极调控电路与方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!