1 | %
|
---|
2 | % $Id: report.tex 571 2008-04-20 17:31:04Z rick $
|
---|
3 | %
|
---|
4 |
|
---|
5 | \documentclass[12pt,a4paper]{article}
|
---|
6 |
|
---|
7 | \usepackage{listings}
|
---|
8 |
|
---|
9 | \frenchspacing
|
---|
10 | \usepackage[english,dutch]{babel}
|
---|
11 | \selectlanguage{dutch}
|
---|
12 | \usepackage{graphicx}
|
---|
13 | \usepackage{url}
|
---|
14 | \usepackage{multicol}
|
---|
15 | \usepackage{fancybox}
|
---|
16 | \usepackage{amssymb,amsmath}
|
---|
17 | \usepackage{float}
|
---|
18 | \usepackage{color}
|
---|
19 | \usepackage{subfig}
|
---|
20 | \usepackage{marvosym}
|
---|
21 | \floatstyle{ruled}
|
---|
22 | \newfloat{result}{thp}{lop}
|
---|
23 | \floatname{result}{Result}
|
---|
24 |
|
---|
25 | \input{highlight.sty}
|
---|
26 |
|
---|
27 | \title{Laser Pulse Shaping problem\\
|
---|
28 | \large{Practical Assignments Natural Computing, 2009}}
|
---|
29 | \author{Rick van der Zwet\\
|
---|
30 | \texttt{<hvdzwet@liacs.nl>}}
|
---|
31 | \date{\today}
|
---|
32 |
|
---|
33 |
|
---|
34 | \begin{document}
|
---|
35 | \newcommand{\wekacmd}[1]{\begin{quote}\small{\texttt{#1}}\end{quote}}
|
---|
36 | \newcommand{\unixcmd}[1]{\begin{quote}\small{\texttt{#1}}\end{quote}}
|
---|
37 |
|
---|
38 |
|
---|
39 | \maketitle
|
---|
40 |
|
---|
41 | \section{Introduction}
|
---|
42 | The report is focused on the so-called \emph{laser pulse shaping problem}.
|
---|
43 | Today's lasers are also used within the range of atoms or molecule research.
|
---|
44 | Using small pulses it is able to align and alter the movement of the atoms.
|
---|
45 |
|
---|
46 | The problem lies in the fact the atoms cannot be controlled by any type of
|
---|
47 | laser pulse. There are many parameters which could all be set to 'shape' the
|
---|
48 | laser pulse the way it can move the atoms.
|
---|
49 |
|
---|
50 | To turn and tweak all the 'knobs' at the same time there will be \emph{Particle
|
---|
51 | Swarm Optimizer (PSO)} used to explore the search space. The \emph{PSO} is
|
---|
52 | basically a whole bunch of individual agents which all try to find an optimum
|
---|
53 | into the search space. During this search they get input about other potential
|
---|
54 | bests from the whole swarm (broadcast style) and the neighborhood
|
---|
55 | (observation) and using this values they determine their new location.
|
---|
56 |
|
---|
57 | \section{Problem description}
|
---|
58 | A laser pulse going through a crystal produces light at the octave of its
|
---|
59 | frequency spectrum. The total energy of the radiated light is proportional to
|
---|
60 | the integrated squared intensity of the primary pulse. Explicitly, the
|
---|
61 | time-dependent profile of the laser field in our simulations is given by:
|
---|
62 | \begin{equation}
|
---|
63 | \label{eq:simulation}
|
---|
64 | E(t) = \int_{-\infty}^\infty A(\omega)exp(i\phi(\omega))exp(i{\omega}t) d\omega,
|
---|
65 | \end{equation}
|
---|
66 |
|
---|
67 | where $A(\omega)$ is a Gaussian window function describing the contribution of
|
---|
68 | different frequencies to the pulse and $\phi(\omega)$, the phase function,
|
---|
69 | equips these frequencies with different complex phases.
|
---|
70 |
|
---|
71 | To determine the best solution a fitness function is needed, which could be
|
---|
72 | found in the shape of equation~\ref{eq:fitness}
|
---|
73 | \begin{equation}
|
---|
74 | \label{eq:fitness}
|
---|
75 | SHG = \int_0^T E^4(t)dt \longrightarrow maximization
|
---|
76 | \end{equation}
|
---|
77 |
|
---|
78 | Note that $0 < SHG < 1$
|
---|
79 | \section{Statistics}
|
---|
80 |
|
---|
81 | \section{Approach}
|
---|
82 | The Wikipedia page 'Particle swarm
|
---|
83 | optimization'~\footnote{http://en.wikipedia.org/wiki/Particle\_swarm\_optimization}
|
---|
84 | contained a reference implementation used to implement the algorithm. The nice
|
---|
85 | part about the algorithm is its flexibility in tuning. As within the \emph{PSO}
|
---|
86 | there are many 'knobs' which could be tweaked as well, like likeliness of
|
---|
87 | heading for the global optimum, neighborhood optimum and local optimum.
|
---|
88 |
|
---|
89 | \section{Implementation}
|
---|
90 | The code is written in
|
---|
91 | \emph{Octave}\footnote{http://www.gnu.org/software/octave/} which is the
|
---|
92 | open-source 'variant' of \emph{MATLAB}\copyright
|
---|
93 | \footnote{http://www.mathworks.com/products/matlab/}. There are small minor
|
---|
94 | differences between them, but all code is made compatible to to run on both
|
---|
95 | systems. The code is to be found in Appendix~\ref{app:code}.
|
---|
96 |
|
---|
97 | As work is done remotely, the following commands are used:
|
---|
98 | \unixcmd{matlab-bin -nojvm -nodesktop -nosplash -nodisplay < \%\%PROGRAM\%\%}
|
---|
99 | \unixcmd{octave -q \%\%PROGRAM\%\%}
|
---|
100 |
|
---|
101 | The flock is represented into a 3d block. A slice of that block contains a
|
---|
102 | local swarm, a column in slice is a individual particle.
|
---|
103 |
|
---|
104 | \section{Results}
|
---|
105 | The program is run against a parameter set of 80. The algorithm is allowed to run
|
---|
106 | for 10 minutes with a maximum of 1000 iterations. If there are no improvements
|
---|
107 | after 5 iterations then it will bail out as well.
|
---|
108 |
|
---|
109 | The algorithm is kind of 'social' e.g. it will favor the neighborhood and the
|
---|
110 | global optimum more than it's own local optimum. Also its active, meaning it
|
---|
111 | changes direction fast the moment the optimum is found somewhere else.
|
---|
112 |
|
---|
113 | Size of the local swarms is 50, each with 10 agents.
|
---|
114 |
|
---|
115 | After running 5 times, the best fitness found was $0.0000045481$. Improvement is
|
---|
116 | almost only shown in the first 100 iterations see figure~\ref{fig:pso-fitness},
|
---|
117 | afterwards it quickly stalls.
|
---|
118 | Trying with a smaller number more and less show the same result as seen in
|
---|
119 | figure~\ref{fig:pso-small}
|
---|
120 |
|
---|
121 | \begin{figure}[htp]
|
---|
122 | \begin{center}
|
---|
123 | \subfloat[80]{\label{fig:pso-fitness}\includegraphics[scale=0.4]{pso-fitness.eps}}
|
---|
124 | \subfloat[10]{\label{fig:pso-small}\includegraphics[scale=0.4]{pso-fitness-10.eps}}
|
---|
125 | \end{center}
|
---|
126 | \caption{Fitness throughout the iterations}
|
---|
127 | \label{fig:fitness}
|
---|
128 | \end{figure}
|
---|
129 |
|
---|
130 | Changing various flags like walkspeed $wander$ or changing the socialness of
|
---|
131 | the agents does not prove to change much in the algoritm result.
|
---|
132 |
|
---|
133 | \section{Conclusions}
|
---|
134 | Giving the lack of external results of other algorithms in large scale setups
|
---|
135 | (80 parameters) its hard to say whether this is a good or worse preforming
|
---|
136 | algorithm.
|
---|
137 |
|
---|
138 | For furher research within the algorithm there are many knobs to tweak as well.
|
---|
139 | One could think of implementing a algorithm around this setup as well.
|
---|
140 |
|
---|
141 | \section{Appendix 1}
|
---|
142 | \label{app:code}
|
---|
143 | \include{pso.m}
|
---|
144 | \include{SHGa.m}
|
---|
145 | \include{SHG.m}
|
---|
146 | \end{document}
|
---|