
\documentclass{article} % For LaTeX2e
\usepackage{iclr2023_conference_tinypaper,times}

% Optional math commands from https://github.com/goodfeli/dlbook_notation.
\input{math_commands.tex}

\usepackage{hyperref}
\usepackage{url}

\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{subcaption}



\title{Generation of a random self-similarity curve for antenna modeling}

% Authors must not appear in the submitted version. They should be hidden
% as long as the \iclrfinalcopy macro remains commented out below.
% Non-anonymous submissions will be rejected without review.

\author{Antiquus S.~Hippocampus, Natalia Cerebro \& Amelie P. Amygdale \thanks{ Use footnote for providing further information
about author (webpage, alternative address)---\emph{not} for acknowledging
funding agencies.  Funding acknowledgements go at the end of the paper.} \\
Department of Computer Science\\
Cranberry-Lemon University\\
Pittsburgh, PA 15213, USA \\
\texttt{\{hippo,brain,jen\}@cs.cranberry-lemon.edu} \\
\And
Ji Q. Ren \& Yevgeny LeNet \\
Department of Computational Neuroscience \\
University of the Witwatersrand \\
Joburg, South Africa \\
\texttt{\{robot,net\}@wits.ac.za} \\
\AND
Coauthor \\
Affiliation \\
Address \\
\texttt{email}
}

% The \author macro works with any number of authors. There are two commands
% used to separate the names and addresses of multiple authors: \And and \AND.
%
% Using \And between authors leaves it to \LaTeX{} to determine where to break
% the lines. Using \AND forces a linebreak at that point. So, if \LaTeX{}
% puts 3 of 4 authors names on the first line, and the last on the second
% line, try using \AND instead of \And before the third author name.

\newcommand{\fix}{\marginpar{FIX}}
\newcommand{\new}{\marginpar{NEW}}

%\iclrfinalcopy % Uncomment for camera-ready version, but NOT for submission.
\begin{document}


\maketitle

\begin{abstract}
The trend towards miniaturization of technical devices has created a challenge in their design. Fractal geometry offers a promising solution for designing broken structures in a fast and efficient manner. In this study, we propose a novel approach for generating a random curve based on the fractal dimension, which exhibits self-similarity across different length scales. We show the possibility of using this method to the design of a wire dipole antenna, using a specified fractal dimension as a design parameter.
\end{abstract}

\section{Introduction}

Previous works \cite{BROW10, RING13} for generating objects by fractal dimension value are not intended for generating curves. However, this is necessary in some applications, such as those related to antenna geometry modeling.

\section{Method}
\label{method}

Calculating fractal dimension $d$ of set $F$ is based on the coverage of the set by $|N(\varepsilon)|$ number of boxes with side $\varepsilon$
\begin{equation}
    \label{theory_bcd}
    d = \lim_{\varepsilon \to 0} \frac{\log{|N_{\varepsilon}(F)|}}{-\log{\varepsilon}},
\end{equation}
where $N_{\varepsilon}(F)$ contains minimum number $|N_{\varepsilon}(F)|$ of boxes, which cover the set $F$.

Box-counting algorithm in numerical approach for estimation fractal dimension. The algorithm is based on covering a set with boxes of different sizes and calculating the dimension as the slope of a straight line. To do this, Equation \ref{theory_bcd} is represented as
\begin{equation}
    \label{theory_bcd_2}
    d \log{\varepsilon} + \log{|N_{\varepsilon}(F)|} = 0.
\end{equation}

Let us impose a constraint on the connectivity of neighboring elements on the set $F$. We define the sequence $\mathcal{E}$ of side of boxes as follows:
\begin{equation}
    \label{s_set}
    \mathcal{E}=\{3^{-i}\}_{i=1}^n,
\end{equation}
that is at each next step, each previous box will be divided into 9 smaller boxes. 

Let a set $F^{(i)}$ be constructed that satisfies the connectivity condition on the subset $\mathcal{E}^{(i)}=\{\varepsilon_1, \varepsilon_2, ..., \varepsilon_i\} \subset \mathcal{E}$. At the next step $i+1$ we resample the curve with a step 3 times smaller (according to equation \eqref{s_set}), which was at $i$-th step. As a result, we get a resampled set $\widetilde{F^{(i)}}$, which is located on a grid with side $\varepsilon_{i+1}$. Figure \ref{fig:alg_steps_1_2} shows the result of resampling.


