Light in Planar Stratified Media - part 1

ECE 5368/6358                                            han q le - copyrighted
Use solely for students registered for UH ECE 6358/5368 during courses - DO NOT distributed (copyrighted materials)

Part 2

7. Bragg reflector: dielectric stack

A very special application of thin film is dielectric reflector/transmitter of arbitrary value, or what we more commonly call “mirror”. But we see that no metal mirrors will able able to give the high reflectivity some times required, e. g. 99.999%. We'll see that a Bragg reflector, like a Bragg grating, will do that. The application is not just for “mirror” in the common sense. A metal mirror just reflects, but the transmitted part is not for any application.
Here, Bragg reflector is really a band-reflected filter: it reflects light strongly (e. g. 99.999...%) for wavelength in a certain range, and transmit the same for wavelength out of that range.

More generally, the physics of this is the propagation of waves in periodic structure. This is the case of one-dimension we consider here, but it can be applied to more than 1-D and is known as photonic crystal or photonic band gap structure.

7.1 General periodic structure (link)

7.1.1 Discussion

We consider the general formalism of a periodic structure with transfer matrix: 
S=(({{(Subscript[s, 11]), (Subscript[s, 12])}, {(Subscript[s, 21]), (Subscript[s, 22])}})).
Then the response of a structure with M such periods is simply (S^M).

By a theorem, we can use the Tchebychev polynomials:    
      (S^M)=(({{(Subscript[s, 11])(Subscript[U, M-1])(γ)-(Subscript[U, M-2])(γ), (Subscript[s, 12])(Subscript[U, M-1])(γ)}, {(Subscript[s, 21])(Subscript[U, M-1])(γ), (Subscript[s, 22])(Subscript[U, M-1])(γ)-(Subscript[U, M-2])(γ)}})) 
where γ is the average of the two eigenvalues, and (Subscript[U, M]) are the Tchebychev polynomials. (Subscript[U, M])[Cos[θ]]=((Sin[(M+1)θ])/(Sin[θ]))

However, there is a problem of using Tchebychev with Mathematica for numerical purpose. It is not very practical with large M because of numerical errors, and the generation of the polynomials is generally quite slow in mathematica and other softwares as well (check time on ChebychevU generation for large N). Inverse Cos and Sin then are used but this becomes the same as the power marix method.
An alternative is the power matrix method, which is a simpler, faster, and more robust numerical method. Thus, in this case we write:
S= Inverse[(({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))] . (({{λ, 0}, {0, (λ^(-1))}})) . (({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}})) 
where λ can be purely real or imaginary (e^(i θ)) (more generally, any thing) (remember that we assume Det[S]=1)
Then the S matrix of the entire M periods is:
(S^N) = Inverse[(({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))] . (({{(λ^N), 0}, {0, (λ^(-N))}})) . (({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))

Inverse[(({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))] . (({{(λ^N), 0}, {0, (λ^(-N))}})) . (({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))

We assume that the C matrix is scaled such that det[(({{(Subscript[c, 11]), (Subscript[c, 12])}, {(Subscript[c, 21]), (Subscript[c, 22])}}))]=1.

(({{(((λ^N) (Subscript[c, 11]) (Subscript[c, 22]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))-(((λ^(-N)) (Subscript[c, 12]) (Subscript[c, 21]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21]))), (((λ^N) (Subscript[c, 12]) (Subscript[c, 22]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))-(((λ^(-N)) (Subscript[c, 12]) (Subscript[c, 22]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))}, {(((λ^(-N)) (Subscript[c, 11]) (Subscript[c, 21]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))-(((λ^N) (Subscript[c, 11]) (Subscript[c, 21]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21]))), (((λ^(-N)) (Subscript[c, 11]) (Subscript[c, 22]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))-(((λ^N) (Subscript[c, 12]) (Subscript[c, 21]))/((Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])))}})) /. (Subscript[c, 11]) (Subscript[c, 22])-(Subscript[c, 12]) (Subscript[c, 21])->1

7.1.2 Reflectivity

We can apply results to obtain the reflection and transmission of the structure. Let the input and medium be the same:

SM=(({{(λ^N) (Subscript[c, 11]) (Subscript[c, 22])-(λ^(-N)) (Subscript[c, 12]) (Subscript[c, 21]), (λ^N) (Subscript[c, 12]) (Subscript[c, 22])-(λ^(-N)) (Subscript[c, 12]) (Subscript[c, 22])}, {(λ^(-N)) (Subscript[c, 11]) (Subscript[c, 21])-(λ^N) (Subscript[c, 11]) (Subscript[c, 21]), (λ^(-N)) (Subscript[c, 11]) (Subscript[c, 22])-(λ^N) (Subscript[c, 12]) (Subscript[c, 21])}}))  ;
FullSimplify[Solve[SM .(({{1, 1}, {I (Subscript[k, 0]), -I (Subscript[k, 0])}})).(({{1}, {r}}))==(({{1, 1}, {I (Subscript[k, 0]), -I (Subscript[k, 0])}})).(({{t}, {0}})),{r,t}]]

The reflection:
              r->((i ((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])) ((Subscript[c, 21])+i (Subscript[c, 22]) (Subscript[k, 0])) ((λ^(2 N))-1))/(((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0])) ((Subscript[c, 22]) (Subscript[k, 0])-i (Subscript[c, 21])) (λ^(2 N))+((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])) ((Subscript[c, 22]) (Subscript[k, 0])+i (Subscript[c, 21]))))
                    ((i  ((Subscript[c, 21])+i (Subscript[c, 22]) (Subscript[k, 0])) ((λ^(2 N))-1))/(((((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0])) ((Subscript[c, 22]) (Subscript[k, 0])-i (Subscript[c, 21])))/(((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])))) (λ^(2 N))+ ((Subscript[c, 22]) (Subscript[k, 0])+i (Subscript[c, 21]))))
                    ((  (-i  (Subscript[c, 21])+ (Subscript[c, 22]) (Subscript[k, 0])) (1-(λ^(2 N))))/(((((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0])) ((Subscript[c, 22]) (Subscript[k, 0])-i (Subscript[c, 21])))/(((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])))) (λ^(2 N))+ ((Subscript[c, 22]) (Subscript[k, 0])+i (Subscript[c, 21]))))
                      (( (1-(λ^(2 N))))/(((((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0])) )/(((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])))) (λ^(2 N))+ ((((Subscript[c, 22]) (Subscript[k, 0])+i (Subscript[c, 21])))/(((Subscript[c, 22]) (Subscript[k, 0])-i (Subscript[c, 21]))))))
                      -((((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])) )/(((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0])))) (((λ^(2 N))-1)/((λ^(2 N))+ ((((Subscript[c, 22]) (Subscript[k, 0])+i (Subscript[c, 21])))/(((Subscript[c, 22]) (Subscript[k, 0])-i (Subscript[c, 21]))))((((Subscript[c, 11])+i (Subscript[c, 12]) (Subscript[k, 0])) )/(((Subscript[c, 11])-i (Subscript[c, 12]) (Subscript[k, 0]))))))
Notice that if |(λ^(2 N))|-> 0, or |(λ^(2 N))|-> ∞, |r|-> 1
In other words, if the magnitude of the eigenvalue of S differs from 1, then the magnitude of reflectivity approaches to 1 as N-> ∞. This is the concept of very strong reflectivity from a periodic structure, without even specify details of the period.

7.2 Bragg reflector S matrix

A Bragg reflector is a periodic dielectric structure that is usually designed 2 dielectric layers for each period, which is the simplest non-trivial design possible. 
Denote consisting of a layer of high index of thickness (Subscript[l, H]) and a layer of low index of thickness (Subscript[l, L]).
Then:
(Subscript[S, H])=(({{cos((Subscript[l, H]) (Subscript[k, H])), ((sin((Subscript[l, H]) (Subscript[k, H])))/(Subscript[k, H]))}, {-sin((Subscript[l, H]) (Subscript[k, H])) (Subscript[k, H]), cos((Subscript[l, H]) (Subscript[k, H]))}}))  ; (Subscript[S, L])=(({{cos((Subscript[k, L]) (Subscript[l, L])), ((sin((Subscript[k, L]) (Subscript[l, L])))/(Subscript[k, L]))}, {-sin((Subscript[k, L]) (Subscript[l, L])) (Subscript[k, L]), cos((Subscript[k, L]) (Subscript[l, L]))}}))  
The segment S matrix for each period is:

FullSimplify[(({{cos((Subscript[k, L]) (Subscript[l, L])), ((sin((Subscript[k, L]) (Subscript[l, L])))/(Subscript[k, L]))}, {-sin((Subscript[k, L]) (Subscript[l, L])) (Subscript[k, L]), cos((Subscript[k, L]) (Subscript[l, L]))}})) . (({{cos((Subscript[l, H]) (Subscript[k, H])), ((sin((Subscript[l, H]) (Subscript[k, H])))/(Subscript[k, H]))}, {-sin((Subscript[l, H]) (Subscript[k, H])) (Subscript[k, H]), cos((Subscript[l, H]) (Subscript[k, H]))}}))]

We can simplify a little:
       cos((Subscript[k, H]) (Subscript[l, H])) cos((Subscript[k, L]) (Subscript[l, L]))-((sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) (Subscript[k, H]))/(Subscript[k, L]))=
cos((Subscript[k, H]) (Subscript[l, H])) cos((Subscript[k, L]) (Subscript[l, L]))-sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L]))+sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L]))-((sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) (Subscript[k, H]))/(Subscript[k, L])) 
       =cos((Subscript[k, H]) (Subscript[l, H])+(Subscript[k, L]) (Subscript[l, L]))+sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L]))(1-(( (Subscript[k, H]))/(Subscript[k, L])) ) 
We will call (Subscript[k, H]) (Subscript[l, H])+(Subscript[k, L]) (Subscript[l, L])=Φ, which is the optical thickness of the period.
((cos((Subscript[k, L]) (Subscript[l, L])) sin((Subscript[k, H]) (Subscript[l, H])))/(Subscript[k, H]))+((cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])))/(Subscript[k, L]))=(1/(Subscript[k, H]))(cos((Subscript[k, L]) (Subscript[l, L])) sin((Subscript[k, H]) (Subscript[l, H]))+(( (Subscript[k, H]))/(Subscript[k, L])) cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])))
=(1/(Subscript[k, H]))(sin(Φ)- (1-(( (Subscript[k, H]))/(Subscript[k, L])) )cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])))
-cos((Subscript[k, L]) (Subscript[l, L])) sin((Subscript[k, H]) (Subscript[l, H])) (Subscript[k, H])-cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) (Subscript[k, L])
=-(Subscript[k, H]) (cos((Subscript[k, L]) (Subscript[l, L])) sin((Subscript[k, H]) (Subscript[l, H])) +cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) ((Subscript[k, L])/(Subscript[k, H])))
=-(Subscript[k, H]) (sin(Φ) +cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) (((Subscript[k, L])/(Subscript[k, H]))-1))
The matrix is:
(({{cos(Φ)+sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L]))(1-(( (Subscript[k, H]))/(Subscript[k, L])) ), (1/(Subscript[k, H]))(sin(Φ)- (1-(( (Subscript[k, H]))/(Subscript[k, L])) )cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])))}, {-(Subscript[k, H]) (sin(Φ) -cos((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L])) (1-((Subscript[k, L])/(Subscript[k, H])))), cos(Φ)+sin((Subscript[k, H]) (Subscript[l, H])) sin((Subscript[k, L]) (Subscript[l, L]))(1-(( (Subscript[k, L]))/(Subscript[k, H])) )}}))

Consider special case when Φ corresponds to half wavelength, that is Φ= π

S=(({{Cos[Φ]+Sin[(Subscript[k, H]) (Subscript[l, H])]Sin[(Subscript[k, L]) (Subscript[l, L])](1-(( (Subscript[k, H]))/(Subscript[k, L])) ), (1/(Subscript[k, H]))(Sin[Φ]- (1-(( (Subscript[k, H]))/(Subscript[k, L])) )Cos[(Subscript[k, H]) (Subscript[l, H])] Sin[(Subscript[k, L]) (Subscript[l, L])] )}, {-(Subscript[k, H]) (Sin[Φ] -Cos[(Subscript[k, H]) (Subscript[l, H])] Sin[(Subscript[k, L]) (Subscript[l, L])] (1-((Subscript[k, L])/(Subscript[k, H])))), Cos[Φ]+Sin[(Subscript[k, H]) (Subscript[l, H])]Sin[(Subscript[k, L]) (Subscript[l, L])](1-(( (Subscript[k, L]))/(Subscript[k, H])) )}})) /.  Φ-> π

7.2.2 Quarter-wave stack

Consider the special case when the period is symmetric with each layer having an optical thickness of quarterwave:
                    (Subscript[k, H]) (Subscript[l, H])=(Subscript[k, L]) (Subscript[l, L])=(π/2)

S0=S /. (Subscript[k, H]) (Subscript[l, H])-> (π/2)  /. (Subscript[k, L]) (Subscript[l, L])-> (π/2)

We have very simple result. Hence, we can calculate the reflectance:

Solve[(({{(((-((Subscript[k, H])/(Subscript[k, L]))))^M), 0}, {0, (((-((Subscript[k, L])/(Subscript[k, H]))))^M)}})) .(({{1, 1}, {I (Subscript[k, 0]), -I (Subscript[k, 0])}})).(({{1}, {r}}))==(({{1, 1}, {I (Subscript[k, s]), -I (Subscript[k, s])}})).(({{t}, {0}})),{r,t}]

We can simplify:
       r->((2 (Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M))/((Subscript[k, s]) (((-((Subscript[k, H])/(Subscript[k, L]))))^M)+(Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M)))-1=((2 (Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M)-(Subscript[k, s]) (((-((Subscript[k, H])/(Subscript[k, L]))))^M)-(Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M))/((Subscript[k, s]) (((-((Subscript[k, H])/(Subscript[k, L]))))^M)+(Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M))) 
                                                   =(((Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M)-(Subscript[k, s]) (((-((Subscript[k, H])/(Subscript[k, L]))))^M))/((Subscript[k, s]) (((-((Subscript[k, H])/(Subscript[k, L]))))^M)+(Subscript[k, 0]) (((-((Subscript[k, L])/(Subscript[k, H]))))^M))) =(((Subscript[k, 0]) (((((Subscript[k, L])/(Subscript[k, H]))))^(2M))-(Subscript[k, s]) )/((Subscript[k, s]) +(Subscript[k, 0]) (((((Subscript[k, L])/(Subscript[k, H]))))^(2M)))) 
                                                   =-(((Subscript[k, s])-(Subscript[k, 0]) (((((Subscript[k, L])/(Subscript[k, H]))))^(2M)))/((Subscript[k, s]) +(Subscript[k, 0]) (((((Subscript[k, L])/(Subscript[k, H]))))^(2M)) ))
We see that:                   (((((Subscript[k, L])/(Subscript[k, H]))))^2)=(((Subscript[n, L])^2)/((Subscript[n, H])^2))
Hence, if (Subscript[n, L])<(Subscript[n, H]), (((((Subscript[k, L])/(Subscript[k, H]))))^(2M))-> 0 for large M, and r ->-1

7.3 Bragg reflector: calculation illustration

We will generate general formula.

Short code demo λ/4-Bragg stack mirror reflectivity

Sp[n_List,L_List,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}})) . (({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})) ];
Reflect[n_List,L_List,ns_,λ_,θ_,M_]:=Module[{SM,ki,ks} ,
ki=(2 Pi/λ) Cos[θ]  ; ks=  (2 Pi/λ) (Sqrt[(ns^2)-(((Sin[θ]))^2)])   ;
       SM=MatrixPower[Sp[n,L,λ,θ],M] ;
1-(2 (SM[[1,1]] ks+I SM[[2,1]]))/(ks (SM[[1,1]]-I ki SM[[1,2]])+ki SM[[2,2]]+I SM[[2,1]])  ] ;

