[go: up one dir, main page]

CN105866581B - A kind of electric appliance type identification method - Google Patents

A kind of electric appliance type identification method Download PDF

Info

Publication number
CN105866581B
CN105866581B CN201610213373.6A CN201610213373A CN105866581B CN 105866581 B CN105866581 B CN 105866581B CN 201610213373 A CN201610213373 A CN 201610213373A CN 105866581 B CN105866581 B CN 105866581B
Authority
CN
China
Prior art keywords
current
electrical appliance
classifier
load
electrical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610213373.6A
Other languages
Chinese (zh)
Other versions
CN105866581A (en
Inventor
郭艳杰
凌云
肖伸平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Kede Electronics Co ltd
Original Assignee
Hunan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan University of Technology filed Critical Hunan University of Technology
Priority to CN201610213373.6A priority Critical patent/CN105866581B/en
Priority to CN201810455735.1A priority patent/CN108318770A/en
Publication of CN105866581A publication Critical patent/CN105866581A/en
Application granted granted Critical
Publication of CN105866581B publication Critical patent/CN105866581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An electric appliance type identification method is realized by an electric appliance type identification device comprising an information acquisition module, an information processing module and a communication module. The electric appliance type identification method simultaneously adopts the starting current characteristics of the electric appliance, the fundamental voltage current phase difference and the load current frequency spectrum characteristics of the electric appliance as the identification characteristics of the electric appliance type, and the characteristic information is rich; the combined classifier comprising the decision tree classifier and the Bayes classifier is adopted for identification and classification, and the characteristics of the decision tree classifier and the Bayes classifier are considered for comprehensive identification, so that the identification accuracy is high; the method for acquiring the fundamental voltage current phase difference, the starting current characteristic and the load current frequency spectrum characteristic is simple and reliable. The electric appliance type identification method can be used in student dormitories, large-scale commercial markets and other collective public places needing electric appliance management, and can also be used in other occasions needing electric appliance type identification and statistics and needing electric appliance management.

Description

一种电器类型识别方法A kind of electric appliance type identification method

技术领域technical field

本发明涉及一种设备识别分类装置及方法,尤其是涉及一种电器类型识别方法。The invention relates to a device and method for identifying and classifying equipment, in particular to a method for identifying electrical appliances.

背景技术Background technique

目前,主流的电器负载性质识别方法包括基于负载功率综合系数算法的电器负载识别方法、基于电磁感应的电器负载识别方法、基于神经网络算法的电器负载识别方法、基于周期性离散变换算法的电器负载识别方法等。各种方法均能够在一定程度是实现电器负载性质的识别,但由于特征性质单一,识别手段单一,普遍存在泛化能力不够及不能完全准确识别的问题。At present, the mainstream electrical load identification methods include the electrical load identification method based on the load power comprehensive coefficient algorithm, the electrical load identification method based on electromagnetic induction, the electrical load identification method based on the neural network algorithm, and the electrical load identification method based on the periodic discrete transformation algorithm. identification method, etc. Various methods can realize the identification of electrical load properties to a certain extent, but due to the single characteristic properties and single identification means, there are generally problems of insufficient generalization ability and incomplete and accurate identification.

发明内容Contents of the invention

本发明的目的在于,针对现在已有技术的缺陷,提供一种能够实现高效识别的电器类型识别方法。所述电器类型识别方法由包括信息采集模块、信息处理模块、通信模块电器类型识别装置来实现。The object of the present invention is to provide a method for identifying electrical appliances that can realize efficient identification, aiming at the defects of the prior art. The electrical appliance type identification method is realized by an electrical appliance type identification device including an information collection module, an information processing module, and a communication module.

所述信息采集模块用于采集电器的负载电流并转换成电流数字信号;所述电流数字信号被送至信息处理模块;所述信息处理模块依据输入的电流数字信号,采用组合分类器进行电器类型识别;所述通信模块用于发送信息处理模块的电器类型识别结果至上位机。The information collection module is used to collect the load current of the electrical appliance and convert it into a current digital signal; the current digital signal is sent to the information processing module; the information processing module uses a combination classifier to classify the electrical appliance type according to the input current digital signal Identification; the communication module is used to send the electrical type identification result of the information processing module to the host computer.

所述组合分类器的输入特征包括电器的启动电流特征、电器的负载电流频谱特征和电器的基波电压电流相位差;所述组合分类器包括决策树分类器和贝叶斯分类器;所述启动电流特征包括启动过程时间、启动电流最大值、启动电流最大值时间。The input features of the combined classifier include the starting current characteristics of the electrical appliance, the load current spectrum characteristics of the electrical appliance and the fundamental voltage and current phase difference of the electrical appliance; the combined classifier includes a decision tree classifier and a Bayesian classifier; the The characteristics of the starting current include the starting process time, the maximum value of the starting current, and the time of the maximum value of the starting current.

所述信息采集模块包括电流传感器、前置放大器、滤波器、A/D转换器;所述信息处理模块的核心为DSP,或者为ARM,或者为单片机,或者为FPGA。The information acquisition module includes a current sensor, a preamplifier, a filter, and an A/D converter; the core of the information processing module is DSP, or ARM, or a single-chip microcomputer, or FPGA.

所述A/D转换器可以采用信息处理模块的核心中包括的A/D转换器。The A/D converter may adopt an A/D converter included in the core of the information processing module.

所述信息采集模块、信息处理模块、通信模块的全部或者部分功能集成在一片SoC上。All or part of the functions of the information collection module, information processing module and communication module are integrated on one SoC.

所述通信模块还接收上位机的相关工作指令;所述通信模块与上位机之间的通信方式包括无线通信方式与有线通信方式;所述无线通信方式包括ZigBee、蓝牙、WiFi、433MHz数传方式;所述有线通信方式包括485总线、CAN总线、互联网、电力载波方式。The communication module also receives relevant work instructions from the host computer; the communication mode between the communication module and the host computer includes a wireless communication mode and a wired communication mode; the wireless communication mode includes ZigBee, Bluetooth, WiFi, and 433MHz digital transmission mode ; The wired communication methods include 485 bus, CAN bus, Internet, and power carrier.

所述负载电流频谱特征通过以下方法获得:The load current spectrum feature is obtained by the following method:

步骤一、获取电器负载的稳态电流信号,并将其转换为对应的稳态电流数字信号;Step 1. Obtain the steady-state current signal of the electrical load and convert it into a corresponding steady-state current digital signal;

步骤二、对稳态电流数字信号进行傅立叶变换,得到负载电流频谱特性;Step 2, performing Fourier transform on the steady-state current digital signal to obtain the load current spectrum characteristic;

步骤三、将负载电流频谱特性中谐波次数为n次的奇次谐波信号相对幅值作为负载电流频谱特征,n=1,3,…,M;所述M表示谐波最高次数且M大于等于3。Step 3, the relative amplitude of the odd harmonic signal whose harmonic order is n in the load current spectrum characteristic is used as the load current spectrum characteristic, n=1, 3, ..., M; said M represents the highest harmonic order and M Greater than or equal to 3.

所述组合分类器中,决策树分类器为主分类器,贝叶斯分类器为辅助分类器。In the combination classifier, the decision tree classifier is the main classifier, and the Bayesian classifier is the auxiliary classifier.

所述组合分类器进行电器类型识别的方法是:当主分类器成功实现电器类型识别时,主分类器的电器类型识别结果为组合分类器的识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果为2种或者2种以上电器类型,将主分类器输出的2种或者2种以上电器类型识别结果中,辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果中未能给出识别的电器类型时,将辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果。The method for the combination classifier to identify the electrical appliance type is: when the main classifier successfully realizes the electrical appliance type identification, the electrical appliance type identification result of the main classifier is the identification result of the combined classifier; when the main classifier fails to realize the electrical appliance type identification, and The identification result of the main classifier is two or more types of electrical appliances, and among the identification results of two or more types of electrical appliances output by the main classifier, the electrical appliance type with the highest probability in the output of the auxiliary classifier is used as the electrical appliance of the combined classifier. Type recognition results; when the main classifier fails to realize electrical appliance type identification, and the recognized electrical appliance type is not given in the identification result of the main classifier, the electrical appliance type with the highest probability in the output of the auxiliary classifier is used as the electrical appliance type of the combined classifier recognition result.

所述启动电流特征由信息处理模块通过以下方法获得:The starting current feature is obtained by the information processing module through the following methods:

步骤1、电器启动前,开始对电器的负载电流连续采样并对负载电流大小进行判断;当负载电流有效值大于ε时,判定电器开始启动并转向步骤2;所述ε为大于0的数值;Step 1. Before the electrical appliance is started, start to continuously sample the load current of the electrical appliance and judge the magnitude of the load current; when the effective value of the load current is greater than ε, determine that the electrical appliance starts to start and turn to step 2; the ε is a value greater than 0;

步骤2、对电器的负载电流进行连续采样,以工频周期为单位计算负载电流有效值并保存;计算最近N个工频周期的负载电流有效值的平均值;当最近N个工频周期之内的每个工频周期的负载电流有效值与该N个工频周期的负载电流有效值的平均值相比较,波动幅度均小于设定的相对误差范围E时,判定电器负载进入稳定状态,转向步骤3;所述N的取值范围为50-500;所述E的取值范围为2%-20%;Step 2. Continuously sample the load current of the electrical appliance, calculate and save the effective value of the load current in units of power frequency cycles; calculate the average value of the effective value of the load current in the last N power frequency cycles; when the latest N power frequency cycles The effective value of the load current in each power frequency cycle is compared with the average value of the load current effective value of the N power frequency cycles. When the fluctuation range is less than the set relative error range E, it is determined that the electrical load has entered a stable state. Turn to step 3; the value range of the N is 50-500; the value range of the E is 2%-20%;

步骤3、将最近N个工频周期之内的负载电流有效值的平均值作为电器负载稳态电流有效值;将电器开始启动时刻至最近N个工频周期起始时刻之间的时间作为启动过程时间;将电器开始启动时刻至启动过程时间之内负载电流有效值最大的工频周期之间的时间作为启动电流最大值时间;将启动电流最大值时间所在工频周期的负载电流有效值与电器负载稳态电流有效值之间的比值作为启动电流最大值。Step 3. Use the average value of the effective value of the load current within the last N power frequency cycles as the effective value of the steady-state current of the electrical appliance load; use the time between the start of the electrical appliance and the start of the last N power frequency cycles as the startup The process time; the time between the start-up time of the electrical appliance and the power frequency cycle with the largest load current effective value within the start-up process time is taken as the maximum start-up current time; the load current effective value of the power-frequency cycle where the start-up current maximum time is located The ratio between the effective values of the steady-state current of the electrical appliance load is used as the maximum value of the starting current.

所述组合分类器的输入特征还包括电器负载稳态电流有效值。The input features of the combination classifier also include the effective value of the steady-state current of the electric appliance load.

所述电器的基波电压电流相位差通过以下方法获得:The fundamental voltage and current phase difference of the electrical appliance is obtained by the following method:

步骤①、待电器负载进入稳定状态后,同步获取电器负载的稳态电压信号、稳态电流信号,并将其转换为相应的稳态电压数字信号、稳态电流数字信号;Step 1. After the electrical load enters a stable state, obtain the steady-state voltage signal and steady-state current signal of the electrical load synchronously, and convert them into corresponding steady-state voltage digital signals and steady-state current digital signals;

步骤②、对稳态电压数字信号、稳态电流数字信号分别进行数字滤波,提取出基波电压信号、基波电流信号;Step ②, performing digital filtering on the steady-state voltage digital signal and the steady-state current digital signal respectively, and extracting the fundamental voltage signal and the fundamental current signal;

步骤③、分析计算基波电压信号与基波电流信号之间的相位差,将基波电压信号与基波电流信号之间的相位差作为电器的基波电压电流相位差。Step 3. Analyzing and calculating the phase difference between the fundamental voltage signal and the fundamental current signal, and using the phase difference between the fundamental voltage signal and the fundamental current signal as the fundamental voltage and current phase difference of the electrical appliance.

本发明的有益效果是:同时采用电器的启动电流特征、电器的负载电流频谱特征以及电器的基波电压电流相位差作为所述电器类型识别装置的识别特征,特征信息丰富;采用包括决策树分类器和贝叶斯分类器的组合分类器进行识别分类,兼顾决策树分类器和贝叶斯分类器的特点进行综合识别,泛化能力与识别准确率高;提供的包括启动过程时间、启动电流最大值、启动电流最大值时间在内的启动电流特征获取方法,以及负载电流频谱特征获取方法简单、可靠。The beneficial effects of the present invention are: adopting the starting current characteristics of electrical appliances, the load current spectrum characteristics of electrical appliances, and the fundamental wave voltage and current phase difference of electrical appliances as the identification features of the electrical appliance type identification device, and the feature information is rich; adopting decision tree classification The combined classifier of the decision tree classifier and the Bayesian classifier is used for identification and classification, taking into account the characteristics of the decision tree classifier and the Bayesian classifier for comprehensive identification, with high generalization ability and recognition accuracy; The method for obtaining the characteristics of the starting current including the maximum value and the time of the maximum value of the starting current, and the method for obtaining the spectral characteristics of the load current are simple and reliable.

附图说明Description of drawings

图1为本发明电器类型识别装置实施例的结构示意图;FIG. 1 is a schematic structural view of an embodiment of an electrical appliance type identification device of the present invention;

图2为白炽灯台灯的启动过程电流波形;Fig. 2 is the current waveform of the starting process of the incandescent desk lamp;

图3为电阻炉等电阻性负载的启动过程电流波形;Figure 3 is the current waveform of the start-up process of resistive loads such as resistance furnaces;

图4为单相电机类负载的启动过程电流波形;Figure 4 is the current waveform in the starting process of a single-phase motor load;

图5为计算机及开关电源类负载的启动过程电流波形;Fig. 5 is the starting process current waveform of computer and switching power supply load;

图6为电器类型识别方法流程图。Fig. 6 is a flowchart of a method for identifying an electrical appliance type.

具体实施方式Detailed ways

以下结合附图对本发明作进一步说明。The present invention will be further described below in conjunction with accompanying drawing.

图1为本发明电器类型识别装置实施例的结构示意图,包括信息采集模块101、信息处理模块102、通信模块103。FIG. 1 is a schematic structural diagram of an embodiment of an electrical appliance type identification device according to the present invention, including an information collection module 101 , an information processing module 102 , and a communication module 103 .

信息采集模块102用于采集电器的负载电压、负载电流并将负载电压、负载电流转换成电压数字信号、电流数字信号,电压数字信号、电流数字信号被送至信息处理模块102。信息采集模块中包括电压传感器、电流传感器、前置放大器、滤波器、A/D转换器等组成部分,分别完成负载电流信号的传感、放大、滤波与模数转换功能。当负载电压、负载电流范围较大时,可以选择具有程控功能的前置放大器,或者是在A/D转换器前再增加一个独立的程控放大器,对范围较大的负载电流实行分段控制放大,使输入至A/D转换器的电压信号范围保持在合理的区间,保证转换精度。滤波器用于滤除高频分量,避免频谱混叠。The information collection module 102 is used to collect the load voltage and load current of the electrical appliances and convert the load voltage and load current into voltage digital signals and current digital signals, and the voltage digital signals and current digital signals are sent to the information processing module 102 . The information acquisition module includes voltage sensor, current sensor, preamplifier, filter, A/D converter and other components, which respectively complete the sensing, amplification, filtering and analog-to-digital conversion functions of the load current signal. When the range of load voltage and load current is large, you can choose a preamplifier with program-controlled function, or add an independent program-controlled amplifier before the A/D converter, and implement segmental control amplification for a large range of load current. , so that the range of the voltage signal input to the A/D converter is kept within a reasonable range, and the conversion accuracy is guaranteed. Filters are used to filter out high frequency components to avoid spectral aliasing.

信息处理模块102依据输入的电压数字信号、电流数字信号,采用包括决策树分类器和贝叶斯分类器的组合分类器实现电器类型识别。组合分类器的输入特征包括电器的启动电流特征和电器的负载电流频谱特征和电器的基波电压电流相位差。信息处理模块102的核心为DSP、ARM、单片机,或者为FPGA。当信息处理模块的核心中包括有A/D转换器且该A/D转换器满足要求时,信息采集模块101中的A/D转换器可以采用信息处理模块102的核心中包括的A/D转换器。The information processing module 102 uses a combined classifier including a decision tree classifier and a Bayesian classifier to identify electrical appliances according to the input voltage digital signal and current digital signal. The input features of the combined classifier include the characteristics of the starting current of the electrical appliance, the spectral characteristics of the load current of the electrical appliance and the phase difference of the fundamental wave voltage and current of the electrical appliance. The core of the information processing module 102 is DSP, ARM, single-chip microcomputer, or FPGA. When the core of the information processing module includes an A/D converter and the A/D converter meets the requirements, the A/D converter in the information collection module 101 can adopt the A/D converter included in the core of the information processing module 102. converter.

通信模块103用于实现与上位机之间的通信,将识别结果发送至上位机。通信模块102与上位机之间的通信方式包括无线通信方式与有线通信方式,可以采用的无线通信方式包括ZigBee、蓝牙、WiFi、433MHz数传等方式,可以采用的有线通信方式包括485总线、CAN总线、互联网、电力载波等方式。通信模块103还可以接收上位机的相关工作指令,完成指定的工作任务。上位机可以是管理部门的服务器,也可以是各种工作站,或者是各种移动终端。The communication module 103 is used to realize the communication with the upper computer, and send the identification result to the upper computer. The communication mode between the communication module 102 and the upper computer includes wireless communication mode and wired communication mode. The wireless communication mode that can be used includes ZigBee, Bluetooth, WiFi, 433MHz data transmission, etc. The wired communication mode that can be used includes 485 bus, CAN Bus, Internet, power carrier, etc. The communication module 103 can also receive relevant work instructions from the host computer to complete specified work tasks. The upper computer can be the server of the management department, various workstations, or various mobile terminals.

信息采集模块101、信息处理模块102、通信模块103的全部或者部分功能可以集成在一片SoC上,减小装置体积,方便安装。All or part of the functions of the information collection module 101, the information processing module 102, and the communication module 103 can be integrated on one SoC, which reduces the size of the device and facilitates installation.

不同的电器设备具有不同的启动电流特征。如图2所示为白炽灯台灯的启动过程电流波形。白炽灯是将灯丝通电加热到白炽状态,利用热辐射发出可见光的电光源。白炽灯的灯丝通常用耐高温的金属钨制造,但金属钨的电阻随温度变化大,以Rt表示钨丝在t℃时的电阻,以R0表示钨丝在0℃时的电阻,则两者有下述的关系Different electrical equipment has different starting current characteristics. As shown in Figure 2, it is the current waveform of the starting process of the incandescent lamp. An incandescent lamp is an electric light source that heats the filament to an incandescent state and emits visible light by thermal radiation. The filament of an incandescent lamp is usually made of high temperature resistant metal tungsten, but the resistance of metal tungsten varies greatly with temperature. Let R t represent the resistance of the tungsten wire at t°C, and R 0 represent the resistance of the tungsten wire at 0°C, then The two have the following relationship

Rt=R0(1+0.0045t)R t =R 0 (1+0.0045t)

例如,设白炽灯的灯丝(钨丝)在正常工作时的温度为2000℃,一只“220V 100W”的白炽灯的灯丝在2000℃正常工作时的电阻为For example, if the temperature of the filament (tungsten filament) of an incandescent lamp is 2000°C during normal operation, the resistance of the filament of a "220V 100W" incandescent lamp at 2000°C is

其在不通电时0℃的电阻为Its resistance at 0°C when no power is applied is

其在不通电时20℃的电阻为Its resistance at 20°C when no power is applied is

R20=R0(1+0.0045t)=52.8ΩR 20 =R 0 (1+0.0045t)=52.8Ω

即白炽灯在启动通电的瞬间电流超过其额定电流的9倍,且最大启动电流发生在启动时刻。随着白炽灯钨丝温度的升高,白炽灯的负载电流按照指数规律减小,然后进入稳定状态。That is, the current of the incandescent lamp at the moment of starting and energizing exceeds 9 times its rated current, and the maximum starting current occurs at the starting moment. As the temperature of the tungsten filament of the incandescent lamp increases, the load current of the incandescent lamp decreases exponentially and then enters a steady state.

设电器负载稳态电流有效值为IW,且定义电器负载电流有效值进入电器负载稳态电流有效值的一个设定的相对误差范围之内并稳定在这个相对误差范围之内,则电器负载进入稳定状态。相对误差范围可以设定为10%,也可以设定为2%、5%、15%、20%等2%-20%之间的值。图2中,设定的相对误差范围为10%,当白炽灯的负载电流按照指数规律减小到其IW的10%误差范围时,如图2中的时刻TS,启动过程结束。白炽灯的启动过程时间为TS。IW为有效值。Assuming that the effective value of the steady-state current of the electrical appliance load is I W , and it is defined that the effective value of the electrical appliance load current enters a set relative error range of the steady-state current effective value of the electrical appliance load and is stable within this relative error range, then the electrical appliance load into a steady state. The relative error range can be set at 10%, or at a value between 2%, 5%, 15%, 20%, etc., between 2% and 20%. In Figure 2, the set relative error range is 10%. When the load current of the incandescent lamp decreases to the 10% error range of its I W according to the exponential law, as shown in the time T S in Figure 2, the start-up process ends. The starting process time of the incandescent lamp is T S . I W is a valid value.

选择启动过程时间、启动电流最大值I*、启动电流最大值时间作为电器的启动电流特征;启动电流最大值为标么值,即启动电流最大值I*为启动电流的最大有效值IM与电器负载稳态电流有效值IW的比值。Select the starting process time, the maximum value of the starting current I * , and the time of the maximum value of the starting current as the characteristics of the starting current of the electrical appliance; The ratio of the electrical load steady-state current effective value I W.

图2中,白炽灯的启动过程时间为TS;启动电流最大值I*为IM/IW,其值约在9-10之间;启动电流最大值时间为TM,TM=0。In Fig. 2, the starting process time of an incandescent lamp is T S ; the maximum starting current I* is I M /I W , and its value is about 9-10; the starting current maximum time is TM , TM = 0 .

如图3所示为电阻炉等电阻性负载的启动过程电流波形。电阻炉等电阻性负载通常采用镍铬、铁铬铝等电热合金丝,其共同特点是电阻温度修正系数小,电阻值稳定。以牌号为Cr20Ni80的镍铬电热丝为例,其在1000℃时的电阻修正系数为1.014,即1000℃时相对于20℃时,牌号为Cr20Ni80的镍铬电热丝电阻只增加1.4%。因此,电阻炉等电阻性负载在通电启动时即进入稳定状态,电阻炉等电阻性负载的启动过程时间TS=0;启动电流最大值I*=1;启动电流最大值时间TM=0。Figure 3 shows the current waveform of the start-up process of resistive loads such as resistance furnaces. Resistive loads such as resistance furnaces usually use electrothermal alloy wires such as nickel-chromium, iron-chromium-aluminum, etc., and their common characteristics are small resistance temperature correction coefficient and stable resistance value. Taking the nickel-chromium heating wire with the brand name Cr20Ni80 as an example, its resistance correction coefficient at 1000°C is 1.014, that is, at 1000°C compared to 20°C, the resistance of the nickel-chromium heating wire with the brand name Cr20Ni80 only increases by 1.4%. Therefore, resistive loads such as resistance furnaces enter a stable state when they are energized and started, and the start-up process time of resistive loads such as resistance furnaces is T S =0; the maximum value of the starting current I*=1; the time of the maximum value of the starting current T M =0 .

如图4所示为单相电机类负载的启动过程电流波形。单相电机类负载既具有电感性负载特性,又具有反电动势负载特性。启动时刻,由于电感的作用,启动时刻的启动电流为0;随后电流迅速上升,在电机反电动势未建立之前,达到电流峰值IM;此后,电机转速增加,电机负载电流逐步减小,直到进入稳定状态。图4中,单相电机类负载的启动过程时间为TS;启动电流最大值I*为IM/IW;启动电流最大值时间为TMFigure 4 shows the current waveform of the single-phase motor load during startup. Single-phase motor loads have both inductive load characteristics and counter electromotive force load characteristics. At the starting moment, due to the effect of the inductance, the starting current at the starting moment is 0; then the current rises rapidly, and reaches the current peak value I M before the back electromotive force of the motor is established; after that, the motor speed increases, and the motor load current gradually decreases until it enters stable state. In Fig. 4, the starting process time of single-phase motor load is T S ; the maximum starting current I* is I M /I W ; the maximum starting current time is T M .

如图5所示为计算机及开关电源类负载的启动过程电流波形。计算机及开关电源类负载因为对电容充电的影响,在启动瞬间会产生一个很大的浪涌电流,其峰值可达到稳态电流有效值IW的几倍至十几倍,时间为1至2个工频周期。图5中,计算机及开关电源类负载的启动过程时间为TS,约1至2个工频周期;启动电流最大值I*为IM/IW;启动电流最大值时间为TM=0。Figure 5 shows the current waveforms of the computer and switching power supply loads during startup. Computer and switching power supply loads will generate a large surge current at the moment of startup due to the impact on capacitor charging, and its peak value can reach several times to ten times the steady-state current effective value I W , and the time is 1 to 2 frequency cycle. In Fig. 5, the start-up process time of computer and switching power supply loads is T S , about 1 to 2 power frequency cycles; the maximum value of the starting current I* is I M /I W ; the time of the maximum value of the starting current is TM = 0 .

获取电器的启动电流特征的方法是:The method to obtain the starting current characteristics of the electrical appliance is:

电器启动前,负载电流值为0(未开机)或者很小(处于待机状态)时,信息处理模块102即开始对负载电流进行连续采样;当采样得到的负载电流值有效值开始大于0或者是开始大于电器的待机电流时,即判断出电器已经启动,记录该时刻为T0。用一个较小的非负阈值ε来区分电器启动前后的负载电流值,当ε取值特别小时,例如,ε取值1mA时,所述识别装置不考虑待机情况,即认为待机也是电器的启动状态;当ε取值较小但大于电器的待机电流时,例如,ε取值20mA时,所述识别装置会将电器的待机状态认为是未启动状态,但同时也会的部分功率特别小的电器造成漏识别。Before the electrical appliance starts, when the load current value is 0 (not powered on) or very small (in standby state), the information processing module 102 starts to continuously sample the load current; when the sampled effective value of the load current starts to be greater than 0 or is When it starts to be greater than the standby current of the electrical appliance, it is judged that the electrical appliance has been started, and this moment is recorded as T 0 . A small non-negative threshold ε is used to distinguish the load current value before and after the electrical appliance is started. When the value of ε is particularly small, for example, when the value of ε is 1mA, the identification device does not consider the standby situation, that is, it considers that the standby is also the startup of the electrical appliance state; when the value of ε is small but greater than the standby current of the electrical appliance, for example, when the value of ε is 20mA, the identification device will consider the standby state of the electrical appliance as a non-started state, but at the same time, some of the power is particularly small Electrical appliances cause missed identification.

信息处理模块102对负载电流进行连续采样,且以工频周期为单位计算负载电流有效值并保存;当电器已经启动,且连续采样达到N个工频周期后,采样的同时连续计算最近N个工频周期的负载电流有效值的平均值IV;信息处理模块102对最近N个工频周期之内每个工频周期的负载电流有效值与该N个工频周期的负载电流有效值的平均值进行比较,误差(或波动)幅度均小于设定的相对误差范围E时,判定电器负载进入稳定状态,该最近N个工频周期的起始时刻为启动过程的结束时刻,记录该时刻为T1The information processing module 102 continuously samples the load current, and calculates and saves the effective value of the load current in units of power frequency cycles; when the electrical appliance has been started and the continuous sampling reaches N power frequency cycles, the latest N values are continuously calculated while sampling. The average value IV of the load current effective value of the power frequency cycle ; the information processing module 102 compares the load current effective value of each power frequency cycle within the latest N power frequency cycles with the load current effective value of the N power frequency cycles Compared with the average value, when the error (or fluctuation) range is less than the set relative error range E, it is judged that the electrical load has entered a stable state, and the start time of the latest N power frequency cycles is the end time of the start-up process, record this time for T 1 .

将最近N个工频周期之内的负载电流有效值的平均值作为电器负载稳态电流有效值IW;将电器开始启动时刻T0至最近N个工频周期起始时刻T1之间的时间作为启动过程时间TS;将T0至T1之内负载电流有效值最大的工频周期所在时刻记录为T2,将T0至T2之间的时间作为启动电流最大值时间TM;将T2所在工频周期的负载电流有效值与电器负载稳态电流有效值IW之间的比值作为启动电流最大值I*。The average value of the load current effective value within the latest N power frequency cycles is taken as the steady-state current effective value I W of the electrical appliance load ; The time is taken as the start-up process time T S ; the moment of the power frequency cycle with the maximum load current effective value within T 0 to T 1 is recorded as T 2 , and the time between T 0 and T 2 is taken as the start-up current maximum time T M ; The ratio between the effective value of the load current in the power frequency cycle of T2 and the effective value of the steady-state current I W of the electrical appliance load is taken as the maximum value of the starting current I*.

由于预先不知道电器负载稳态电流有效值IW,因此,将N个工频周期,即一段持续时间TP之内波动范围小于设定的相对误差范围E时的负载电流有效值的平均值作为电器负载稳态电流有效值IW。由于普通电器负载的启动过程较快,所以,TP的取值范围为1-10s,典型取值是2s,相应的工频周期数量N的取值范围为50-500,N的典型取值是100。所述相对误差范围E的取值范围为2%-20%,E的典型取值是10%。Since the effective value of the steady-state current I W of the electrical appliance load is not known in advance, the average value of the effective value of the load current when the fluctuation range is less than the set relative error range E within N power frequency cycles, that is, a period of time T P As the effective value of the steady-state current of the electrical appliance load I W . Due to the fast start-up process of ordinary electrical loads, the value range of T P is 1-10s, the typical value is 2s, and the corresponding power frequency cycle number N ranges from 50-500, the typical value of N is 100. The value range of the relative error range E is 2%-20%, and the typical value of E is 10%.

组合分类器的输入特征还包括电器的负载电流频谱特征。电器的负载电流频谱特征由信息处理模块102控制信息采集模块101,通过以下步骤获得:The input features of the combination classifier also include the load current spectrum features of electrical appliances. The load current spectrum feature of the electrical appliance is obtained by the information processing module 102 controlling the information collection module 101 through the following steps:

步骤一、待电器负载进入稳定状态后,获取电器负载的稳态电流信号,并将其转换为对应的稳态电流数字信号。Step 1. After the electrical load enters a steady state, the steady-state current signal of the electrical load is obtained and converted into a corresponding steady-state current digital signal.

步骤二、对稳态电流数字信号进行傅立叶变换,得到负载电流频谱特性。为保证傅立叶变换的顺利进行,在前述获取电器负载的稳态电流信号,并将其转换为对应的稳态电流数字信号的过程中,A/D转换器的精度和速度需要满足傅立叶变换的要求,采样频率可以设定为10kHz,或者是其他数值;信息处理模块102对采集到的稳态电流数字信号进行FFT运算,计算其频谱。Step 2, performing Fourier transform on the steady-state current digital signal to obtain the load current spectrum characteristic. In order to ensure the smooth progress of Fourier transform, in the process of obtaining the steady-state current signal of the electrical load and converting it into the corresponding steady-state current digital signal, the accuracy and speed of the A/D converter need to meet the requirements of Fourier transform , the sampling frequency can be set to 10kHz, or other numerical values; the information processing module 102 performs FFT operation on the collected steady-state current digital signal, and calculates its frequency spectrum.

步骤三、将负载电流频谱特性中的n次谐波信号相对幅值作为负载电流频谱特征,其中,n=1,2,…,M;在组成组合分类器的输入特征向量时,n次谐波信号相对幅值在输入特征向量中按照1,2,…,M的顺序依次排列。由于负载电流频谱特性主要由奇次谐波组成,除少数电器设备外,偶次谐波分量几乎为0,因此,也可以将负载电流频谱特性中谐波次数为n次的奇次谐波信号相对幅值依序作为负载电流频谱特征,其中,n=1,3,…,M。n=1时的1次谐波为工频基波。所述谐波信号相对幅值为谐波信号幅值与电器负载稳态电流有效值IW的比值。所述M表示谐波最高次数,一般情况下,M大于等于3。Step 3, use the relative amplitude of the nth harmonic signal in the load current spectral characteristic as the load current spectral characteristic, wherein, n=1, 2, ..., M; when forming the input feature vector of the combined classifier, the nth harmonic The relative amplitude of the wave signal is arranged in the order of 1, 2, ..., M in the input feature vector. Since the load current spectral characteristics are mainly composed of odd harmonics, except for a few electrical equipment, the even harmonic components are almost 0, therefore, the odd harmonic signal with the nth harmonic order in the load current spectral characteristics can also be The relative amplitudes are sequentially used as load current spectrum features, where, n=1, 3, . . . , M. The 1st harmonic when n=1 is the power frequency fundamental wave. The relative amplitude of the harmonic signal is the ratio of the amplitude of the harmonic signal to the effective value I W of the steady-state current of the electrical appliance load. The M represents the highest order of the harmonic, and in general, M is greater than or equal to 3.

组合分类器的输入特征还包括电器的基波电压电流相位差。基波电压电流相位差可以对电阻性、电容性、电感性负载进行区分,还可以对一般的电感性负载和大电感性负载进行区分。电器的基波电压电流相位差由信息处理模块102控制信息采集模块101,通过以下步骤获得:The input features of the combined classifier also include the fundamental voltage and current phase difference of electrical appliances. The fundamental voltage and current phase difference can distinguish resistive, capacitive, and inductive loads, as well as general inductive loads and large inductive loads. The fundamental voltage and current phase difference of the electrical appliance is obtained by the information processing module 102 controlling the information collection module 101 through the following steps:

步骤①、待电器负载进入稳定状态后,同步获取电器负载的稳态电压信号、稳态电流信号,并将其转换为对应的稳态电压数字信号、稳态电流数字信号。Step ①. After the electrical load enters a stable state, obtain the steady-state voltage signal and steady-state current signal of the electrical load synchronously, and convert them into corresponding steady-state voltage digital signals and steady-state current digital signals.

步骤②、对稳态电压数字信号、稳态电流数字信号分别进行数字滤波,提取出基波电压信号、基波电流信号。Step 2. Perform digital filtering on the steady-state voltage digital signal and the steady-state current digital signal to extract the fundamental voltage signal and the fundamental current signal.

步骤③、分析计算基波电压信号与基波电流信号之间的相位差,将基波电压信号与基波电流信号之间的相位差作为电器的基波电压电流相位差。Step 3. Analyzing and calculating the phase difference between the fundamental voltage signal and the fundamental current signal, and using the phase difference between the fundamental voltage signal and the fundamental current signal as the fundamental voltage and current phase difference of the electrical appliance.

步骤②中对稳态电压数字信号、稳态电流数字信号分别进行数字滤波,其数字滤波算法可以选择卡尔曼滤波法、小波变换法、维纳滤波法、自适应滤波等数字滤波器算法。In step ②, the steady-state voltage digital signal and the steady-state current digital signal are respectively digitally filtered, and the digital filter algorithm can choose Kalman filter method, wavelet transform method, Wiener filter method, adaptive filter and other digital filter algorithms.

组合分类器中,决策树分类器为主分类器,贝叶斯分类器为辅助分类器。组合分类器的输入特征包括前述的启动电流特征和负载电流频谱特征,组合分类器的输入特征同时作为决策树分类器的输入特征和贝叶斯分类器的输入特征。In the combined classifiers, the decision tree classifier is the main classifier, and the Bayesian classifier is the auxiliary classifier. The input features of the combined classifier include the aforementioned start-up current features and load current spectrum features, and the input features of the combined classifier are simultaneously used as the input features of the decision tree classifier and the Bayesian classifier.

如图6所示为电器类型识别方法流程图,所述电器类型识别方法的具体步骤是:As shown in Figure 6, it is a flowchart of an electrical appliance type identification method, and the specific steps of the electrical appliance type identification method are:

步骤A、等待电器启动;Step A, wait for the electrical appliance to start;

步骤B、采集电器启动电流数据并保存,直至电器启动过程结束;Step B, collecting and saving the starting current data of the electric appliance until the end of the starting process of the electric appliance;

步骤C、分析采集的电器启动电流数据,获取电器的启动电流特征;Step C, analyzing the collected starting current data of the electric appliance to obtain the starting current characteristics of the electric appliance;

步骤D、采集电器稳态工作时的电压、电流数据并保存;Step D, collecting and saving the voltage and current data when the electrical appliance works in a steady state;

步骤E、分析采集的电器稳态工作时的电压、电流数据,获取电器的负载电流频谱特征、基波电压电流相位差;Step E, analyzing the collected voltage and current data of the electrical appliance in steady state operation, and obtaining the load current spectrum characteristics and fundamental voltage and current phase difference of the electrical appliance;

步骤F、将启动电流特征、负载电流频谱特征、基波电压电流相位差作为组合分类器的输入特征;组合分类器进行电器类型识别;Step F, using the starting current characteristics, load current spectrum characteristics, and fundamental voltage and current phase difference as the input characteristics of the combined classifier; the combined classifier performs electrical type identification;

步骤G、输出电器类型识别结果。Step G, outputting the identification result of the electric appliance type.

所述组合分类器进行电器类型识别的方法是:当主分类器成功实现电器类型识别,即主分类器输出的识别结果为唯一的电器类型,即识别结果中唯一的电器类型为是时,将主分类器识别的电器类型作为组合分类器的电器类型识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果为2种或者2种以上电器类型,即识别结果中有2种或者2种以上电器类型为是时,将主分类器输出的2种或者2种以上电器类型识别结果中,辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果中未能给出识别的电器类型,即识别结果中没有电器类型为是时,将辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果。The method for the combined classifier to identify the electrical appliance type is: when the main classifier successfully realizes the electrical appliance type identification, that is, when the identification result output by the main classifier is the only electrical appliance type, that is, when the only electrical appliance type in the identification result is Yes, the main The electrical appliance type identified by the classifier is used as the electrical appliance type identification result of the combined classifier; when the main classifier fails to realize the electrical appliance type identification, and the identification result of the main classifier is 2 or more types of electrical appliances, that is, there are 2 types of electrical appliances in the identification result Or when more than 2 types of electrical appliances are yes, among the 2 or more types of electrical identification results output by the main classifier, the electrical type with the highest probability in the output of the auxiliary classifier is used as the electrical type identification result of the combined classifier; when the main classification The device fails to realize the electrical type identification, and the identification result of the main classifier fails to give the identified electrical type, that is, when there is no electrical type in the identification result, the electrical type with the highest probability in the output of the auxiliary classifier is used as the combined classification The appliance type identification result of the appliance.

以一个简单的实施例1为例,来说明组合分类器进行电器类型识别的方法。设有一个组合分类器,其输入特征为x={TS,I*,TM,A1,A2,A3,A4,A5},其中,TS是启动过程时间,单位是ms;I*是启动电流最大值;TM是启动电流最大值时间,单位是ms;A1、A2、A3、A4、A5为负载电流频谱特性中的1-5次谐波信号相对幅值,为用电负载的基波电压电流相位差。组合分类器的输出是{B1,B2,B3,B4},B1、B2、B3、B4分别代表组合分类器对白炽灯、电阻炉、吹风机、计算机的识别结果输出,识别结果B1、B2、B3、B4的取值均为二值分类标记。主分类器的输入特征也是x={TS,I*,TM,A1,A2,A3,A4,A5},其输出是{F1,F2,F3,F4},F1、F2、F3、F4分别代表主分类器对白炽灯、电阻炉、吹风机、计算机的识别结果输出,识别结果F1、F2、F3、F4的取值也均为二值分类标记。辅助分类器的输入特征同样为x={TS,I*,TM,A1,A2,A3,A4,A5},其输出是{P(y1|x),P(y2|x),P(y3|x),P(y4|x)},P(y1|x)、P(y2|x)、P(y3|x)、P(y4|x)为辅助分类器输出的后验概率,P(y1|x)、P(y2|x)、P(y3|x)、P(y4|x)之间的相互大小表明辅助分类器的当前输入特征表示所识别的电器属于白炽灯、电阻炉、吹风机、计算机的可能性大小。A simple embodiment 1 is taken as an example to illustrate the method of combining classifiers to identify electrical appliances. There is a combined classifier whose input features are x={T S , I*, T M , A 1 , A 2 , A 3 , A 4 , A 5 , }, among them, T S is the start-up process time, the unit is ms; I* is the maximum value of the start-up current; T M is the time of the maximum value of the start-up current, the unit is ms; A 1 , A 2 , A 3 , A 4 , A 5 is the relative amplitude of the 1-5th harmonic signal in the load current spectrum characteristic, is the phase difference of the fundamental voltage and current of the electric load. The output of the combined classifier is {B 1 , B 2 , B 3 , B 4 }, B 1 , B 2 , B 3 , and B 4 respectively represent the output of the combined classifier’s recognition results for incandescent lamps, resistance furnaces, hair dryers, and computers , the values of the recognition results B 1 , B 2 , B 3 , and B 4 are all binary classification marks. The input features of the main classifier are also x={T S , I*, T M , A 1 , A 2 , A 3 , A 4 , A 5 , }, its output is {F 1 , F 2 , F 3 , F 4 }, F 1 , F 2 , F 3 , and F 4 respectively represent the output of the recognition results of the main classifier for incandescent lamps, resistance furnaces, hair dryers, and computers, The values of the recognition results F 1 , F 2 , F 3 , and F 4 are also binary classification marks. The input features of the auxiliary classifier are also x={T S , I*, T M , A 1 , A 2 , A 3 , A 4 , A 5 , }, whose output is {P(y 1 |x), P(y 2 |x), P(y 3 |x), P(y 4 |x)}, P(y 1 |x), P(y 2 |x), P(y 3 |x), P(y 4 |x) are the posterior probabilities output by the auxiliary classifier, P(y 1 |x), P(y 2 |x), P(y 3 |x) and P(y 4 |x) indicate that the current input features of the auxiliary classifier indicate the likelihood that the identified electrical appliances belong to incandescent lamps, resistance stoves, hair dryers, and computers.

在实施例1中,B1、B2、B3、B4的分类标记和F1、F2、F3、F4的分类标记均取1、0。分类标记为1时,相应的电器类型与当前输入特征匹配,为确认的识别结果,或者说相应的电器类型识别结果为是;分类标记为0时,相应的电器类型与输入特征不匹配,未能成为确认的识别结果,或者说相应的电器类型识别结果为否。In Example 1, the classification marks of B 1 , B 2 , B 3 , and B 4 and the classification marks of F 1 , F 2 , F 3 , and F 4 are all 1 and 0. When the classification mark is 1, the corresponding electrical appliance type matches the current input feature, which is a confirmed recognition result, or the corresponding electrical appliance type recognition result is Yes; when the classification mark is 0, the corresponding electrical appliance type does not match the input feature, and it is not The recognition result can be confirmed, or the corresponding electric appliance type recognition result is no.

在实施例1中,设某次的主分类器的识别结果分类标记为F1F2F3F4=0100,则认为主分类器成功实现电器类型识别,因此,不考虑辅助分类器的识别结果,直接令B1B2B3B4=0100,即组合分类器的识别结果是:被识别的电器为电阻炉。In Embodiment 1, if the classification mark of the identification result of a certain main classifier is F 1 F 2 F 3 F 4 =0100, then it is considered that the main classifier successfully realizes the electrical type identification, therefore, the identification of the auxiliary classifier is not considered As a result, directly set B 1 B 2 B 3 B 4 =0100, that is, the recognition result of the combined classifier is: the recognized electric appliance is a resistance furnace.

在实施例1中,设某次的主分类器的识别结果分类标记为F1F2F3F4=1010,则认为主分类器未能实现电器类型识别,且主分类器的识别结果为2种或者2种以上电器类型;再设此时辅助分类器的识别结果满足P(y1|x)<P(y3|x),则令B1B2B3B4=0010,即组合分类器的识别结果是:被识别的电器为吹风机。In Embodiment 1, if the classification mark of the identification result of a certain main classifier is F 1 F 2 F 3 F 4 =1010, then it is considered that the main classifier failed to realize the electrical type identification, and the identification result of the main classifier is 2 or more than 2 types of electrical appliances; and assuming that the recognition result of the auxiliary classifier satisfies P(y 1 |x)<P(y 3 |x), then let B 1 B 2 B 3 B 4 =0010, that is The recognition result of the combined classifier is: the recognized electrical appliance is a hair dryer.

在实施例1中,设某次的主分类器的识别结果分类标记为F1F2F3F4=0000,则认为主分类器未能实现电器类型识别,且主分类器的识别结果中未能给出识别的电器类型;再设此时辅助分类器的识别结果满足P(y1|x)>P(y2|x)且P(y1|x)>P(y3|x)且P(y1|x)>P(y4|x),则令B1B2B3B4=1000,即组合分类器的识别结果是:被识别的电器为白炽灯。In Embodiment 1, if the classification mark of the recognition result of a certain main classifier is F 1 F 2 F 3 F 4 =0000, then it is considered that the main classifier fails to realize the electrical type identification, and the recognition result of the main classifier is The type of electrical appliances recognized cannot be given; and the recognition result of the auxiliary classifier at this time is set to satisfy P(y 1 |x)>P(y 2 |x) and P(y 1 |x)>P(y 3 |x ) and P(y 1 |x)>P(y 4 |x), then set B 1 B 2 B 3 B 4 =1000, that is, the recognition result of the combined classifier is: the recognized electrical appliance is an incandescent lamp.

组合分类器、主分类器的识别结果分类标记也可以采用其他的方案,例如,分别用分类标记1、-1,或者是0、1,或者是-1、1,以及其他方案来表示相应电器识别结果为是、否。组合分类器与主分类器的分类标记方案可以相同,也可以不相同。The classification marks of the recognition results of the combination classifier and the main classifier can also adopt other schemes, for example, use classification marks 1, -1, or 0, 1, or -1, 1, and other schemes to represent the corresponding electrical appliances The recognition result is yes or no. The classification labeling scheme of the combined classifier and the main classifier can be the same or different.

所述组合分类器的输入特征中,还可以包括电器负载稳态电流有效值IW。例如,有2种不同的电器,电烙铁和电阻炉需要识别,电烙铁、电阻炉都是纯电阻负载,且都具有电阻温度修正系数小,电阻值稳定的共同特点。因此,单纯依靠前述的启动电流特征和负载电流频谱特征、电器的基波电压电流相位差特征无法将他们进行区分。输入特征中增加电器负载稳态电流有效值IW后,电烙铁功率小,电器负载稳态电流有效值IW小;电阻炉功率大,电器负载稳态电流有效值IW大,特征不同,组合分类器可以进行并完成识别。The input features of the combined classifier may also include the effective value I W of the steady-state current of the electrical appliance load. For example, there are two different electrical appliances, electric soldering iron and resistance furnace, which need to be identified. Both electric soldering iron and resistance furnace are purely resistive loads, and both have the common characteristics of small resistance temperature correction coefficient and stable resistance value. Therefore, relying solely on the aforementioned starting current characteristics, load current spectrum characteristics, and fundamental voltage and current phase difference characteristics of electrical appliances, they cannot be distinguished. After adding the effective value of the steady-state current I W of the electric appliance load in the input feature, the power of the electric soldering iron is small, and the effective value I W of the steady-state current of the electric appliance load is small; the power of the resistance furnace is large, and the effective value I W of the steady-state current of the electric appliance load is large, and the characteristics are different. Combined classifiers can do and complete the recognition.

辅助分类器为贝叶斯分类器。可以选择NBC分类器(朴素贝叶斯分类器)、TAN分类器(树扩展朴素贝叶斯分类器)、BAN分类器(增强的贝叶斯分类器)等三种贝叶斯分类器之中的一种作为辅助分类器。The auxiliary classifier is a Bayesian classifier. You can choose among three Bayesian classifiers such as NBC classifier (Naive Bayesian classifier), TAN classifier (Tree-extended Naive Bayesian classifier), BAN classifier (Enhanced Bayesian classifier) A kind of as an auxiliary classifier.

实施例2选择NBC分类器作为辅助分类器。朴素贝叶斯分类的定义如下:Example 2 selects the NBC classifier as the auxiliary classifier. Naive Bayes classification is defined as follows:

⑴设x={a1,a2,…,am}为一个待分类项,而每个a为x的一个特征属性;(1) Let x={a 1 ,a 2 ,…,a m } be an item to be classified, and each a is a characteristic attribute of x;

⑵有类别集合C={y1,y2,…,yn};⑵There is a category set C={y 1 ,y 2 ,…,y n };

⑶计算P(y1|x),P(y2|x),…,P(yn|x);(3) Calculate P(y 1 |x), P(y 2 |x),...,P(y n |x);

⑷如果P(yk|x)=max{P(y1|x),P(y2|x),…,P(yn|x)},则x∈yk(4) If P(y k |x)=max{P(y 1 |x), P(y 2 |x),...,P(y n |x)}, then x∈y k .

计算第⑶步中的各个条件概率的具体方法是:The specific method of calculating each conditional probability in step (3) is:

①找到一个已知分类的待分类项集合作为训练样本集;① Find a set of items to be classified with known classification as the training sample set;

②统计得到各类别下各个特征属性的条件概率估计;②Statistically obtain the conditional probability estimates of each feature attribute under each category;

P(a1|y1),P(a2|y1),…,P(am|y1);P(a 1 |y 1 ),P(a 2 |y 1 ),…,P(a m |y 1 );

P(a1|y2),P(a2|y2),…,P(am|y2);P(a 1 |y 2 ),P(a 2 |y 2 ),…,P(a m |y 2 );

…;...;

P(a1|yn),P(a2|yn),…,P(am|yn)。P(a 1 |y n ),P(a 2 |y n ),…,P(a m |y n ).

③根据贝叶斯定理,有:③According to Bayes' theorem, there are:

因为分母对于所有类别为常数,因此我们只要将分子最大化即可;又因为在朴素贝叶斯中各特征属性是条件独立的,所以有:Because the denominator is constant for all categories, we only need to maximize the numerator; and because each feature attribute in Naive Bayes is conditionally independent, so there are:

实施例2中,组合分类器的输入特征是{TS,I*,TM,A1,A3,IW},其中,TS是启动过程时间,单位是ms;I*是启动电流最大值;TM是启动电流最大值时间,单位是ms;A1、A3为负载电流频谱特性中的1、3次奇次谐波信号相对幅值;为电器的基波电压电流相位差,单位为度,且基波电压超前于基波电流时,IW为电器负载稳态电流有效值,单位是安培。要求识别的电器类别是白炽灯、电阻炉、电风扇、计算机、电烙铁。令朴素贝叶斯分类器的特征属性组合x={a1,a2,a3,a4,a5,a6,a7}中的元素与组合分类器的输入特征集合中的元素按序{TS,I*,TM,A1,A3,IW}一一对应;朴素贝叶斯分类器的输出类别集合C={y1,y2,y3,y4,y5}则分别与电器类别白炽灯、电阻炉、电风扇、计算机、电烙铁一一对应。In Example 2, the input features of the combination classifier are {T S , I*, T M , A 1 , A 3 , , I W }, where, T S is the start-up process time, the unit is ms; I* is the maximum value of the start-up current; T M is the time of the maximum value of the start-up current, the unit is ms; A 1 and A 3 are load current spectrum characteristics The relative amplitudes of the 1st and 3rd odd harmonic signals; is the phase difference of the fundamental voltage and current of the electrical appliance, in degrees, and when the fundamental voltage is ahead of the fundamental current, I W is the effective value of the steady-state current of the electrical appliance load, and the unit is ampere. The electrical appliances that require identification are incandescent lamps, resistance furnaces, electric fans, computers, and electric soldering irons. Let the elements in the feature attribute combination x={a 1 ,a 2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 } of the naive Bayesian classifier and the elements in the input feature set of the combined classifier be divided by Sequence {T S , I*, T M , A 1 , A 3 , , I W } one-to-one correspondence; the output category set C={y 1 ,y 2 ,y 3 ,y 4 ,y 5 } of the naive Bayesian classifier is respectively related to the electrical appliance category incandescent lamp, resistance furnace, electric fan, One-to-one correspondence between computer and electric soldering iron.

训练NBC分类器的过程包括:The process of training an NBC classifier includes:

1、对特征属性进行分段划分,进行离散化处理。实施例2中,采取的特征属性离散化方法是:1. Divide the feature attributes into segments and perform discretization. In Embodiment 2, the feature attribute discretization method adopted is:

a1:{a1<50,50≤a1≤1000,a1>1000};a 1 : {a 1 <50, 50≤a 1 ≤1000, a 1 >1000};

a2:{a2<7,7≤a2≤11,a2>11};a 2 : {a 2 <7, 7≤a 2 ≤11, a 2 >11};

a3:{a3<20,20≤a3≤300,a3>300};a 3 : {a 3 <20, 20≤a 3 ≤300, a 3 >300};

a4:{a4<0.7,0.7≤a4≤0.9,a4>0.9};a 4 : {a 4 <0.7, 0.7≤a 4 ≤0.9, a 4 >0.9};

a5:{a5<0.02,0.02≤a5≤0.05,a5>0.05};a 5 : {a 5 <0.02, 0.02≤a 5 ≤0.05, a 5 >0.05};

a6:{a6<-6,-6≤a6≤18,a6>18};a 6 : {a 6 <-6, -6≤a 6 ≤18, a 6 >18};

a7:{a7<0.45,a7≥0.45}。a 7 : {a 7 <0.45, a 7 ≥0.45}.

2、对每类电器类型均采集多组样本作为训练样本,同时计算每类电器类型样本在所有电器类型样本中所占有的比例,即分别计算P(y1)、P(y2)、P(y3)、P(y4)、P(y5)。当每类电器均采集相同的样本数量时,例如,每类电器均采集超过100组的样本,其中每类电器随机选择100组样本作为训练样本,其他则作为测试样本,总的训练样本为500组,且有2. Collect multiple sets of samples for each type of electrical appliances as training samples, and calculate the proportion of each type of electrical appliances in all electrical appliances, that is, calculate P(y 1 ), P(y 2 ), P (y 3 ), P(y 4 ), P(y 5 ). When the same number of samples is collected for each type of electrical appliance, for example, each type of electrical appliance collects more than 100 groups of samples, among which 100 groups of samples are randomly selected for each type of electrical appliance as training samples, and the others are used as test samples. The total training samples are 500 group with

P(y1)=P(y2)=P(y3)=P(y4)=P(y5)=0.2。P(y 1 )=P(y 2 )=P(y 3 )=P(y 4 )=P(y 5 )=0.2.

3、计算训练样本每个类别条件下各个特征属性分段的频率(比例),统计得到各类别下各个特征属性的条件概率估计,即分别统计计算3. Calculate the frequency (proportion) of each feature attribute segment under each category condition of the training sample, and obtain the conditional probability estimate of each feature attribute under each category, that is, statistical calculation respectively

P(a1<50|y1)、P(50≤a1≤1000|y1)、P(a1>1000|y1);P(a 1 <50|y 1 ), P(50≤a 1 ≤1000|y 1 ), P(a 1 >1000|y 1 );

P(a1<50|y2)、P(50≤a1≤1000|y2)、P(a1>1000|y2);P(a 1 <50|y 2 ), P(50≤a 1 ≤1000|y 2 ), P(a 1 >1000|y 2 );

…;...;

P(a1<50|y5)、P(50≤a1≤1000|y5)、P(a1>1000|y5);P(a 1 <50|y 5 ), P(50≤a 1 ≤1000|y 5 ), P(a 1 >1000|y 5 );

P(a2<7|y1)、P(7≤a2≤11|y1)、P(a2>11|y1);P(a 2 <7|y 1 ), P(7≤a 2 ≤11|y 1 ), P(a 2 >11|y 1 );

P(a2<7|y2)、P(7≤a2≤11|y2)、P(a2>11|y2);P(a 2 <7|y 2 ), P(7≤a 2 ≤11|y 2 ), P(a 2 >11|y 2 );

…;...;

P(a2<7|y5)、P(7≤a2≤11|y5)、P(a2>11|y5);P(a 2 <7|y 5 ), P(7≤a 2 ≤11|y 5 ), P(a 2 >11|y 5 );

P(a3<20|y1)、P(20≤a3≤300|y1)、P(a3>300|y1);P(a 3 <20|y 1 ), P(20≤a 3 ≤300|y 1 ), P(a 3 >300|y 1 );

P(a3<20|y2)、P(20≤a3≤300|y2)、P(a3>300|y2);P(a 3 <20|y 2 ), P(20≤a 3 ≤300|y 2 ), P(a 3 >300|y 2 );

…;...;

P(a3<20|y5)、P(20≤a3≤300|y5)、P(a3>300|y5);P(a 3 <20|y 5 ), P(20≤a 3 ≤300|y 5 ), P(a 3 >300|y 5 );

P(a4<0.7|y1)、P(0.7≤a4≤0.9|y1)、P(a4>0.9|y1);P(a 4 <0.7|y 1 ), P(0.7≤a 4 ≤0.9|y 1 ), P(a 4 >0.9|y 1 );

P(a4<0.7|y2)、P(0.7≤a4≤0.9|y2)、P(a4>0.9|y2);P(a 4 <0.7|y 2 ), P(0.7≤a 4 ≤0.9|y 2 ), P(a 4 >0.9|y 2 );

…;...;

P(a4<0.7|y5)、P(0.7≤a4≤0.9|y5)、P(a4>0.9|y5);P(a 4 <0.7|y 5 ), P(0.7≤a 4 ≤0.9|y 5 ), P(a 4 >0.9|y 5 );

P(a5<0.02|y1)、P(0.02≤a5≤0.05|y1)、P(a5>0.05|y1);P(a 5 <0.02|y 1 ), P(0.02≤a 5 ≤0.05|y 1 ), P(a 5 >0.05|y 1 );

P(a5<0.02|y2)、P(0.02≤a5≤0.05|y2)、P(a5>0.05|y2);P(a 5 <0.02|y 2 ), P(0.02≤a 5 ≤0.05|y 2 ), P(a 5 >0.05|y 2 );

P(a5<0.02|y5)、P(0.02≤a5≤0.05|y5)、P(a5>0.05|y5);P(a 5 <0.02|y 5 ), P(0.02≤a 5 ≤0.05|y 5 ), P(a 5 >0.05|y 5 );

P(a6<-6|y1)、P(-6≤a6≤18|y1)、P(a6>18|y1);P(a 6 <-6|y 1 ), P(-6≤a 6 ≤18|y 1 ), P(a 6 >18|y 1 );

P(a6<-6|y2)、P(-6≤a6≤18|y2)、P(a6>18|y2);P(a 6 <-6|y 2 ), P(-6≤a 6 ≤18|y 2 ), P(a 6 >18|y 2 );

…;...;

P(a6<-6|y5)、P(-6≤a6≤18|y5)、P(a6>18|y5);P(a 6 <-6|y 5 ), P(-6≤a 6 ≤18|y 5 ), P(a 6 >18|y 5 );

P(a7<0.45|y1)、P(a7≥0.45|y1);P(a 7 <0.45|y 1 ), P(a 7 ≥0.45|y 1 );

P(a7<0.45|y2)、P(a7≥0.45|y2);P(a 7 <0.45|y 2 ), P(a 7 ≥0.45|y 2 );

…;...;

P(a7<0.45|y5)、P(a7≥0.45|y5)。P(a 7 <0.45|y 5 ), P(a 7 ≥0.45|y 5 ).

经过上述的步骤1、步骤2、步骤3,NBC分类器训练完成。其中,步骤1对特征属性进行分段划分由人工确定,对每一个输入特征进行分段离散化时,分段的数量为2段或者2段以上,例如,实施例2中,特征a1-a6都分为3段,特征a7分为2段。每一个特征具体分为多少段,分段阈值的选择可以根据训练后的贝叶斯分类器对测试样本测试后的结果进行调整。步骤2、步骤3由信息处理模块102或者是计算机计算完成。After the above steps 1, 2 and 3, the training of the NBC classifier is completed. Among them, step 1 divides the feature attributes into segments manually determined, and when discretizing each input feature into segments, the number of segments is 2 segments or more. For example, in embodiment 2, feature a 1 - a 6 is divided into 3 sections, feature a 7 is divided into 2 sections. How many segments each feature is divided into, and the selection of the segmentation threshold can be adjusted according to the results of the test sample after the training of the Bayesian classifier. Step 2 and Step 3 are completed by the information processing module 102 or computer calculation.

本发明中采用贝叶斯分类器进行分类的方法是:The method that adopts Bayesian classifier to classify among the present invention is:

1、将组合分类器的输入特征作为贝叶斯分类器的输入特征。在实施例2中,将组合分类器的输入特征集合{TS,I*,TM,A1,A3,IW}作为贝叶斯分类器的输入特征x,且有x={a1,a2,a3,a4,a5,a6,a7}。1. Use the input features of the combined classifier as the input features of the Bayesian classifier. In Example 2, the input feature set {T S , I*, T M , A 1 , A 3 , , I W } as the input feature x of the Bayesian classifier, and x={a 1 ,a 2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 }.

2、根据训练得到的各类别下各个特征属性的条件概率估计,分别确定各输入特征属性的分段所在并确定其对每类电器类别的概率P(a1|y1)~P(am|yn),其中,电器类别集合为C={y1,y2,…,yn}。实施例2中,电器类别集合C={y1,y2,y3,y4,y5}对应代表的电器类别是白炽灯、电阻炉、电风扇、计算机、电烙铁,确定P(a1|y1)~P(a7|y5)的方法是采用训练NBC分类器过程中得到的各个特征属性的条件概率估计。2. According to the conditional probability estimation of each characteristic attribute under each category obtained through training, respectively determine the segmentation location of each input characteristic attribute and determine its probability P(a 1 |y 1 )~P(a m |y n ), where the set of electrical appliance categories is C={y 1 ,y 2 ,...,y n }. In Example 2, the electrical appliance category set C={y 1 , y 2 , y 3 , y 4 , y 5 } corresponds to the representative electrical appliance categories including incandescent lamps, resistance furnaces, electric fans, computers, and electric soldering irons, and P(a 1 |y 1 )~P(a 7 |y 5 ) method is to use the conditional probability estimation of each feature attribute obtained in the process of training the NBC classifier.

3、按照式3. According to the formula

计算每种电器类别的后验概率。因为分母P(x)对于所有电器类别为常数,令P(x)=1替代实际的P(x)值,不影响每种电器类别后验概率之间的相互大小比较,此时有Compute the posterior probability for each appliance class. Since the denominator P(x) is a constant for all electrical appliances, setting P(x)=1 to replace the actual P(x) value does not affect the mutual comparison between the posterior probabilities of each electrical appliance category. At this time, there is

实施例2中,有In Example 2, there are

采用测试样本对训练好的贝叶斯分类器进行测试,根据测试结果决定是否调整对输入特征的离散化方法(即调整分段数量与阈值),重新训练贝叶斯分类器。Use test samples to test the trained Bayesian classifier, and decide whether to adjust the discretization method for input features (that is, adjust the number of segments and thresholds) according to the test results, and retrain the Bayesian classifier.

主分类器为决策树分类器,决策树分类器的算法可以选择ID3,C4.5,CART等。实施例2选择采用ID3决策树分类器作为主分类器。ID3决策树分类器的几个定义如下:The main classifier is a decision tree classifier, and the algorithm of the decision tree classifier can choose ID3, C4.5, CART, etc. Embodiment 2 chooses to use the ID3 decision tree classifier as the main classifier. Several definitions of the ID3 decision tree classifier are as follows:

设D为用类别对训练元组进行的划分,则D的熵表示为:Let D be the division of training tuples by category, then the entropy of D is expressed as:

其中pi表示第i个类别在整个训练元组(即样本)中出现的概率,可以用属于此类别元素的数量除以训练元组元素总数量作为估计。熵的实际意义表示是D中元组的类标号所需要的平均信息量。Among them, p i represents the probability that the i-th category appears in the entire training tuple (ie, the sample), which can be estimated by dividing the number of elements belonging to this category by the total number of training tuple elements. The actual meaning of entropy is the average amount of information required by the class label of the tuple in D.

假设将训练元组D按属性A进行划分,则A对D划分的期望信息为:Assuming that the training tuple D is divided according to attribute A, the expected information of A's division of D is:

而信息增益即为两者的差值:The information gain is the difference between the two:

g ain(A)=in fo(D)-in foA(D) (3)g ain(A)=in fo(D)-in fo A (D) (3)

ID3算法在每次需要分裂时,计算每个属性的增益率,然后选择增益率最大的属性进行分裂。The ID3 algorithm calculates the gain rate of each attribute every time it needs to be split, and then selects the attribute with the largest gain rate for splitting.

训练ID3决策树分类器可以采用特征属性离散化方法,也可以采用连续特征属性的潜在分裂法。其具体方法是:检测所有的属性,选择信息增益最大的属性产生决策树结点,由该属性的不同取值建立分支,再对各分支的子集递归调用该方法建立决策树结点的分支,直到所有子集仅包含同一类别的数据为止。最后得到一棵决策树,它可以用来对新的样本进行分类。在实施例2中,对每类电器类型均采集多组样本,随机抽取部分作为训练样本,其余的作为测试样本。To train the ID3 decision tree classifier, the discretization method of feature attributes can be used, and the potential split method of continuous feature attributes can also be used. The specific method is: detect all attributes, select the attribute with the largest information gain to generate a decision tree node, establish branches based on the different values of the attribute, and then recursively call this method on a subset of each branch to establish a branch of the decision tree node , until all subsets contain only data of the same category. Finally, a decision tree is obtained, which can be used to classify new samples. In Embodiment 2, multiple groups of samples are collected for each type of electrical appliances, some of which are randomly selected as training samples, and the rest are used as test samples.

特征属性离散化方法训练ID3决策树分类器的过程包括:The process of training the ID3 decision tree classifier with the feature attribute discretization method includes:

1)对每个特征属性实现特征区分。实施例2中,采取的特征区分方法是:1) Realize feature distinction for each feature attribute. In embodiment 2, the characteristic distinguishing method that takes is:

