CN112423434A - Power supply ripple based multi-path LED lamp brightness bypass detection device and method - Google Patents
Power supply ripple based multi-path LED lamp brightness bypass detection device and method Download PDFInfo
- Publication number
- CN112423434A CN112423434A CN202011268498.1A CN202011268498A CN112423434A CN 112423434 A CN112423434 A CN 112423434A CN 202011268498 A CN202011268498 A CN 202011268498A CN 112423434 A CN112423434 A CN 112423434A
- Authority
- CN
- China
- Prior art keywords
- signal
- led lamp
- circuit
- matrix
- power supply
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 11
- 239000011159 matrix material Substances 0.000 claims description 91
- 238000000926 separation method Methods 0.000 claims description 51
- 238000000354 decomposition reaction Methods 0.000 claims description 28
- 238000005070 sampling Methods 0.000 claims description 25
- 238000007537 lampworking Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000005315 distribution function Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 claims description 4
- 230000001186 cumulative effect Effects 0.000 claims description 3
- 230000017105 transposition Effects 0.000 claims 2
- 230000005540 biological transmission Effects 0.000 claims 1
- 230000002087 whitening effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 3
- 230000003321 amplification Effects 0.000 description 2
- 239000003990 capacitor Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003199 nucleic acid amplification method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 235000019557 luminance Nutrition 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B45/00—Circuit arrangements for operating light-emitting diodes [LED]
- H05B45/30—Driver circuits
- H05B45/32—Pulse-control circuits
- H05B45/325—Pulse-width modulation [PWM]
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B45/00—Circuit arrangements for operating light-emitting diodes [LED]
- H05B45/30—Driver circuits
- H05B45/36—Circuits for reducing or suppressing harmonics, ripples or electromagnetic interferences [EMI]
Landscapes
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
本发明公开了一种基于电源纹波的多路LED灯亮度旁路检测装置和方法。本发明包括LED灯、LED灯驱动电路、电源纹波信号采集电路和信号处理器;LED灯驱动电路与LED灯相连并控制LED灯,若干个连有LED灯的LED灯驱动电路并联接到电源上形成多路LED灯,电源纹波信号采集电路接到电源上并采集若干个LED灯驱动电路对电源产生的电源纹波,电源纹波信号采集电路通过USB接口将采集到的电源纹波传输到信号处理器,信号处理器对混合纹波信号进行处理后可得每盏LED灯的亮度。本发明为一种旁路接入式装置,在原有电路下,实现了多路LED灯的亮度检测,并且装置结构简单,成本低,具有一定的普适性。
The invention discloses a device and a method for detecting a brightness bypass of a multi-channel LED lamp based on power supply ripple. The invention includes an LED lamp, an LED lamp drive circuit, a power supply ripple signal acquisition circuit and a signal processor; the LED lamp drive circuit is connected with the LED lamp and controls the LED lamp, and several LED lamp drive circuits connected with the LED lamp are connected in parallel with the power supply A multi-channel LED light is formed on the top of the circuit, and the power supply ripple signal acquisition circuit is connected to the power supply and collects the power supply ripple generated by several LED lamp drive circuits to the power supply. The power supply ripple signal acquisition circuit transmits the collected power supply ripple through the USB interface. To the signal processor, the signal processor can obtain the brightness of each LED lamp after processing the mixed ripple signal. The invention is a bypass access type device, which realizes the brightness detection of multi-channel LED lamps under the original circuit, and has simple structure, low cost and certain universality.
Description
技术领域technical field
本发明涉及一种多路LED灯亮度检测方法,尤其涉及一种基于电源纹波的多路PWM调制的LED灯亮度旁路检测装置和方法。The invention relates to a multi-channel LED lamp brightness detection method, in particular to a multi-channel PWM-modulated LED lamp brightness bypass detection device and method based on power supply ripple.
背景技术Background technique
LED是固态电光源和半导体照明装置。它的电气特性是高度离散的。具有体积小,机械强度大,功耗低,寿命长,调节控制容易,无污染的特点。PWM是脉冲宽度调制信号,其中脉冲宽度表示的是脉冲高电平的时间,PWM调光通过PWM波LED打开和关闭,以改变正向电流的传导时间,以达到亮度调节的效果,因为人眼对亮度闪烁不敏感,当PWM波频率大于100Hz时,人眼观察到的时LED的平均亮度。LEDs are solid-state electric light sources and semiconductor lighting devices. Its electrical characteristics are highly discrete. It has the characteristics of small size, high mechanical strength, low power consumption, long life, easy adjustment and control, and no pollution. PWM is a pulse width modulation signal, where the pulse width represents the time of the high level of the pulse, PWM dimming is turned on and off by the PWM wave LED to change the conduction time of the forward current to achieve the effect of brightness adjustment, because the human eye Insensitive to brightness flicker, when the PWM wave frequency is greater than 100Hz, the average brightness of the LED observed by the human eye.
当前针对LED灯的亮度检测大多基于传感器,而使用传感器的弊端越来越明显,较为普遍的是传感器在易受环境影响,在恶劣环境中性能不稳定,容易受外界灰尘的影响等。同时需要在设计LED整体电路时需要将传感器直接安装在驱动电路中,不利于设备的更新换代,因此需要开发更智能更便捷、在不改变原有电路的结构下能够实现亮度检测的旁路检测方法与系统,然而目前未见相关报道。At present, most of the brightness detection for LED lights is based on sensors, and the disadvantages of using sensors are becoming more and more obvious. It is more common that sensors are easily affected by the environment, their performance is unstable in harsh environments, and they are easily affected by external dust. At the same time, when designing the overall LED circuit, the sensor needs to be directly installed in the driving circuit, which is not conducive to the replacement of equipment. Therefore, it is necessary to develop a more intelligent and convenient bypass detection that can realize brightness detection without changing the structure of the original circuit. method and system, but no relevant reports have been found so far.
发明内容SUMMARY OF THE INVENTION
针对背景技术中的不足,本发明设计目的在于提供一种基于电源纹波的多路PWM调制LED灯亮度旁路检测方法,针对一个电源驱动多路LED灯的情况,利用多路PWM调制的LED灯的不同状态对LED灯驱动电路的扰动而产生的不同电源纹波规律性变化来间接检测每路LED灯对应的亮度。In view of the deficiencies in the background technology, the design purpose of the present invention is to provide a brightness bypass detection method of a multi-channel PWM modulated LED lamp based on power supply ripple. The different power supply ripples generated by the disturbance of different states of the lamp to the LED lamp drive circuit regularly change to indirectly detect the brightness corresponding to each LED lamp.
为了实现上述目的,本发明采取的技术方案是:In order to achieve the above object, the technical scheme adopted by the present invention is:
一、一种基于电源纹波的多路LED灯亮度旁路检测装置1. A multi-channel LED lamp brightness bypass detection device based on power supply ripple
装置包括LED灯、LED灯驱动电路、电源纹波信号采集电路和信号处理器;LED灯驱动电路与LED灯相连并控制LED灯,若干个连有LED灯的LED灯驱动电路并联接到电源上形成多路LED灯,电源纹波信号采集电路接到电源上并采集若干个LED灯驱动电路对电源产生的电源纹波,电源纹波信号采集电路通过CH340USB转接口将采集到的电源纹波传输到信号处理器,所述信号处理器为计算机终端。The device includes an LED lamp, an LED lamp drive circuit, a power supply ripple signal acquisition circuit and a signal processor; the LED lamp drive circuit is connected with the LED lamp and controls the LED lamp, and a plurality of LED lamp drive circuits connected with the LED lamp are connected in parallel to the power supply A multi-channel LED lamp is formed. The power ripple signal acquisition circuit is connected to the power supply and collects the power ripple generated by several LED lamp drive circuits on the power supply. The power ripple signal acquisition circuit transmits the collected power ripple through the CH340USB transfer interface. to the signal processor, which is a computer terminal.
所述的LED灯驱动电路包括驱动电路电源端口、驱动电路输出端口、LED灯正负接口、PWM信号占空比控制电路和LED灯工作电路,PWM信号占空比控制电路与LED灯工作电路相连,LED灯工作电路依次通过驱动电路输出端口和LED灯正负接口与LED灯相连,LED灯驱动电路通过驱动电路电源端口连接到电源上;外部旋钮或红外遥控控制PWM信号占空比控制电路中PWM波中高电平与低电平的占空比,使得LED灯工作电路的工作时间得到控制,达到调节LED灯亮度的效果。The LED lamp drive circuit includes a drive circuit power supply port, a drive circuit output port, an LED lamp positive and negative interface, a PWM signal duty cycle control circuit and an LED lamp working circuit, and the PWM signal duty cycle control circuit is connected with the LED lamp working circuit. , the LED lamp working circuit is connected to the LED lamp through the drive circuit output port and the LED lamp positive and negative interfaces in turn, and the LED lamp drive circuit is connected to the power supply through the drive circuit power port; the external knob or infrared remote control controls the PWM signal duty cycle control circuit. The duty ratio of the high level and the low level in the PWM wave makes the working time of the LED lamp working circuit be controlled to achieve the effect of adjusting the brightness of the LED lamp.
所述电源纹波信号采集电路包括滤波电路、负载电阻、取样电阻、AD取样模块和放大电路;电源之间连接有串联的负载电阻和取样电阻,取样电阻的两端与放大电路连接,放大电路将取样电阻两端的微弱的差分信号转化放大后输出,放大电路依次与滤波电路、电容、AD取样模块相连,AD取样模块通过CH340串口转USB芯片将采集到的电源纹波传输到信号处理器。The power supply ripple signal acquisition circuit includes a filter circuit, a load resistor, a sampling resistor, an AD sampling module and an amplifying circuit; a series-connected load resistor and a sampling resistor are connected between the power supplies, and both ends of the sampling resistor are connected to the amplifying circuit, and the amplifying circuit The weak differential signal at both ends of the sampling resistor is converted and amplified and output. The amplification circuit is connected to the filter circuit, capacitor, and AD sampling module in turn. The AD sampling module transmits the collected power ripple to the signal processor through the CH340 serial port to USB chip.
二、一种基于电源纹波的多路LED灯亮度旁路检测方法2. A brightness bypass detection method for multi-channel LED lamps based on power supply ripple
所述信号处理器中输入混合纹波信号,对混合纹波信号进行处理的方法包括以下步骤:A mixed ripple signal is input into the signal processor, and the method for processing the mixed ripple signal includes the following steps:
1)对混合纹波信号进行j层分解,分解重构后获得混合纹波信号的小波系数和尺度系数;1) Perform j-layer decomposition on the mixed ripple signal, and obtain the wavelet coefficients and scale coefficients of the mixed ripple signal after the decomposition and reconstruction;
所述步骤1)具体为:Described step 1) is specifically:
利用Hilbert变换的复小波函数基对混合纹波信号进行j层分解,分解重构后获得分解信号Y,从分解信号Y中可得混合纹波信号的小波系数和尺度系数:Using the complex wavelet function basis of Hilbert transform, the mixed ripple signal is decomposed in j layers, and the decomposed signal Y is obtained after the decomposition and reconstruction. From the decomposed signal Y, the wavelet coefficients and scale coefficients of the mixed ripple signal can be obtained:
其中di为分解信号Y中第i个小波系数,cj为分解信号Y中第j个尺度系数。where d i is the i-th wavelet coefficient in the decomposed signal Y, and c j is the j-th scale coefficient in the decomposed signal Y.
2)选取小波系数和尺度系数,建立信号分解矩阵,对信号分解矩阵进行降维重构,获得多通道信号 2) Select wavelet coefficients and scale coefficients, establish a signal decomposition matrix, and perform dimension reduction and reconstruction on the signal decomposition matrix to obtain a multi-channel signal
所述步骤2)具体为:Described step 2) is specifically:
对信号分解矩阵Q进行降维重构,获得多通道信号 Perform dimensionality reduction and reconstruction on the signal decomposition matrix Q to obtain multi-channel signals
选取小波系数d1,d2,...,dj和尺度系数cj,其中,d1表示第1个小波系数,d2表示第2个小波系数,dj表示第j个小波系数,建立信号分解矩阵Q=[cj,d1,d2,...,dj]T,计算协方差矩阵S的特征值Λ=[λ1,λ2,...,λj+1]以及对应的特征向量V=[ω1,ω2,...,ωj+1]:Select wavelet coefficients d 1 , d 2 ,...,d j and scale coefficient c j , where d 1 represents the first wavelet coefficient, d 2 represents the second wavelet coefficient, d j represents the jth wavelet coefficient, Establish the signal decomposition matrix Q=[c j ,d 1 ,d 2 ,...,d j ] T , calculate the eigenvalues of the covariance matrix S Λ=[λ 1 ,λ 2 ,...,λ j+1 ] and the corresponding feature vector V=[ω 1 ,ω 2 ,...,ω j+1 ]:
其中,u1表示尺度系数cj的均值,u2表示小波系数d1的均值,uj+1表示小波系数dj的均值,T表示转置操作,λ1表示协方差矩阵S中第1个特征值,λj+1表示协方差矩阵S中第j+1个特征值,ω1表示协方差矩阵S中第1个特征向量,ωj+1表示协方差矩阵S中第j+1个特征向量;in, u 1 represents the mean value of the scale coefficient c j , u 2 represents the mean value of the wavelet coefficient d 1 , u j+1 represents the mean value of the wavelet coefficient d j , T represents the transpose operation, λ 1 represents the first feature in the covariance matrix S value, λ j+1 represents the j+1 eigenvalue in the covariance matrix S, ω 1 represents the first eigenvector in the covariance matrix S, and ω j+1 represents the j+1 eigenvalue in the covariance matrix S vector;
将特征值Λ=[λ1,λ2,...,λj+1]从大到小进行排序,依次选择N-1个特征值,其中N表示LED灯的个数,从信号分解矩阵Q中选出与N-1个特征值所对应的特征值序号的N-1个信号分量与混合纹波信号共同组成多通道信号 Sort the eigenvalues Λ=[λ 1 ,λ 2 ,...,λ j+1 ] from large to small, and select N-1 eigenvalues in turn, where N represents the number of LED lights, from the signal decomposition matrix Select the N-1 signal components of the eigenvalue serial number corresponding to the N-1 eigenvalues from Q and the mixed ripple signal to form a multi-channel signal
3)将多通道信号进行白化处理获得白化多通道信号对分离矩阵M随机赋初始值,利用白化多通道信号将分离矩阵M不断迭代至前一个分离矩阵Mk-1与当前的分离矩阵Mk的误差满足∑∑|Mk-Mk-1|≤σ,获得最终的分离矩阵M;其中,σ为误差,满足0<σ<1,k为分离矩阵M迭代的次数,∑∑|Mk-Mk-1|表示分离矩阵Mk与分离矩阵Mk-1作差后获得中间矩阵,对中间矩阵中所有元素进行求和后获得结果;计算获得原始多通道信号 其中O(t)=[O1(t),O2(t),···,ON(t)],O1(t)表示第1个原始通道信号,N表示总共有N路LED灯;3) Convert the multi-channel signal Perform whitening processing to obtain whitened multi-channel signals Randomly assign initial values to the separation matrix M, and use whitening multi-channel signals The separation matrix M is continuously iterated until the error between the previous separation matrix M k-1 and the current separation matrix M k satisfies ∑∑|M k -M k-1 |≤σ, and the final separation matrix M is obtained; where σ is Error, satisfying 0<σ<1, k is the number of iterations of the separation matrix M, ∑∑|M k -M k-1 | means that the separation matrix M k and the separation matrix M k-1 are different to obtain the intermediate matrix, The result is obtained after summing all elements in the matrix; the calculation obtains the original multi-channel signal Where O(t)=[O 1 (t),O 2 (t),...,ON (t)], O 1 (t) represents the first original channel signal, and N represents a total of N LEDs lamp;
所述步骤3)具体为:Described step 3) is specifically:
将多通道信号采用以下公式进行白化处理获得白化多通道信号 multi-channel signal Use the following formula to perform whitening processing to obtain a whitened multi-channel signal
对分离矩阵M随机赋初始值,利用下列公式将分离矩阵M不断迭代至前一个分离矩阵Mk-1与当前的分离矩阵Mk的误差满足|Mk-Mk-1|≤σ,获得最终的分离矩阵M;Randomly assign an initial value to the separation matrix M, and use the following formula to iterate the separation matrix M continuously until the error between the previous separation matrix M k-1 and the current separation matrix M k satisfies |M k -M k-1 |≤σ, obtain The final separation matrix M;
其中,表示累积分布函数,表示概率分布函数,mk-1表示第k-1次迭代获得的分离矩阵M中某一行,y表示白化多通道信号中与mk-1相同的行序号的一行,mk表示第k次迭代获得的分离矩阵M中与mk-1相同的行序号的一行,Mk-1表示第k-1次迭代计算所得的分离矩阵M,Mk表示第k次迭代计算所得的分离矩阵M,E{}表示期望操作,T表示转置操作;in, represents the cumulative distribution function, represents the probability distribution function, m k-1 represents a row in the separation matrix M obtained by the k-1 iteration, and y represents the whitened multi-channel signal A row with the same row number as m k-1 , m k represents a row with the same row number as
最后,计算原始多通道信号 Finally, calculate the original multi-channel signal
4)将原始多通道信号O(t)中的每个子原始通道信号均转换成方波信号,计算每个方波信号的占空比,形成总占空比q=[q1,q2,...,qN],由总占空比q得N盏LED灯亮度L=[L1,L2,...,LN],其中,占空比与LED灯亮度等比例对应,当占空比为1时,LED灯为最亮的工作状态;当占空比为0时,LED灯完全熄灭。4) Convert each sub-original channel signal in the original multi-channel signal O(t) into a square wave signal, calculate the duty cycle of each square wave signal, and form a total duty cycle q=[q 1 ,q 2 , ...,q N ], from the total duty cycle q, the brightness of N LED lights L=[L 1 , L 2 , ..., L N ], where the duty cycle corresponds to the brightness of the LED lights in equal proportions, When the duty cycle is 1, the LED light is the brightest working state; when the duty cycle is 0, the LED light is completely off.
本发明具有的有效效益是:The effective benefit that the present invention has is:
本发明所设计的一种基于电源纹波的多路PWM调制LED灯亮度旁路检测装置和方法,不同于传统的基于传感器的LED灯亮度检测方法,利用PWM调制LED灯的不同状态对LED灯驱动电路的扰动而产生的不同电源纹波规律性变化来间接检测每路LED灯对应的亮度。The device and method for detecting the brightness of a multi-channel PWM modulated LED lamp brightness based on the power supply ripple designed by the present invention is different from the traditional sensor-based method for detecting the brightness of an LED lamp. The different power ripples generated by the disturbance of the drive circuit change regularly to indirectly detect the brightness corresponding to each LED lamp.
本发明所设计的一种基于电源纹波的多路PWM调制LED灯亮度旁路检测装置,作为一种旁路接入式系统,在不改变原有电路的条件下,实现了多路PWM调制LED的亮度检测,并且系统结构简单,实现成本低,使用范围广,具有一定的普适性,结合当下泛在电力物联网,基于电源纹波的无传感检测,提供了另一种思路。A multi-channel PWM modulation LED lamp brightness bypass detection device based on power supply ripple designed by the present invention, as a bypass access system, realizes multi-channel PWM modulation without changing the original circuit. LED brightness detection, and the system structure is simple, the implementation cost is low, the use range is wide, and it has a certain universality. Combined with the current ubiquitous power Internet of things, sensorless detection based on power supply ripple provides another idea.
附图说明Description of drawings
图1是本发明实施例的模块示意图;Fig. 1 is the module schematic diagram of the embodiment of the present invention;
图2是本发明实施例的结构框图;2 is a structural block diagram of an embodiment of the present invention;
图3是PWM信号占空比控制电路接口示意图;Fig. 3 is a schematic diagram of a PWM signal duty cycle control circuit interface;
图4是电源纹波信号采集电路电路图;Figure 4 is a circuit diagram of a power supply ripple signal acquisition circuit;
图5是信号处理器的信号处理算法流程图;Fig. 5 is the signal processing algorithm flow chart of the signal processor;
图中:1、LED灯,2、LED灯驱动电路,3、电源纹波信号采集电路,4、信号处理器,5、电源,6、驱动电路电源端口,7、PWM信号占空比控制电路,8、驱动电路输出端口,9、LED灯正负接口,10、LED灯工作电路,11、滤波电路,12、负载电阻,13、取样电阻,14、AD取样模块,15、放大电路。In the figure: 1. LED light, 2. LED light drive circuit, 3. Power supply ripple signal acquisition circuit, 4. Signal processor, 5. Power supply, 6. Drive circuit power supply port, 7. PWM signal duty cycle control circuit , 8, drive circuit output port, 9, LED light positive and negative interface, 10, LED light working circuit, 11, filter circuit, 12, load resistance, 13, sampling resistance, 14, AD sampling module, 15, amplifier circuit.
具体实施方式Detailed ways
下面结合附图对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings.
如图1和图2所示,本发明包括LED灯1、LED灯驱动电路2、电源纹波信号采集电路3和信号处理器4;LED灯驱动电路2与LED灯1相连并控制LED灯1,若干个连有LED灯1的LED灯驱动电路2并联接到电源5上形成多路LED灯,电源纹波信号采集电路3接到电源5上并采集若干个LED灯驱动电路2对电源5产生的电源纹波,电源纹波信号采集电路3通过CH340USB转接口将采集到的电源纹波传输到信号处理器4,信号处理器4为计算机终端。As shown in FIG. 1 and FIG. 2 , the present invention includes an
LED灯驱动电路2包括驱动电路电源端口6、驱动电路输出端口8、LED灯正负接口9、PWM信号占空比控制电路7和LED灯工作电路10,PWM信号占空比控制电路7与LED灯工作电路10相连,LED灯工作电路10依次通过驱动电路输出端口8和LED灯正负接口9与LED灯1相连,LED灯驱动电路2通过驱动电路电源端口6连接到电源5上;外部旋钮或红外遥控控制PWM信号占空比控制电路7中PWM波中高电平与低电平的占空比,使得LED灯工作电路10的工作时间得到控制,达到调节LED灯1亮度的效果。The LED
其中PWM信号占空比控制电路选用市面上易购买到的占空比可调方波矩形波信号发生电路,本发明实施中选用telesky公司的一款带液晶显示的PWM脉冲模块,三个PWM信号发生器输出50Hz,200Hz,600Hz的等幅度PWM波到LED灯的工作电路,具体实施中,LED灯驱动电路2选择三路,即LED灯的个数为三。The duty ratio control circuit of the PWM signal selects a square wave rectangular wave signal generating circuit with an adjustable duty ratio that is readily available on the market. In the implementation of the present invention, a PWM pulse module with liquid crystal display from telesky company is selected, and three PWM signals The generator outputs equal amplitude PWM waves of 50Hz, 200Hz and 600Hz to the working circuit of the LED light.
如图4所示,电源纹波信号采集电路3包括滤波电路11、负载电阻12、取样电阻13、AD取样模块14和放大电路15;电源5之间连接有串联的负载电阻12和取样电阻13,取样电阻13的两端与放大电路15连接,放大电路15将取样电阻13两端的微弱的差分信号转化放大后输出,放大电路15依次与滤波电路11、电容、AD取样模块14相连,AD取样模块14通过CH340串口转USB芯片将采集到的电源纹波传输到信号处理器4。As shown in FIG. 4 , the power supply ripple
具体实施中,负载电阻12选取120Ω,取样电阻13选取为1Ω,选取基于OP27的同相输入放大器A1和A2,同相输入放大器A1和A2的同相输入实现输入电阻的放大。基于INA105的差分放大器A3将差分的输入信号转换成单端输出信号,提高了放大电路15的共模抑制比即抑制共模,放大差模增益,同时抑制了噪声。根据电路原理,计算该放大器的差模增益:In the specific implementation, the load resistance 12 is selected as 120Ω, the sampling resistance 13 is selected as 1Ω, the non-inverting input amplifiers A1 and A2 based on OP27 are selected, and the non-inverting input of the non-inverting input amplifiers A1 and A2 realizes the amplification of the input resistance. The differential amplifier A3 based on INA105 converts the differential input signal into a single-ended output signal, which improves the common mode rejection ratio of the amplifier circuit 15, that is, suppresses the common mode, amplifies the differential mode gain, and simultaneously suppresses noise. According to the circuit principle, calculate the differential mode gain of the amplifier:
Avd=1+2R3/RX A vd =1+2R 3 /R X
其中Avd表示电压放大倍数。本发明实例中选取电阻R3为5kΩ的滑动变阻器,电阻R4为20kΩ,因此放大倍数最小为9倍。Where Avd represents the voltage magnification. In the example of the present invention, a sliding varistor with a resistance R3 of 5kΩ and a resistance R4 of 20kΩ are selected, so the minimum magnification is 9 times.
滤波电路11使用基于OP27的二阶低通滤波器来滤除高频的噪声,使波形更加平滑。二阶RC低通滤波器的截止频率f与二阶RC低通滤波器的直接关系式如下:The filter circuit 11 uses a second-order low-pass filter based on OP27 to filter out high-frequency noise and make the waveform smoother. The direct relationship between the cutoff frequency f of the second-order RC low-pass filter and the second-order RC low-pass filter is as follows:
其中本实例选取的电阻R5=R6=5kΩ,电容C1=C2=0.01uF,计算得二阶RC低通滤波器的截止频率f为1190kHz。The resistor R5=R6=5kΩ and the capacitor C1=C2=0.01uF are selected in this example, and the cut-off frequency f of the second-order RC low-pass filter is calculated as 1190kHz.
AD取样模块14选取的是ST公司的STM32F103系列单片机的内部ADC资源,AD取样模块14将获取的采样数据通过STM32的内部DMA转移到内存,减轻CPU的负担,同时增强AD采样的稳定性和精确度,并通过板载CH340串口转USB芯片,通过UART串行通信将采样数据,即混合纹波信号传输至信号处理器4中,本发明具体实施中取样频率为10kHz,满足奈奎斯特采样频率定理。The AD sampling module 14 selects the internal ADC resources of ST's STM32F103 series single-chip microcomputer. The AD sampling module 14 transfers the acquired sampling data to the memory through the internal DMA of the STM32, reducing the burden on the CPU and enhancing the stability and accuracy of AD sampling. The sampled data, that is, the mixed ripple signal, is transmitted to the
如图5所示,信号处理器4中输入混合纹波信号,对混合纹波信号进行处理的方法包括以下步骤:As shown in FIG. 5 , the mixed ripple signal is input to the
1)对混合纹波信号进行j层分解,分解重构后获得混合纹波信号的小波系数和尺度系数;1) Perform j-layer decomposition on the mixed ripple signal, and obtain the wavelet coefficients and scale coefficients of the mixed ripple signal after the decomposition and reconstruction;
步骤1)具体为:Step 1) is specifically:
利用Hilbert变换的复小波函数基对混合纹波信号进行j层分解,分解重构后获得分解信号Y,从分解信号Y中可得混合纹波信号的小波系数和尺度系数:Using the complex wavelet function basis of Hilbert transform, the mixed ripple signal is decomposed in j layers, and the decomposed signal Y is obtained after the decomposition and reconstruction. From the decomposed signal Y, the wavelet coefficients and scale coefficients of the mixed ripple signal can be obtained:
其中di为分解信号Y中第i个小波系数,cj为分解信号Y中第j个尺度系数。where d i is the i-th wavelet coefficient in the decomposed signal Y, and c j is the j-th scale coefficient in the decomposed signal Y.
具体实施中,j=4,得到对应的信号分量为:In the specific implementation, j=4, the corresponding signal components obtained are:
2)选取小波系数和尺度系数,建立信号分解矩阵,对信号分解矩阵进行降维重构,获得多通道信号 2) Select wavelet coefficients and scale coefficients, establish a signal decomposition matrix, and perform dimension reduction and reconstruction on the signal decomposition matrix to obtain a multi-channel signal
步骤2)具体为:Step 2) is specifically:
对信号分解矩阵Q进行降维重构,获得多通道信号 Perform dimensionality reduction and reconstruction on the signal decomposition matrix Q to obtain multi-channel signals
选取小波系数d1,d2,...,dj和尺度系数cj,其中,d1表示第1个小波系数,d2表示第2个小波系数,dj表示第j个小波系数,建立信号分解矩阵Q=[cj,d1,d2,...,dj]T,计算协方差矩阵S的特征值Λ=[λ1,λ2,...,λj+1]以及对应的特征向量V=[ω1,ω2,...,ωj+1]:Select wavelet coefficients d 1 , d 2 ,...,d j and scale coefficient c j , where d 1 represents the first wavelet coefficient, d 2 represents the second wavelet coefficient, d j represents the jth wavelet coefficient, Establish the signal decomposition matrix Q=[c j ,d 1 ,d 2 ,...,d j ] T , calculate the eigenvalues of the covariance matrix S Λ=[λ 1 ,λ 2 ,...,λ j+1 ] and the corresponding feature vector V=[ω 1 ,ω 2 ,...,ω j+1 ]:
其中,u1表示尺度系数cj的均值,u2表示小波系数d1的均值,uj+1表示小波系数dj的均值,T表示转置操作,λ1表示协方差矩阵S中第1个特征值,λj+1表示协方差矩阵S中第j+1个特征值,ω1表示协方差矩阵S中第1个特征向量,ωj+1表示协方差矩阵S中第j+1个特征向量;in, u 1 represents the mean value of the scale coefficient c j , u 2 represents the mean value of the wavelet coefficient d 1 , u j+1 represents the mean value of the wavelet coefficient d j , T represents the transpose operation, λ 1 represents the first feature in the covariance matrix S value, λ j+1 represents the j+1 eigenvalue in the covariance matrix S, ω 1 represents the first eigenvector in the covariance matrix S, and ω j+1 represents the j+1 eigenvalue in the covariance matrix S vector;
将特征值Λ=[λ1,λ2,...,λj+1]从大到小进行排序,依次选择N-1个特征值,其中N表示LED灯的个数,从信号分解矩阵Q中选出与N-1个特征值所对应的特征值序号的N-1个信号分量与混合纹波信号共同组成多通道信号 Sort the eigenvalues Λ=[λ 1 ,λ 2 ,...,λ j+1 ] from large to small, and select N-1 eigenvalues in turn, where N represents the number of LED lights, from the signal decomposition matrix Select the N-1 signal components of the eigenvalue serial number corresponding to the N-1 eigenvalues from Q and the mixed ripple signal to form a multi-channel signal
具体实施中,信号分解矩阵Q=[c4,d1,d2,d3,d4]T,先计算信号分解矩阵Q每个信号分量的均值向量:In the specific implementation, the signal decomposition matrix Q=[c 4 , d 1 , d 2 , d 3 , d 4 ] T , first calculate the mean vector of each signal component of the signal decomposition matrix Q:
其中,L为信号分量的长度。where L is the length of the signal component.
协方差矩阵S的特征值Λ=[λ1,λ2,...,λ5]以及对应的特征向量V=[ω1,ω2,...,ω5];将特征值Λ=[λ1,λ2,...,λ5]从大到小进行排序,依次选择2个特征值,从信号分解矩阵Q中选出与2个特征值所对应的特征值序号的2个信号分量与混合纹波信号共同组成多通道信号 The eigenvalues Λ=[λ 1 ,λ 2 ,...,λ 5 ] of the covariance matrix S and the corresponding eigenvectors V=[ω 1 ,ω 2 ,...,ω 5 ]; the eigenvalues Λ= [λ 1 ,λ 2 ,...,λ 5 ] are sorted from large to small, two eigenvalues are selected in turn, and two eigenvalue numbers corresponding to the two eigenvalues are selected from the signal decomposition matrix Q The signal components and the mixed ripple signal together form a multi-channel signal
3)将多通道信号进行白化处理获得白化多通道信号对分离矩阵M随机赋初始值,利用白化多通道信号将分离矩阵M不断迭代至前一个分离矩阵Mk-1与当前的分离矩阵Mk的误差满足∑∑|Mk-Mk-1|≤σ,获得最终的分离矩阵M;其中,σ为误差,满足0<σ<1,k为分离矩阵M迭代的次数,∑∑|Mk-Mk-1|表示分离矩阵Mk与分离矩阵Mk-1作差后获得中间矩阵,对中间矩阵中所有元素进行求和后获得结果;计算获得原始多通道信号 其中O(t)=[O1(t),O2(t),···,ON(t)],O1(t)表示第1个原始通道信号,即第1路LED灯所产生的原始通道信号,N表示总共有N路LED灯;3) Convert the multi-channel signal Perform whitening processing to obtain whitened multi-channel signals Randomly assign initial values to the separation matrix M, and use whitening multi-channel signals The separation matrix M is continuously iterated until the error between the previous separation matrix M k-1 and the current separation matrix M k satisfies ∑∑|M k -M k-1 |≤σ, and the final separation matrix M is obtained; where σ is Error, satisfying 0<σ<1, k is the number of iterations of the separation matrix M, ∑∑|M k -M k-1 | means that the separation matrix M k and the separation matrix M k-1 are different to obtain the intermediate matrix, The result is obtained after summing all elements in the matrix; the calculation obtains the original multi-channel signal Where O(t) = [O 1 (t),O 2 (t),...,ON (t)], O 1 (t) represents the first original channel signal, that is, the first LED lamp The original channel signal generated, N means there are N LED lights in total;
步骤3)具体为:Step 3) is specifically:
将多通道信号采用以下公式进行白化处理获得白化多通道信号 multi-channel signal Use the following formula to perform whitening processing to obtain a whitened multi-channel signal
对分离矩阵M随机赋初始值,利用下列公式将分离矩阵M不断迭代至前一个分离矩阵Mk-1与当前的分离矩阵Mk的误差满足∑∑|Mk-Mk-1|≤σ,获得最终的分离矩阵M;Randomly assign an initial value to the separation matrix M, and use the following formula to iterate the separation matrix M continuously until the error between the previous separation matrix M k-1 and the current separation matrix M k satisfies ∑∑|M k -M k-1 |≤σ , to obtain the final separation matrix M;
其中,表示累积分布函数,表示概率分布函数,mk-1表示第k-1次迭代获得的分离矩阵M中某一行,y表示白化多通道信号中与mk-1相同的行序号的一行,mk表示第k次迭代获得的分离矩阵M中与mk-1相同的行序号的一行,Mk-1表示第k-1次迭代计算所得的分离矩阵M,Mk表示第k次迭代计算所得的分离矩阵M,E{}表示期望操作,T表示转置操作;in, represents the cumulative distribution function, represents the probability distribution function, m k-1 represents a row in the separation matrix M obtained by the k-1 iteration, and y represents the whitened multi-channel signal A row with the same row number as m k-1 , m k represents a row with the same row number as
最后,计算原始多通道信号 Finally, calculate the original multi-channel signal
4)将原始多通道信号O(t)中的每个子原始通道信号均转换成方波信号,计算每个方波信号的占空比,形成总占空比q=[q1,q2,···,qN],由总占空比q得N盏LED灯亮度L=[L1,L2,···,LN],其中,占空比与LED灯亮度等比例对应,当占空比为1时,LED灯为最亮的工作状态;当占空比为0时,LED灯完全熄灭。4) Convert each sub-original channel signal in the original multi-channel signal O(t) into a square wave signal, calculate the duty cycle of each square wave signal, and form a total duty cycle q=[q 1 ,q 2 , ...,q N ], from the total duty cycle q, the brightness of N LED lights L=[L 1 , L 2 , ..., L N ], where the duty cycle corresponds to the brightness of the LED lights in equal proportions, When the duty cycle is 1, the LED light is the brightest working state; when the duty cycle is 0, the LED light is completely off.
具体实施中,总占空比q=[q1,q2,q3],对应的三盏LED灯的亮度L=[L1,L2,L3]。In a specific implementation, the total duty ratio q=[q 1 , q 2 , q 3 ], and the corresponding luminances of the three LED lamps L=[L 1 , L 2 , L 3 ].
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011268498.1A CN112423434B (en) | 2020-11-13 | 2020-11-13 | Device and method for brightness bypass detection of multi-channel LED lamps based on power supply ripple |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011268498.1A CN112423434B (en) | 2020-11-13 | 2020-11-13 | Device and method for brightness bypass detection of multi-channel LED lamps based on power supply ripple |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112423434A true CN112423434A (en) | 2021-02-26 |
CN112423434B CN112423434B (en) | 2021-10-08 |
Family
ID=74831778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011268498.1A Active CN112423434B (en) | 2020-11-13 | 2020-11-13 | Device and method for brightness bypass detection of multi-channel LED lamps based on power supply ripple |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112423434B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101452240B1 (en) * | 2012-12-14 | 2014-10-22 | (주)세종하이테크 | Circuit for reducing Direct Current ripple for LED lighting apparatus |
CN104812121A (en) * | 2014-01-27 | 2015-07-29 | 通用电气公司 | LED driving circuit |
CN204634138U (en) * | 2015-06-11 | 2015-09-09 | 深圳市暗能量电源有限公司 | LED control circuit for hot swap |
CN104936340A (en) * | 2015-05-20 | 2015-09-23 | 深圳市朗科智能电气股份有限公司 | Ripple-free LED lamp power circuit and method for eliminating LED lamp power ripples |
CN208445795U (en) * | 2018-05-29 | 2019-01-29 | 中国石油天然气集团有限公司 | The Adaptive Suppression circuit and LED light source driving circuit of remnants ripple electric current |
-
2020
- 2020-11-13 CN CN202011268498.1A patent/CN112423434B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101452240B1 (en) * | 2012-12-14 | 2014-10-22 | (주)세종하이테크 | Circuit for reducing Direct Current ripple for LED lighting apparatus |
CN104812121A (en) * | 2014-01-27 | 2015-07-29 | 通用电气公司 | LED driving circuit |
CN104936340A (en) * | 2015-05-20 | 2015-09-23 | 深圳市朗科智能电气股份有限公司 | Ripple-free LED lamp power circuit and method for eliminating LED lamp power ripples |
CN204634138U (en) * | 2015-06-11 | 2015-09-09 | 深圳市暗能量电源有限公司 | LED control circuit for hot swap |
CN208445795U (en) * | 2018-05-29 | 2019-01-29 | 中国石油天然气集团有限公司 | The Adaptive Suppression circuit and LED light source driving circuit of remnants ripple electric current |
Also Published As
Publication number | Publication date |
---|---|
CN112423434B (en) | 2021-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN202019482U (en) | A One-way RS-485 Controlled LED Driving Power System | |
CN105116956A (en) | Maximum power tracing controller applied to photovoltaic power generation system | |
CN203661346U (en) | Intelligent control type led driving power supply | |
US8653428B2 (en) | Solar-powered wireless communication module with daylight intensity measurement | |
CN110007126A (en) | A DC bus voltage isolation detection circuit | |
CN118311503B (en) | Single-bit broadband radar system with arbitrary variable threshold | |
CN209231210U (en) | A near-infrared receiving and transmitting control device with adjustable transmitting power | |
CN112423434B (en) | Device and method for brightness bypass detection of multi-channel LED lamps based on power supply ripple | |
CN107426875A (en) | A kind of amplitude dimming power source of constant-voltage LED light fixture group | |
CN111866930B (en) | Method and system for radio frequency signal detection based on machine learning | |
CN117351259A (en) | A non-intrusive load identification method based on binary V-I trajectory color coding | |
CN203259168U (en) | A specific optical signal detection circuit | |
CN116131947B (en) | Visible light communication device based on photovoltaic device | |
CN109673079B (en) | Silicon controlled rectifier dimming active bleeder control circuit | |
CN108982958B (en) | A Blind Source Separation Method of Single-channel Frequency Conversion Electric Signal Based on Wavelet Transform | |
CN117580209A (en) | Alternating current-direct current voltage sampling circuit of LED dimming driving power supply | |
CN109587883A (en) | A kind of apparatus and system that LED source is adaptive | |
Gaiotto et al. | An advanced measurement equipment for the tracing of photovoltaic panel I–V curves | |
CN209356876U (en) | A Digital Photovoltaic Array Simulator | |
CN104936330A (en) | LED driving power supply and LED illuminating device comprising the same | |
CN210721062U (en) | High-speed low-noise multichannel data acquisition equipment | |
CN203072192U (en) | LED fluorescent lamp with variable color temperature and control device | |
CN106357333A (en) | Special integrated circuit for transmitting terminal based on visible light communication | |
TWI385905B (en) | Photovoltaic simulation apparatus | |
CN221807243U (en) | Night light circuit and PD fast charging charger |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |