-
卷积神经网络[14](Convolutional Neural Networks, CNN)通过卷积运算完成神经网络的构建。通常CNN分为输入层、卷积层、激活层、池化层以及全连接层[15]。输入层对应室内照明设备的分布、照明区域人员分布、照明设备状态信号等。卷积层由物理量之间的量纲变化关系决定,从而建立各个输入层数据之间的计算模型。激活层常用函数包括Sigmoid函数、Tanh函数和ReLU函数,在文中采用ReLU函数,因为照明变化的特征量很弱,采用Sigmoid函数容易造成梯度消失问题,而采用Tanh函数的运算量大,对于大量照明源控制而言,其延时效果明显,故采用可以分段优化计算的ReLU函数更合理。
-
室内智能照明的核心是实现照明程度充足的前提下减少能耗,而照明充足是针对室内人员而言的,故快速获取人员位置与分布,并根据人员位置实时变化信息与位置分布信息完成照明系统照明强度的自动调节是研究的主要内容。故实现调节算法的第一个重要步骤是完成智能控制区域内人员的定位分离,以10.0 m×10.0 m的区域为例,将待测区域划分为三个尺度上的区域,分别是5.0 m×5.0 m、2.5 m×2.5 m、1.0 m×1.0 m。划分依据有两个,一是光源有效照明范围,二是光源之间的距离。所以划分区域以能够获取光照并且其权重系数不超过相隔一个光源为宜。每次数据采集后在迭代嵌套区域框后,会得到任意人员位置的三个锚定框,则限定区域边界条件可表示为:
$$ \left\{ \begin{gathered} {m_x} = \sigma \left( {{t_x}} \right) + {n_x} \\ {m_y} = \sigma \left( {{t_y}} \right) + {n_y} \\ \end{gathered} \right. $$ (1) 而对应点的高度与宽度位置可表示为:
$$ \left\{ \begin{gathered} {m_g} = {p_g}{{\rm e}^{{t_g}}} \\ {m_k} = {p_k}{{\rm e}^{{t_k}}} \\ \end{gathered} \right. $$ (2) 式中:tx , ty, tg, tk 是卷积神经网络预测的每个单元格上每个边界框的对应坐标值;x和y表示直角坐标系中其x与y的值;g和k表示高度值与宽度值;nx和ny表示目标在设定中心位置上的偏移程度; pg和, pk 表示高度与宽度对应的预测边界框。
预测网络的最小单元由卷积层、BN层和Leaky ReLU层组成。在卷积操作后添加批量归一化,再采用Compose 作为堆叠网络层解决梯度弱化的问题。
-
设 A 为归一化输入空间,并将 A 划分为相等的网格。划分的网格交点数记为Pj (j= 1, 2, ···, L),对应的权重为qj。则封闭球体空间定义[16]为:
$$ U = \left\{ {x\left| {\left\| {x - {P_j}} \right\| \leqslant {R_b},x \in A} \right.} \right\} $$ (3) 式中:Rb表示封闭球体的半径,其范围为(0, 1)。同时,定义球面上的高斯函数为:
$$ {g_{j({x_k})}} = \exp \left( {\frac{{{{\left\| {x - {P_j}} \right\|}^2}}}{{{\sigma ^2}}}} \right) $$ (4) 式中:x为任何点;σ=2.5。
在该封闭空间中,以活动节点为中心的封闭球体的误差补偿函数为:
$$ {y_k} = {S_k}\left[ {{b_1},{b_2},\cdots,{b_L}} \right]{\left[ {{q_1},{q_2},\cdots,{q_L}} \right]^{\text{T}}} $$ (5) 式中:bL由公式(4)计算得到;q为权重系数向量;Sk为权重系数。由此对区域内所有点进行分类,就能将人员位置精确到区块化中的最小单元,并根据实时变化进行迭代。
-
当获取人员位置时,就可以根据人员位置构建最佳视觉照明强度分布函数,从而将光强调节至最优能耗比。首先,设一次采样在 (x, y) 点的光照强度定义为:
$$ {I^{\left( i \right)}}\left( {x,y} \right) = \sum\limits_t {{u^{\left( i \right)}}\left( {x,y,t} \right)} $$ (6) 式中:i表示采样次数;u表示波场;t表示时间。N次拍摄的光源照度可以看作是单次拍摄的照度之和:
$$ {I_{\rm total}}\left( {x,y} \right) = \sum\limits_{i = 1}^N {{I^{\left( i \right)}}\left( {x,y} \right)} $$ (7) 通过累积求和的方式获取目标位置的光照强度总量就可以计算得到该区域的光能是否符合照明需求,同时得到最优的照明位置及功耗比例,从而实现智能调节。
-
为了验证区域内照度符合设计要求,采用PIC-300 AW型照度计,照度测试范围1~200 klx,测量精度为±4%。实验室顶棚横纵方向分别为x和y,以2.0 m间距分别悬挂相同LED照明光源,整个测试用房间为100 m2 (10 m×10 m),对应16个LED。则照度测试共四种情况,如图3所示。
无论人员的位置在何处都可以被视为图3中四种情况中的一种。第一位置表示正对某一个灯,第二位置表示两个灯(x轴或y轴方向)连线上,第三位置表示两个灯(x轴与y轴的对角线上)连线上,第四种表示介于两个灯与中点O的三角形中。不同位置照明强度测试结果如表1所示。
表 1 不同测试位置的照度测试值
Table 1. Illumination test values of different test positions
LED Illuminance value/lx P1 P2 P3 P4 1 m 1 41 41 114 63 2 86 42 110 102 3 85 168 117 86 4 263 164 115 207 Total 475 415 456 458 measured 382 325 362 361 2 m 1 17 22 81 43 2 54 21 87 87 3 57 119 83 56 4 177 115 86 152 Total 305 277 337 338 measured 247 222 272 271 注:P表示Position,序号见图3。 由表1数据可知,距离最近为1 m时的测试值,最大为263 lx,总照度值最大值为475 lx,实测最大值为382 lx。对所有合计值与实测值进行分析可知,合计值的80%约为实际值,分析认为单个LED的测试值之和明显大于合计值,这是因为每次单个LED测试时,照度测试计都是截面法向与测试LED共线的,而实测时,照度计是水平放置的,所以存在入射角度对其的影响。不过由于其测试数据存在线性比例关系,所以不影响测试效果。从位置1、2、3、4的测试结果可以看出,随距离变化的照度增加量与距离值约成二次方量级变化关系。
-
在确定了照度值分布以后,只需要将人员位置找到,就可以通过神经网络进行迭代,将所有人员位置对应区域的照明度调节至适宜值后关闭其他位置的光源,从而达到智能照明的目的。人员位置实际值与测试计算值的对比如图4和图5所示。
测试空间分为x轴与y轴两个方向,图4表示x轴方向上人员位置的计算值与实测值,图5表示y轴方向上人员位置的计算值与实测值。由测试数据可以看出,计算值曲线分布与实测值曲线分布基本一致,个别位置略有偏差,x轴方向最小误差为6 cm,最大误差为−96 cm,y轴最小误差为4 cm,最大误差为91 cm。可见计算效果最差时也优于100 cm,小于一个照明单元的半径值,所以,该计算值对于完成基于该照明单元的定位时符合设计要求。
-
为了验证算法的时效性,分析了当光源总量及人员总量发生大幅变化时算法的收敛速度,从而验证算法在实时调节照明强度与变化速度方面,对待测区域人员的视觉效果的影响程度。测试方法是将算法计算中两个主要输入参量进行增量变化,然后与传统人工神经网络(ANN, Artificial Neural Network)算法进行相同数据量计算时的收敛时间进行对比,光源量变化与收敛时间的对应关系如图6所示,人员量变化与收敛时间的对应关系如图7所示。
由图6可以看出,当光源总量增大时,收敛时间会有一定的增幅,小于300个光源时,收敛时间低于0.5 s,而超过800个时,收敛时间增速变慢,约为0.95 s。虽有一定增幅,但是从换算光源数可知,该数量的光源可以等效照明面积非常大,总计处理速度约1 s左右是能够满足实际应用需求的。
由图7可以看出,测试数据是以大约300个光源(约20个拟控制房间)为准,对人数增量与收敛时间的关系进行了分析。随着人数的增多,收敛时间有所增加,但是两种算法的增加时间都很小,都在0.2 s以内,基本可以忽略,说明收敛控制主要还是受光源总量的影响较大。
Intelligent adjustment system of indoor lighting based on deep learning
-
摘要: 为了实现室内照明的智能控制,根据室内人员实时位置进行跟踪式照明,通过人员覆盖区域完成自适应亮度调节,达到总体节能且局部照明舒适的目的。设计了基于光纤传感网络的智能照明系统,提出了基于深度学习的照明区块化设计与人员实时定位的照明调节算法。区块化设计将照明区域划分成多个等尺寸子区域,划分尺度由光源覆盖间距决定,实现对照明区域的离散处理。再通过状态采集模块对每个子区域进行照度量化分析,将检测结果作为卷积网络输入层的控制参数导入分析模型中。结合封闭体人员定位算法实现对照明子区域定位及照度调节。实验测试了100 m2照明范围内的四种典型情况,获得了各LED对测试位置的照度权值,并测试了不同高度对照度值的影响程度。区域内在x轴方向的人员定位精度最大误差为−96 cm,在y轴方向为91 cm,均小于预设照明区块的最小单元。文中算法在LED个数递增时,收敛时间略优于ANN算法,与对应LED体量的照明空间相比,收敛时间满足应用需求,验证了其具有大范围照明智能调节的能力。Abstract: To achieve intelligent control of indoor lighting, tracking lighting is performed according to the real-time position of indoor personnel, and adaptive brightness adjustment is completed through the coverage area of personnel, so as to achieve the purpose of overall energy savings and comfortable local lighting. An intelligent lighting system based on a fiber optic sensor network is designed, and a lighting adjustment algorithm based on deep learning lighting block design and real-time positioning of personnel is proposed. The block design divides the lighting area into multiple equal-sized subareas, and the division scale is determined by the light source coverage interval to realize the discrete processing of the lighting area. Then, through the state acquisition module to perform quantification analysis on each sub-region, the detection results are imported into the analysis model as the control parameters of the input layer of the convolutional network. The closed-body personnel positioning algorithm is combined to realize the positioning of the lighting subarea and the illuminance adjustment. The experiment tested four typical situations within the illumination range of 100 m2, obtained the illuminance weight value of each LED on the test location, and tested the degree of influence of the illuminance value of different heights. The maximum error of personnel positioning accuracy in the x-axis direction in the area is −96 cm, and it is 91 cm in the y-axis direction, both of which are smaller than the minimum unit of the preset lighting block. When the number of LEDs increases, the convergence time of this algorithm is slightly better than that of the ANN algorithm. Compared with the lighting space of the corresponding LED volume, the convergence time meets the application requirements, verifying its ability to intelligently adjust lighting over a large range.
-
Key words:
- intelligent lighting /
- optical fiber sensing /
- deep learning /
- block design
-
表 1 不同测试位置的照度测试值
Table 1. Illumination test values of different test positions
LED Illuminance value/lx P1 P2 P3 P4 1 m 1 41 41 114 63 2 86 42 110 102 3 85 168 117 86 4 263 164 115 207 Total 475 415 456 458 measured 382 325 362 361 2 m 1 17 22 81 43 2 54 21 87 87 3 57 119 83 56 4 177 115 86 152 Total 305 277 337 338 measured 247 222 272 271 注:P表示Position,序号见图3。 -
[1] 敬舒奇, 魏东, 王旭, 等. 室内LED照明控制策略与技术研究进展[J]. 建筑科学, 2020, 36(6): 136-146. Jing S Q, Wei D, Wang X, et al. Research progress of indoor LED lighting control strategies and technologies [J]. Building Science, 2020, 36(6): 136-146. (in Chinese) [2] Tang S, Kalavally V, Ng K Y, et al. Development of a prototype smart home intelligent lighting control architecture using sensors onboard a mobile computing system [J]. Energy & Buildings, 2017, 138: 368-376. [3] Silver D, Huang A, Maddison C J, et al. Mastering the game of Go with deep neural networks and tree search [J]. Nature, 2016, 529(7587): 484-489. doi: 10.1038/nature16961 [4] Patorski K, Trusiak M, Tkaczyk T. Optically-sectioned two-shot structured illumination microscopy with Hilbert-Huang processing [J]. Opt Express, 2014, 22(8): 9517-9527. doi: 10.1364/OE.22.009517 [5] Kandasamy N K, Karunagaran G, Spanos C, et al. Smart lighting system using ANN-IMC for personalized lighting control and daylight harvesting [J]. Building and Environment, 2018, 139: 170-180. doi: 10.1016/j.buildenv.2018.05.005 [6] Nagy Z, Yong F Y, Schlueter A. Occupant centered lighting control: A user study on balancing comfort, acceptance, and energy consumption [J]. Energy and Buildings, 2016, 126: 310-322. doi: 10.1016/j.enbuild.2016.05.075 [7] Paulauskaite-Taraseviciene A, Morkeviciu N, Janaviciute A, et al. The usage of artificial neural networks for intelligent lighting control based on resident’s behavioural pattern [J]. Elektronika Ir Elektrotechnika, 2015, 21(2): 72-79. [8] Wen Y J, Agogino A M. Personalized dynamic design of networked lighting for energy-efficiency in open-plan offices [J]. Energy & Buildings, 2011, 43(8): 1919-1924. [9] Cheng Z, Zhao Q, Wang F, et al. Satisfaction based Q-learning for integrated lighting and blind control [J]. Energy & Buildings, 2016, 127: 43-55. [10] Yin Z D, Jiang X, Yang Z T, et al. WUB-IP: A high precision UWB positioning scheme for indoor multiuser applications [J]. IEEE Syst J, 2019, 13(1): 279-288. doi: 10.1109/JSYST.2017.2766690 [11] Wu Y, Jiang B, Lu N. A descriptor system approach for estimation of incipient faults with application to high-speed railway traction devices [J]. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2019, 49(10): 2108-2118. doi: 10.1109/TSMC.2017.2757264 [12] Xiao B, Lin Q, Chen Y. A vision-based method for automatic tracking of construction machines at nighttime based on deep learning illumination enhancement [J]. Automation in Construction, 2021, 127: 103721-1-13. doi: 10.1016/j.autcon.2021.103721 [13] 郭俊凯. 公路隧道照明精确检测与智能控制系统研究[J]. 隧道建设, 2020, 40(2): 76-81. Guo J K. Study on lighting accurate detection and intelligent control system in highway tunnel [J]. Tunnel Construction, 2020, 40(2): 76-81. (in Chinese) [14] 高淑芝, 李天池. 基于单片机的教室照明智能控制系统设计[J]. 控制工程, 2020, 27(11): 2010-2015. Gao S Z, Li T C. Design of intelligent control system of classroom lighting based on single chip microcomputer [J]. Control Engineering of China, 2020, 27(11): 2010-2015. (in Chinese) [15] 霍一, 马晓轩. ZigBee与神经网络的智能节能照明控制系统设计[J]. 现代电子技术, 2020, 43(20): 61-66. Huo Y, Ma X X. Design of intelligent energy-saving lighting control system based on ZigBee and neural network [J]. Modern Electronics Technique, 2020, 43(20): 61-66. (in Chinese) [16] Pandharipande A, Newsham G R. Lighting controls: Evolution and revolution [J]. Lighting Research & Technology, 2018, 50(1): 115-128.