a1:{a1<50,50≤a1≤1000,a1>1000};a 1 : {a 1 <50, 50≤a 1 ≤1000, a 1 >1000};

a2:{a2<4,a2≥4};a 2 : {a 2 <4,a 2 ≥4};

a3:{a3<30,a3≥30};a 3 : {a 3 <30,a 3 ≥30};

a4:{a4<0.85,a4≥0.85};a 4 : {a 4 <0.85, a 4 ≥0.85};

a5:{a5<0.1,a5≥0.05};a 5 : {a 5 <0.1, a 5 ≥0.05};

a6:{a6<-12,-12≤a6≤12,a6>12};a 6 : {a 6 <-12, -12≤a 6 ≤12, a 6 >12};

a7:{a7<0.45,a7≥0.45}。a 7 : {a 7 <0.45, a 7 ≥0.45}.

2)计算各属性的信息增益。在实施例2中,针对训练样本按照式(2)和式(3)分别计算7个特征属性的信息增益。2) Calculate the information gain of each attribute. In Embodiment 2, the information gains of the seven feature attributes are respectively calculated according to formula (2) and formula (3) for the training samples.

3)选择具有最大信息增益的属性作为该次分裂的分裂(决策)属性及决策树结点,取得分裂结果,建立分支;如果样本都在同一个类,则该结点成为树叶,并用该类标记。3) Select the attribute with the largest information gain as the split (decision) attribute and decision tree node of the split, obtain the split result, and establish a branch; if the samples are all in the same class, the node becomes a leaf, and the class is used mark.

