Household electricity charge optimization method and device based on improved ant lion algorithm

By improving the Ant Lion algorithm to build a household electricity bill model and combining it with user dissatisfaction, the problems of rough device classification and neglect of user experience in household electricity bill optimization are solved, the coordinated optimization of electricity bill expenditure and user comfort is achieved, and the optimal household electricity scheduling plan is found.

CN120560044BActive Publication Date: 2025-10-17HUAQIAO UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511014751.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-10-17
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

The existing household electricity bill optimization model ignores user experience. The traditional ant lion algorithm is prone to fall into local optimality and it is difficult to achieve coordinated optimization of electricity bill expenditure and user comfort under multiple complex factors.

Method used

A household electricity bill model is constructed. The household electricity bill objective function and the multi-objective optimization function of user dissatisfaction are combined and solved using the improved ant lion algorithm (LTK-ALO). The population is initialized through logistic chaotic mapping, and a t-distribution perturbation strategy and Cauchy mutation mechanism are designed to enhance global search and local development capabilities.

Benefits of technology

It achieves the coordinated optimization of electricity expenditure and user comfort, solves the problems of rough equipment classification and neglect of user experience in traditional models, and finds the optimal household electricity scheduling plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560044B_ABST
    Figure CN120560044B_ABST
Patent Text Reader

Abstract

The application discloses a household electricity cost optimization method and device based on an improved ant lion algorithm, relates to the technical field of household electricity optimization, and comprises the following steps: S1, constructing a household electricity cost model for calculating the electricity cost of household electrical equipment and a multi-objective optimization function combining a household electricity cost objective function and user dissatisfaction; and S2, using the multi-objective optimization function as the fitness function of the improved ant lion algorithm, and solving the household electricity cost model by using the improved ant lion algorithm; the improved ant lion algorithm uses chaotic mapping to initialize the ant and ant lion populations; and the Cauchy distribution is used to introduce Cauchy mutation disturbance when falling into local optimization. The application realizes the collaborative optimization of electricity cost expenditure and user comfort by constructing a household electricity cost model, forming the double-target integration of electricity cost expenditure and user experience; and the improved ant lion algorithm is used to solve the household electricity cost model, so that the defect that the traditional ant lion algorithm is prone to falling into local optimization is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of household electricity optimization, and particularly relates to a household electricity bill optimization method and device based on an improved ant lion algorithm. BACKGROUND

[0002] In recent years, with the development of smart home technology, the popularity of smart meters in households is becoming higher and higher. Through the smart meter, residents can understand the power consumption information of various devices in the home, which provides the possibility for optimizing the power consumption time period of smart home devices. However, in the face of diversified electricity price policies and complex household appliances, most residents are difficult to reasonably arrange the power consumption time of various devices according to the change of electricity price, and cannot fully utilize the low valley electricity price period to reduce electricity bill expenditure. At the same time, there is also a lack of scientific scheduling scheme in the management of household power consumption devices.

[0003] Although there are many research results in electricity bill optimization. For example, Yu Haoming et al. simplified the optimal charging decision of new energy vehicles based on real-time electricity price response, and at the same time proposed an effective method for online estimation of real-time electricity price, but the method has strong limitations and is difficult to popularize to every family. Shah J et al. took household electric water heaters as the research object, successfully reduced the electricity cost by reasonably responding to the change of electricity price on the basis of meeting the user's water demand, but this research did not take into account the experience of household users. Javadi et al. proposed a household energy management optimization scheme to encourage active producers and consumers to trade their surplus energy in the local energy community based on the rules of the pool market. The results show that through cooperation, the end users of the local energy community market can reduce the total electricity bill, but the paper does not analyze the classification of household devices. Zhe C et al. proposed a residential building demand response scheduling method, which uses genetic algorithm as the target optimization algorithm to search for the minimum electricity bill. The proposed scheduling method can effectively shorten the peak load to non-peak load time and reduce the electricity bill, but it neglects the consideration of device classification and user satisfaction after scheduling. Wang C et al. considered different load demand response modes and established a demand response model for various loads. In order to fully utilize the residential electricity consumption data, a multi-objective optimization scheduling model of flexible load on the user side was established, and a greedy algorithm was used to calculate and analyze the model, but it only focuses on reducing electricity price and ignores user experience. Huang Z et al. studied the flexible load in the system and established a flexible load model and its working state. On this basis, combined with the real-time electricity price of the power grid, a household energy management system model is constructed to maximize the reduction of electricity purchase cost and improve the utilization rate of renewable energy. Genetic algorithm is used for solution, but the model does not classify flexible load and ignores the different operating characteristics of flexible devices.

[0004] However, the traditional electricity cost model faces challenges such as ignoring user experience, optimization algorithm being prone to local optimum, and insufficient electricity price prediction accuracy. In addition, the Ant Lion Optimization (ALO) algorithm has strong dynamic adaptability, high search efficiency, and strong global search capability, and is suitable for scenarios with large data fluctuations and multi-objective optimization advantages, and is therefore used to solve the household electricity cost model. However, the traditional Ant Lion Optimization algorithm is prone to local optimum. Therefore, in view of the above problems, a household electricity cost optimization method based on improved Ant Lion Optimization algorithm is proposed. SUMMARY