n={2.,1.3} ; L=(1/4.)/n  ; ns=1.5  ;
Manipulate[
Plot[Abs[Reflect[n,L,ns,λ,θ,M]]^2,{λ,0.6,1.4}, PlotRange-> {0,1},PlotStyle-> {Thick,Blue}
,Filling->{1->  {Axis,Hue[0.5,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Reflectance"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic],
{M,3,50,1},{θ,0., Pi/4}]

Demo λ/4-Bragg stack mirror reflectivity

Note how the difference between (Subscript[n, L]) and (Subscript[n, H]) determines the “stop band” width: the range of wavelength (or frequency) that has high reflectivity.

7.3.1 Deviation for quarterwave

We will see that it works without the perfect symmetry of quarterwave each layer.

Demo λ/4-Bragg mirror reflectivity with asymmetric layer thickness

Optimization the optical thickness of the 2 layers (a=1 for λ/4 each).

7.4 Advanced calculation: field inside

We can gain insight by seeing the field inside a Bragg reflector

Short source code Demo λ/4-Bragg mirror reflectivity with asymmetric layer thickness

Sp[n_List,L_List,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}})) . (({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})) ];
Reflect[n_List,L_List,ns_,λ_,θ_,M_]:=Module[{SM,ki,ks} ,
ki=(2 Pi/λ) Cos[θ]  ; ks=  (2 Pi/λ) (Sqrt[(ns^2)-(((Sin[θ]))^2)])   ;
       SM=MatrixPower[Sp[n,L,λ,θ],M] ;
1-((2 (SM[[1,1]] ks+I SM[[2,1]]))/(ks (SM[[1,1]]-I ki SM[[1,2]])+ki SM[[2,2]]+I SM[[2,1]]))  ] ;

Einc[λ_, x_,t_]:=  If[x≤ 0, (E^(I  (2 Pi/λ) ( x-  t)))  ,]  ;
Eref[BraggParm_,λ_, x_,t_]:=Module[ {n,L,ns,M,R } ,
{n,L,ns,M}=BraggParm  ;
R= Reflect[n,L,ns,λ,0.,M]  ;
         If[x≤ 0,  R  (E^(-I  (2 Pi/λ) ( x +  t)))   ,   ]
]  ;
EBragg[BraggParm_,λ_, x_,t_]:=Module[ {n,L,ns,M, R, Λ
                       ,nH, nL, d1,d2, k0,kH, kL,S, u,m, coef, F} ,
{n,L,ns,M}=BraggParm   ;
R= Reflect[n,L,ns,λ,0.,M]   ;
{nH, nL}=n  ; { d1,d2}=L  ;Λ=d1+d2   ;
k0=2 Pi/λ  ; 
S=(({{cos(k0 nL d2), ((sin(k0 nL d2))/(k0 nL))}, {-sin(k0 nL d2) k0 nL, cos(k0 nL d2)}})). (({{cos(k0 nH d1), ((sin(k0 nH d1))/(k0 nH))}, {-sin(k0 nH d1) k0 nH, cos(k0 nH d1)}}))   ;
If[x> 0 && x< M Λ, 
u=Mod[x,Λ]  ;
m=Floor[x/Λ]  ;
If[u<d1 ,
coef=(({{(1/2), -(I/(2 k0 nH))}, {(1/2), (I/(2 k0 nH))}})) . MatrixPower[S,m] . (({{R+1}, {I k0 (1-R)}})) ;
F=coef[[1]] (E^(I  (k0  nH u -2 π  t))) + coef[[2]]  (E^(-I  ( k0  nH u +2 π t)))  
,
coef=(({{(1/2), -(I/(2 k0 nL))}, {(1/2), (I/(2 k0 nL))}})) . (({{cos(k0 nH d1), ((sin(k0 nH d1))/(k0 nH))}, {-sin(k0 nH d1) k0 nH, cos(k0 nH d1)}})) . MatrixPower[S,m] . (({{R+1}, {I  k0 (1-R)}})) ;
F=coef[[1]] (E^(I (k0 nL (u-d1) -2 π  t)))  + coef[[2]]  (E^(-I (k0 nL (u-d1)+2 π t)))
],  ] ;
F
];

nb={1.8,1.3}; L=1/ (4 * nb)  ; ns=1.5; λ=1 ;
BraggParm={nb, L, ns,15} ;
Manipulate[Animate[Plot[{Re[Einc[λ, x,t]],Re[Eref[BraggParm,λ, x,t]],
Re[EBragg[BraggParm,λ, x,t]]}, {x,-3,6}, PlotRange-> {-2,2}]
, {t,0,1}, AnimationRunning-> False]
,{λ,0.8,1.2}]

Demo internal field of λ/4-Bragg stack mirror

Notice what happens when the wavelength varies from outside stop band, near stop band, and inside the stop band.
See more in HW

8. Advanced topic: interference filter

8.1 Discussion

Interference filter is essentially a Fabry-Perot: a cavity between two thick Bragg reflector. A cavity will have a resonance as a multiple of λ/2.
Can one design with multiple cavities to make the resonance sharper? Certainly. But here is another interesting idea: if many cavities are close with each other, they form "coupled cavities" and one can broaden the resonance, just like in a crystal or structure several energy levels can be close together to form a band. This is the concept of forming a transmission band with a shape different from Lorentzian transmission.
For thin-film filter applications, people design anywhere from 3 cavities to more than 7, and one can design them in multiple of λ/2, e. g. 2 (λ/2), 3 (λ/2), ...

8.2 Illustration

Below is the generic design of interferencce thin-film filter

Various modules for calculation is given below.
SBLH[n_List, L_List, M_, λ_, θ_]: Bragg stack S matrix for same number of low and high index layer, but start with low index layer.
SBHL[n_List, L_List, M_, λ_, θ_] :=Bragg stack S matrix for same number of low and high index layer, but start with high index layer.
SBLodd[n_List, L_List, M_, λ_, θ_] :=Bragg stack S matrix with low index layers terminating both sides of the stack
SBHodd[n_List, L_List, M_, λ_, θ_] :=Bragg stack S matrix with high index layers terminating both sides of the stack
Scav[n_, L_, λ_, θ_] : S matrix of a cavity

Short source code Demo thin-film λ-filter design

SBLH[n_List,L_List,M_,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
MatrixPower[(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}})) . (({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})) ,M] 
];
SBHL[n_List,L_List,M_,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
MatrixPower[(({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})).(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}}))   ,M] 
];
SBLodd[n_List,L_List,M_,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
MatrixPower[(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}})) . (({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})) ,M]. (({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}}))
];
SBHodd[n_List,L_List,M_,λ_,θ_]:=Module[{ dH, dL,kH, kL , k0, nH, nL, d1,d2},
{nH, nL}=n  ; { d1,d2}=L  ;
k0=2 Pi/λ  ; kH=k0 (Sqrt[(nH^2)-(((Sin[θ]))^2)])  ; kL=k0 (Sqrt[(nL^2)-(((Sin[θ]))^2)])  ;
dH=kH*d1  ; dL=kL*d2  ;
MatrixPower[(({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}})).(({{cos(dL), ((sin(dL))/kL)}, {-sin(dL) kL, cos(dL)}}))   ,M] . (({{cos(dH), ((sin(dH))/kH)}, {-sin(dH) kH, cos(dH)}}))
];
Scav[n_,L_,λ_,θ_]:=Module[{d, k},
k=(2 Pi/λ ) (Sqrt[(n^2)-(((Sin[θ]))^2)]) ;
d=k L  ;       (({{cos(d), ((sin(d))/k)}, {-sin(d) k, cos(d)}}))  ] ;

Below are modules to calculate the reflection, transmission through the total S matrix of a structure.