4)在已有分裂结果的基础上,递归使用前述步骤计算子结点的分裂属性,建立分支,最终得到整个决策树。4) On the basis of the existing split results, recursively use the aforementioned steps to calculate the split attributes of the child nodes, establish branches, and finally obtain the entire decision tree.

经过上述的步骤,ID3决策树分类器训练完成。其中,步骤1)对特征属性进行分段特征区分由人工确定,对每一个输入特征进行分段离散化时,分段的数量为2段或者2段以上,例如,实施例2中,特征a1、a6分为3段,特征a2-a5、a7都分为2段。每一个特征具体分为多少段,分段阈值的选择可以根据训练后的决策树分类器对测试样本测试后的结果进行调整。步骤2)至步骤4)由信息处理模块102或者是计算机完成。After the above steps, the training of ID3 decision tree classifier is completed. Wherein, step 1) carries out segmentation feature distinction to feature attribute by artificial determination, when each input feature is carried out segmentation discretization, the quantity of segmentation is 2 segments or more than 2 segments, for example, in embodiment 2, feature a 1 and a 6 are divided into 3 sections, and features a 2 -a 5 and a 7 are divided into 2 sections. How many segments each feature is divided into, and the selection of the segmentation threshold can be adjusted according to the results of the test sample after the training of the decision tree classifier. Step 2) to step 4) are completed by the information processing module 102 or a computer.