[0005] In view of the above problems, the present application proposes a household electricity cost optimization method and device based on improved Ant Lion Optimization algorithm. By introducing the type of household equipment and the degree of user dissatisfaction, a household electricity cost model is constructed, and a double-target integration of electricity cost expenditure and user experience is formed, realizing the collaborative optimization of electricity cost expenditure and user comfort. For the problem of household electricity cost optimization involving multiple complex factors such as the operating characteristics of different types of equipment, large fluctuations in electricity prices, and the diversified electricity demand of residents, an improved Ant Lion Optimization algorithm (LTK-ALO) is proposed to solve the household electricity cost model. The population is initialized by Logistic chaotic mapping to enhance diversity, a t-distribution disturbance strategy is designed to dynamically balance global search and local development, and a Cauchy mutation mechanism is constructed to force escape from extreme values, solving the defect of the traditional Ant Lion Optimization algorithm being prone to local optimum. The traditional Ant Lion Optimization algorithm is improved multiple times, and the improved algorithm is used to optimize and solve the household electricity cost model to explore the optimal household electricity scheduling scheme.

[0006] On the one hand, the household electricity cost optimization method based on improved Ant Lion Optimization algorithm has the following specific steps:

[0007] S1, a household electricity cost model construction step, a household electricity cost model for calculating household electricity equipment electricity cost and a multi-objective optimization function combining household electricity cost objective function and user dissatisfaction degree are constructed;

[0008] S2, an improved Ant Lion Optimization algorithm solving step, using the multi-objective optimization function as the fitness function of the improved Ant Lion Optimization algorithm, the improved Ant Lion Optimization algorithm is used to solve the household electricity cost model, and the optimal household electricity cost and the best operation scheme of each equipment electricity time distribution are obtained; the improved Ant Lion Optimization algorithm uses chaotic mapping to initialize the ant and ant lion population, uses t-distribution disturbance to improve the walking strategy of ants, and introduces Cauchy mutation disturbance when the algorithm falls into local optimum.

[0009] Preferably, the household electrical appliances include rigid appliances and flexible appliances; the rigid appliances are electrical appliances that must run continuously or in a fixed mode in daily life and are not directly adjusted or interrupted by user behavior; the flexible appliances are electrical appliances whose operating time and power consumption can be adjusted to a certain extent according to user preferences, electricity price policies or energy management system instructions; the flexible appliances include flexible interruptible appliances and flexible non-interruptible appliances; the interruptible appliances are electrical appliances that can receive an interruption instruction at any time during operation and stop working immediately; the non-interruptible appliances are electrical appliances that complete the entire working cycle according to a preset program and cannot be stopped or changed during the period.

[0010] Preferably, the objective function of the household electricity bill is expressed as:

[0011] ;

[0012] ;

[0013] in, Indicates the The total load demand of the user's rigid equipment in each time period. A day is divided into 48 time periods. Indicates the Time period Power consumption of each flexible device; Indicates the The electricity price for each time period; Indicates the The total electricity cost of the user in each time period; Sum represents the total electricity cost in 48 time periods.

[0014] Preferably, the modeling representation of the interruptible device is:

[0015] ;

[0016] ;

[0017] ;

[0018] ;

[0019] ;

[0020] in, Indicates the device number of the flexible device; Indicates the number of interruptible devices; Indicates the The flexible device The working status of each time period, 0 means not running, 1 means running; denotes the working status of the th flexible device in 48 time periods, is interruptible device; and denote the start time and end time of the device, respectively; denotes the total working time of the th flexible device; denotes the power of the th flexible device; denotes the power consumption of the th flexible device in time period.

[0021] Preferably, the modeling of the non-interruptible device is represented as:

[0022] ;

[0023] ;

[0024] ;

[0025] ;

[0026] ;

[0027] wherein, denotes the device number of the flexible device; denotes the number of interruptible devices; denotes the number of flexible devices; denotes the working status of the th flexible device in the th time period, 0 represents the non-running state, and 1 represents the running state; denotes the working status of the th flexible device in 48 time periods, is non-interruptible device; and denote the start time and end time of the th flexible device, respectively; denotes the total working time of the th flexible device; denotes the power of the th flexible device; denotes the power consumption of the th flexible device in time period.

[0028] Preferably, the user dissatisfaction degree is calculated based on the running time offset, represented as:

[0029] ;

[0030] ;

[0031] wherein, represents the total dissatisfaction of the user with all flexible device running offsets; represents the dissatisfaction of the user with the th flexible device; represents the minimum electricity price of the 48 time periods; represents the number of flexible devices; represents the time of the th flexible device offset set by the user, which is the running time offset of the non-interruptible device when , and which is the running time offset of the interruptible device when ; represents the dissatisfaction coefficient of the th flexible device.

[0032] Preferably, the running time offset of the non-interruptible device is represented as:

[0033] , ;

[0034] wherein, represents the lower limit of the working time window set by the user of the th flexible device; represents the upper limit of the working time window set by the user of the th flexible device; represents the total running time of the th flexible device; represents the maximum function, represents the offset of the start time later than the lower limit of the working time, represents the offset of the end time later than the upper limit of the working time, ensuring that the offset is only calculated when the time window is exceeded.

[0035] Preferably, the running time offset of the interruptible device is represented as:

[0036] , ;

[0037] wherein, represents the lower limit of the working time window set by the user of the th flexible device; represents the upper limit of the working time window set by the user of the th flexible device; is the running time period of the device; indicates the state of the flexible device in the time period.

[0038] Preferably, the multi-objective optimization function is the sum of the household electricity cost objective function and user dissatisfaction; the fitness function of the improved ant lion algorithm using the multi-objective optimization function is used to solve the household electricity cost model using the improved ant lion algorithm, and the specific steps are as follows:

[0039] S201, using the sum of the household electricity cost objective function and user dissatisfaction as the fitness function of the improved ant lion algorithm;

[0040] S202, initializing the population of the ant lion algorithm using the Logistic mapping;

[0041] S203, calculating the fitness of the ant lion and the ant using the fitness function, and reserving the elite ant lion according to the fitness;

[0042] S204, selecting the optimal ant lion for the ant using the roulette strategy;

[0043] S205, constructing the trap together with the optimal ant lion and the elite ant lion;

[0044] S206, improving the walking strategy of the ant using the t-distribution disturbance, guiding the ant population to move and explore fully in the ant lion trap by adding a disturbance term obeying the t-distribution to the original ant position, and taking the iteration number as the degree of freedom parameter of the t-distribution; the ant lion starts to capture the ant;

[0045] S207, updating the position of the ant population;

[0046] S208, calculating the new fitness values of the ant and the ant lion, and selecting the new generation of elite ant lion according to the new fitness values, and updating the position of the ant lion population;

[0047] S209, if the same fitness value is continuously selected as the fitness value of the optimal ant lion for two times and is recorded as the historical optimal value, it is determined that the algorithm falls into local optimum; once it is confirmed that it falls into local optimum, the Cauchy mutation operation is performed on the ant lion population and the ant population, and the fitness values of the ant and the ant lion are recalculated after the operation is completed;

[0048] S210, repeating steps S204-S209 until the iteration number reaches the preset iteration number, and outputting the optimal electricity cost corresponding to the elite ant lion and the best operation scheme of the electricity time distribution of each device.

[0049] On the other hand, the household electricity cost optimization device based on the improved ant lion algorithm comprises the following:

[0050] The household electricity fee model construction module is configured to construct a household electricity fee model for calculating household electricity fees and a multi-objective optimization function combining a household electricity fee target function and user dissatisfaction.

[0051] The improved aardvark lion algorithm solving step module is configured to use the multi-objective optimization function as the fitness function of the improved aardvark lion algorithm, solve the household electricity fee model by using the improved aardvark lion algorithm, and obtain an optimal household electricity fee and an optimal operation scheme of the electricity time distribution of each device.

[0052] Compared with the prior art, the present application has the following beneficial effects:

[0053] (1) The present application introduces household device types and user dissatisfaction to construct a household electricity fee model, integrates double targets of electricity fee expenditure and user experience, realizes collaborative optimization of electricity fee expenditure and user comfort, and solves the problems of rough device classification and neglect of user experience in the traditional electricity fee model.

[0054] (2) The present application involves multiple complex factors such as the operation characteristics of different types of devices, large price fluctuations, and diversified electricity demand of residents, proposes an improved aardvark lion algorithm (LTK-ALO) to solve the household electricity fee model, initializes the population by using Logistic chaotic mapping to enhance diversity, designs a t-distribution disturbance strategy to dynamically balance global search and local development, and constructs a Cauchy mutation mechanism to force escape from extreme values, thereby multiple improving the traditional aardvark lion algorithm, using the improved algorithm to optimize and solve the household electricity fee model in this paper, and exploring the optimal household electricity dispatching scheme. BRIEF DESCRIPTION OF DRAWINGS

[0055] The present application will be further described in detail below with reference to the accompanying drawings;

[0056] Figure 1 The flowchart of the household electricity fee optimization method based on the improved aardvark lion algorithm of the embodiment of the present application;

[0057] Figure 2 The technical scheme flowchart of the household electricity fee optimization method based on the improved aardvark lion algorithm of the embodiment of the present application;

[0058] Figure 3 The architecture diagram of constructing a household electricity fee optimization model of the household electricity fee optimization method based on the improved aardvark lion algorithm of the embodiment of the present application;

[0059] Figure 4This is an architecture diagram of an improved ant lion algorithm of a household electricity rate optimization method based on the improved ant lion algorithm according to an embodiment of the present invention;

[0060] Figure 5 This is a structural block diagram of a household electricity bill optimization device based on an improved ant lion algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The present invention is further described below through specific embodiments.

[0062] like Figure 1 and Figure 2 As shown in the figure, the household electricity bill optimization method based on the improved ant lion algorithm has the following specific steps:

[0063] S1, household electricity bill model construction step, constructing a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction.

[0064] The architecture diagram of the household electricity bill optimization model is as follows: Figure 3 As shown. First, household electrical equipment is categorized. Household electrical equipment is divided into rigid equipment and flexible equipment. Rigid equipment refers to those that must operate continuously or in a fixed pattern in daily life, and whose operating time and power consumption are difficult to adjust or interrupt directly through user behavior. These types of equipment often relate to a household's basic living needs and safety, such as refrigerators, lighting (although they can be turned on and off, basic nighttime lighting needs are considered rigid), and security systems. Rigid equipment loads play a critical role. A power outage, such as the loss of incandescent lighting, spoilage of food in refrigerators, and the failure of safety systems such as alarms, can cause significant inconvenience to users. Therefore, these rigid loads are typically not included in optimized scheduling, leaving no room for optimization in energy management. The operating hours and power consumption are considered fixed and unchanging, and no further scheduling planning is performed on them.

[0065] Flexible devices are those whose operating hours and power consumption can be adjusted to a certain extent based on user preferences, electricity pricing policies, or instructions from the energy management system. This type of device offers greater flexibility and optimization potential in energy management.