Reflect[SM_, ns_,λ_,θ_]:=Module[{ki,ks} ,
ki=(2 Pi/λ) Cos[θ]  ; ks=  (2 Pi/λ) (Sqrt[(ns^2)-(((Sin[θ]))^2)])   ;
1-((2 (SM[[1,1]] ks+I SM[[2,1]]))/(ks (SM[[1,1]]-I ki SM[[1,2]])+ki SM[[2,2]]+I SM[[2,1]]))  ] ;
Trans[SM_, ns_,λ_,θ_]:=Module[{ki,ks} ,
ki=(2 Pi/λ) Cos[θ]  ; ks=  (2 Pi/λ) (Sqrt[(ns^2)-(((Sin[θ]))^2)])   ;
((2 ki Det[SM])/(ks (SM[[1,1]]-I ki SM[[1,2]])+ki SM[[2,2]]+I SM[[2,1]]))  ] ;
Trans2[SM_, ns_,λ_,θ_]:=Module[{ki,ks} ,
ki=(2 Pi/λ) Cos[θ]  ; ks=  (2 Pi/λ) (Sqrt[(ns^2)-(((Sin[θ]))^2)])   ;
(4 ki^2)/(ki^2 (SM[[1,2]]^2 ks^2+SM[[2,2]]^2)+SM[[1,1]]^2 ks^2+2 ki ks +SM[[2,1]]^2)   ] ;

8.2.1 Single l/2 cavity

Illustration for the transmission through structure with just one cavity with half wavelength: λ/2.
You can change the mirror stack 1 and 2, length of the cavity, and the angle.

Short source code Demo thin-film λ-filter design - single λ/2 cavity