连续特征属性的潜在分裂法训练ID3决策树分类器的过程包括:The process of training the ID3 decision tree classifier by the potential split method of continuous feature attributes includes:

Ⅰ、计算各属性的信息增益。先将训练样本D中元素按照特征属性排序,则每两个相邻元素的中间点可以看做潜在分裂点,从第一个潜在分裂点开始,分裂D并计算两个集合的期望信息,具有最小期望信息的点称为这个属性的最佳分裂点,其信息期望作为此属性的信息期望。在实施例2中,针对训练样本,找出最佳分裂点按照式(2)和式(3)分别计算7个特征属性的信息增益。Ⅰ. Calculate the information gain of each attribute. First sort the elements in the training sample D according to the feature attributes, then the middle point of every two adjacent elements can be regarded as a potential split point, starting from the first potential split point, split D and calculate the expected information of the two sets, with The point with the minimum expected information is called the best split point of this attribute, and its information expectation is taken as the information expectation of this attribute. In Embodiment 2, for the training samples, the best split point is found to calculate the information gains of the seven feature attributes according to formula (2) and formula (3).

Ⅱ、选择具有最大信息增益的属性作为该次分裂的分裂(决策)属性及决策树结点,取得分裂结果,建立分支;如果样本都在同一个类,则该结点成为树叶,并用该类标记。Ⅱ. Select the attribute with the largest information gain as the split (decision) attribute and decision tree node of the split, obtain the split result, and establish a branch; if the samples are all in the same class, the node becomes a leaf, and the class is used mark.