[0066] Further classification of flexible devices divides them into interruptible and non-interruptible devices. Interruptible devices, such as electric vehicle charging devices, electric water heaters, etc., exhibit high flexibility and response speed. They can not only flexibly choose the start time in different time periods of the day according to the user's schedule to achieve optimal distribution of energy use, but more importantly, these devices can receive interrupt instructions at any time during operation and immediately stop working, and then seamlessly connect to the next time period to continue execution when the electricity price is more favorable or the user needs to rearrange. This instant control capability makes interruptible devices play an important role in dealing with power grid load peaks and promoting power supply and demand balance.

[0067] In contrast, non-interruptible devices, such as washing machines, dishwashers, etc., are also important components of smart homes, but are more rigid in scheduling. These devices, once started, will complete the entire work cycle according to the preset program and cannot be stopped or change tasks during the period. Although they cannot be as flexible as interruptible devices, through reasonable planning and scheduling, such as using low electricity price periods for concentrated operation, they can also optimize the household energy use structure to a certain extent and reduce electricity costs.

[0068] The modeling of interruptible devices in flexible devices is defined as follows:

[0069] ;

[0070] ;

[0071] ;

[0072] ;

[0073] ;

[0074] In the above formula: represents the device number; represents the number of interruptible devices; represents the device working state in the first time period, 0 represents the non-running state, and 1 represents the running state; represents the device working state in 48 time periods; and represent the start time and end time of the device, respectively; represents the total working time of the device ; represents the power of the device ; represents the energy consumption of the device in Power consumption in the time period.

[0075] Where the non-interruptible device modeling in the flexible device is defined as follows:

[0076] ;

[0077] ;

[0078] ;

[0079] ;

[0080] ;

[0081] In the above formula: denotes the device number; denotes the number of non-interruptible devices; denotes the working state of the device in the first time period, 0 represents the non-running state, and 1 represents the running state; denotes the working state of the device in 48 time periods; and denote the start time and end time of the device, respectively; denotes the total working time of the device ; denotes the power of the device ; denotes the power consumption of the device in the time period.

[0082] Secondly, the electricity cost function of the user is constructed. The household electricity cost objective function is defined as the sum of the product of the time period power consumption of n electrical devices of the user in 48 time periods a day and the corresponding electricity price. Among them, the power of the rigid device is fixed, and the flexible device is schedulable. Therefore, the expression of the objective function of the household electricity cost is defined as follows:

[0083] ;

[0084] ;

[0085] In the above formula: denotes the first time period, the total load demand of the rigid device of the user; denotes the power consumption of the first device of the flexible device in the first time period; is the first The electricity price at the time; For The total electricity cost of the user at the time; Sum is the total electricity cost in 48 time periods.

[0086] Then, the user dissatisfaction model is constructed. The user dissatisfaction is a quantitative indicator to measure the user's acceptance of the deviation of the device running time from the ideal time period. It refers to the user's acceptance of the advance or delay of the device running time based on the expected plan. In the actual household electricity scenario, users have their own expectations and requirements for the running time of different devices. However, due to the influence of electricity price fluctuations, the actual running time of the device is often difficult to completely match the ideal time period. The introduction of user dissatisfaction is to measure the acceptable degree of deviation, thereby providing a key basis for subsequent device scheduling and electricity cost optimization.

[0087] For flexible non-interruptible devices, the running time is continuous, and there are only two cases of advance running or delay running, such as a washing machine, with a running time of 2 time periods. The user originally expects it to run between 38 and 40 time periods, but due to the influence of electricity price, the washing machine may run in the 37-39 or 39-41 time periods after scheduling, with a running time offset of 1. The running time offset calculation formula of the flexible non-interruptible device is defined as follows:

[0088] ;

[0089] In the above formula: is the time offset of the flexible non-interruptible device from the user's setting, represents the lower limit of the user's set working time window of the device, represents the upper limit of the user's set working time window of the device, is the total running time of the device, represents the maximum function, represents the offset of the start time later than the lower limit of the working time, represents the offset of the end time later than the upper limit of the working time, ensuring that the offset is only calculated when the time window is exceeded. Since the running time of the flexible interruptible device may be discrete, the device may run in advance and delay at the same time. For example, an electric vehicle charging station runs for 4 time periods, and the user originally expects it to run between 36 and 40 time periods. However, due to the fluctuation of electricity price, the device may run in the 35, 38, 39, and 41 time periods, with an offset of 2. The running time offset calculation formula of the flexible interruptible device is defined as follows:

[0090]

[0091] ​​ ;

[0092] In the above formulae: denotes the lower bound of the working time window set by the user of the device , denotes the upper bound of the working time window set by the user of the device , is the running time period of the device, denotes the state of the device running in the time period.

[0093] The user's dissatisfaction degree is the sum of the dissatisfaction degrees of all flexible devices in a day, and n flexible devices are set, and the user has a respective dissatisfaction degree coefficient for each device, defined as , The greater the , the more the user does not want the flexible device to exceed the user's running user expectation time. Taking an air conditioner as an example, if the cooling period is adjusted from 20:00-22:00 to 22:00-24:00, although the peak time electricity price can be avoided, the user may feel obviously uncomfortable due to the increase in room temperature during the sleep period, so the of the air conditioner should be set to be larger to prevent the air conditioner from being scheduled outside the expected running time. The user's dissatisfaction degree definition for the flexible device a and the user's total dissatisfaction degree definition are as follows:

[0094] ;

[0095] ;