n={1.8,1.5} ; L=(1/4.)/n  ; ns=1.4  ;
ncav=1.8 ; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[ns*Trans2[
SBHL[n,L,M1,λ,θ] .  Scav[ncav,Lcav/(2  ncav),λ,θ] .  SBLH[n,L,M2,λ,θ]
, ns,λ,θ],{λ,0.9,1.1}, PlotRange-> {0,1},PlotStyle-> {Thick,Red}
,Filling->{1->  {Axis,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{Lcav,0.9,3.2},{θ,0.,Pi/4},
{M1,5,10,1},{M2,5,10,1}]

n={1.8,1.5} ; L=(1/4.)/n  ; ns=1.5  ;
ncav=1.3 ; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[Log[10,ns*Trans2[
SBHodd[n,L,M1,λ,θ] .  Scav[ncav,1./(2  ncav),λ,θ] .  SBHodd[n,L,M2,λ,θ]
, ns,λ,θ]]*10,{λ,0.9,1.1}, PlotRange-> {-40,0},PlotStyle-> {Thick,Red}
,Filling->{1->  {Bottom,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{ncav,1.,2.5},
{M1,5,10,1},{M2,5,10,1}]

Varying the cavity length to adjust the filter wavelength:

Below is a similar calculation, but transmission is expressed in dB. The variation now is the index of the cavity.

8.2.2 Double l/2 cavity

Illustration for 2 cavities, each is λ/2. You can change the coupler stack (between the 2 cavity)

Short source code Demo thin-film λ-filter design - double λ/2-cavities

n={1.8,1.3} ; L=(1/4.)/n  ; ns=1.5  ;
ncav=1.3; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[Log[10,ns*Trans2[
SBLH[n,L,M1,λ,θ] .  Scav[ncav,Lcav/(2  ncav),λ,θ] .  
SBHodd[n,L,Mcouple,λ,θ] .
Scav[ncav,Lcav/(2  ncav),λ,θ] .  SBHL[n,L,M2,λ,θ] 
, ns,λ,θ]]*10,{λ,0.8,1.2}, PlotRange-> {-40,0}, PlotPoints-> 200
,PlotStyle-> {Thick,Red}
,Filling->{1->  {Bottom,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{Lcav,0.9,3.2},
{M1,3,10,1},{M2,3,10,1},{Mcouple,2,10,1}]

8.2.3   3 cavities

Illustration for 3 cavities, λ/2, 3/2 λ, and λ/2

Short source code Demo thin-film λ-filter design - 3 cavities with variable thickness

n={1.8,1.3} ; L=(1/4.)/n  ; ns=1.5  ;
ncav=1.3 ; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[Log[10,ns*Trans2[
SBLH[n,L,M1,λ,θ] 
.  Scav[ncav,Lcav/(2  ncav),λ,θ]
 .  SBHodd[n,L,Mcouple,λ,θ]
 .Scav[ncav,3*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
. Scav[ncav,Lcav/(2  ncav),λ,θ] 
.  SBHL[n,L,M2,λ,θ] 
, ns,λ,θ]]*10,{λ,0.9,1.1}, PlotRange-> {-40,0}, PlotPoints-> 200
,PlotStyle-> {Thick,Red}
,Filling->{1->  {Bottom,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{Lcav,1,3.2},
{{M1,5},3,10,1},{{M2,5},3,10,1},{{Mcouple,5},2,10,1}]

Note how apodization can be done with more cavities (triple-resonance) and coupling between the cavity.

8.2.4   5 cavities

Illustration for 5 cavities, λ/2, 3/2 λ, 5/2 λ, 3/2 λ and λ/2

Short source code Demo thin-film λ-filter design - 5 cavities with variable thickness

n={1.8,1.3} ; L=(1/4.)/n  ; ns=1.5  ;
ncav=1.3 ; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[Log[10,ns*Trans2[
SBLH[n,L,M1,λ,θ] 
.  Scav[ncav,Lcav/(2  ncav),λ,θ]
 .  SBHodd[n,L,Mcouple,λ,θ]
 .Scav[ncav,3*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
 .Scav[ncav,5*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
 .Scav[ncav,3*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
. Scav[ncav,Lcav/(2  ncav),λ,θ] 
.  SBHL[n,L,M2,λ,θ] 
, ns,λ,θ]]*10,{λ,0.9,1.1}, PlotRange-> {-60,0}, PlotPoints-> 200
,PlotStyle-> {Thick,Red}
,Filling->{1->  {Bottom,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance (dB)"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{{Lcav,1},0.9,1.1},
{{M1,5},3,10,1},{{M2,5},3,10,1},{{Mcouple,5},2,10,1}]

Not only better apodization with higher rejection ratio, but also how flat the top is (low residual ripple) to give sharper filter with more cavities (5)

Short source code Demo thin-film λ-filter design - 5 cavities with variable thickness - zoom in

n={1.8,1.3} ; L=(1/4.)/n  ; ns=1.5  ;
ncav=1.3 ; Lcav=1./(2  ncav) ;θ=0.  ; M1=5  ; M2=5 ;
Manipulate[Plot[Log[10,ns*Trans2[
SBLH[n,L,M1,λ,θ] 
.  Scav[ncav,Lcav/(2  ncav),λ,θ]
 .  SBHodd[n,L,Mcouple,λ,θ]
 .Scav[ncav,3*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
 .Scav[ncav,5*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
 .Scav[ncav,3*Lcav/(2  ncav),λ,θ] 
.  SBHodd[n,L,Mcouple,λ,θ] 
. Scav[ncav,Lcav/(2  ncav),λ,θ] 
.  SBHL[n,L,M2,λ,θ] 
, ns,λ,θ]]*10,{λ,0.99,1.01}, PlotRange-> {-60,0}, PlotPoints-> 200
,PlotStyle-> {Thick,Red}
,Filling->{1->  {Bottom,Hue[0.1,1,1,0.5]}} , Frame-> True,FrameLabel-> {"Wavelength (relative)","Transmittance (dB)"},LabelStyle->{14,FontFamily-> "Arial"},  GridLines->Automatic]
,{{Lcav,1},0.9,1.1},
{{M1,3},3,10,1},{{M2,3},3,10,1},{{Mcouple,4},2,20,1}]

Note how flat-top, squarish narrow the filter can be designed (note the change of the wavelength scale).

8.2.5   A wide band: 10 cavities

Design exercise: one can design a very wideband filter by using many cavities: e. g. 10.