Ⅲ、在已有分裂结果的基础上,递归使用前述步骤计算子结点的分裂属性,建立分支,最终得到整个决策树。III. On the basis of the existing split results, recursively use the aforementioned steps to calculate the split attributes of the child nodes, establish branches, and finally obtain the entire decision tree.

在前述决策树的训练过程中,当给定结点的所有样本属于同一类,结束递归过程,决策树已经建立。给定结点的所有样本属于同一类,有可能是单种电器类别的确认结果,也可能是所有电器类型的否定结果。In the training process of the aforementioned decision tree, when all samples of a given node belong to the same class, the recursive process ends and the decision tree has been established. All samples at a given node belong to the same class, either a positive result for a single appliance class or a negative result for all appliance types.

在前述决策树分类器的训练过程中,当没有剩余属性可以用来进一步划分样本时,同样需要结束递归过程,但此时有些子集还不是纯净集,即集合内的元素不属于同一类别;此时,可以采用增加特征属性,例如,在实施例2中增加负载电流频谱特性中的5次、7次等奇次谐波信号相对幅值作为新的特征属性,对决策树进行重新训练。当训练后或者重新训练后的决策树分类器最终的部分子集不是纯净集,其集合内的元素不属于同一类别时,不采用子集“多数表决”方式将子集中出现次数最多的类别作为此结点类别,而是直接将子集中的所有类别作为此结点类别,即所述决策树分类器可以输出多种电器类别的确认结果。In the training process of the aforementioned decision tree classifier, when there are no remaining attributes that can be used to further divide the samples, the recursive process also needs to end, but at this time some subsets are not pure sets, that is, the elements in the set do not belong to the same category; At this point, adding feature attributes can be used, for example, in embodiment 2, adding the relative amplitudes of odd-order harmonic signals such as the 5th, 7th, etc. in the load current spectrum characteristics as new feature attributes to retrain the decision tree. When the final partial subset of the trained or retrained decision tree classifier is not a pure set, and the elements in the set do not belong to the same category, the subset "majority voting" method is not used to select the category with the most occurrences in the subset as Instead, all categories in the subset are directly used as this node category, that is, the decision tree classifier can output confirmation results of various electrical appliance categories.

