MATLAB在低碳的室內裝潢燈光照明的應用

來源:互聯網
上載者:User

問題描述,一個10*4*3的房間只配備300Watt的照明功率,要如何掛載燈泡使得燈光可以均勻的散布在房間各個角落,假定只是空房間,燈泡的使用個數不限,但功率的總和不超過300Watt。衡量亮度的指標是Watt/㎡

 

使用一個燈,要照亮各個角落當然要掛載天花板的最中間,也就是座標(5,2)

1

可看出一個300Watt的燈泡其燈光分布情況很不均勻,差距很大,所以不是最佳的方案

 

使用兩個燈泡,當然是要放在y=2這條線上了,但最佳座標需要算一下

 

其最暗的角落(0,0)和最亮的地方(5,2)隨這燈泡移動的軌跡如下

可見在1.06和8.9的地方有交叉,則最優的點就是(1.06,2)和(8.9,2)。

 

三個燈泡的時候

曲線:

 

無最優解

 

 

附上代碼:

syms x y;
light1=300/(4*pi*((x-5)^2+(y-2)^2+3^2));
ezcontourf(light1,[0 10 0 4]);
colormap(gray);
axis equal tight;

[x,y]=meshgrid(0:0.1:10,0:0.1:4);
light2=inline('150/(4*pi*((x-d)^2+(y-2)^2+3^2))','x','y','d');
light2=vectorize(light2);
figure;
contourf(light2(x,y,2)+light2(x,y,8),50);
colormap(gray);
axis equal tight;

intensity_corner=[];
for d=0:0.1:10
    intensity_corner=[intensity_corner light2(0,0,d)+light2(0,0,10-d)];
end

intensity_center=[];
for d=0:0.1:10
    intensity_center=[intensity_center light2(5,2,d)+light2(5,2,10-d)];
end
figure;
plot(0:0.1:10,intensity_corner);
hold on;
plot(0:0.1:10,intensity_center,'r-');

optimal=solve('150/(4*pi*((0-d)^2+(0-2)^2+3^2))+150/(4*pi*((0-(10-d))^2+(0-2)^2+3^2))=150/(4*pi*((5-d)^2+(2-2)^2+3^2))+150/(4*pi*((5-(10-d))^2+(2-2)^2+3^2))','d');
optimal=double(optimal);

optimal_intensity=light2(0,0,optimal(1))+light2(0,0,10-optimal(1));

light3=inline('100/(4*pi*((x-d)^2+(y-2)^2+3^2))','x','y','d');
light3=vectorize(light3);
figure;
contourf(light3(x,y,1)+light3(x,y,9)+light3(x,y,5),50);
colormap(gray);
axis equal tight;

test_intensity_corner=light3(0,0,1)+light3(0,0,9)+light3(0,0,5);
test_intensity_center=light3(5,2,1)+light3(5,2,9)+light3(5,2,5);

intensity_corner3=[];
for d=0:0.1:10
    intensity_corner3=[intensity_corner3 light3(0,0,d)+light3(0,0,10-d)+light3(0,0,5)];
end

intensity_center3=[];
for d=0:0.1:10
    intensity_center3=[intensity_center3 light3(5,2,d)+light3(5,2,10-d)+light3(5,2,5)];
end
figure;
plot(0:0.1:10,intensity_corner3);
hold on;
plot(0:0.1:10,intensity_center3,'r-');

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.