Waveform generation method and system for non-intrusive load identification performance evaluation
By constructing test cases as a multi-objective constrained optimization problem and using a genetic algorithm to generate waveform test cases for non-intrusive load identification performance evaluation, the problem of insufficient representativeness and diversity of test cases in existing technologies is solved, and a more scientific and comprehensive load identification performance evaluation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-14
AI Technical Summary
In existing non-intrusive load identification performance evaluations, the complexity of test cases cannot be scientifically quantified, and the generation process relies on human experience, resulting in test results that lack representativeness and diversity, making it difficult to comprehensively and objectively evaluate the performance of load identification algorithms.
The test cases are constructed as a multi-objective constrained optimization problem. A genetic algorithm is used to generate waveform test cases. By selecting the original waveform library of the equipment and determining various waveform indicators, an optimization objective function is constructed, and the optimal waveform test case is generated by the genetic algorithm. Combining indicators such as waveform complexity, equipment superposition degree, power amplitude distribution, number of power mutation points and equipment category diversity, the genetic algorithm is used for encoding and optimization.
The generated test cases are more representative and diverse, comprehensively covering the performance of the load monitoring algorithm under different conditions, improving the scientific rigor and fairness of the test, avoiding local optima and premature convergence problems, and enhancing the degree of automation and global search capabilities.
Smart Images

Figure CN121863353A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system analysis and smart grid technology, specifically relating to a waveform generation method and system for non-intrusive load identification performance evaluation. Background Technology
[0002] With the deepening development of smart grid and smart home concepts, refined electricity consumption information on the user side is of vital importance for energy management, energy-saving diagnostics, and demand-side response. Non-intrusive load monitoring (NILM) technology, as a cost-effective solution, only requires the installation of a monitoring device at the user's main inlet. By analyzing the total load voltage and current signals, it can decompose and identify the operating status, power, and operating time of each electrical device, breaking the traditional model of separate metering for each household and greatly reducing deployment costs.
[0003] As algorithm research deepens, a crucial issue has become increasingly prominent: how to scientifically and objectively evaluate the performance of different load identification algorithms. Test cases are the foundation of load identification performance evaluation, and their quality directly affects the reliability of the algorithm evaluation results. Currently, most test cases have significant problems in waveform composition, mainly manifested in an imbalance in the distribution of waveform difficulty: either simple waveforms account for a large proportion, making the recognition task overly idealistic, resulting in generally good algorithm performance in tests; or high-difficulty waveforms account for an excessive proportion, making the recognition task too difficult, leading to large fluctuations in test results and a lack of reference value. Therefore, the structural imbalance of test cases is not conducive to a comprehensive and objective performance evaluation of load identification modules.
[0004] Currently, there is no mature test case generation method in the field of non-intrusive load monitoring, resulting in a lack of unified, systematic, and repeatable test case support for the performance verification of algorithms and devices. Existing research faces two major challenges: on the one hand, the complexity of test cases cannot be scientifically quantified, making it difficult to transform test case quality into an optimizable mathematical problem; on the other hand, the test case generation process relies excessively on human experience, making it impossible to efficiently and automatically generate representative and diverse test cases. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a waveform generation method and system for non-intrusive load identification performance evaluation, addressing the aforementioned problems in the prior art. This invention aims to consider key attributes affecting the quality of test cases, such as power amplitude distribution, the number of power abrupt change points, and the diversity of equipment types, and transform the test case construction problem into a multi-objective constrained optimization problem, so as to efficiently and automatically generate representative and diverse test cases required for non-intrusive load identification performance evaluation.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A waveform generation method for non-intrusive load identification performance evaluation includes the following steps: S101, Select from the original device waveform library M The original device waveform of each device; S102, identify various waveform indicators that affect non-intrusive load identification; S103, construct the deviation of various waveform indicators from the expected values as the optimization objective function, as shown in the following formula: ; in, Waveform test case I The optimization objective function, For the first k Weights of various waveform indicators The number of waveform indicators, For the first k The expected value of the waveform index, Based on waveform test cases I The generated test waveform The calculated first k Waveform indicators; S104, to include M Waveform test cases, composed of waveform control parameters of individual devices, are encoded as individuals in the genetic algorithm. The negative of the objective function is used as the fitness function of the genetic algorithm. The genetic algorithm is then used to select individuals based on their waveform control parameters. M The original device waveforms are used to generate the optimal waveform test cases required for non-intrusive load identification performance evaluation.
[0007] Optionally, the waveform control parameters of the device include the device's startup time and its power scaling factor, as described in the waveform test case. I The generated test waveform The function expression is: ; in, M This represents the total number of devices in the test case. For the first m Power scaling factor for each device For the first m The device is Power at any moment For the first m The index of the starting sampling point of each device waveform.
[0008] Optionally, step S104 includes: S201, to include MThe waveform test cases, consisting of the startup time and power scaling factor of each device, are encoded as individuals in the genetic algorithm. I =[ D , T start , P ],in D For device number vectors, T start For including M A startup time vector for each device. P For including M Power scaling factor vectors for each device; generate an initial population based on the individual's encoding; S202, the negative of the objective function is used as the fitness function of the genetic algorithm. ; S203 involves selection and recombination of the current population, including randomly selecting multiple individuals and choosing a fitness function. The individual with the highest value is taken as the parent individual. For obtaining multiple parent individuals, a hybrid crossover mechanism is used to generate new individuals. The hybrid crossover mechanism includes partial mapping crossover of the device number vectors of two parent individuals, and midpoint interpolation or uniform crossover of the startup time vector and power scaling factor vector to obtain new individuals. S204, Mutate the current population, including randomly replacing the device number in an individual in the current population, randomly adding or deleting a device in an individual, and randomly adding Gaussian perturbations to the startup time vector and power scaling factor vector of an individual. S205, retaining the fitness function for the current population. The E individuals with the highest values are selected as the new current population. S206, determine whether the number of iterations is equal to the preset maximum number of iterations or whether the fitness improvement of the best individual over multiple generations is less than the preset threshold. If it is true, jump to step S207; otherwise, jump to step S203 to continue iterating. S207, Select a fitness function from the new current population. The individual with the highest value is output as the optimal waveform test case required for the non-intrusive load identification performance evaluation.
[0009] Optionally, after step S204 and before step S205, the method further includes: calculating waveform indicators for individuals in the current population, and deleting individuals whose waveform indicators exceed a preset threshold from the current population.
[0010] Optionally, in step S205, the fitness function is preserved for the current population. When selecting the E individuals with the highest fitness values as the new current population, this includes first adjusting the individual's fitness function based on the individual's violation intensity. The value, and then retain the fitness function The E individuals with the highest values; the fitness function of adjusting individuals based on the intensity of their violations. The function expression for the value is: ; in, The adjusted fitness function The value, λ As a penalty weight, The severity of the violation.
[0011] Optionally, the function expression for calculating the intensity of the violation is: ; in, and For different types of default, the penalty coefficients are... M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For the first m The first device collected the data. n -1 power, The threshold for determining a significant transition.
[0012] Optionally, the various waveform indicators affecting non-intrusive load identification include some or all of the following: waveform complexity, equipment superposition, power amplitude distribution, number of power abrupt change points, and equipment category diversity. The expression for the waveform complexity calculation function is as follows: ; ; in, Waveform test case I Waveform complexity, M This represents the total number of devices in the test case. and These are weighting coefficients. N The number of sampling points. For the first m The first device collected the data. n One power, For the first mAverage power of each device This represents the spectral information entropy after performing a Fourier transform on the power sequence. For the first m Each device at sampling rate f s Collected N A power sequence, ~ The first m The first to Nth power values collected by each device; The calculation function expression for the device superposition degree is: ; in, Waveform test case I The degree of equipment overlap, and Each is any number m The first device collected the data. n The maximum and minimum values of each power. For the first m The first device collected the data. n Power; The calculation function expression for the power amplitude distribution is: ; in, Waveform test case I The power amplitude distribution M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. The function expression for calculating the number of power mutation points is: ; in, Waveform test case I The number of power mutation points, M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, For the first m The (n-1)th power collected by the device The threshold for determining a significant transition; The calculation function expression for the diversity of the equipment categories is as follows: ; in, Waveform test case I The diversity of equipment categories M This represents the total number of devices in the test case. Indicates the first m The functional category label of each device, Let |·| denote the union of sets, and let |·| denote the cardinality of the set, where the cardinality is the number of categories.
[0013] The present invention also provides a waveform generation system for non-intrusive load identification performance evaluation, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation.
[0014] The present invention also provides a computer-readable storage medium storing a computer program or instructions that are programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation by a processor.
[0015] The present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation via a processor.
[0016] Compared with the prior art, the present invention mainly has the following beneficial effects: The method of the present invention includes selecting from the original device waveform library. M The original waveforms of each device; identifying various waveform indicators that affect non-intrusive load identification; constructing the deviation of various waveform indicators from expected values as optimization objective functions; including... M Waveform test cases, composed of waveform control parameters of individual devices, are encoded as individuals in the genetic algorithm. The negative of the objective function is used as the fitness function of the genetic algorithm. The genetic algorithm is then used to select individuals based on their waveform control parameters. MThis invention generates optimal waveform test cases for non-intrusive load identification performance evaluation by using the original waveforms of individual devices. It has the following advantages: 1. By introducing five key attribute indicators—waveform complexity, device superposition, power amplitude distribution, number of power mutation points, and device category diversity—and combining them with the optimization objective function and attribute objective vector, the generated test cases better match the expected task requirements. Compared to traditional case design methods based on manual experience or single-indicator selection, the cases generated by this invention are more representative in terms of complexity and diversity, comprehensively covering the performance differences of non-intrusive load monitoring algorithms under different operating conditions, thereby improving the scientific rigor and fairness of the test. 2. This invention uses a genetic algorithm as the core solution strategy, combining real-number encoding and structure vector individual representation. Through mechanisms such as tournament selection, hybrid crossover, structure and parameter mutation, elite retention, and constraint penalties, it effectively avoids local optima and premature convergence problems. This method not only significantly improves the automation level and global search capability of test case generation but also enables rapid convergence to a high-quality solution within a finite number of iterations. By combining the above-mentioned technical means, the method of the present invention can be used for non-intrusive load identification performance evaluation, transforming the quality of test cases into an optimizable mathematical problem, so as to efficiently and automatically generate representative and diverse waveform test cases. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention.
[0018] Figure 2 This is the fitness change curve of the genetic algorithm in this embodiment of the invention.
[0019] Figure 3 The waveforms of each device in the waveform test case are shown in the embodiments of the present invention.
[0020] Figure 4 The waveform of the total power of each device superimposed in the waveform test case of this invention embodiment is shown. Detailed Implementation
[0021] The key to this invention lies in transforming the test case construction problem into a multi-objective constrained optimization problem. It considers key attributes affecting test case quality, such as power amplitude distribution, the number of power abrupt change points, and the diversity of equipment types. Oriented towards non-intrusive load identification performance evaluation, it utilizes a genetic algorithm to efficiently and automatically generate representative and diverse waveform test cases. To enable those skilled in the art to better understand the technical solution of this invention, the following will provide a more detailed description of the technical solution in conjunction with the accompanying drawings of the embodiments of this invention.
[0022] like Figure 1 As shown, the waveform generation method for non-intrusive load identification performance evaluation in this embodiment includes the following steps: S101, Select from the original device waveform library M The original device waveform of each device; S102, identify various waveform indicators that affect non-intrusive load identification; S103, construct the deviation of various waveform indicators from the expected values as the optimization objective function, as shown in the following formula: ; in, Waveform test case I The optimization objective function, For the first k Weights of various waveform indicators The number of waveform indicators, For the first k The expected value of the waveform index, Based on waveform test cases I The generated test waveform The calculated first k Waveform indicators; S104, to include M Waveform test cases, composed of waveform control parameters of individual devices, are encoded as individuals in the genetic algorithm. The negative of the objective function is used as the fitness function of the genetic algorithm. The genetic algorithm is then used to select individuals based on their waveform control parameters. M The original device waveforms are used to generate the optimal waveform test cases required for non-intrusive load identification performance evaluation.
[0023] In step S101 of this embodiment, the waveform is selected from the original device waveform library. M When using the original device waveform of a device, the original device waveform library is needed. Includes Z A subset of candidate device operating power waveforms is required. To construct the current test case, a subset of devices needs to be selected from the waveform library. That is, to select from them M The waveforms of each device are used to construct the target device for the test case.
[0024] In step S102 of this embodiment, when determining the various waveform indicators affecting non-intrusive load identification, the waveform indicators can be selected according to actual needs, such as waveform complexity, equipment superposition degree, power amplitude distribution, number of power abrupt change points, and equipment category diversity. K Several influential indicators can be used to construct the desired attribute target vector. : ; in, ~ They are respectively number 1 to KThe waveform indicators are as follows. The specific meanings and calculation methods of waveform complexity, equipment superposition degree, power amplitude distribution, number of power abrupt change points, and equipment category diversity are shown in Table 1.
[0025] Table 1: Meaning and Calculation Methods of Various Waveform Indicators
[0026] In this embodiment, five indicators are specifically selected: waveform complexity, device superposition degree, power amplitude distribution, number of power abrupt change points, and device category diversity. K =5. Based on the different roles each attribute plays in achieving the goal, an optimization objective function can be constructed to measure the deviation between the test case attribute structure and the expected value: ; in, Waveform test case I The optimization objective function, For the first k Weights of various waveform indicators For the first k The expected value of the waveform index, Based on waveform test cases I The generated test waveform The calculated k-th waveform index.
[0027] The complexity of the overall load characteristics is comprehensively assessed from both time and frequency domain perspectives. First, the fluctuation intensity (i.e., the variance of time variation) and spectral entropy (i.e., frequency distribution) of the power sequence for each device are calculated. Then, the complexity of the test case is calculated using a weighted average. A larger value indicates greater device fluctuations and more complex frequency components. Therefore, in this embodiment, the waveform complexity calculation function is expressed as follows: ; ; in, Waveform test case I Waveform complexity, M This represents the total number of devices in the test case. and This is a weighting coefficient (the value can be chosen according to actual needs, for example, 0.5 in this embodiment). N The number of sampling points. For the first m The first device collected the data. n One power, For the first m Average power of each device This represents the spectral information entropy after performing a Fourier transform on the power sequence. For the first m Each device at sampling rate f s Collected N A power sequence, ~ The first m The first to Nth power values collected by each device.
[0028] In this embodiment, the calculation function expression for the device superposition degree is: ; in, Waveform test case I The degree of equipment overlap, and Each is any number m The first device collected the data. n The maximum and minimum values of each power. For the first m The nth power collected by the device; max(·) represents the maximum value operation, min(·) represents the minimum value operation, and represents the maximum range of power coverage during the operation of all devices in the test case.
[0029] Power amplitude distribution represents the degree of overlap in power signal ranges among multiple devices during operation. It indicates how many devices in the power sequence exceed a predetermined threshold. δ (That is, considered as "operating state"), and based on this, the simultaneity or overlap of equipment operation is determined. In this embodiment, the calculation function expression for power amplitude distribution is: ; in, Waveform test case I The power amplitude distribution M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. A value approaching 1 indicates that most devices are operating most of the time (power is above the threshold). δ =20W), indicating that there is a high degree of overlap in the operation of the equipment (many devices are running at the same time). A value close to 0 indicates that almost no devices exceed the power threshold, or that the devices are turned on for very short periods of time, operate in staggered phases, and have very low overlap.
[0030] The number of power abrupt change points characterizes the dynamic intensity of load power sequence changes and the frequency of events in a test case. During multi-device operation, the startup, shutdown, or load changes of different devices can cause significant amplitude transitions in the power curve. These transition points reflect the density of events and the complexity of load behavior in the test scenario. In this embodiment, the calculation function for the number of power abrupt change points is: ; in, Waveform test case I The number of power mutation points, M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, For the first m The first device collected the data. n -1 power, The threshold for determining a significant transition. This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. The threshold for determining a significant transition can be set to the desired value according to actual needs. In this embodiment, It is 50W. When A larger value indicates the presence of numerous sudden events in the test case (such as frequent start-stop cycles or rapid power changes), suggesting a highly dynamic scenario with significant identification difficulty; when When the value is relatively small, it indicates that the power sequence is generally stable, events are rare, and the load operation status is relatively simple.
[0031] Loads with different operating principles exhibit varying startup behavior, steady-state power, harmonic characteristics, and frequency response. Based on their operating principles, they can be categorized into motor-type, heating-type, lighting-type, power electronic-type, and hybrid-type. In this embodiment, the calculation function expression for the diversity of these equipment categories is: ; in, Waveform test case I The diversity of equipment categories M This represents the total number of devices in the test case. Indicates the first m The functional category label of each device, Let |·| denote the union of sets, and let |·| denote the cardinality of the set, where the cardinality is the number of categories.
[0032] In this embodiment, the waveform control parameters of the device include the device's startup time and its power scaling factor, as described in the waveform test case. I The generated test waveform The function expression is: ; in, M This represents the total number of devices in the test case. For the first m Power scaling factor for each device For the first m The device is Power at any moment For the first m The starting sampling point index (not time) of the waveform of each device, if n - t m If the value is less than 0, then zero padding is used.
[0033] In order to effectively solve the above test case optimization problem, in step S104 of this embodiment, a genetic algorithm (GA) is used as the core solution strategy. Combined with the specific requirements of test case generation, the encoding method, fitness function definition, genetic operation design, constraint handling mechanism and termination condition are set.
[0034] In this embodiment, step S104 includes: S201, to include M The waveform test cases, consisting of the startup time and power scaling factor of each device, are encoded as individuals in the genetic algorithm. I =[ D , T start , P ],in D For device number vectors, T start For including M A startup time vector for each device. P For including M Power scaling factor vectors for each device; generate an initial population based on the individual's encoding; S202, the negative of the objective function is used as the fitness function of the genetic algorithm. ; S203 involves selection and recombination of the current population, including randomly selecting multiple individuals and choosing a fitness function. The individual with the highest value is taken as the parent individual. For obtaining multiple parent individuals, a hybrid crossover mechanism is used to generate new individuals. The hybrid crossover mechanism includes partial mapping crossover of the device number vectors of two parent individuals, and midpoint interpolation or uniform crossover of the startup time vector and power scaling factor vector to obtain new individuals. S204, Mutate the current population, including randomly replacing the device number in an individual in the current population, randomly adding or deleting a device in an individual, and randomly adding Gaussian perturbations to the startup time vector and power scaling factor vector of an individual. S205, retaining the fitness function for the current population. The E individuals with the highest values are selected as the new current population. S206, determine whether the number of iterations is equal to the preset maximum number of iterations or whether the fitness improvement of the best individual over multiple generations is less than the preset threshold. If it is true, jump to step S207; otherwise, jump to step S203 to continue iterating. S207, Select a fitness function from the new current population. The individual with the highest value is output as the optimal waveform test case required for the non-intrusive load identification performance evaluation.
[0035] Step S201 includes M When encoding waveform test cases consisting of the startup time and power scaling factor of each device as individuals (chromosomes) in a genetic algorithm, an encoding method is set for each test case. Assuming each individual (chromosome) represents a configuration scheme for a candidate test case, a real-number encoding + structure vector approach is used, containing three core dimensions: a. Define the device number vector as: D = [1,2,…, m ,… M ]; In the formula m This indicates the device number involved in the synthesis of this case.
[0036] b. Define the startup time vector as follows: T start = [ t 1, t 2, …, t m ,… t M ]; In the formula t m Indicates the first m The device starts sampling point index position.
[0037] c. Define the power scaling factor vector as follows: P = [ p 1, p 2,…, p M ]; In the formula p m Indicates the first m The amplitude adjustment factor of the operating power of the equipment is used to stretch or compress the amplitude of the original equipment power waveform (i.e., to scale the original equipment power waveform by multiplying it by this factor).
[0038] Therefore, an individual representing a waveform test case can be encoded as I =[ D , T start , P ].
[0039] The fitness function is used to evaluate the degree of matching between the individual encoding vector I and the test case it represents on five key attribute indicators (waveform complexity, superposition, power amplitude range, number of mutation points, and class diversity). The goal is to minimize the objective function E(I). Since the essence of the genetic algorithm is to "maximize fitness," step S202 uses the negative of the objective function as the fitness function of the genetic algorithm. The fitness function is used to evaluate waveform test cases. I The degree of matching on the indicators is expected to optimize the objective function. E ( I The smaller the fitness value, the better. Since the essence of a genetic algorithm is to "maximize fitness", the fitness function adopts the following transformation form: ; in, wk Indicates the first k The weight coefficient of the item, Indicates the first k The expected target value of each attribute. bk ( I (Based on individual coding) I Generated test waveforms vn The calculated first k Each attribute value.
[0040] Step S203 includes employing a tournament selection strategy to select and recombine individuals within the current population, including randomly selecting multiple individuals and choosing a fitness function. The individual with the highest fitness value is selected as the parent individual. For example, in this embodiment, 30 individuals are randomly selected for comparison in each round of selection, and the one with the highest fitness is selected as the parent. This method can effectively control selection pressure and avoid premature convergence. For obtaining multiple parent individuals, a hybrid crossover mechanism (PMX) is used to generate new individuals. The hybrid crossover mechanism includes partial mapping crossover of the device number vectors of two parent individuals, and midpoint interpolation or uniform crossover of the startup time vector and power scaling factor vector to obtain new individuals.
[0041] Mutation operations are used to maintain the breadth of the search space and prevent getting trapped in local optima. Step S204 performs mutations on the current population, including structural mutation and parameter mutation: Structural mutation: randomly replace the device number in an individual, or randomly add or delete a device in an individual; Parameter mutation: randomly add Gaussian perturbations to the start-up time vector and power scaling factor vector of an individual.
[0042] In step S205, the fitness function is preserved for the current population. When selecting the E individuals with the highest fitness values as the new current population, the number of individuals E can be chosen according to actual needs. For example, in this embodiment, 30 individuals are randomly selected for comparison in each round of selection, and the one with the highest fitness is selected as the parent. This method can effectively control selection pressure and avoid premature convergence.
[0043] As an optional implementation, after step S204 and before step S205, the method further includes: calculating waveform indicators for individuals in the current population, and deleting individuals whose waveform indicators exceed a preset threshold from the current population. For example, based on waveform complexity, device overlap, power amplitude distribution, number of power mutation points, and device category diversity, individuals with severe time overlap, device conflicts, or waveform distortion can be screened and deleted from the current population. For example, in this embodiment, the value is 0.5. >0.85, <0.1 or If the value is greater than 0.6, the individual will be removed directly.
[0044] As an optional implementation, step S205 retains the fitness function for the current population. When selecting the E individuals with the highest fitness values as the new current population, this includes first adjusting the individual's fitness function based on the individual's violation intensity. The value, and then retain the fitness function The E individuals with the highest values; the fitness function of adjusting individuals based on the intensity of their violations. The function expression for the value is: ; in, The adjusted fitness function The value, λ As a penalty weight, The violation intensity is defined as follows. In this embodiment, the function expression for calculating the violation intensity is: ; in, and These are penalty coefficients for different violations, used to apply weighted penalties based on the actual overlap of multiple devices and power abrupt change points. The values can be selected according to actual needs, such as in this embodiment. =0.4, =0.6; M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For the first m The first device collected the data. n -1 power, The threshold for determining a significant transition.
[0045] In step S206, when determining whether the number of iterations equals the preset maximum number of iterations or whether the improvement in fitness of the best individual across multiple generations is less than a preset threshold, the preset maximum number of iterations is used in this embodiment. G max =50, which can be determined based on the task size and complexity; if the fitness improvement of the best individual across multiple generations is less than a preset threshold, specifically if the fitness improvement of the best individual across 5 consecutive generations is less than a preset threshold of 0.001, then the algorithm is considered to have converged. If either of the above two conditions is met, proceed to step S207; otherwise, proceed to step S203 to continue iterating.
[0046] Finally, through the method of this embodiment, various combinations of parameters such as waveform complexity, device superposition, power amplitude distribution, number of power mutation points, and device category diversity can be set to generate a target non-intrusive test case set.
[0047] To further verify the effectiveness of the waveform generation method for non-intrusive load identification performance evaluation in this embodiment, five key attribute targets were set to guide the generation of test cases: a waveform complexity target of 0.5, aiming to obtain waveform features of moderate complexity; a power distribution range set at 6000W to ensure that the power difference between devices in the test cases remains at a moderate level; a device overlap target of 0.3, aiming to achieve a scenario where an average of three devices operate simultaneously; a power mutation point count set at 0.5 to ensure that the test cases contain a sufficient number of significant power change points; and a device diversity target of 5.0, requiring the test cases to cover five different types of devices to ensure the richness of test case type coverage. After 50 generations of evolution, the fitness change curve of the genetic algorithm is as follows: Figure 2 As shown. From Figure 2 It was observed that the genetic algorithm converged rapidly in the first 10 generations, with the fitness increasing from approximately 0.5 initially to around 0.92. It then entered a slow optimization phase, stabilizing around generation 30, with a final fitness of approximately 0.96. The attributes of the optimal test cases obtained through genetic algorithm optimization are shown in Table 2.
[0048] Table 2: Record of Test Results for Simple Operating Condition Load Identification Function
[0049] As can be seen from the results in Table 2, the generated waveform test cases meet the preset requirements in multiple dimensions. The waveform complexity score is 0.5, which is close to the target value of 0.52, meaning it is neither too simple nor too complex. The power range is 5800W, with moderate power differences between devices, which is beneficial for evaluating the distinguishing ability of the genetic algorithm. The 0.46 power mutation points are close to the target value of 0.5, providing sufficient dynamic change features. Furthermore, the number of devices is consistent with the target value, verifying that the waveform test case generation method of this embodiment can effectively control multiple attribute indicators and achieve test case construction with controllable complexity.
[0050] Figure 3 The following are the power waveforms of each device in the waveform test case of this embodiment. Figure 4 This is the superimposed total power waveform of all devices in the waveform test case of this embodiment. From... Figure 3 The waveform test cases shown indicate that, in the period between 50s and 100s, three devices were running simultaneously, and different devices were starting and stopping. Between 120s and 170s, three devices were also running simultaneously, but these were different from the devices running simultaneously between 50s and 100s. From... Figure 4 The waveform test case shown shows that the total power waveform has a uniform distribution of power abrupt changes, without being too concentrated or sparse. This proves that the generated test case is representative, neither too simple nor too complex, and is suitable for evaluating the performance of the load identification algorithm.
[0051] Furthermore, this embodiment also provides a waveform generation system for non-intrusive load identification performance evaluation, including a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation. This embodiment also provides a computer-readable storage medium storing a computer program or instructions programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation via a processor. This embodiment also provides a computer program product including a computer program or instructions programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation via a processor.
[0052] Those skilled in the art will understand that the technical solutions provided by this invention may take the form of a method, system, or computer program product. Therefore, this invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce an implementation of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0053] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A waveform generation method for non-intrusive load identification performance evaluation, characterized in that, Includes the following steps: S101, Select from the original device waveform library M The original device waveform of each device; S102, identify various waveform indicators that affect non-intrusive load identification; S103, construct the deviation of various waveform indicators from the expected values as the optimization objective function, as shown in the following formula: ; in, Waveform test case I The optimization objective function, For the first k Weights of various waveform indicators The number of waveform indicators, For the first k The expected value of the waveform index, Based on waveform test cases I The generated test waveform The calculated first k Waveform indicators; S104, to include M Waveform test cases, composed of waveform control parameters of individual devices, are encoded as individuals in the genetic algorithm. The negative of the objective function is used as the fitness function of the genetic algorithm. The genetic algorithm is then used to select individuals based on their waveform control parameters. M The original device waveforms are used to generate the optimal waveform test cases required for non-intrusive load identification performance evaluation.
2. The waveform generation method for non-intrusive load identification performance evaluation according to claim 1, characterized in that, The waveform control parameters of the device include the device's startup time and its power scaling factor, as described in the waveform test case. I The generated test waveform The function expression is: ; in, M This represents the total number of devices in the test case. For the first m Power scaling factor for each device For the first m The device is Power at any moment For the first m The index of the starting sampling point of each device waveform.
3. The waveform generation method for non-intrusive load identification performance evaluation according to claim 1, characterized in that, Step S104 includes: S201, to include M The waveform test cases, consisting of the startup time and power scaling factor of each device, are encoded as individuals in the genetic algorithm. I =[ D , T start , P ],in D For device number vectors, T start For including M A startup time vector for each device. P For including M Power scaling factor vectors for each device; generate an initial population based on the individual's encoding; S202, the negative of the objective function is used as the fitness function of the genetic algorithm. ; S203 involves selection and recombination of the current population, including randomly selecting multiple individuals and choosing a fitness function. The individual with the highest value is taken as the parent individual. For obtaining multiple parent individuals, a hybrid crossover mechanism is used to generate new individuals. The hybrid crossover mechanism includes partial mapping crossover of the device number vectors of two parent individuals, and midpoint interpolation or uniform crossover of the startup time vector and power scaling factor vector to obtain new individuals. S204, Mutate the current population, including randomly replacing the device number in an individual in the current population, randomly adding or deleting a device in an individual, and randomly adding Gaussian perturbations to the startup time vector and power scaling factor vector of an individual. S205, retaining the fitness function for the current population. The E individuals with the highest values are selected as the new current population. S206, determine whether the number of iterations is equal to the preset maximum number of iterations or whether the fitness improvement of the best individual over multiple generations is less than the preset threshold. If it is true, jump to step S207; otherwise, jump to step S203 to continue iterating. S207, Select a fitness function from the new current population. The individual with the highest value is output as the optimal waveform test case required for the non-intrusive load identification performance evaluation.
4. The waveform generation method for non-intrusive load identification performance evaluation according to claim 3, characterized in that, The process after step S204 and before step S205 also includes: calculating waveform indicators for individuals in the current population, and deleting individuals whose waveform indicators exceed a preset threshold from the current population.
5. The waveform generation method for non-intrusive load identification performance evaluation according to claim 3, characterized in that, In step S205, the fitness function is preserved for the current population. When selecting the E individuals with the highest fitness values as the new current population, this includes first adjusting the individual's fitness function based on the individual's violation intensity. The value, and then retain the fitness function The E individuals with the highest values; the fitness function of adjusting individuals based on the intensity of their violations. The function expression for the value is: ; in, The adjusted fitness function The value, λ As a penalty weight, The severity of the violation.
6. The waveform generation method for non-intrusive load identification performance evaluation according to claim 5, characterized in that, The expression for calculating the intensity of a violation is as follows: ; in, and For different types of default, the penalty coefficients are... M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For the first m The first device collected the data. n -1 power, The threshold for determining a significant transition.
7. The waveform generation method for non-intrusive load identification performance evaluation according to claim 1, characterized in that, The various waveform indicators affecting non-intrusive load identification include some or all of the following: waveform complexity, equipment superposition, power amplitude distribution, number of power abrupt change points, and equipment category diversity. The expression for the waveform complexity calculation function is as follows: ; ; in, Waveform test case I Waveform complexity, M This represents the total number of devices in the test case. and These are weighting coefficients. N The number of sampling points. For the first m The first device collected the data. n One power, For the first m Average power of each device This represents the spectral information entropy after performing a Fourier transform on the power sequence. For the first m Each device at sampling rate f s Collected N A power sequence, ~ The first m The first to Nth power values collected by each device; The calculation function expression for the device superposition degree is: ; in, Waveform test case I The degree of equipment overlap, and Each is any number m The first device collected the data. n The maximum and minimum values of each power. For the first m The first device collected the data. n Power; The calculation function expression for the power amplitude distribution is: ; in, Waveform test case I The power amplitude distribution M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, Power threshold, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. The function expression for calculating the number of power mutation points is: ; in, Waveform test case I The number of power mutation points, M This represents the total number of devices in the test case. N The number of sampling points. For the first m The first device collected the data. n One power, For the first m The first device collected the data. n -1 power, The threshold for determining a significant transition; The calculation function expression for the diversity of the equipment categories is as follows: ; in, Waveform test case I The diversity of equipment categories M This represents the total number of devices in the test case. Indicates the first m The functional category label of each device, Let |·| denote the union of sets, and let |·| denote the cardinality of the set, where the cardinality is the number of categories.
8. A waveform generation system for non-intrusive load identification performance evaluation, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to execute the waveform generation method for non-intrusive load identification performance evaluation as described in any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the waveform generation method for non-intrusive load identification performance evaluation as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the waveform generation method for non-intrusive load identification performance evaluation as described in any one of claims 1 to 7.