主分类器还可以选择由多个二类输出决策树分类器组成,每个二类输出决策树分类器对应识别一种电器类型,例如,实施例1中可以采用4个二类输出决策树分类器分别识别白炽灯、电阻炉、吹风机、计算机,实施例2中可以采用5个二类输出决策树分类器分别识别白炽灯、电阻炉、电风扇、计算机、电烙铁。主分类器选择多个二类输出决策树分类器共同组成时,所有二类输出决策树分类器的输入特征均为主分类器的输入特征,所有的训练样本均作为每个二类输出决策树分类器的训练样本。主分类器选择多个二类输出决策树分类器共同组成时,每个二类输出决策树分类器只需要完成一种电器类型的识别,决策树的训练相对简单。当所述某个二类输出决策树分类器的训练结束后,或者是增加特征属性重新训练结束后,有些子集还不是纯净集,即有子集还不能确认输入属性是否属于该二类输出决策树分类器所识别的电器类型时,将该子集所在的节点定义为是,即让该二类输出决策树分类器在此种情况下判定此次输入的特征属性属于所识别的电器类型。由于此时主分类器由多个二类输出决策树分类器组成,各二类输出决策树分类器之间相互独立,因此,对某一特征属性进行识别时,主分类器有可能输出的识别结果为唯一的电器类型,或者识别结果为2种或者2种以上电器类型,或者未能给出识别的电器类型。The main classifier can also be selected to be composed of multiple second-class output decision tree classifiers, and each second-class output decision tree classifier corresponds to identify a type of electrical appliance. For example, in embodiment 1, four second-class output decision tree classifications can be used Incandescent lamps, resistance furnaces, hair dryers, and computers are identified respectively. In Embodiment 2, five second-class output decision tree classifiers can be used to identify incandescent lamps, resistance furnaces, electric fans, computers, and electric soldering irons. When the main classifier is composed of multiple second-class output decision tree classifiers, the input features of all second-class output decision tree classifiers are the input features of the main classifier, and all training samples are used as each second-class output decision tree Training samples for the classifier. When the main classifier is composed of multiple second-class output decision tree classifiers, each second-class output decision tree classifier only needs to complete the identification of one type of electrical appliance, and the training of the decision tree is relatively simple. When the training of a certain second-class output decision tree classifier is over, or after the retraining of adding feature attributes is over, some subsets are not pure sets, that is, there are subsets that cannot confirm whether the input attributes belong to the second-class output When the type of electrical appliance identified by the decision tree classifier, the node where the subset is located is defined as yes, that is, the second-class output decision tree classifier determines that the characteristic attribute of the input belongs to the identified electrical appliance type in this case . Since the main classifier is composed of multiple second-class output decision tree classifiers at this time, and each second-class output decision tree classifier is independent of each other, when identifying a feature attribute, the main classifier may output the identification The result is a unique electrical appliance type, or the recognition result is 2 or more electrical appliance types, or the recognized electrical appliance type cannot be given.