From \eqref{theory_bcd} it is known the number of boxes $|N_\varepsilon(F)|$ for the box side $\varepsilon$ and dimension $d$: $N(\varepsilon, d) = \varepsilon^{-d}$. This means that each filled box from the previous step must be broken into 9 parts and filled with $L=\left\lceil\frac{N(\varepsilon_{i+1}, d)}{|N_{\varepsilon_i}(F^{(i)})|}\right\rceil$ boxes. 
To do this, for each box $\tilde{b} \in N_{\varepsilon_i}(\widetilde{F^{(i)}})$ we obtain the corresponding subset of the constructed curve $\widetilde{M^{(i)}} = \widetilde{F^{(i)}} \cap \tilde{b}$. Take the first $m^{(i)}_{first} \in \widetilde{M^{(i)}}$ and the last $m^{(i)}_{last} \in \widetilde{M^{(i)}}$ element of subset $\widetilde{M^{(i)}}$. An example of the first and last polyline point inside each box is shown in figure \ref{fig:alg_steps_1_2}. Generate a random local polyline $C=\{c_1, c_2, ..., c_L\}$ inside each box (the generation process is described below), where $c_1=m^{(i)}_{first}, c_2=m^{(i)}_{last}$. The set $F^{(i+1)}$ is constructed by combining local polylines. The resulting curve is shown in figure \ref{fig:alg_steps_2}.

The process is repeated until the resulting set $F^{(n)}$ is constructed. To construct the set $F^{(1)}$ the first and last elements are chosen randomly, resampling is not required. 

Consider the problem of generating a random polyline from point $a$ to point $b$ of length $L$ on a discrete set of points $B$ of size $s \times s$  (in the two-dimensional case). To solve it, one can represents set $B$ as an acyclic connected graph. Using the recursive Breadth First Search algorithm, it is possible to form all possible paths from point $a$ to the point $b$ and save them, for example, in a dictionary. Then, to get a random polyline from point $a$ to point $b$ of length $L$ it will be enough to choose a suitable random polyline from the dictionary. In order for polylines to not have self-intersections, it is necessary to use, for example, the sweeping straight line method after generating paths to filter out curves with self-intersections.

\section{Wire dipole modeling}

Consider a family of symmetric wire dipoles with a linear arm length of 7.5 cm made of a wire with a diameter of $d=1$ mm. We randomly generate the geometry of the arms, as described in the \ref{method} section, with the fractal dimension $d$ from $1.1$ to $1.7$ with a step of $0.003$. For each dimension value we generate two geometry: with $\varepsilon=3^{-2}$ (second iteration of generation) and $\varepsilon=3^{-4}$ (third iteration of generation). For each generated antenna geometry, we numerically modeled the electrodynamic characteristics (frequency $f$ and bandwidth $BW$) in Altair FEKO software.

We fitted regression models of electrodynamic characteristics on the length $L$ and fractal dimension $d$ of the dipole arm. The dipole arm length is a strong predictor because the base frequency $f$ depends on the propagation time of the electromagnetic wave along the conductor, so the dependence of $f$ on $L$ is a theoretical result \cite{GIBS14}. Table \ref{table_fr_l} shows values of the root mean squared error (RMSE) and relative mean absolute error (rMAE). The smallest values of RMSE and rMAE corresponds to the linear models on the fractal dimension. 

\begin{table}
  \caption{Root mean squared error (RMSE) and relative mean absolute error (rMAE) for regressional models of the base frequency $f$ dependent on the length $L$ and fractal dimension $d$ of the dipole arm.}
  \label{table_fr_l}
  \centering
  \begin{tabular}{llll}
    \toprule
    \multirow{2}{*}{Error} & \multicolumn{3}{c}{Model} \\
    \cmidrule(l){2-4}
         & linear, by $L$ & nonlinear, by $L$  & linear, by $d$\\
    \midrule
    RMSE & 65.6  & 40.6 & 29.52 \\
    rMAE     & 12.25\% & 7\%     & 5.14\% \\

    \bottomrule
  \end{tabular}
\end{table}

\section{Conclusion}