[0096] In the above formulae: denotes the user's dissatisfaction degree for the device , is the minimum electricity price of the 48 time periods, is the total dissatisfaction degree of the user for the running offset of all devices, denotes the dissatisfaction degree coefficient of the th flexible device.

[0097] The user's home electricity price response model is defined as follows:

[0098] ;

[0099] In the above formulae: denotes the total electricity bill expenditure of the user, is the total dissatisfaction degree of the user for the running offset of all devices, is the electricity price response value combined with the total electricity bill expenditure of the home and the total dissatisfaction degree of the user, which also serves as the fitness function of the home electricity bill model in the optimization algorithm.

[0100] S2, an improved ant lion optimization algorithm is used to solve the household electricity cost model.

[0101] The ant lion algorithm covers many key steps, mainly including random walk of ants, clever arrangement of traps, use of traps to capture ants, successful capture of prey, and reconstruction of traps. The algorithm takes the mutual influence between ant lions and ants in the trap as the simulation object. In this simulation scenario, ants will search for food sources in the search area by random walking, while ant lions will use carefully constructed traps to accurately capture ants. Specifically, the random walk of ants follows the rules defined in the following formula:

[0102] ;

[0103] where, is used to calculate the cumulative sum, represents iteration, is a random function, which is defined as follows:

[0104] ;

[0105] where, represents iteration, is a uniformly distributed random number in the interval [0,1]. In the optimization process, the position of the ant is saved and used by the following matrix.

[0106] ;

[0107] where, is a matrix for saving the position of each ant, represents the position of the th ant in the th dimension, n represents the number of ants, and d represents the dimension of the variable. Ants and ant lions represent the solution to the optimization problem. In the optimization process, the matrix is used to store the position information of all ants. The fitness function is used to evaluate the position of each ant, and the corresponding matrix is constructed to save the fitness value of each ant. The fitness matrix is represented as:

[0108] ;

[0109] where, the matrix is used to save the fitness value of each ant, is the fitness function, represents the position of the th ant in the th dimension, n represents the number of ants, and d represents the dimension of the variable.

[0110] In the ant lion algorithm, assuming that the ant lion is hiding somewhere in the search range, the following matrix is ​​used to save the position and fitness value of the ant lion.

[0111] ;

[0112] in, The matrix is ​​used to save the position of each ant lion. Indicates the Weizhongdi The position of the ant lion, n represents the number of ant lions, and d represents the dimension of the variable.

[0113] ;

[0114] in, The matrix is ​​used to store the fitness value of each ant lion. is the fitness function, Indicates the Weizhongdi The position of the ant lion, n represents the number of ant lions, and d represents the dimension of the variable.

[0115] The random walk behavior of individual ants completely follows The constructed rule model. In each iteration of the optimization algorithm, the ants perform random walk operations according to the constructed rules, and then update their own positions. However, given that each search space has a clear boundary, which is defined by the range of variable values, in this case, the constructed rule model cannot be directly applied to the update operation of the ant position, otherwise the ant position will exceed the established search space range. In order to ensure that the ants can achieve random walks within the legal search space boundaries and avoid the occurrence of out-of-bounds phenomena, the following equation is introduced to normalize the relevant parameters. The normalization formula is specifically defined as follows:

[0116] ;

[0117] in, Indicates the The minimum value of the random walk of the dimensional variable; Indicates the The maximum value of the random walk of the dimensional variable; For the In the iteration Minimum of the dimensional random walk; For the In the iteration The maximum value of a dimensional random walk.

[0118] The walk formula is defined as follows:

[0119] ;

[0120] ;

[0121] in, Indicates the The minimum value of all variables in the dimensional ant; Indicates the The maximum value of all variables of the ant dimension; and Respectively represent The maximum and minimum values ​​of all variables in the iteration; Show first The selected The location of the ant lion.

[0122] The ants' movement is restricted by the traps built by the ant lions. The following formula defines the change in the trap range:

[0123] ;

[0124] ;

[0125] ;

[0126] ;

[0127] in, Represents the current iteration number, represents the maximum number of iterations, A constant defined based on the current iteration that adjusts the accuracy of the search.

[0128] During an antlion's hunting process, the moment an ant reaches the bottom of a pit marks the final stage of the hunt. Once this stage is complete, the antlion quickly drags the ant into the sand pit, completing the hunt. To accurately simulate this natural hunting scenario, the following conditions were set: The ant's entry into the sand triggers the antlion's hunting mechanism. Simultaneously, the antlion must immediately synchronize its position to the prey's latest location. This ensures it maintains an optimal hunting position at all times, maximizing its chances of successfully capturing new prey. This ensures the entire hunting process is more aligned with natural laws, achieving a precise simulation.

[0129] ;

[0130] When an ant lion captures an ant, its position is updated to the position of the captured ant. The update operator formula is defined as follows:

[0131] ;

[0132] wherein, is the fitness value of the previous generation of ant lion population, after selecting an ant lion according to the roulette rule, the position reached by random walk around the ant lion. denotes the position after the random walk around the elite ant lion at the th iteration. the position of the th iteration of the th dimension of the ant.

[0133] As shown in Figure 4 , in view of the defects of the traditional ant lion algorithm, the embodiment proposes three key modifications of the ant lion algorithm: initialization modification, ant walking modification and local optimal solution detection. The embodiment aims to improve the ant lion algorithm to realize fine management and optimization of the family electricity fee model, provide a scientific and reasonable electricity fee management scheme for family users, and reduce electricity fee expenditure, as follows:

[0134] In the population initialization stage, the Logistic chaotic mapping is introduced, and the chaotic sequence generated by the chaotic mapping is used to initialize the ant and ant lion population, so that the initial solution is more uniformly distributed in the search space, the randomness and diversity of the population are enhanced, the search range is widened, and the algorithm is prevented from falling into local optimum in the early stage. The formula of the Logistic chaotic mapping is as follows:

[0135] ;

[0136] The initialization steps of the ant lion population improved by the Logistic chaotic mapping are as follows:

[0137] Determine the following parameters: population size N, dimension of the problem dim, parameter of the Logistic chaotic mapping, initial value of the chaotic mapping, lower bound of the d-dimensional ant lion population , upper bound of the d-dimensional ant lion population .

[0138] Generate a chaotic sequence. Generate a chaotic sequence for each dimension d, each sequence contains N values, i.e. the population size. Use the following formula to generate the sequence:

[0139] ;

[0140] wherein, , is the initial value randomly selected in the dth dimension.

[0141] Map the chaotic sequence to the search space. Map the chaotic sequence Each value in Mapped into the search space, we get the d-dimensional position of the n-th individual in the population The mapping formula is as follows:

[0142] ;

[0143] Generate a population. For each individual i (i=1, 2, ..., N), construct a position vector Contains D elements, which represent the various decision variables in the problem, and the position vector of each individual It consists of D mapped chaotic values.

[0144] During the algorithm's iterations, a t-distribution perturbation strategy is employed to improve ant movement. Based on the ant's current position, fitness, and t-distribution parameters, the perturbation step size and direction are calculated to update the ant's position. In the early stages of the iteration, the t-distribution approximates the standard Cauchy distribution, endowing the algorithm with strong global search capabilities. As the iterations progress, the t-distribution approaches a Gaussian distribution. This change effectively strengthens the algorithm's local search capabilities, thereby improving convergence speed and accuracy. The t-distribution holds a unique position, serving as an intermediate transition between the Gaussian and Cauchy distributions and capable of transitioning to other distributions by flexibly adjusting the degrees of freedom n. When n = 1, the t-distribution becomes a standard Cauchy distribution; when n > 30, it becomes a Gaussian distribution. Notably, current research has found that search algorithms often exhibit certain drawbacks in the later stages of iteration. This can be addressed by cleverly employing the t-distribution perturbation strategy. This strategy effectively breaks the limitations of local optima, effectively enhancing the algorithm's global search capabilities and helping it discover more optimal solutions in complex solution spaces. The t-distribution is used to optimize the ant lion algorithm and the positions of individual ants are mutated by the t-distribution. The mutation process is defined as follows:

[0145] ;

[0146] in, is the first The new position of each ant; is the first The original position of each ant; The t-distribution that satisfies the number of iterations of the algorithm as the degree of freedom. The ant lion algorithm based on the t-distribution is Add at the position The t-distributed perturbation term allows individual ants to fully explore the ant lion trap during the search process, allowing the ant population to fully roam within the ant lion trap. Using the algorithm's overall number of iterations, t, as the degree of freedom parameter for the t-distribution, this guides the ant population's exploration within the ant lion trap. During the algorithm's initial iterations, due to the small number of iterations, the t-distribution approaches a standard Cauchy distribution. This allows the algorithm to transcend local constraints, demonstrating strong global search potential and extensively exploring the space of possible optimal solutions. As the iterations progress, when the number of iterations, t, reaches a certain scale, the t-distribution gradually transforms into a Gaussian distribution, focusing the algorithm's search on fine-grained local areas, highlighting its local search capabilities. Overall, the introduction of the t-distribution perturbation strategy to optimize the Ant Lion Algorithm has shown significant results. It broadens the global search horizon in the early stages of the iterations and enhances the accuracy of local deep search in the later stages, resulting in improved convergence rate and accuracy.

[0147] During the algorithm's execution, a monitoring process is implemented to compare the current optimal value with the historical optimal value. If the optimal value remains unchanged after multiple iterations, indicating a local optimum, a Cauchy perturbation is promptly introduced to help the ants and antlions escape this predicament and ensure the algorithm's search for a global optimum. The long tail of the Cauchy distribution allows for a large perturbation duration, helping the algorithm to break free from the constraints of the current search space. The fitness of selected individuals is then reassessed after the perturbation, improving algorithm stability.

[0148] The heavy-tailed property of the Cauchy distribution enables it to maintain a high sampling probability in the neighborhood of local extreme values. This property is used to improve the ant lion algorithm: when an elite individual falls into a local extreme value, the random perturbation generated by the Cauchy mutation can effectively reduce its dependence on the current extreme point. This perturbation strategy increases the frequency of individual sampling in areas far away from the extreme value, thereby shifting search resources from the local neighborhood to the global space. This embodiment embeds the mutation mechanism into the state update process of the elite ant lion and constructs a Cauchy perturbation operator to enhance the global escape capability of the algorithm. This improvement not only enhances the global search capability of the algorithm, but also improves the overall performance and stability of the algorithm. The specific improved formula is defined as follows:

[0149] ;

[0150] in, is the initial position The updated location of is the standard Cauchy random distribution at t=1; parameter is a constant used to control the intensity of the Cauchy distribution variation.

[0151] The steps of the ant lion algorithm based on Cauchy mutation are as follows.

[0152] Execute the pre-order steps of the original basic ant lion algorithm.

[0153] If the optimal values of two consecutive iterations of the lion group are nearly the same and are recorded as the historical optimal value, it is determined that the algorithm is trapped in a local optimum. At this time, the Cauchy mutation is triggered to randomly disturb the current elite lion position with Cauchy distribution, forcing it to jump out of the local neighborhood and turn to global exploration.