Claims (8)

1.一种电器类型识别方法,其特征在于,由包括信息采集模块、信息处理模块、通信模块的电器类型识别装置来实现;1. An electrical appliance type identification method, characterized in that, is realized by an electrical appliance type identification device comprising an information collection module, an information processing module, and a communication module; 所述信息采集模块用于采集电器的负载电流并转换成电流数字信号;所述电流数字信号被送至信息处理模块;The information collection module is used to collect the load current of the electrical appliance and convert it into a current digital signal; the current digital signal is sent to the information processing module; 所述信息处理模块依据输入的电流数字信号,采用组合分类器进行电器类型识别;The information processing module uses a combined classifier to identify electrical appliances according to the input current digital signal; 所述通信模块用于发送信息处理模块的电器类型识别结果至上位机;The communication module is used to send the electrical appliance type identification result of the information processing module to the host computer; 所述组合分类器的输入特征包括电器的启动电流特征、电器的负载电流频谱特征和电器的基波电压电流相位差;The input characteristics of the combined classifier include the starting current characteristics of the electrical appliance, the load current spectrum characteristics of the electrical appliance and the fundamental voltage and current phase difference of the electrical appliance; 所述组合分类器包括决策树分类器和贝叶斯分类器;The combination classifier includes a decision tree classifier and a Bayesian classifier; 所述启动电流特征包括启动过程时间、启动电流最大值、启动电流最大值时间;The starting current characteristics include the starting process time, the maximum value of the starting current, and the time of the maximum value of the starting current; 所述组合分类器中,决策树分类器为主分类器,贝叶斯分类器为辅助分类器;In the combined classifier, the decision tree classifier is the main classifier, and the Bayesian classifier is the auxiliary classifier; 所述组合分类器进行电器类型识别的方法是:当主分类器成功实现电器类型识别时,主分类器的电器类型识别结果为组合分类器的识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果为2种或者2种以上电器类型,将主分类器输出的2种或者2种以上电器类型识别结果中,辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果;当主分类器未能实现电器类型识别,且主分类器的识别结果中未能给出识别的电器类型时,将辅助分类器输出中概率最高的电器类型作为组合分类器的电器类型识别结果。The method for the combination classifier to identify the electrical appliance type is: when the main classifier successfully realizes the electrical appliance type identification, the electrical appliance type identification result of the main classifier is the identification result of the combined classifier; when the main classifier fails to realize the electrical appliance type identification, and The identification result of the main classifier is two or more types of electrical appliances, and among the identification results of two or more types of electrical appliances output by the main classifier, the electrical appliance type with the highest probability in the output of the auxiliary classifier is used as the electrical appliance of the combined classifier. Type recognition results; when the main classifier fails to realize electrical appliance type identification, and the recognized electrical appliance type is not given in the identification result of the main classifier, the electrical appliance type with the highest probability in the output of the auxiliary classifier is used as the electrical appliance type of the combined classifier recognition result. 2.如权利要求1所述的电器类型识别方法,其特征在于,所述信息采集模块包括电流传感器、前置放大器、滤波器、A/D转换器;所述信息处理模块的核心为DSP,或者为ARM,或者为单片机,或者为FPGA。2. The electrical appliance type identification method as claimed in claim 1, wherein the information collection module includes a current sensor, a preamplifier, a filter, and an A/D converter; the core of the information processing module is a DSP, Either ARM, or a microcontroller, or an FPGA. 3.如权利要求2所述的电器类型识别方法,其特征在于,所述A/D转换器采用信息处理模块的核心中包括的A/D转换器。3. The electrical appliance type identification method according to claim 2, wherein the A/D converter is an A/D converter included in the core of the information processing module. 4.如权利要求1所述的电器类型识别方法,其特征在于,所述信息采集模块、信息处理模块、通信模块的全部或者部分功能集成在一片SoC上。4. The electrical appliance type identification method according to claim 1, wherein all or part of the functions of the information collection module, information processing module and communication module are integrated on one SoC. 5.如权利要求1-4中任一项所述的电器类型识别方法,其特征在于,所述负载电流频谱特征通过以下方法获得:5. The electrical appliance type identification method according to any one of claims 1-4, wherein the load current spectrum feature is obtained by the following method: 步骤一、获取电器负载的稳态电流信号,并将其转换为对应的稳态电流数字信号;Step 1. Obtain the steady-state current signal of the electrical load and convert it into a corresponding steady-state current digital signal; 步骤二、对稳态电流数字信号进行傅立叶变换,得到负载电流频谱特性;Step 2, performing Fourier transform on the steady-state current digital signal to obtain the load current spectrum characteristic; 步骤三、将负载电流频谱特性中谐波次数为n次的奇次谐波信号相对幅值作为负载电流频谱特征,其中,n=1,3,…,M;所述M表示谐波最高次数且M大于等于3。Step 3, taking the relative amplitude of the odd harmonic signal whose harmonic order is n times in the load current spectrum characteristic as the load current spectrum characteristic, wherein, n=1, 3, ..., M; said M represents the highest harmonic order And M is greater than or equal to 3. 6.如权利要求1-4中任一项所述的电器类型识别方法,其特征在于,所述启动电流特征由信息处理模块通过以下方法获得:6. The electrical appliance type identification method according to any one of claims 1-4, wherein the starting current feature is obtained by the information processing module through the following methods: 步骤1、电器启动前,开始对电器的负载电流连续采样并对负载电流大小进行判断;当负载电流有效值大于ε时,判定电器开始启动并转向步骤2;所述ε为大于0的数值;Step 1. Before the electrical appliance is started, start to continuously sample the load current of the electrical appliance and judge the magnitude of the load current; when the effective value of the load current is greater than ε, determine that the electrical appliance starts to start and turn to step 2; the ε is a value greater than 0; 步骤2、对电器的负载电流进行连续采样,以工频周期为单位计算负载电流有效值并保存;计算最近N个工频周期的负载电流有效值的平均值;当最近N个工频周期之内的每个工频周期的负载电流有效值与该N个工频周期的负载电流有效值的平均值相比较,波动幅度均小于设定的相对误差范围E时,判定电器负载进入稳定状态,转向步骤3;所述N的取值范围为50-500;所述E的取值范围为2%-20%;Step 2. Continuously sample the load current of the electrical appliance, calculate and save the effective value of the load current in units of power frequency cycles; calculate the average value of the effective value of the load current in the last N power frequency cycles; when the latest N power frequency cycles The effective value of the load current in each power frequency cycle is compared with the average value of the load current effective value of the N power frequency cycles. When the fluctuation range is less than the set relative error range E, it is determined that the electrical load has entered a stable state. Turn to step 3; the value range of the N is 50-500; the value range of the E is 2%-20%; 步骤3、将最近N个工频周期之内的负载电流有效值的平均值作为电器负载稳态电流有效值;将电器开始启动时刻至最近N个工频周期起始时刻之间的时间作为启动过程时间;将电器开始启动时刻至启动过程时间之内负载电流有效值最大的工频周期之间的时间作为启动电流最大值时间;将启动电流最大值时间所在工频周期的负载电流有效值与电器负载稳态电流有效值之间的比值作为启动电流最大值。Step 3. Use the average value of the effective value of the load current within the last N power frequency cycles as the effective value of the steady-state current of the electrical appliance load; use the time between the start of the electrical appliance and the start of the last N power frequency cycles as the startup The process time; the time between the start-up time of the electrical appliance and the power frequency cycle with the largest load current effective value within the start-up process time is taken as the maximum start-up current time; the load current effective value of the power-frequency cycle where the start-up current maximum time is located The ratio between the effective values of the steady-state current of the electrical appliance load is used as the maximum value of the starting current. 7.如权利要求1-4中任一项所述的电器类型识别方法,其特征在于,所述组合分类器的输入特征还包括电器负载稳态电流有效值。7. The electrical appliance type identification method according to any one of claims 1-4, wherein the input features of the combined classifier further include an effective value of a steady-state current of an electrical appliance load. 8.如权利要求1-4中任一项所述的电器类型识别方法,其特征在于,所述电器的基波电压电流相位差通过以下方法获得:8. The electrical appliance type identification method according to any one of claims 1-4, wherein the fundamental wave voltage and current phase difference of the electrical appliance is obtained by the following method: 步骤①、待电器负载进入稳定状态后,同步获取电器负载的稳态电压信号、稳态电流信号,并将其转换为相应的稳态电压数字信号、稳态电流数字信号;Step ①. After the electrical load enters a stable state, obtain the steady-state voltage signal and steady-state current signal of the electrical load synchronously, and convert them into corresponding steady-state voltage digital signals and steady-state current digital signals; 步骤②、对稳态电压数字信号、稳态电流数字信号分别进行数字滤波,提取出基波电压信号、基波电流信号;Step ②, performing digital filtering on the steady-state voltage digital signal and the steady-state current digital signal respectively, and extracting the fundamental voltage signal and the fundamental current signal; 步骤③、分析计算基波电压信号与基波电流信号之间的相位差,将基波电压信号与基波电流信号之间的相位差作为电器的基波电压电流相位差。Step 3. Analyzing and calculating the phase difference between the fundamental voltage signal and the fundamental current signal, and using the phase difference between the fundamental voltage signal and the fundamental current signal as the fundamental voltage and current phase difference of the electrical appliance.
CN201610213373.6A 2016-04-08 2016-04-08 A kind of electric appliance type identification method Active CN105866581B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610213373.6A CN105866581B (en) 2016-04-08 2016-04-08 A kind of electric appliance type identification method
CN201810455735.1A CN108318770A (en) 2016-04-08 2016-04-08 A kind of electric appliance sorting technique

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610213373.6A CN105866581B (en) 2016-04-08 2016-04-08 A kind of electric appliance type identification method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201810455735.1A Division CN108318770A (en) 2016-04-08 2016-04-08 A kind of electric appliance sorting technique