We proposed a new method for generating random self-similarity curves by fractal dimension value on a given set of length scales. This approach was used to generate the geometry of the arms for the symmetric wire dipole antenna. The possibility of using this approach for the design of symmetric self-similarity wire dipole antenna is demonstrated on the example of studying the relationship between the fractal dimension of the arm geometry and the main electrodynamic characteristics (base frequency and bandwidth).


\subsubsection*{Acknowledgements}
*********

\subsubsection*{URM Statement}
The authors acknowledge that at least one key author of this work meets the URM criteria of ICLR 2024 Tiny Papers Track.

\bibliography{iclr2023_conference_tinypaper}
\bibliographystyle{iclr2023_conference_tinypaper}

\appendix
\section{Appendix}

Figure \ref{fig:alg_steps} shows 

\begin{figure}
     \centering
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_gen/0.png}
         \caption{Constructed curve $F^{(i)}$ on step $i$}
         \label{fig:alg_steps_1}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_gen/7.png}
         \caption{Resampled curve $\widetilde{F^{(i)}}$. Colored squares mark the start and end points of the curve inside each box}
         \label{fig:alg_steps_1_2}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_gen/6.png}
         \caption{Constructed curve $F^{(i+1)}$ on step $i+1$. The colored squares mark the starting and ending points of the curve inside each box, along which the local polyline was constructed.}  
         \label{fig:alg_steps_2}
     \end{subfigure}
        \caption{Algorithm steps for generating a random curve from the value of the fractal dimension}
        \label{fig:alg_steps}
% \vspace{-25pt} % ВНИМАНИЕ!
\end{figure}

Figure shows

\begin{figure}
     \centering
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_2/curve_iter_2_1.png}
         \caption{Fractal dimension $d=1.1$}
         % \label{fig:alg_steps_1}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_2/curve_iter_2_2.png}
         \caption{Fractal dimension $d=1.28$}
         % \label{fig:alg_steps_1_2}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_2/curve_iter_2_3.png}
         \caption{Fractal dimension $d=1.64$}  
         % \label{fig:alg_steps_2}
     \end{subfigure}
        \caption{An example of a symmetric dipole geometry based on a random second order prefractal.}
        \label{fig_dipole_2}
% \vspace{-25pt} % ВНИМАНИЕ!
\end{figure}

\begin{figure}
     \centering
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_3/curve_iter_3_1.png}
         \caption{Fractal dimension $d=1.106$}
         % \label{fig:alg_steps_1}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_3/curve_iter_3_2.png}
         \caption{Fractal dimension $d=1.292$}
         % \label{fig:alg_steps_1_2}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/curve_iter_3/curve_iter_3_3.png}
         \caption{Fractal dimension $d=1.628$}  
         % \label{fig:alg_steps_2}
     \end{subfigure}
        \caption{An example of a symmetric dipole geometry based on a random third-order prefractal.}
        \label{fig_dipole_3}
% \vspace{-25pt} % ВНИМАНИЕ!
\end{figure}

Figure shows 

\begin{figure}
     \centering
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_fr/comp_fr_1.png}
         \caption{Linear model dependent on length $L$ (cm) of dipole arm}
         % \label{fig:alg_steps_1}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_fr/comp_fr_2.png}
         \caption{Nonlinear model dependent on length $L$ (cm) of dipole arm}
         % \label{fig:alg_steps_1_2}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_fr/comp_fr_3.png}
         \caption{Linear model dependent on fractal dimension $d$ of dipole arm geometry}  
         % \label{fig:alg_steps_2}
     \end{subfigure}
        \caption{Regression models of base frequnecy $f$ (MHz).}
        \label{fig_fr}
\end{figure}

\begin{figure}
     \centering
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_bw/comp_bw_1.png}
         \caption{Linear model dependent on length $L$ (cm) of dipole arm}
         % \label{fig:alg_steps_1}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_bw/comp_bw_2.png}
         \caption{Nonlinear model dependent on length $L$ (cm) of dipole arm}
         % \label{fig:alg_steps_1_2}
     \end{subfigure}
     \hfill
     \begin{subfigure}[t]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{./figs/comp_bw/comp_bw_3.png}
         \caption{Linear model dependent on fractal dimension $d$ dipole arm geometry}  
         % \label{fig:alg_steps_2}
     \end{subfigure}
        \caption{Regression models of bandwidth $BW$ (MHz).}
        \label{fig_bw}
\end{figure}

\end{document}