[0154] Mutation operation: first copy the optimal ant lion individual value and number to the original population size, then embed the Cauchy mutation operator, further update the position of the ant lion group, and update the optimal value.

[0155] ;

[0156] ;

[0157] Wherein, and are the initial positions of the original ant lion and ant individuals; and are the updated new positions after the Cauchy mutation operation.

[0158] Finally, the improved ant lion algorithm is used to optimize and solve the family electricity fee model, and the specific implementation steps are as follows:

[0159] S201: Initialize the parameters required by the family electricity fee model. It needs to confirm whether the intelligent home devices participating in optimization are flexible interruptible type, device quantity, power, running time and user's expected running window, and set the fitness function as formula The device running state is coded in binary: the on-off state of a single device in 48 time periods is represented by a 1x48 0-1 array (1=running, 0=off), and the state of n devices throughout the day forms an n x 48 decision matrix X, where X(i,t) represents the start-stop state of the ith device at the t time period. This coding method converts the continuous scheduling problem into a discrete binary optimization, and the matrix dimension matches the fine modeling requirements of 48 half-hour time periods. The specific definition is as follows:

[0160] ;

[0161] S202: Initialize the population of the ant lion algorithm using the Logistic chaotic mapping.

[0162] S203: Calculate the fitness of the ant lion and the ant, and keep the elite ant lion.

[0163] S204: Select the optimal ant lion for the ant using the roulette strategy.

[0164] S205: The optimal ant lion and the elite ant lion are used to build traps together.

[0165] S206: The walking strategy of the ant is improved by using t-distribution disturbance, and the ant lion starts to catch the ant.

[0166] S207: The ant population position is updated.

[0167] S208: The fitness values of the ant and the ant lion are calculated, and a new generation of elite ant lion is selected, and the ant lion population position is updated.

[0168] S209: The algorithm is judged whether it can fall into local optimum: if the algorithm detects that the same fitness value is used as the fitness value of the optimal ant lion for two times in succession and is recorded as the historical optimal value, in this case, it is judged that the algorithm has the risk of falling into local optimum. Once it is confirmed that it falls into local optimum, the Cauchy mutation operation is performed on the ant lion population and the ant population, and the fitness values of them are recalculated after the operation is completed.

[0169] S210: It is judged whether the iteration number is reached, if not, it is turned to step S204 for continuous execution, otherwise the algorithm is ended, and the final optimal solution, i.e. the optimal family electricity charge and the best operation scheme of the electricity time distribution of each device, is obtained.

[0170] As shown in Figure 5 , the application also discloses a family electricity charge optimization device based on the improved ant lion algorithm, which comprises:

[0171] A family electricity charge model construction module 501 is used for constructing a family electricity charge model for calculating the electricity charge of the family electricity device and a multi-objective optimization function combining the family electricity charge target function and the user dissatisfaction degree.

[0172] An improved ant lion algorithm solving step module 502 is used for taking the multi-objective optimization function as the fitness function of the improved ant lion algorithm, using the improved ant lion algorithm to solve the family electricity charge model, and obtaining the optimal family electricity charge and the best operation scheme of the electricity time distribution of each device; the improved ant lion algorithm uses chaotic mapping to initialize the ant and the ant lion population, uses t-distribution disturbance to improve the walking strategy of the ant, and introduces Cauchy mutation disturbance when the algorithm falls into local optimum.

[0173] The specific implementation of the family electricity charge optimization device based on the improved ant lion algorithm is the same as the family electricity charge optimization method based on the improved ant lion algorithm, and the embodiment will not be repeated.

[0174] The above is only a specific embodiment of the application, but the design concept of the application is not limited thereto, and any non-essential modification of the application using this concept shall be regarded as an act of infringing the protection scope of the application.

Claims

1. A household electricity bill optimization method based on an improved ant lion algorithm, characterized in that: The steps include: S1, household electricity bill model construction step, constructing a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction; S2, an improved ant lion algorithm solution step, using a multi-objective optimization function as the fitness function of the improved ant lion algorithm, using the improved ant lion algorithm to solve the household electricity bill model, and obtaining the optimal household electricity bill and the optimal operation plan for the distribution of electricity usage time of each device; the improved ant lion algorithm uses a chaotic map to initialize the ant and ant lion populations, uses t-distribution perturbation to improve the ant's wandering strategy, and introduces Cauchy mutation perturbation when the algorithm falls into a local optimum; The household electrical appliances include rigid appliances and flexible appliances. Rigid appliances are electrical appliances that must operate continuously or in a fixed mode in daily life and are not directly adjusted or interrupted by user behavior. Flexible appliances are electrical appliances whose operating time and power consumption can be adjusted to a certain extent based on user preferences, electricity price policies, or instructions from energy management systems. The flexible devices include flexible interruptible devices and flexible non-interruptible devices; The interruptible device is an electrical device that can receive an interrupt instruction at any time during operation and stop working immediately; The non-interruptible equipment is an electrical equipment that completes the entire working cycle according to the preset program and cannot be stopped or changed during the period; The user dissatisfaction is calculated based on the running time offset and is expressed as: Discomfort a =ω a ×Deviation a ; Among them, TotalDiscomfort represents the user's total dissatisfaction with the operation deviation of all flexible devices; Discomfort a Indicates the user's dissatisfaction with the a-th flexible device; min(Price) represents the minimum electricity price in 48 time periods; Deviation a Indicates the time set by the user for the offset of the ath flexible device. When a∈[1,2,…,m], it is the runtime offset of the non-interruptible device. When a∈[m+1,m+2,…,n], it is the runtime offset of the interruptible device. m represents the number of interruptible devices; n represents the number of flexible devices. ω a Represents the dissatisfaction coefficient of the a-th flexible device.

2. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1 is characterized in that: The objective function of the household electricity bill is expressed as: Among them, P must,i It represents the total load demand of the user's rigid equipment in the i-th time period. A day is divided into 48 time periods; represents the power consumption of the a-th flexible device in the i-th time period; Price i Cost represents the electricity price in the i-th time period; i represents the total electricity cost of the user in the i-th time period; Sum represents the total electricity cost in 48 time periods.

3. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1 is characterized in that: The modeling representation of the interruptible device is: Where a represents the device number of the flexible device; m represents the number of interruptible devices; Indicates the working status of the a-th flexible device in the i-th time period, 0 indicates the non-operating state, and 1 indicates the operating state; X a It represents the working status of the a-th flexible device in 48 time periods, and a∈[1,2,…,m] is an interruptible device; and Respectively represent the start time and end time of the device; t a represents the total working time of the ath flexible device; P a represents the power of the a-th flexible device; represents the power consumption of the a-th flexible device in time period i.

4. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1, characterized in that: The modeling representation of the non-interruptible device is: Where a represents the device number of the flexible device; m represents the number of interruptible devices; n represents the number of flexible devices; Indicates the working status of the a-th flexible device in the i-th time period, 0 indicates the non-operating state, and 1 indicates the operating state; X a It represents the working status of the a-th flexible device in 48 time periods. When a∈[m+1,m+2,…,n], it is an uninterruptible device. and They represent the start time and end time of the ath flexible device respectively; t a represents the total working time of the flexible device; P a represents the power of the a-th flexible device; represents the power consumption of the a-th flexible device in time period i.

5. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1 is characterized in that: The runtime offset of a non-interruptible device is expressed as; Among them, α a represents the lower limit of the user-set working time window of the a-th flexible device, β a represents the upper limit of the working time window set by the user of the a-th flexible device, t a represents the total running time of the a-th flexible device; max represents the maximum value function, Indicates the offset of the start time later than the lower limit of the working time. Indicates the offset by which the end time is later than the upper limit of the working hours, ensuring that the offset is only calculated when the time window is exceeded.

6. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1, characterized in that: The runtime offset of an interruptible device is expressed as; Among them, α a represents the lower limit of the working time window set by the user of the a-th flexible device; β a represents the upper limit of the working time window set by the user of the a-th flexible device; t is the operating time period of the device; x a,t Indicates the operating status of the a-th flexible device in time period t.

7. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1, characterized in that: The multi-objective optimization function is the sum of the household electricity bill objective function and user dissatisfaction; the multi-objective optimization function is used as the fitness function of the improved ant lion algorithm, and the household electricity bill model is solved using the improved ant lion algorithm. The specific steps are as follows: S201, the sum of the household electricity bill objective function and user dissatisfaction is used as the improved ant lion algorithm fitness function; S202, using Logistic mapping to initialize the population of the ant lion algorithm; S203, using a fitness function to calculate the fitness of ant lions and ants, and retaining elite ant lions based on the fitness; S204, using a roulette wheel strategy to select the best ant lion; In S205, the superior ant lion and the elite ant lion build a trap together; S206, using t-distribution perturbation to improve the ants' movement strategy, by adding a t-distributed disturbance term to the original ant positions, to guide the ant population to fully move and explore within the ant lion trap, wherein the number of iterations of the disturbance term is used as the degree of freedom parameter of the t-distribution; the ant lion begins to capture the ants; S207, updating the position of the ant population; S208, calculating the new fitness values ​​of the ants and ant lions, selecting a new generation of elite ant lions based on the new fitness values, and updating the position of the ant lion population; S209: If the same fitness value is used as the fitness value of the optimal ant lion twice in a row and is recorded as the historical optimal value, the algorithm is determined to have fallen into a local optimum. Once it is confirmed that it has fallen into a local optimum, a Cauchy mutation operation is performed on the ant lion population and the ant population. After the operation is completed, the fitness values ​​of the ants and ant lions are recalculated. S210, repeat steps S204-S209 until the number of iterations reaches the preset number of iterations, and output the optimal electricity cost corresponding to the elite ant lion and the optimal operation plan for the power consumption time distribution of each device.

8. A household electricity rate optimization device based on an improved ant lion algorithm using the household electricity rate optimization method based on an improved ant lion algorithm according to any one of claims 1 to 7, comprising: A household electricity bill model construction module is used to construct a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function that combines the household electricity bill objective function and user dissatisfaction; An improved ant lion algorithm solution step module is used to solve a household electricity bill model using a multi-objective optimization function as the improved ant lion algorithm's fitness function to obtain the optimal household electricity bill and the optimal operating plan for the distribution of electricity usage time of each device. The improved ant lion algorithm uses a chaotic map to initialize ants and ant lion populations, utilizes t-distribution perturbations to improve the ants' wandering strategies, and introduces Cauchy mutation perturbations when the algorithm falls into a local optimum.

Citation Information

Patent Citations

  • Grid-connected micro-grid capacity optimization configuration method based on improved ant lion algorithm

    CN116231729A

  • Two-stage wind storage coordinated planning method and device considering source load uncertainty

    CN119482698A