Publications (2)

Publication Number Publication Date
CN105866581A CN105866581A (en) 2016-08-17
CN105866581B true CN105866581B (en) 2018-06-26

Family

ID=56636926

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810455735.1A Withdrawn CN108318770A (en) 2016-04-08 2016-04-08 A kind of electric appliance sorting technique
CN201610213373.6A Active CN105866581B (en) 2016-04-08 2016-04-08 A kind of electric appliance type identification method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201810455735.1A Withdrawn CN108318770A (en) 2016-04-08 2016-04-08 A kind of electric appliance sorting technique

Country Status (1)

Country Link
CN (2) CN108318770A (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273920A (en) * 2017-05-27 2017-10-20 西安交通大学 A kind of non-intrusion type household electrical appliance recognition methods based on random forest
CN108224681A (en) * 2017-12-16 2018-06-29 广西电网有限责任公司电力科学研究院 Non-intrusion type starting of air conditioner detection method based on decision tree classifier
CN109030975B (en) * 2018-05-23 2020-02-18 北京航空航天大学 Electric appliance type inference method and device based on intelligent socket
CN109164327A (en) * 2018-10-11 2019-01-08 深圳华建电力工程设计有限公司 Electricity system electric appliance behavior discrimination method and device based on combined type criterion
CN109596917A (en) * 2018-12-07 2019-04-09 江苏智臻能源科技有限公司 A kind of non-load identification efficient detection method of registering one's residence
CN109613362B (en) * 2018-12-14 2021-02-26 四川长虹电器股份有限公司 Non-invasive electric appliance quantity identification method
CN110135393A (en) * 2019-05-27 2019-08-16 湖南工业大学 Electric load start-up operation identification device
CN110197220A (en) * 2019-05-27 2019-09-03 湖南工业大学 A kind of electrical load starting operation recognition methods
CN110598578B (en) * 2019-08-23 2024-06-28 腾讯云计算(北京)有限责任公司 Identity recognition method, identity recognition system training method, device and equipment
CN115795354B (en) * 2023-02-06 2023-04-25 北京志翔科技股份有限公司 Three-in-one place identification method and identification device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2731801Y (en) * 2004-02-16 2005-10-05 哈尔滨世纪旌旗科技有限责任公司 Diggings power supply management arrangement
US20120148118A1 (en) * 2010-12-09 2012-06-14 Electronics And Telecommunications Research Institute Method for classifying images and apparatus for the same
CN102684270A (en) * 2012-05-31 2012-09-19 华为技术有限公司 Method for identifying type of universal serial bus (USB) chargers and USB device
CN103378506A (en) * 2012-04-20 2013-10-30 Tcl集团股份有限公司 Power socket device capable of recognizing types of electric appliances
CN103489005A (en) * 2013-09-30 2014-01-01 河海大学 High-resolution remote sensing image classifying method based on fusion of multiple classifiers

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2362769A (en) * 2000-05-26 2001-11-28 Nokia Mobile Phones Ltd Battery charging circuit in which power is supplied via a communications port

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2731801Y (en) * 2004-02-16 2005-10-05 哈尔滨世纪旌旗科技有限责任公司 Diggings power supply management arrangement
US20120148118A1 (en) * 2010-12-09 2012-06-14 Electronics And Telecommunications Research Institute Method for classifying images and apparatus for the same
CN103378506A (en) * 2012-04-20 2013-10-30 Tcl集团股份有限公司 Power socket device capable of recognizing types of electric appliances
CN102684270A (en) * 2012-05-31 2012-09-19 华为技术有限公司 Method for identifying type of universal serial bus (USB) chargers and USB device
CN103489005A (en) * 2013-09-30 2014-01-01 河海大学 High-resolution remote sensing image classifying method based on fusion of multiple classifiers

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于BP神经网络的负载识别和C语言实现;王娟 等;《河北省科学院学报》;20050330;第22卷(第1期);第11页第1段-第13页第1段 *
基于RBF网络和贝叶斯分类器融合的人脸识别方法;陈彪 等;《电子产品世界》;20090215(第2期);第41页第1段-第43页倒数第1段 *

Also Published As

Publication number Publication date
CN108318770A (en) 2018-07-24
CN105866581A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN105866581B (en) A kind of electric appliance type identification method
CN105759148B (en) A method for judging the type of electrical appliances
CN105785187B (en) A method for judging the type of electrical appliances used in student dormitories
CN105759149B (en) Student dormitory appliance type judger
CN105913005A (en) Electric appliance load type intelligent identification method and device
CN105913006A (en) Electricity load type identification method
CN110533089B (en) Adaptive non-intrusive load identification method based on random forest
CN110514889A (en) A kind of method and system of non-intrusion type household electricity remained capacity
CN110119545B (en) Non-invasive power load identification method based on stack type self-encoder
CN117315434A (en) Non-invasive load identification method based on time sequence imaging and deep learning
CN105891633A (en) Device for determining the type of electrical appliances used in student dormitories
CN106909101A (en) A kind of non-intrusion type household electrical appliance sorter and method
Du et al. Support vector machine based methods for non-intrusive identification of miscellaneous electric loads
CN105866580A (en) Electric appliance type determining apparatus
CN112909923A (en) Non-invasive household load behavior recognition device based on DTW algorithm
CN114186631A (en) A load identification method based on non-intrusive intelligent terminal
CN109613362B (en) Non-invasive electric appliance quantity identification method
CN105868790A (en) Electrical load type recognizer
CN114942344A (en) Non-invasive electrical appliance identification method, system, medium, equipment and terminal
Rathore et al. Non intrusive load monitoring and load disaggregation using transient data analysis
CN105913010A (en) Electric appliance type determination device
CN116340759A (en) A Nonlinear Load State Recognition Method Based on Time-Frequency Analysis
CN105913009A (en) Electric appliance type identifier
CN110135392A (en) An electrical load type identification method
CN114330444A (en) Method and device for identifying circuit load

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201110

Address after: 233000 Xianghe Home Floor No.9, Xinhuai Road, Dongsheng Street, Longzihu District, Bengbu City, Anhui Province

Patentee after: Bengbu Qibang Science and Technology Information Consulting Co.,Ltd.

Address before: 412007 School of industry, research and production, Hunan University of Technology, 88 West Taishan Road, Zhuzhou, Hunan

Patentee before: HUNAN University OF TECHNOLOGY

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221017

Address after: 271000 North of Fengxiang Road, Tai'an High-tech Zone, Shandong Province

Patentee after: SHANDONG KEDE ELECTRONICS Co.,Ltd.

Address before: 233000 No.9, 1st floor, Xianghe Jiayuan, Xinhuai Road, Dongsheng Street, Longzihu District, Bengbu City, Anhui Province

Patentee before: Bengbu Qibang Science and Technology Information Consulting Co.,Ltd.

TR01 Transfer of patent right