Вы находитесь на странице: 1из 11

Chapter 3.

The Illumination Problem


S. Barton and D. Gruntz

3.1 Introduction
In this article we consider a horizont al road illuminated by two lights , where Pi
is th e illumination power and hi the height of a lamp. The coordinates of th e
lamps are (0, hl) and (8, h2 ) where 8 is the horizont al dist ance between th e
two light sources. Let X = (x, 0) be a point on t he road somewhere between
th e two light s. In this chapte r we will look for a point X which is minimally
illuminated. In Figure 3.1 we have made a sketch of the situation we will refer
to later in this chapte r.

FIG URE 3.1. Illumination Problem Description.


P2

P1

h2
r2

h1 r1

o x

In t he first section we will find X given th e height and th e inte nsity of both
lamps. In th e second section we will maximize th e illumination at X by varying
th e height of the second lamp. In th e last section we will go even further and
optimize th e illum ination at X with respect to the heights of both lamps. In
effect , we will opt imize th e illumination of th e road by varying t he heights of
th e lamps.

W. Gander et al., Solving Problems in Scientific Computing Using Maple and MATLAB®
© Springer-Verlag Berlin Heidelberg 2004
40 S. Barton and D. Gruntz

3.2 Finding the Minimal Illumination Point on a Road


In t his secti on we look for th e minimall y illumi nated point X between t he two
light sources. It is known from physics, t hat th e light int ensity depends on the
inverse value of the square of the distance to the light source and on the impact
angle of the light rays, see [1, 2J.
The dist ance from X to th e first light source is x and to th e second one
8 -X. Using th e Pythagorean theorem we can determine r l and r 2 , th e dist an ces
from X t o th e two light sources,

The light int ensiti es from t he two lamps at X are given by

If the impact angles of t he light rays are a l and a 2, the road illumination
depends on sin a l and sin a 2 which are given by

Thus t he total illuminat ion C( x) at th e point X is

By minimizing C(x ) for 0 :::; x :::; 8 we get t he coordinat es of X . To find th e


minimum we can simply take the derivative of C(x) and find its roots. We will
at te mpt t his using MA PL E .
> 8[1] := P[1]*h[1]/(h[1r2 + x~2)~(3/2) :
> 8[2] := P[2]*h[2]/(h[2]~2 + (5 - x) ~2)~(3/2) :
> C := 8[1] + 8[2] :
> dC : = diff(C , X)j
PI b, x 3 P2 h2 ( - 2 8 + 2 x)
dC := - 3 (h12 + X2)5/2 - "2 (h 22 + (8 _ x )2)5/2
> 501ve(dC=O,x):
If you try this comma nd, you will see that MAPLE will never ret urn an answer.
Using algebra ic manipulations, t he equation dC = 0 can be transformed into
a polynomi al equation in x . In parti cular we will move one of the terms of
th e equation to the right hand side, squa re both sides, move th e right hand
side back t o t he left and writ e th e expression over a common denomin ator. We
observe th at th e numerato r must be zero.
Chapter 3. The Illumination Problem 41

> eq : = diff(S[l] , x) -2 - diff(S[2] , x)-2;

P I 2h I 2 X2 9 P22 h 22 (- 2 8 + 2 x )2
eq := 9 (h12 + X2)5 -"4 (hl + (8 _ X)2 )5
> eq : = collect (primpart(numer(eq», x);
The result of the last comma nd is a degree-12 polynom ial in x,

This polynomi al is difficult to solve in closed form without specifying th e con-


st ants .
We consider t he following numerical values: PI = 2000 [W] , P2 = 3000 [W],
hI = 5 [m], h 2 = 6 [m] and 8 = 20 [m] . The functions G(x) , G'(x) == dC ,
SI(X) and S2(X) (th e illumination intensities on th e road implied by each lamp
separ ately) can be plotted using MAPLE, see Figure 3.2. An int erval cont aining
the zero of the function G' (x) can be picked off from th is graph . We will use
this int erval to determine X using fsolve .

FIG URE 3.2. Illumin ation as a Function of the Position.

> P[l] := 2000 : P[2] : = 3000 : s : = 20 : h[l] := 5: h[2] := 6:


> plot({C, S[l], S[2], dC}, x = -5/2 . . 5*3/2) ;
42 S. Barton and D. Gruntz

> Xm := fso lve (dC = 0 , x , 5 . . 10 ) ;


Xm := 9.338299136
> Cmin .= subs (x = Xm , C) ;
Cmin := 18.24392572
> Xe : = f so lve (8 [1] 8 [2], x, O. • 5);
Xe := 9.003061731
> dX .= Xm - Xe;
dX := .335237405
It is int eresting to note, t hat the position X differs from the point X e which is
equally illuminated from both lamps.
For th is numeri cal example we can also determine the point X directly. We
can apply the s ol ve command to Equation (3.2) and obtain an algebraic num-
ber defined by a degr ee-12 polynomial with integer coefficients. Real (physical)
solutions correspond to points between the two light sources .
> sol : = [solve (eq, x)] :
> s ol f : = se l ect( t -> t ype (t , numer ic ) and t > 0 and t < 5,
> evalf (sol ) ) ;
solf := [.02848997038, 9.338299136, 19.97669581]
MAPLE returned three extremes, and it is necessary to determine which solution
is a minim um.
> map(t -> i f subs( x = t, diff(dC , x)) < 0
> then max el se min f i , solf) ;
[m ax , min, max ]
> map (t - > subs (x =t , C), solf) ;
[81.98104008, 18.24392572, 84.47655488]
As can be seen the same result was obtained for X , namely x = 9.338299136.
Notic e that the maximal illuminated points are located near the two lamps and
not immediately beneath them .

3.3 Va rying h2 to M aximize the Illumination


In this section we use the same num erical values as in the previous one but
consider the height of the second light source as a variable and maximize the
illumination at X . Hence C( x , h2 ) is a function of two variables.
As a first step, we find the function x(h 2 ) such th at

To do so, we vary h 2 from 3 [m] to 9 [m] and resolve the problem for each value
of h2 as in the last section.
> h [2] : = 'h [2]':
Chapter 3. Th e Illumination Problem 43

> H2 := array(0 . . 30): # array for the values of h[2]


> X := array(0 .. 30) : # array for the values of x(h[2])
> for i from 0 to 30 do
> H2[i] := 3 + 6*i/30:
> X[i] := fsolve(subs(h[2]=H2[i] , dC) , x, s/4 . . 3*s/4):
> od :
> H2 := convert(H2, list):
> X := convert(X, l ist) :
Figure 3.3 is a plot of x (h2 ) generated with t he following command:
> plot(zip«h2, x) -> [h2, x], H2, X» ;

FIGURE 3.3.
x-Coordinate of the Minimal Illum inated Point for
3 ~ h2 ~ 9.

9.8

9.7

9.4

3 4 5 6 7 8 h2 9

We will plot C (x , h2 ) as a 3-dimensional plot and overlay it with t he space curve


C (x (h2 ) , h2 ) of t he points with minimal illuminat ion. As expected, the space
curve lies in t he valley of C (x , h2 ) .
> f := unapply(C, x, h[2]) :
> Cu : = [seq([X[i] , H2[i] , f(X[i], H2[i])], i 1 . . 31) ]:
> with(plots):
> PLI := space curve (Cu, thickness = 2):
> PL2 := plot3d(subs(h[2] = h2 ,C), x = -s/2 . . 3*s/2, h2 3 . . 9,
> style = wireframe):

> display({PL1 , PL2}) ;


44 S. Barton and D. Gruntz

FIGURE 3.4. Illumination Function C(x , h 2 ) .

300

250

200

150
3
100 4
5
50 6 h2
7
30 8
20 10
x o . -10 9

As a second step we find the point of maximal illuminat ion on the cur ve x(h 2 ) .
This point is among t he stationary points of the function C( x , h2 ) , i.e. among
the points where the gradient of C( x , h2 ) becomes zero.
> wi th (linalg) ;
> g ; = grad( C, [x, h [2]]);

> Sol ;= f s olve ({g [l] = 0 , g[2] = O}, {x, h [2]} ,


> {x = O. • s , h[2] = 3 . . 9});
Sol := {x = 9.503151310, h 2 = 7.422392890}
In order to verify that t his solution is a maximum we look at the eigenvalu es of
th e Hessian of C( x , h2 ) at the above point.
> H ; = subs(Sol , hes s i an (C, [x, h [2] ]»;
H '= [1.056539134 - .1793442077 ]
. - .1793442077 - .2536310107
> eigenvals(H);
Chapter 3. Th e Illumination Problem 45

-.2777372198, 1.080645343
T he different signs of th e eigenvalues t ell us th at we have found a saddle point.
Since H[l , 1] = fPCjf)x 2 == 1.06 > 0 we have a minimum in x-direct ion, and
since H[2 , 2] = f)2C j f)h2 2 == - 0.25 < 0 we have a maximum in h 2-dir ection,
hence we found what we were looking for, namely the maxim ally illuminated
point among all minimally illuminat ed points (x(h 2 ) , 0).
Note that we can analyt ically solve the second equat ion g 2 = 0 for h 2 in our
num erical example.
> {solve(g[2] = O. h[2])};
1 1
{-2 V2 (-20 + x ), 2V2 (-20 + x )}
This means that for t he optimal height of the second lamp, t he imp act angle a2
is given by
> tan(alpha[2]) = normal(%[l]/(s-x)) ;
1
tan (a 2) = 2 V2
> evalf(arctan(rhs(%))) ;
.6154797085
> evalf(convert(%. degrees));
35.26438965 degrees
or a 2 = 35° 15' 51.8028".

3.4 Optimal Illumination


It is very important to have a homogeneous illumination on a road . This prob-
lem cannot be solved using point-light sour ces. We will always obtain a maxi-
mal illumination ben eath t he light sources and a minimum somewhere between
th em. But for lamps of a given illumination and a given sepa ra tion we can
maximize the illumination of th e minim ally illuminated point by adj usting th e
heights of th e light sources. We will consider this problem in t his secti on.
T he total illuminat ion C (x, hI , h2 ) is now a function of t hree vari abl es. T he
minimal illuminat ed point is agai n, as in lower dimensions , determined by th e
roots of th e gra dient of C. We t ry to find a general solution; in MAPLE t his
mean s unassigning t he var iables we used for th e num erical exa mple.
> r-tn := 'P[l]': P[2] := 'P[2] ' : h[l] := ' h [ l ] ' :
> h[2] := 'h[2]' : s := ' s' :
> g := grad Cc , [x , h[l]. h[2]]);
PI hI X 3 P2 h 2 ( - 2 s + 2 x )
g := [ -3 (h 12 + X2)5/2 - 2 (h22 + (s - x F )5/2'
2 2
PI 3 PI h I P2 3 P2 h 2 ]
(h1 2
+ x 2)3/2 - (h12 + X2)5/2 ' (hl 2
+ (s - XF )3/2 - (h2 + (s - XF )5/2
46 S. Barton and D. Gruntz

To simplify the next comput at ions we sha ll subs titute s - x =a and we convert
the vector variable 9 into a list.
> g := subs(s = sigma + x , convert(g, list));
Plhl X 3 P2 h 2 a
g := [ -3 (h12 + X2)5/2 + (hl + ( 2)5/2'
2
PI 3 PI h 1 P2 3 P2 hl ]
(h1 2
+ x 2)3/2 - (h1 2 + X2)5/2' (hl + ( 2)3/2 - (hl + ( 2)5/2
MAPLE can not solve ana lyt ically for the roo ts of the system of equat ions 9 = O.
However , we can solve the second equation for hI and the third for h2 •
> shl := {solve(g[2] = 0, h[l])};
1 1
shl := {2" V2 x, -2" V2 x}
> sh2 := {solve(g[3] = 0, h[2])} ;
1 1
sh2 := {2" V2a, - 2" V20-}
We ar e int erested in positive values only since it is rather unusual to illuminate
a road from below.
> ho[l] : = remove(has, shl, -1/2)[];
1
ha l ,' = -2 V2 x
> ho[2] := remove(has, sh2, -1/2)[];
1
ho 2 := - V2a
2
Not e that the optimal height for each lamp is independent of the illumination
power. This result defines the geometry! Hence t he impact angles are th e same
as the one we compute d in Sect ion 3.3, namely

t an o - = tan o -,
V2
=2 ::::} al = a2 = 35° 15' 51.8028".
By sub stituting the optimal heights into gl we can find the overall solution. We
assign the real solution to the variable Xo since it is the only physically realistic
solution.
Q := simplify(subs(h[l] = ho[l], h[2] = ho[2], g[l]),symbolic);
Q := _~ V3 (PI 0- 3 - 3
P2 x )
9 x 3 0- 3
> q := subs(P[1] = p[1J-3, P[2] = p[2]-3,
> select(has, numer(Q), P[l])) = 0;
3 3 3
x3 = 0
q : = P 1 0- - P 2
> q : = map(u -> simplify((u + p[2] -3*x-3) -(1/3), symbolic), q);
a = P2 X
q := PI

> q .= subs(sigma = s - x, p[l] = P[1]-(1/3),


> p[2] = P[2]-(1/3), q) ;
q := P l l / 3 (s - x) = P2 l / 3 X
Chapt er 3. Th e Illumination Problem 47

The equation q = 0 can be solved directl y using th e commands


> Xo := 801ve(q = 0, x);
Pl l / 3 8
X o := 1/ 3 1/ 3
PI +P2
The solution can be interpreted as follows: The maximum illumination of th e
minimally illuminated point is obtained if t he quotient of th e dist ances x and
8 - x is equa l to t he quotient of th e cube roots of the light powers. In other
words: The maximum possible illumination of th e minimally illuminated point
is reached if th e volume densities of t he illuminating powers ar e equal.
Let us plot t he optimally illum inated point Xo as a function of th e power
of the light sources for the case 8 = 20. We will then det ermine t he optimal
heights for t he case PI = 2000 and P2 = 3000
> 8 := 20:
> plot3d(Xo, P[1] = 0 . . 2000, P[2] = 0 . . 3000,
> orientation = [110, 60], axe8=BOXED) ;
> P[1 ] := 2000 : P[2] := 3000: x := Xo:
> h [1] : = evalf (ho [1] ) ;
b , := 6.593948668

> h[2] : = evalf(ho[2]) ;


h2 := 7.548186950

As we can see from Figure 3.5, for a wide range of power values th e optimal
illuminated point Xo is around 8/ 2 = 10. This can also be seen by comparing
the valu es of Xo and Xm , the position of minimal illumination compu ted in the
first secti on. Th e relat ive difference is
> evalf( (Xm - Xo)/Xm ) ;
.0013972025

but t he relative difference of th e illuminations is


> evalf( (C - Cmin)/Cmin );
.040658247

which is about 30 times larg er.


F inally in Fig ure 3.6 we will compare the optimal solution Cop with t hat of
Section 3.2 where we used the fixed heights hI = 5 and h 2 = 6.
> Cop := evalf(C);
Cop := 18.98569176

> x := ' x ' : Cop := C: h[1] := 5 : h[2] := 6 :


> plot({C, Cop}, x = -8/2 .. 3*8/2);
S. Bar ton an
48 d D. Gru n tz

F IGU R E 3.5 . Xo as
a Fun ct ion of
P I an d P

F IG UR E 3.6 . Th e O
p tim al Illum
in ati on .
Cin

801L, I
/--\
I ,
I \ I ,
I
f ' : ,
\
\ I
\
;
I
\ I
I
I
I
\
\
\
\
I
I \
,,
I \
I \ I \
\ \

I
I
: 60 \
\
, I
\
\
\
\
I \ : COP
I I \
I
I
I
\
\
\
\ I
, I
\
\
\

I
I
I
\
\ ,
I
I \
\
\ I \
\
: 40 I \
\
I \ I
\
! \
I
I
\
I
: \ I \
\
\
/ \
\
I
II /
I
\
I " ' /, '
I ' \
I '
\
I
20 " ~"

"
.--~.\---
-----------
.10
0
10 --------~ 20 30
Chapter 3. The Illumination Problem 49

3.5 Conclusion
Based on our computations we can make some recommendations to persons
involved with illumination.

• If we insert X 0 into the optimal heights then they depend on the light
powers H, P2 and the distance s only.

• For the special case PI = P2 the optimal height for both lamps is

References
[1] M . E. GETTYS and F . J . KELLER, Classical and modern Physics, Me. Graw
Hill, 1989.
[2] R . G. LERNER and G. L . TRIGG, Encyclopedia of physics, VCH Publishers,
New York, 1991.

Вам также может понравиться