Method for intelligent regulation and control of poultry house environment based on model prediction and improved particle swarm algorithm
By using a model-based prediction and improved particle swarm optimization algorithm for intelligent control of poultry house environment, the problems of high energy consumption and poor stability in poultry house environment control have been solved, achieving efficient and low-carbon control effects and reducing energy consumption by 17%-44%.
Patent Information
- Application Number
- CN202211065247.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2042-09-01
AI Technical Summary
Existing methods for controlling poultry house environments are energy-intensive and have poor system stability. Traditional threshold control methods are prone to causing stress in poultry. Model-based predictive control methods require the prediction of environmental parameters for multiple time periods, which increases complexity.
An intelligent control method based on model prediction and improved particle swarm optimization algorithm is adopted. The solution space is formed by abstracting the state of the control equipment. The improved particle swarm optimization algorithm is used to search for efficient and low-carbon control schemes in the solution space. The control effect is evaluated by combining the neural network prediction model.
It reduced energy consumption for facility regulation by 17%-44%, improved system stability, and the optimization effect was more significant when there was a large difference between the regulation target and the environmental condition.
Smart Images

Figure CN115562403B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of poultry house environment regulation, and more particularly, to a poultry house environment intelligent regulation method based on model prediction and improved particle swarm algorithm. BACKGROUND
[0002] Efficient production of greenhouse depends on suitable greenhouse microclimate environment, and greenhouse microclimate environment regulation depends on various agricultural facilities. Therefore, it is of great significance to realize greenhouse environment optimization regulation for agricultural production. Poultry house is a special greenhouse for poultry breeding. In modern poultry breeding, the temperature and humidity in the house are regulated to meet the conditions suitable for poultry growth, thereby improving economic benefits. At present, the threshold regulation method commonly used in poultry houses, that is, when the boundary of the specified regulation range is reached, the regulation device is turned on until the specific regulation constraint boundary is reached. Although it is simple and easy to implement, it has high energy consumption, poor system stability, and is prone to cause stress in poultry. Based on model predictive control (MPC) and other automatic control methods, the reliability is high and the energy consumption is low, but the environment parameters of multiple time periods need to be predicted in advance.
[0003] Therefore, it is necessary to develop a poultry house environment intelligent regulation method based on model prediction and improved particle swarm algorithm.
[0004] The information disclosed in the background section of the present application is only intended to deepen the understanding of the general background of the present application, and should not be regarded as acknowledging or implying in any form that the information constitutes prior art known to those skilled in the art. SUMMARY
[0005] The present application proposes a poultry house environment intelligent regulation method based on model prediction and improved particle swarm algorithm, which can abstract the state of the regulation device in the greenhouse according to the collected environment regulation device in the poultry house, form a solution space that can be adapted by a particle swarm algorithm, use an improved particle swarm algorithm to search for feasible solutions in the solution space, and find an efficient and low-carbon regulation scheme under the condition of reaching a given target. It includes:
[0006] Step 1: Obtain the poultry house device condition, determine the regulation target of the poultry house and input;
[0007] Step 2: Based on the poultry house device condition, construct a solution space and initialize particles;
[0008] Step 3: Determine the objective function according to the regulation target, calculate the fitness of the particle swarm, and output the optimal regulation scheme by solving the fitness of each particle using the objective function through the improved particle swarm algorithm.
[0009] Preferably, the control target is the temperature / humidity range suitable for the growth of poultry under the current breeding conditions in the poultry house.
[0010] Preferably, the step 1 comprises:
[0011] Step 1-1: Obtain the poultry house equipment situation, i.e. the list of all poultry breeding environmental control equipment in the current poultry house that can be controlled through networking, as well as the control position and energy consumption of each equipment;
[0012] Step 1-2: Determine the control target according to the poultry house equipment situation.
[0013] Preferably, the control equipment is encoded and abstracted into the solution space, including:
[0014] The state of the control equipment is encoded, and the state code of the control equipment is denoted as p, the value of p is a certain value between 0 and 1,
[0015] For equipment with only on and off states, 0 is off and 1 is on; for equipment with multiple positions, the state is p∈(0,1), 0 is the off state and 1 is the maximum position of the equipment;
[0016] The control scheme is composed of the state value of each equipment, denoted as matrix plan:
[0017]
[0018] Where, p kt is the operation that the kth equipment needs to perform at time t, k∈(1,m), t∈(1,n), m is the total number of equipment, n is the total number of time steps that need to be controlled, i.e. the total time steps.
[0019] Preferably, the step 3 comprises:
[0020] Step 3-1: Initialize the control target and determine the objective function;
[0021] Step 3-2: According to the input requirements, generate a specified number of particles in the control equipment control combination solution space by improving the particle swarm algorithm;
[0022] Step 3-3: The particles in the particle swarm generate a prediction of the future environmental conditions through the prediction model, the fitness of the prediction result is calculated by the objective function, after the fitness calculation is completed, the parameters in the particle swarm are updated and the current local optimal solution pbest is found, the particle state is updated, this step is iterated, in the iteration process, the neural network prediction model is used to evaluate the control scheme searched at present, and the evaluation result is recorded;
[0023] Step 3-4: For all feasible solutions meeting the target, the cost of the corresponding regulation scheme of the particle is calculated to obtain the global optimal solution gbest of all particles. After particle swarm optimization update iteration, the optimal regulation scheme is output.
[0024] Preferably, the objective function is:
[0025]
[0026] Wherein f represents the objective function, a represents the proportion of time steps meeting the set threshold in all time steps of the future regulation range, n is the total number of time steps of the regulation, t is the t time, represents the greenhouse characteristic data at t time, threshold represents the constraint condition, represents that the greenhouse characteristic data at t time meets the target threshold of the current regulation; price k is the cost required for the kth device regulation, k∈(1,m), cost measures the total cost of the current regulation scheme, and m represents the total number of devices.
[0027] Preferably, the step 3-2 comprises:
[0028] The control combination solution space is:
[0029] min F(plan,E,M)
[0030] s.t. p kt ∈(0,1)
[0031] M(E,plan)-T≤0
[0032] For a regulation scheme, the optimization matrix is required, where d is the number of devices, s represents the required operation steps, p kt represents the operation to be performed by the kth device at t time, M is an evaluation model constructed by the algorithm, used to evaluate the regulation effect, the recorded environment parameter E and the to-be-predicted regulation means plan are input, and the environment prediction result under the condition can be obtained, T is the environment parameter target value, which is the expected result required by the regulation scheme, F is an abstract regulation target function, representing a specific solution obtained by M, E and the regulation means plan; s.t. p kt ∈(0,1) represents the regulation operation p kt performed by the kth regulation device at t time, and its value is between 0 and 1.
[0033] Preferably, the step 3-3 comprises:
[0034] The particle position updating strategy iterates the particles for multiple rounds, and records the local optimal solution pbest of each particle and the global optimal solution gbest of all particles in each iteration. The velocity and position of the particle swarm are usually updated by the following formula:
[0035] v i+1 = wv i + c (1) r1(pbest i -x i ) + c (2) r2(gbest i -x i )
[0036] x i+1 = x i + v i
[0037] In the formula, is the velocity of the particle, is the position of the particle, w is the inertia factor, c (1) >0, c (2) >0 is the acceleration factor, r1 and r2 are constants between (0, 1), used to balance the influence of the individual optimal pbest and the global optimal gbest on the current particle, and i is the number of iterations.
[0038] Preferably, it further comprises:
[0039] The inertia factor w is improved by the following formula:
[0040]
[0041] In the formula, i is the current iteration number, I max is the maximum iteration number, M is the number of warmup rounds, w max and w min represent the maximum inertia factor and the minimum inertia factor, respectively;
[0042] The dynamic acceleration factor is improved by the following formula:
[0043]
[0044]
[0045] The acceleration factors c (1) and c (2) for the historical optimal pbest and the global optimal gbest are used to control the moving direction of the particle, limit the range of the acceleration factor c (1) , limit the range of the acceleration factor c (2)where i is the iteration number, I is the maximum iteration number max is the maximum iteration number;
[0046] The particle velocity is improved by the following formula:
[0047] v i+1 = g i wv i + c (1) r1(pbest i -x i ) + c (2) r2(gbest i -x i )
[0048]
[0049] Through the case A of the latest two movements of the particle i , A i-1 evaluate the cost, calculate g i in combination with the distance of the two movements of the particle, and multiply v i to correct the velocity, limit the new velocity value obtained by iteration according to the velocity constraints v max and v min , and further ensure that the optimization process proceeds smoothly.
[0050] Preferably, the current searched regulation scheme is evaluated by using a neural network prediction model, and the evaluation includes:
[0051] The neural network prediction model is used to learn the situation of the poultry house equipment, obtain the influence effect of the regulation amount on the environmental parameters, combine the generated regulation scheme, evaluate whether the regulation scheme achieves the expected regulation target, and calculate the energy consumption.
[0052] The beneficial effects are as follows:
[0053] 1. The improved particle swarm algorithm is used in the present application, the particle swarm algorithm is used to search the regulation strategy under the framework of model predictive control, and the purpose of reducing the energy consumption of facility regulation is finally achieved. In order to accelerate the search speed of the regulation scheme, the inertia factor, particle velocity and acceleration factor are improved respectively, and the generated scheme is evaluated by using a neural network prediction model, and finally the improved particle swarm algorithm is constructed.
[0054] 2. The regulation scheme generated in the present application can reduce the energy consumption by 17% to 44% compared with the threshold method commonly used in current production in terms of energy consumption, and the greater the difference between the regulation target and the current environmental state, the more obvious the optimization effect on energy consumption.
[0055] The method of the present application has other characteristics and advantages that will be apparent from and / or set forth in the accompanying drawings and the detailed description that follows, which together serve to explain the specific principles of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0056] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like parts throughout the figures, and wherein:
[0057] Figure 1 A flow chart showing the steps of the method for intelligent regulation of the environment of a poultry house based on a model prediction and improved particle swarm algorithm according to one embodiment of the present application. DETAILED DESCRIPTION
[0058] Preferred embodiments of the present application will be described in more detail below. Although the following describes preferred embodiments of the present application, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0059] A new generation of artificial intelligence technology represented by deep learning can avoid the problems of large number of parameters and complex modeling process in traditional mechanism modeling. In artificial neural network prediction models, the recurrent neural network (RNN) model, which is good at sequence processing, is most widely used in greenhouse microclimate prediction. In the aspect of regulation parameter optimization, many intelligent algorithms such as genetic algorithm and particle swarm algorithm are widely used in different problems. By encoding the regulation equipment into solution space and optimizing the solution space under the constraint condition, the approximate optimal solution can be found. Among them, the particle swarm optimization (PSO) is a kind of random search algorithm based on group cooperation, which simulates the foraging behavior of bird flock. Inspired by this algorithm, the acceleration factor, inertia factor and particle velocity of the standard particle swarm algorithm are modified to form an improved particle swarm algorithm, which is further applied to the problem of poultry house climate regulation, forming the technical scheme of the present application.
[0060] At present, scholars at home and abroad have established small climate simulation models based on neural networks for different greenhouse environments, and good results have been achieved. Studies have shown that artificial neural networks are feasible in predicting greenhouse microclimate environments, and the results obtained can provide a reference for future regulation. Particle swarm optimization, as a widely used swarm intelligence algorithm, has excellent application effects in optimization problems. Its algorithm characteristics are random search in the solution space, so using particle swarm optimization on the solution space formed by abstracting the state of the regulation device can find the approximate optimal solution under the constraint condition.
[0061] To facilitate understanding of the scheme and effects of the embodiments of the present application, a specific application example is given below. Those skilled in the art will understand that this example is only for the purpose of facilitating understanding of the present application, and any specific details are not intended to limit the present application in any way.
[0062] Example 1
[0063] Figure 1 A flowchart showing the steps of the poultry house environment intelligent regulation method based on model prediction and improved particle swarm optimization according to an embodiment of the present application is shown.
[0064] As Figure 1 shown, the poultry house environment intelligent regulation method based on model prediction and improved particle swarm optimization includes:
[0065] Step 1: Obtain the poultry house equipment situation, determine the regulation target of the poultry house and input it;
[0066] Step 2: Based on the poultry house equipment situation, construct the solution space and initialize the particles.
[0067] Step 3: Determine the objective function according to the regulation target, calculate the fitness of the particle swarm, and output the optimal regulation scheme by solving the fitness of each particle using the objective function through the improved particle swarm optimization algorithm.
[0068] In one example, the regulation target is the temperature / humidity range suitable for the growth of poultry under the current poultry farming state in the poultry house.
[0069] In one example, step 1 includes:
[0070] Step 1-1: Obtain the poultry house equipment situation, i.e. the list of all poultry farming environmental control equipment in the current poultry house that can be controlled through networking, as well as the control position and energy consumption of each device.
[0071] Step 1-2: Determine the regulation target based on the poultry house equipment situation.
[0072] In one example, the regulation device is encoded and abstracted into a solution space, including:
[0073] Encode the state of the control device, and the state of the control device is denoted as p, the value of p is a certain value between 0 and 1,
[0074] For devices with only on and off states, 0 is off and 1 is on; for devices with multiple gears, the state is p∈(0,1), 0 is the off state and 1 is the maximum gear of the device;
[0075] The control scheme is composed of the state value of each device, denoted as matrix plan:
[0076]
[0077] Where, p kt The kth device needs to perform operation at time t, k∈(1,m), t∈(1,n), m is the total number of devices, n is the total number of time steps that need to be controlled, i.e. the total time steps.
[0078] In one example, step 3 includes:
[0079] Step 3-1: initialize the control target and determine the objective function;
[0080] Step 3-2: according to the input demand, generate a specified number of particles in the control device control combination solution space by improving the particle swarm algorithm;
[0081] Step 3-3: the particles in the particle swarm generate predictions of future environmental conditions through the prediction model, and the objective function calculates the fitness of the prediction results. After the fitness calculation is completed, the parameters in the particle swarm are updated and the current local optimal solution pbest is found. Update the particle state, iterate this step, and use the neural network prediction model to evaluate the control scheme found in the current search, and record the evaluation results;
[0082] Step 3-4: for all feasible solutions that meet the target, calculate the cost of the control scheme corresponding to the particle, obtain the global optimal solution gbest of all particles, and output the optimal control scheme after particle swarm optimization update iteration.
[0083] In one example, the objective function is:
[0084]
[0085] Where, f represents the objective function, α represents the proportion of time steps that meet the set threshold in all time steps in the future control range, n is the total number of time steps, t is the tth time, Indicates the greenhouse feature data at time t, threshold represents the constraint condition, The greenhouse characteristic data representing the t time meets the target threshold of the current regulation; price k is the cost required for the kth device regulation, k ∈ (1, m), cost measures the total cost of the current regulation scheme, and m represents the total number of devices.
[0086] In one example, step 3-2 includes:
[0087] The control combination solution space is:
[0088] min F(plan, E, M)
[0089] s.t. p kt ∈(0, 1)
[0090] M(E, plan) - T ≤ 0
[0091] For a regulation scheme, the optimization matrix is required, where d is the number of devices, s represents the required operation steps, p kt represents the operation to be performed by the kth device at time t, M is an evaluation model constructed by the algorithm, used to evaluate the regulation effect, which inputs the recorded environment parameters E and the to-be-predicted regulation means plan, to obtain the environment prediction result under the condition, T is the environment parameter target value, which is the expected result required by the regulation scheme, F is an abstract regulation target function, representing a specific solution obtained by M, E, and the regulation means plan; s.t. p kt ∈(0, 1) indicates that the kth regulation device performs the regulation operation p kt at time t, and its value is between 0 and 1.
[0092] In one example, step 3-3 includes:
[0093] The particle position updating strategy performs multiple iterations on the particles, and records the local optimal solution pbest of each particle and the global optimal solution gbest of all particles in each iteration. Generally, the following formula is used to update the speed and position of the particle swarm:
[0094] v i+1 = wv i + c (1) r1(pbest i - x i ) + c (2) r2(gbest i - x i )
[0095] x i+1 = x i + v i
[0096] In the formula, is the velocity of the particle, is the position of the particle, w is the inertia factor, c (1) > 0, c (2) > 0 is the acceleration factor, r1, r2 are constants between (0, 1) to balance the influence of the personal best pbest and the global best gbest on the current particle, i is the number of iterations.
[0097] In one example, further comprising:
[0098] The inertia factor w is improved by:
[0099]
[0100] where i is the current iteration number, I max is the maximum iteration number, M is the number of rounds of warmup, w max and w min represent the maximum inertia factor and the minimum inertia factor, respectively;
[0101] The dynamic acceleration factor is improved by:
[0102]
[0103]
[0104] There are acceleration factors c (1) and c (2) for the historical best pbest and the global best gbest, respectively, to control the moving direction of the particle, limit the range of the acceleration factor c (1) , limit the range of the acceleration factor c (2) , i is the iteration number, I max is the maximum iteration number;
[0105] The particle velocity is improved by:
[0106] v i+1 = g i wv i + c (1) r1(pbest i -x i ) + c (2) r2(gbest i -x i )
[0107]
[0108] Through the situation A of the last two movements of the particle iA i-1 The cost is evaluated, and g is calculated according to the distance of two times of movement of the particle i , and is multiplied by v i , the velocity is corrected, and the velocity constraint v max and v min is limited to the new velocity value obtained by iteration, so as to ensure that the optimization process is stable.
[0109] In one example, using a neural network prediction model, evaluating the current searched regulation scheme includes:
[0110] Learning the situation of the poultry house equipment through the neural network prediction model, obtaining the influence effect of the regulation amount on the environmental parameters, combining the generated regulation scheme, evaluating whether the regulation scheme achieves the expected regulation target, and calculating the energy consumption.
[0111] Specifically, the poultry house environment intelligent regulation method based on model prediction and improved particle swarm optimization algorithm includes the following steps:
[0112] Step 1: Obtain the deployment situation of the networked environmental control equipment in the poultry house, including the list of networked environmental control equipment, the gear of each equipment and the energy consumption parameters, and at the same time, according to the current breeding situation in the poultry house, the regulation target is clear; Generally, the regulation target is given a certain temperature / humidity range, which can be obtained by interfacing with the user, and the user can feed back in natural language, for example: the temperature suitable for the current poultry house is 26-30℃, and the relative humidity is 70-85%.
[0113] Step 2: Based on the poultry house equipment data collected in step 1, construct the solution space and initialize the particle;
[0114] Step 3: Calculate the fitness of the solution space and the particle swarm determined in step 2, determine the objective function, use the improved particle swarm optimization algorithm proposed by the present application to solve the fitness of each particle using the objective function, and use the neural network prediction model to evaluate the regulation scheme obtained by the current particle swarm, and record the effect of the current scheme; The power consumption of agricultural equipment in the poultry house environment is used as a constraint condition for the particle swarm optimization algorithm search. The power consumption of the regulation equipment is given, and the parameters mainly include energy consumption (mainly electric energy and water), equipment number / control area and energy consumption unit price (yuan / hour).
[0115] Step 4: Use the particle position update strategy to perform multiple iterations on the particles, record the local optimal solution pbest of each particle and the global optimal solution gbest of all particles in each iteration, output the global optimal solution for subsequent regulation execution module to use.
[0116] Step 1 specifically includes:
[0117] Step 1-1: Obtain a list of all network-controllable devices in the poultry house and check their network control status. First, determine if the devices are functioning properly. Devices that are not functioning properly should be removed from the device log. Obtain the control status parameters and energy consumption parameters of the devices. Device control status parameters refer to the device's operating level. Generally, environmental control equipment is divided into two-level control devices (with only on / off states) and multi-level control devices. Device energy consumption parameters refer to the energy consumption of the equipment. To facilitate subsequent calculations and optimization, energy consumption is converted and evaluated using economic value, with the unit being (yuan / hour).
[0118] Steps 1-2: Based on the poultry house's breeding conditions, determine the control targets for the poultry house. Control targets refer to the temperature and humidity range within the house. These targets vary depending on the different breeding stages. Generally, a temperature / humidity range is given, such as: "The suitable temperature in the current poultry house is 26℃ to 30℃, and the relative humidity is 70% to 85%."
[0119] Step 2 specifically includes: encoding the control equipment and abstracting it into a solution space, including:
[0120] The state of the control equipment is encoded. The control equipment has states of on, off, and multiple settings. The state is encoded as a value between (0,1), where 0 represents off and 1 represents on. For equipment with multiple settings, its state is set to p, where p∈(0,1). The control scheme consists of the state values of each equipment, denoted as the matrix plan.
[0121]
[0122] Step 3 specifically includes:
[0123] Step 3-1: Initialize the control target: Input the optimization target collected in Step 1-3 into the model, and write the objective function according to the problem to be solved.
[0124] The objective function is an important indicator for evaluating the current state of the particle swarm. For the objective of this invention—searching for the optimal solution under specific conditions—the objective function is:
[0125]
[0126] Step 3-2: Based on the input requirements, the MPC module randomly generates a specified number of particles in the control combination space of the control device using the improved particle swarm optimization algorithm proposed in this invention; the MPC module will generate the control combination space according to the requirements, therefore, the problem in step 2 can be expressed by the following formula:
[0127] min F(plan,E,M)
[0128] s.t. p kt ∈(0,1)
[0129] M(E,plan)-T≤0
[0130] Step 3-3: the particles in the particle swarm generate a prediction of the future environmental condition through the prediction model, and the prediction result is fitness calculated by the objective function. After the fitness calculation is completed, the parameters in the particle swarm are updated and the current local optimal solution pbest is found, the particle state is updated, and this step is iterated. In the iteration process, the neural network prediction model is used to evaluate the current search control scheme, and the evaluation result is recorded. Through iteration, the control target is approached as much as possible, and the iteration is ended when the termination iteration condition is reached.
[0131] In step 3-3, the particle position updating strategy is iterated for multiple rounds, and the local optimal solution pbest of each particle and the global optimal solution gbest of all particles are recorded at the same time. The velocity and position of the particle swarm are updated by the following formula:
[0132] v i+1 =wv i +c (1) r1(pbest i -x i )+c (2) r2(gbest i -x i )
[0133] x i+1 =x i +v i
[0134] For the formula for updating the velocity and position of the particle swarm in step 3-3, the inertia factor w is improved:
[0135] In order to improve the search ability of the particle swarm algorithm in the non-convex solution space, a warmup process is designed. In the first few iterations of the algorithm, a small dynamic inertia factor 1e-6 is used to optimize the particles in a local range. Then gradually increase the inertia factor, so that the particles can jump out of the local optimum and search other solution space range. At this time, the inertia factor of M warmup stages can be expressed by the following formula:
[0136]
[0137] At this time, the inertia factor is first gradually increased through a warmup process, and then gradually decreased in a linear decreasing manner.
[0138] For the velocity and position updating formula of the particle swarm algorithm in step 3-3, the dynamic acceleration factor of the particle swarm algorithm is improved:
[0139] As far as possible, uniform search in the direction of historical optimum and global optimum helps the particles to pass through the optimal solution of the problem. The particle acceleration factor is selected to be linearly reduced with the iteration number:
[0140]
[0141]
[0142] For the velocity and position updating formula of the particle swarm algorithm in step 3-3, the dynamic acceleration factor of the particle swarm algorithm is improved:
[0143] Because the size of the search space is limited, the size of the particle velocity determines whether the optimization method will skip the optimal solution. When the speed is large, the search of the problem space is insufficient, which easily makes the particle go out of the problem boundary; when the speed is small, the search range is small, which is not conducive to the search of the entire problem space by the particle, and easily falls into local optimum. In actual problems, only limiting the range of particle velocity cannot guarantee that the particle swarm algorithm has a faster search speed. Therefore, the trend of particle motion is added to speed up the speed of the particle searching for the optimal value:
[0144] v i+1 =g i wv i +c (1) r1(pbest i -x i )+c (2) r2(gbest i -x i )
[0145]
[0146] Through the situation A of the latest two movements of the particle i , A i-1 evaluates the cost, and calculates g i by combining the distance of the two movements of the particle, and the calculation result is substituted into v i+1 =g i wv i +c (1) r1(pbest i -x i )+c (2) r2(gbest i -x i ) and multiplied by v i to correct the speed. According to the speed constraints v max and v minThe new speed value obtained by iteration is limited, thereby ensuring that the optimization process proceeds smoothly.
[0147] For a feasible solution found by the particle swarm algorithm in step 3-3, the application uses a neural network prediction model to predict the regulation effect.
[0148] Due to the searched regulation scheme, it is difficult to map to the regulation effect through a certain linear relationship, the traditional modeling based on the mechanism model requires a large number of parameters, the modeling process is complex and the migration in different greenhouses is poor, therefore, the neural network prediction model is selected to learn the situation of the poultry house equipment, the influence effect of the regulation quantity on the environmental parameters is obtained, whether the regulation scheme can achieve the expected regulation target is evaluated, and the energy consumption is calculated.
[0149] The structure of the neural network prediction model is not limited, and BP neural network or RNN neural network can be selected, only the format of the input and output of the neural network prediction model is constrained, and the input requirement of the regulation model is met.
[0150] Step 3-4: For all feasible solutions meeting the target, the cost of the regulation scheme represented by the particle is calculated, and the global optimal solution gbest of all particles is obtained by comparison. After particle swarm optimization update iteration, the MPC model outputs the optimal regulation scheme.
[0151] The application first collects the deployment situation of the equipment in the poultry house and the related parameters of the equipment, determines the regulation target, and inputs the regulation target into the model. In the actual application scene, the deployment situation of the equipment in the poultry house is the deployment situation of all networkable devices in the poultry house, including the regulation gear and the energy consumption parameter. The regulation gear of the equipment is mainly two gears (on and off) and multiple gears (in addition to on and off, there are different power gears).
[0152] Based on the given equipment information and regulation target, the solution space is optimized by improving the particle swarm algorithm, the found scheme is evaluated by the neural network prediction model, the local optimal solution pbest is obtained by iteration, and after the iteration is completed, the global optimal solution gbest is obtained, and the obtained regulation scheme is output.
[0153] Those skilled in the art should understand that the purpose of the above description of the embodiments of the application is only to exemplarily illustrate the beneficial effects of the embodiments of the application, and is not intended to limit the embodiments of the application to any examples given.
[0154] The above has described the embodiments of the application, the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A method for intelligent regulation of poultry house environment based on model prediction and improved particle swarm optimization algorithm, characterized in that, Comprise: Step 1: acquire the poultry house equipment situation, determine the control target of the poultry house and input; Step 2: based on the poultry house equipment situation, construct the solution space, initialize the particle; Step 3: according to the control target, determine the objective function, calculate the fitness of the particle group, solve the fitness of each particle by using the improved particle swarm optimization algorithm, and output the optimal control scheme; Wherein, the step 3 includes: Step 3-1: initialize the control target, determine the objective function; Step 3-2: according to the input requirement, randomly generate a specified number of particles in the control device control combination solution space by improving the particle swarm optimization algorithm; Step 3-3: the particles in the particle group generate the prediction of the future environmental conditions through the prediction model, the fitness of the prediction result is calculated by the objective function, after the fitness calculation is finished, the parameters in the particle group are updated and the current local optimal solution pbest is found out, the particle state is updated, this step is iterated, in the iteration process, the neural network prediction model is used to evaluate the current searched control scheme, and the evaluation result is recorded; Step 3-4: for all feasible solutions meeting the target, the cost of the control scheme corresponding to the particle is calculated, the global optimal solution gbest of all particles is obtained, after the particle swarm optimization update iteration, the optimal control scheme is output; Wherein, it also includes: The inertia factor w is improved by the following formula: where i is the current iteration number, I max is the maximum iteration number, M is the number of rounds of warmup, w max and w min represent the maximum and minimum inertia factors, respectively; The dynamic acceleration factor is improved by the following formula: There are acceleration factors c for the historical best pbest and the global best gbest. (1) and c (2) Used to control the direction of particle movement. Limited acceleration factor c (1) Scope Limited acceleration factor c (2) The range of i, where i is the iteration number, I max This represents the maximum number of iterations. The particle velocity is improved by the following formula: v i+1 = g i wv i + c (1) r1(pbest i - x i ) + c (2) r2(gbest i - x i ) A i , A i-1 The cost is evaluated, combined with the distance of the particle's two movements to calculate g i , and multiplied by v i to correct the speed. The new speed value is limited according to the speed constraints v max and v min , thereby ensuring that the optimization process proceeds smoothly.
2. The method of claim 1, wherein, The control target is the temperature / humidity range suitable for the growth of poultry under the current poultry breeding state.
3. The method of claim 2, wherein, The step 1 includes: Step 1-1: acquire the poultry house equipment situation, that is, the list of all poultry breeding environmental control equipment capable of being controlled through networking in the current poultry house, and the control position and energy consumption of each device; Step 1-2: according to the poultry house equipment situation, determine the control target.
4. The method of claim 1, wherein, By encoding the control device, it is abstracted into the solution space, including: The state of the control device is encoded, and the state code of the control device is denoted as p, the value of p is a certain value between 0 and 1, For the device with only on and off two states, 0 is off and 1 is on; for the device with multiple gears, its state is p∈(0,1), 0 is the off state and 1 is the maximum gear of the device; The control scheme is composed of the state value of each device, denoted as matrix plan: wherein p kt is the operation that the kth device needs to perform at time t, k e (1, m), t e (1, n), m is the total number of devices, and n is the total number of time steps, i.e., the total number of time steps that need to be regulated.
5. The method of claim 1, wherein, The objective function is: wherein f represents the target function, a represents the proportion of time steps that meet the set threshold in all time steps of the future control range, n is the total number of time steps of the control, t is the t time, represents the greenhouse feature data at the t time, and threshold represents the constraint condition, represents that the greenhouse feature data at the t time meets the target threshold of the current control; price k is the cost required for the kth device control, k∈(1,m), cost measures the total cost of the current control scheme, and m represents the total number of devices.
6. The method of claim 1, wherein, The step 3-2 includes: The control combination solution space is: min F(plan,E,M) s.t.p kt ∈(0,1) M(E,plan)-T≤0 For a regulation scheme, the optimization matrix is needed where d is the number of devices, s represents the required operation steps, p kt represents the operation to be performed at time t by the kth device, M is an evaluation model built by the algorithm, used to evaluate the regulation effect, by inputting the current recorded environmental parameters E and the to-be-predicted regulation means plan, the environmental prediction result under the condition can be obtained, T is the target value of the environmental parameters, which is the expected result required by the regulation scheme, F is an abstract regulation target function, representing a specific solution obtained by M, E, and the regulation means plan; s.t. kt ∈(0, 1) represents the regulation operation p kt performed by the kth regulation device at time t, and its value is between 0 and 1.
7. The method of claim 5, wherein, The step 3-3 includes: The particle position update strategy iterates the particles for multiple rounds, records the local optimal solution pbest of each particle and the global optimal solution gbest of all particles in each iteration, and usually realizes the velocity and position update of the particle group as follows: v i+1 = wv i + c (1) r1(pbest i - x i ) + c (2) r2(gbest i - x i ) x i+1 = x i + v i wherein is the velocity of the particle, is the position of the particle, w is the inertia factor, c (1) > 0, c (2) > 0 is the acceleration factor, r1, r2 are constants between (0, 1) to balance the influence of the personal best pbest and the global best gbest on the current particle, i is the number of iterations.
8. The method of claim 1, wherein, Using the neural network prediction model to evaluate the current searched control scheme includes: The poultry house equipment condition is learned by the neural network prediction model, an influence effect of the regulation and control quantity on the environment parameter is obtained, the generated regulation and control scheme is combined, whether the regulation and control scheme reaches the expected regulation and control target is evaluated, and energy consumption is calculated.
Citation Information
Patent Citations
Chicken house multi-objective optimization transverse ventilation method based on MOPSO and NS-MFO algorithms
CN114971004A