Human Emotion Classification based on EEG Signals Using Recurrent Neural Network And KNN

Abstract: In human contact, emotion is very crucial. Attributes like words, voice intonation, facial expressions, and kinesics can all be used to portray one's feelings. However, brain-computer interface (BCI) devices have not yet reached the level required for emotion interpretation. With the rapid development of machine learning algorithms, dry electrode techniques, and different real-world applications of the brain-computer interface for normal individuals, emotion categorization from EEG data has recently gotten a lot of attention. Electroencephalogram (EEG) signals are a critical resource for these systems. The primary benefit of employing EEG signals is that they reflect true emotion and are easily resolved by computer systems. In this work, EEG signals associated with good, neutral, and negative emotions were identified using channel selection preprocessing. However, researchers had a limited grasp of the specifics of the link between various emotional states until now. To identify EEG signals, we used discrete wavelet transform and machine learning techniques such as recurrent neural network (RNN) and k-nearest neighbor (kNN) algorithm. Initially, the classifier methods were utilized for channel selection. As a result, final feature vectors were created by integrating the features of EEG segments from these channels. Using the RNN and kNN algorithms, the final feature vectors with connected positive, neutral, and negative emotions were categorized independently. The classification performance of both techniques is computed and compared. Using RNN and kNN, the average overall accuracies were 94.844 % and 93.438 %, respectively.

\section{Introduction}
Emotion is fundamental in human-human interaction and communication.
Recognizing the emotional moods of others around us is a crucial aspect of natural communication. Given the prevalence of machines in our daily lives, emotional interaction between people and machines has emerged as one of the most pressing concerns in sophisticated human-machine interaction and brain-computer interface nowadays \cite{1}. While non-physiological attributes like words, voice intonation, facial expressions, and kinesics can all be used to portray one's emotion \cite{2}. In recent decades, many studies on emotion identification based on non-physiological attributes have been published \cite{3}.\\
Throughout the last few decades, numerous investigations on engineering techniques to automate emotion identification have been conducted. They can be divided into three categories. The first strategy focuses on facial expressions or speech analysis \cite{4}. These audio-visual approaches enable non-contact detection of emotion, causing no discomfort to the subject. However, these strategies may be more susceptible to deceit, and the settings might readily shift depending on the situation. The second method focuses on physiological signals at the periphery. Various studies suggest that alterations in the autonomic nervous system in the periphery, such as skin conductance (SC), electrocardiogram (ECG), respiration, and pulse, can be noticed in different emotional states \cite{5}. As compared to audio-visual-based techniques, peripheral physiological signal responses tend to provide more comprehensive and complicated information to evaluate emotional states.\\
The third strategy focuses on central nervous system brain signals such as electrocorticography (ECoG),  electroencephalography (EEG), and functional magnetic resonance imaging (fMRI). EEG signals, among various brain signals, have been shown to convey informative qualities in reactions to emotional states. EEG signals are obtained by monitoring voltage changes on the skull surface through electrical stimulation of activated neurons in the brain \cite{6}. In clinical settings, EEG is the most often utilized brain-activity-measuring technology for emotion recognition. Furthermore, EEG-based BCI devices open up a new channel of communication by detecting variations in the underlying pattern of brain activity while completing different tasks \cite{7}. However, BCI systems have yet to achieve the requisite level of emotion interpretation.\\
The interpretation of people's various emotional states via BCI systems, as well as automatic emotion recognition, may enable automated systems to react to humans in the future intuitively. They will be increasingly beneficial in a variety of disciplines, including medicine, entertainment, education, and many others \cite{8}. To understand emotions, BCI systems require variable resources that can be collected from humans and processed. Among the most essential resources for achieving this goal is the EEG signal. Emotion recognition is coupled with knowledge from several fields such as psychology, neurology, and engineering. SAM Self-Assessment Manikin (SAM)  surveys are commonly utilized in the creation of emotion detection systems for categorized affective responses of respondents \cite{9}. Furthermore, in this study, EEG patterns associated with positive, neutral and negative emotions were categorized.\\
The remainder of this paper is organized as follows: Related work is presented in Section 2. The employed methodology is depicted in Section 3. Section 4 describes the rationale behind our emotion induction experimental design. Section 5 presents a systematic description of methods like feature extraction, classification, etc. Section 6 discusses the experimental results and discussion. Finally, Section 7 concludes this paper.

\section{Related Work}
Several studies have employed various algorithms linked to EEG-based classification of emotional states. For example, Bhardwaj et al. \cite{10} highlights use of support vector machines (SVM) and LDA to classify seven emotions. In their investigation, three EEG channels (Fp1, P3, and O1) were utilized. The researchers looked into EEG signal subbands (theta, alpha, and beta). The overall average accuracies obtained were 74.13\% using SVM and 66.50\% using LDA.\\
Lee et al. \cite{11} distinguished between positive and negative emotions. In the proposed model the adaptive neuro-fuzzy inference system (ANFIS) yielded a classification accuracy of 78.45\%.\\
Channel et al. \cite{12} employed Fisher discriminant analysis (FDA) and Naive Bayes (NB) as the classification algorithms for the classification of positive and negative emotions. Classification accuracy was obtained as 70\% and 72\% for FDA and NB, respectively.\\
Davidson et al. \cite{13} present the use of a two dimensional model of emotion to categorize the emotions.\\
Murugappan et al. \cite{14} presents the classification of five emotions based on EEG signals. They captured EEG signals from different EEG channels and by employing techniques like kNN and linear discriminant analysis (LDA) algorithms, they attained maximum classification accuracy of 83.26\% and 75.21\%, respectively.\\
Zhang et al. \cite{15} employed Principal Component Analysis (PCA) for feature extraction.Two channels were used to extract the characteristics (F3 and F4). The researchers attained a classification accuracy of 73\%.\\

\section{Methodology}
The focal objective of this study was to categorize EEG signals associated with distinct emotions based on cinematic inputs using channel selection preprocessing. SAM was utilized to assess the emotional states of the individuals. Each audiovisual stimulus was judged by participants in terms of valence, arousal, like/dislike, dominance, and familiarity. EEG signals associated with good and negative emotions were categorized based on the valence assessments of the participants. The DWT approach was used to extract features from EEG recordings. EEG signal wavelet coefficients were believed to be feature vectors, and statistical characteristics were employed to minimize the dimension of those feature vectors. RNN and kNN algorithms were used to classify EEG data associated with positive, neutral, and negative emotion categories. The EEG channels with the best categorization performance were identified. As a result of merging the features of those EEG channels, final feature vectors were created. The classification of the final feature vectors was performed, and their performances were compared. Figure 1 depicts the processes used throughout the classification process.
\begin{figure}[h]
    \centering
    \begin{center}
    \includegraphics[scale=0.4]{image10.png}
    \end{center}
    \caption{Proposed Process of Classification}
\end{figure}

\FloatBarrier

\section{Materials}
\subsection{Database and Participants Questionnaire}
The publicly available database relating to emotional states was used in this investigation. Data was obtained from two participants (one male and one female) for three minutes per state (positive, neutral, and negative) \cite{15}. The  Muse EEG headband is used to record the EEG placements of the TP9, AF7, AF8, and TP10 through dry electrodes. The stimuli (Audio-Visual Clips) used to elicit the emotions are listed in table 1.
\FloatBarrier
\begin{table*}[h]
\begin{center}
\begin{adjustbox}{width=1\textwidth}
\setlength{\tabcolsep}{15pt}
\renewcommand{\arraystretch}{3}

\begin{tabular}{ |c|c|c| }
\hline
\textbf{Clip No.} & \textbf{Audio-Visual Clip} & \textbf{Emotion} \\
\hline
1 & Slow Life - Nature timelapse & Positive \\ \hline
2 & Funny Dogs - Funny dog clips & Positive \\ \hline
3 & La La Land - Opening musical number & Positive \\ \hline
4 & Marley and Me - Death Scene & Negative \\ \hline
5 & Up - Opening Death Scene & Negative \\ \hline
6 & My Girl - Funeral Scene & Negative \\ \hline
\end{tabular}
\end{adjustbox}
\end{center}
\caption{Description of the Audio-Visual clips}
\label{tab:my_label}
\end{table*}
\FloatBarrier
\subsection{Task}
\begin{figure}[h]
    \centering
    \begin{center}
    \includegraphics[scale=0.45]{image13.png}
    \end{center}
    \caption{Protocol to record EEG signals}
\end{figure}
Each participant's EEG signals were captured in a specific paradigm framework based on audiovisual stimuli. The paradigm is divided into two portions, each of which has seven trials, each of which includes the following steps:
\begin{enumerate}
    \item Trial Instance: A two-second screen that displays the current trial.
    \item Cross Fixation: A five-second fixation crosses.
    \item Audio-visual Clip: A 60-second exhibition of music snippets to elicit various emotions.
    \item Evaluation/ Participating Rating: SAM was used to assess valence, arousal, dominance, likes, and familiarity.
\end{enumerate}

Figure 2 depicts the paradigm used on participants to record EEG and peripheral physiological information.
\subsection{EEG Signal Recording}
Electroencephalography is the process of obtaining electrophysiological data and signals from the brain using electrodes \cite{16}. Electrodes can be put subdural \cite{17}, that is, beneath the skull, on, and within the brain itself. Noninvasive approaches necessitate the placement of wet or dry electrodes around the cranium \cite{18}. Observing an instance at time t, raw electrical data is measured in microvolts ($\mu$V), resulting in wave patterns ranging from time period t to t+n. The EEG signal dataset is depicted by Figure 3.
\begin{figure}[h]
    \centering
    \begin{center}
    \includegraphics[scale=0.7]{image14.png}
    \end{center}
    \caption{EEG Signals Dataset (Amplitude vs Time)}
\end{figure}
\\
\\
\\
\section{Methods}
\subsection{Discrete wavelet transform (DWT)}
DWT is commonly utilized for non-stationary signal analysis \cite{6}. DWT has long been preferred for interpreting EEG signals. The DWT method can be used to get the appropriate frequency range. The DWT method divides the signal into sub-bands by filtering it with sequential high pass and low pass filters g[n] and h[n] in the time period \cite{19}. As a result, signal sub-bands with first-level d1 detail and a1 approximation are achieved. The definitions of detail sub-bands and first-level approximation  are as follows:
\begin{equation}
    d_1=\sum_{k=-\infty}^{\infty} x[k] . g[2n-k]
\end{equation}
\begin{equation}
    a_1=\sum_{k=-\infty}^{\infty} x[k] . h[2n-k]
\end{equation}
\subsection{Feature Extraction}
The DWT approach was used to generate feature vectors for EEG signals.
The signal decomposition produces a collection of wavelet coefficients in each sub-band. The wavelet coefficients compactly reflect EEG features \cite{19}. Five statistical parameters were employed to reduce the dimensionality of the feature vector. The five statistical parameters i.e. a technique for reducing the dimension of feature vectors based on the theta band are as follows:
\begin{enumerate}
    \item The absolute maximum of the wavelet coefficients.
    \item The mean of the wavelet coefficients' absolute values.
    \item The coefficients' standard deviation.
    \item Coefficients' average power
    \item Coefficients' average energy
\end{enumerate}
Five-dimensional feature vectors corresponding to EEG segments connected to each emotional state were obtained at the end of the DWT approach, and statistical processes were utilized for feature extraction.

\subsection{Classification Algorithm}
RNN and kNN algorithms were used to classify the feature vectors of EEG data associated with positive and negative emotions. The performance of various pattern recognition algorithms was assessed and compared.
\subsubsection{k-nearest neighbor (kNN)}
The kNN algorithm is a distance-based classification technique. By studying the attributes of a new object, kNN can assign an entity encountered in (n) dimensional vector space to a specified class \cite{20}. The classification phase in the kNN algorithm begins with the calculation of the distance between a new object of an unknown class and each object in the training set. The classification process is completed by allocating the new object to the class that is most prevalent among its k-nearest neighbors. For classification, known classes of objects in the training set of k-nearest neighbors were used.\\
In the kNN algorithm, various methods are utilized to determine distance.
Minkowski, Manhattan, Euclidean, and Hamming distance measures are examples of these methods. The Minkowski distance was utilized in this study to determine the nearest neighbors. The Minkowski distance is calculated as:
\begin{equation}
    distance = (\sum_{i=1}^{n}(x_i-y_i)^c)^\frac{1}{c}
\end{equation}
where x and y are the positions of points in a vector n-space.\\

Calculating the classification algorithm's ability with different k values optimizes the choice of k. To achieve the highest classification accuracy, the optimum value of k was discovered to be different for each participant.
\subsubsection{Recurrent neural networks (RNN)}
Recurrent neural networks (RNN) are a sort of NN that is extensively employed in the sequence analysis process because they are designed to extract contextual information by establishing the relationships between distinct time stamps. RNN is made up of many successive recurrent layers that are sequentially modeled in order to model the sequence with other sequences. RNN has an excellent aptitude for extracting contextual data from a sequence. The contextual cues in the network structure, on the other hand, are stable and successfully utilized to perform the data classification process. RNN may operate on sequences of any length. The architecture of the RNN classifier is depicted in Figure 3.
\begin{figure}[h]
    \centering
    \begin{center}
    \includegraphics[scale=0.5]{image16.png}
    \end{center}
    \caption{Working of RNN (Recurrent Neural Network)}
\end{figure}
\subsubsection{Performance Evaluation}
The trained network's performance can be evaluated using accuracy, specificity, and sensitivity. These are some of the most commonly used success evaluation criteria in the literature. In this work, specificity indicates the capacity to correctly categorize samples including positive emotions, whereas sensitivity reflects the ability to accurately classify samples containing negative emotions. Eqs. (4), (5), and (6) calculate accuracy, specificity, and sensitivity, respectively.
\begin{equation}
    Accuracy = \frac{TN+TP}{TN+FN+TP+FP}
\end{equation}
\begin{equation}
    Specificity = \frac{TP}{TP+FP}
\end{equation}
\begin{equation}
    Sensitivity = \frac{TN}{TN+FN}
\end{equation}
Where,\\
TN: True Negative (Number of true decisions influenced by negative emotions)\\
TP: True Positive (Number of true decisions made by an automated system based on positive sentiment)\\
FN: False Negative (Number of false decisions influenced by negative emotions)\\
FP: False Positive (Number of false decisions made by an automated system based on positive sentiment)
\section{Experimental Results and Discussion}
To undertake a more efficient and reliable classification process, we created a training-set and a test-set for each of the model. The training set was composed of the first two sessions of the EEG dataset for each emotional state. The test set was composed of the most recent session of the EEG dataset for each emotional state. In Fig. 5(a),5(b),5(c), EEG signals related to positive,neutral and negative emotions state respectively are shown.
\begin{figure}[h]
     \centering
     \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{image7.png}
         \caption{Positive Emotion}

     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{image8.png}
         \caption{Neutral Emotion}

     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{image15.png}
         \caption{Negative Emotion}

     \end{subfigure}
        \caption{Categorized EEG Signals Dataset (Amplitude vs Time)}
        \label{fig:three graphs}
\end{figure}
\subsection{Classification of emotions by using RNN}
The final feature vectors were created by integrating the features of EEG segments from the chosen channels ( TP9, AF7, AF8, and TP10). As a result, for each EEG segment associated with positive, neutral, and negative emotions, new feature vectors made of 25 samples were produced. Furthermore, the classification process was applied to train the model, and the classification report and the confusion matrix of the model are shown in Figure 6.
\begin{figure}[H]
    \centering
    \begin{center}
    \includegraphics{image11.png}
    \end{center}
    \caption{Confusion Matrix And Classification Report Of RNN}
\end{figure}
\subsection{Classification of emotions by using kNN}
In this section, the kNN method was used to classify the final feature vectors acquired from EEG segments. The Minkowski distance measure was chosen to implement this classification. To improve the reliability of the classification results, the training and testing data were changed five times at random (fivefold cross-validation). Classification accuracies revealed that the k value yielding the lowest error value varied depending on the subject. From there, the k parameter is set to 1 or 3 for the classification process. Furthermore, the classification process was applied to train the model, and the classification report and the confusion matrix of the model are shown in Figure 7.
\begin{figure}[H]
    \centering
    \begin{center}
    \includegraphics{image9.png}
    \end{center}
    \caption{Confusion Matrix And Classification Report Of kNN}
\end{figure}
This study's findings are discussed in more detail below:
\begin{itemize}
    \item The DWT (Discrete Wavelet Transform) method was used to obtain wavelet coefficients associated with various emotions (i.e. positive, neutral and negative). As feature vectors, these wavelet coefficients were examined. To reduce processing load, the size of feature vectors was lowered by applying five statistical parameters.
    \item RNN and kNN techniques were used to classify combined feature vectors from five channels ( TP9, AF7, AF8, and TP10). RNN was used in this study to determine the emotional state from EEG signals. In this work, the kNN technique was also utilized as a classifier to improve the dependability of the RNN results. kNN is one of the most basic and straightforward classification methods. The kNN algorithm is commonly utilized in numerous EEG applications. The fact that outcomes of the two algorithms were nearly identical. This matching contributes to the process's dependability.
    \item Statistical parameters (accuracy, specificity, and sensitivity) were averaged to determine the overall performance of RNN and kNN classifiers. Figure 8 depicts a comparison of averaged results for emotion classification. The efficiency of RNN was higher than that of kNN, as indicated in the figure. Both strategies, though, can be considered successful.
    \begin{figure}[H]
    \centering
    \begin{center}
    \includegraphics[scale=0.4]{image12.png}
    \end{center}
    \caption{Overall Performance Of RNN and KNN Classifiers}
\end{figure}
\item It was concluded that the RNN and kNN utilized in this investigation provide good accuracy results for emotion categorization.
\end{itemize}
\section{Conclusion}
In this study, we explored the characteristics of EEG data for emotion classification as well as a technique for tracking the trajectory of emotion changes. A series of tests employing movie clips is designed to elicit individuals' emotional responses, and an EEG data collection is obtained. For emotion classification, DWT was utilized for feature extraction, and RNN and kNN approaches were used as classifiers. The performance ranges of categorization for emotions are compatible with both RNN and kNN. As demonstrated by the findings, the critical points were a feature and channel decisions. It is believed that performance can be improved by using the proper channels and features.\\
The future development of this research will be focused on to improve classification efficiency, other physiological data such as blood pressure, respiration rate, body temperature, and GSR (galvanic skin reaction) can be combined with EEG signals.

\bibliographystyle{unsrt}

Signal Processing (eess.SP); Artificial Intelligence (cs.AI); Human-Computer Interaction (cs.HC); Machine Learning (cs.LG)


Solidified Fillings of Nanopores

Abstract: We present a selection of x-ray and neutron diffraction patterns of spherical (He, Ar), dumbbell- (N2, CO), and chain-like molecules (n-C9H20, n-C19H40) solidified in nanopores of silica glass (mean pore diameter 7nm). These patterns allow us to demonstrate how key principles governing crystallization have to be adapted in order to accomplish solidification in restricted geometries. He, Ar, and the spherical close packed phases of CO and N2 adjust to the pore geometry by introducing a sizeable amount of stacking faults. For the pore solidified, medium-length chain-like n-C19H40 we observe a close packed structure without lamellar ordering, whereas for the short-chain C9H20 the layering principle survives, albeit in a modified fashion compared to the bulk phase.

\section{Introduction}

Simple geometric considerations along with the goal of minimizing
the free energy of a system allow one to derive key principles of
the microscopic architecture of crystalline, condensed matter,
among them the close packing principle \cite{Buerger1963}. As the
structures of simple van-der-Waals molecular crystals testify, the
detailed manifestations of these building principles depend
sensitively on the symmetry and the interaction of the basic
building blocks (atoms, molecules or macromolecules)
\cite{Klein1977}. Here, we would like to give some flavor which
key crystallization principles survive or how they have to be
altered in order to allow a system to solidify in extreme spatial
confinement, that is in a geometry which is restricted, at least
in one direction, on the order of the size of its building blocks.
Our conclusions are drawn from the study of the structure of Ar,
N$_{2}$, CO, and two n-alkanes in the nanopores of silica glass.
We will present the structure of the confined molecular crystals
and discuss them with respect to the basic building principles
established in the corresponding bulk phases. Some attention will
also be paid on structural solid-solid phase transitions within
the confined crystalline phases.

By filling fraction dependent measurements both on the structure
 \cite{Huber1999} and on the dynamics \cite{Baumert2002} of
van-der-Waals systems embedded in porous glass one can show that
the pore condensates can usually be decomposed in two components:
The first two or three monolayers close to the pore walls form a
disordered, amorphous phase and at least for the silica matrices,
no melting or freezing transitions have been observed for this
component. Thus, one can term them as ``dead`` monolayers. By
contrast, the second part of the pore filling, located closer to
the pore center, leads a ``life of its own'' characterized by a
structure and thermodynamics which are reminiscent of the bulk
behavior, at least for pore diameters of the order of 10nm. In the
following, we shall focus on the structure of this second part and
will refer to it as \textit{pore solid}.

\section{Experimental}

As hosts we have chosen either Vycor glass or a controlled pore
glass (``Gelsil'' from Geltech, Orlando, FL). Both substrates are
practically pure fused silica. The structure of the nanopores of
both matrices can be described as a network of 3D randomly
oriented, connected pores with relatively uniform diameter d $\sim
$ 7nm \cite{Levitz1991}. The x-ray diffraction patterns have been
recorded using a Bragg-Brentano para-focussing geometry. For more
details on the experimental setup we would like to refer to ref.
\cite{Huber1999}. The elastic neutron diffraction experiment on
$^{4}$He has been carried out on the 2-axis diffractometer D20 of
the Insitut Laue Langevin, Grenoble (France). Both the neutron as
well as the x-ray diffraction patterns will be presented as plots
of the scattered intensity versus the modulus of the scattering
vector $q$, $q=4\pi $/$\lambda $ sin($\Theta )$, where $\lambda $
corresponds to the wavelength of the x-rays and neutrons, resp.
Additionally, the scattering angle 2$\Theta $ is plotted on the
top axis for the x-ray diffraction patterns ($\lambda $=1.542
{\AA}$^{-1})$.

\section{Results}

\begin{figure*}[!]
\epsfig{file=Solidified1c.eps, angle=0, width=1.7\columnwidth}
\caption{\label{fig1} (a) Neutron diffraction pattern of pore
condensed $^{4}$He at p=70bar, T=1K \cite{Wallacher2005}. The
reflections (hkl) are indexed on the basis of a bcc cell. The
cartoon depicts the bcc structure. Note, the intensity of the
(210) bcc reflection has been multiplied by a factor of 50. (b)
X-ray diffraction pattern of pore condensed Ar at T=50K
\cite{Huber1999}; indicated are the fcc (hkl) reflections. As
inset one can find an illustration of the fcc structure.}
\end{figure*}

\begin{figure*}[!]
\epsfig{file=Solidified2c.eps, angle=0, width=1.7\columnwidth}
\caption{\label{fig2}(a) X-ray diffraction pattern of N$_{2}$
confined in GelSil at T=50K. The reflections are indexed on the
basis of a hcp lattice \cite{Huber1999b} (b) X-ray diffraction
pattern of pore condensed CO at T=50K; indicated are the Pa3 (hkl)
reflections \cite{Huber1999b}. The insets in panel (a) and (b)
illustrate the hcp and Pa3 structures, respectively.}
\end{figure*}

\begin{figure*}[!]
\epsfig{file=Solidified3c.eps, angle=0, width=1.7\columnwidth}
\caption{\label{fig3}(a) X-ray diffraction patterns of
n-C$_{9}$H$_{20}$ in GelSil70 at T=180K. The reflections are
indexed assuming an orthorhombic unit cell. The inset depicts an
illustration of the structure. The molecules' long axes are
aligned parallel to the pores and obey a lamellar ordering. (b)
X-ray diffraction pattern of pore condensed n-C$_{19}$H$_{40}$ at
T=200K. The reflections are indexed on the basis of a
two-dimensional rectangular mesh. The cartoon depicts the
``nematocrystalline'' state of the pore solid \cite{Huber2004}.}
\end{figure*}

\subsection{Helium and Argon}

For $^{4}$He the quantum mechanical zero point energy is so large
compared to the normal attractive interactions that it exists as
solid only under pressure $p$ ($p>$25bar), and then with very
small cohesive energies, large molar volumes and large
compressibilities \cite{Klein1977}. Bulk $^{4}$He forms either a
hexagonal close packed (hcp) or a body centered cubic (bcc) phase.
The more loosely packed bcc-structure occurs at higher
temperatures and is believed to be stabilized relative to the hcp
structure for entropic reasons.

A diffraction pattern of confined $^{4}$He (T=1K, p=70bar) is
depicted in Fig 1. (a) \cite{Wallacher2005}. The part of the
pattern containing reflections from the sample cell walls and the
various thermal shields ($q$-range from 2.4-3.5{\AA}$^{-1})$ has
been removed. The scattering intensity is dominated by one peak at
$q=2.25 {\AA}^{-1}$ that can be attributed to confined He, whereas
the sharp peaks on the left and on the right wing of this peak are
due to hcp bulk crystallites, sitting outside the pore space.
Additionally a broad, weak peak at $q=3.75{\AA}^{-1}$ can be
identified as belonging to confined $^{4}$He. A detailed analysis
of the temperature dependence of the diffraction pattern that
considers different packing sequences of triangular net planes
(ABC stacking $\Leftrightarrow$ fcc, AB stacking $\Leftrightarrow$
hcp, random stacking) and the bcc structure, identifies the two
observed peaks as the (110) and (210) bcc reflections. The
intrinsic width $\Delta q$ of the two peaks indicate a coherence
length L of the $^{4}$He crystallites of about 10nm. L is slightly
larger than the pore diameter. The two Bragg peaks represent only
about 30{\%} of the pore filling, whereas the non-crystalline
fraction amounts to about 70{\%}. Additionally to two ``dead''
monolayers of immobile molecules next to the pore walls the
thermodynamic path (low T, high p), which one has to take in order
to solidify $^{4}$He in the pores leads to a liquid-like shell
between the pore solid in the center of the pores and the
amorphous wall coating. Further cooling below 1K leads to no
qualitative change of the diffraction pattern. Quite different to
the situation for bulk He, the loosely packed bcc structure in the
pore center is stable down to lowest temperatures. Thus, the
bcc-hcp lattice reconstruction, known from bulk $^{4}$He, is
suppressed in the pores.

In contrast to the quantum crystal $^{4}$He the zero point motion
of the atoms of solid Ar are negligible rendering it to one of the
most simple, classical crystalline solids \cite{Klein1977}. Kept
under its own vapor pressure, Ar solidifies into a fcc crystalline
structure upon cooling below its bulk triple point of
$T_{3}^{bulk}$=83.8K. Temperature dependent diffraction patterns
of Ar confined in Vycor start to exhibit Bragg peaks upon cooling
below 76K, only. One observes a reduced freezing temperature in
the pores. The diffraction pattern of the pore solid, as it is
shown in Fig. 1(b) for T=60K, can be indexed by referring to the
bulk fcc Ar structure. In the accessible q-range one can identify
the (111), (200), (220), (311) and (222) reflections. Apart from
the finite size broadening, the width of the fcc reflections show
a variation characteristic of crystals suffering from a
substantial amount of stacking faults. If $\alpha $ is the
probability that an AB stack of triangular (111) planes is
followed by a plane in the A position (hcp-like) rather than in
the C position (fcc-like) and L is a characteristic crystallite
size, one arrives at a satisfactory description of the diffraction
pattern of the pore solid with L=100nm and $\alpha $=0.055. The
value of L exceeds the pore diameter by far, which points again to
a rather large coherence length of the crystallites along the
pores.

\subsection{Nitrogen and Carbonmonoxide}

N$_{2}$ and CO are molecules of similar size and shape. As bulk
systems, they have closely related structural and thermodynamical
properties. The melting temperatures are almost equal:
T$_{3}^{bulk}$ (N$_{2})$=63.15K, T$_{3}^{bulk}$ (CO)=68.9K. Bulk
N$_{2}$ and CO are isomorphous in both solid phases. The high-T
$\beta {\rm g}$hase is hcp with a practically ideal c/a ratio --
see illustration in Fig. 2(a). Here the molecules are
orientationally disordered due to rapid reorientations. At lower
temperatures the bulk solids undergo a first-order phase
transition into the $\alpha $ phase (cubic, Pa3), which involves a
change of the center-of-mass lattice from the hcp-stacking
sequence AB{\ldots} to the fcc-stacking sequence ABC{\ldots} and
an orientational ordering of the molecular axes, i.e. of the
quadrupole moments, such that each of the four molecules of the
cell points along one of the four $<$111$>$ directions -- compare
illustration in Fig. 2(b). This orientation of the molecules
appears as a compromise of the cubic symmetry of the center of
mass lattice and the quadrupolar part of the interaction of the
molecules: The resulting mutual orientation of the long axes of
the molecules is given by the tetrahedral angle of 109 degrees,
which is reasonably close to an angle of 90 degrees minimizing
their quadrupolar interaction. Solidification of N$_{2}$ in
GelSil, indicated by the appearance of the hcp Bragg peaks, occurs
at T=54K. The diffraction pattern of confined N$_{2}$ shows five
Bragg peaks, which all coincide with reflections of bulk hcp
$\beta $-N$_{2}$, although with altered intensity ratios and
enhanced linewidths compared to the pattern of the bulk phase. The
(102) reflection is missing. The (103) reflection is extremely
broadened, but can be still identified. By contrast, the (002)
reflection dominates the diffraction pattern and is remarkably
sharp. The variation of the intrinsic peak width $\Delta $q as a
function of the crystallographic direction can be described by a
preferred growth of the crystallites with their c-axes along the
pores and a sizeable amount of stacking faults in the pore solid.
This conclusion is corroborated by diffraction studies varying the
pore diameter as well as studies of N$_{2}$ in well-aligned pores
of porous silicon \cite{Hofmann2005}. Thus, pore confined nitrogen
establishes a structure very related to the bulk $\beta $ phase.
Upon cooling, however, no transition into the orientational
ordered $\alpha {\rm g}$hase has been observed. This solid-solid
transition could be investigated for pore confined CO, only. It
forms the same hcp phase as just presented for confined N$_{2}$,
however, at T=54K the center of mass lattice rearranges according
to the $\beta {\rm t}\alpha $ phase transition scenario and for
T$<$54K one observes a diffraction pattern typical of the cubic
Pa3 structure -- compare Fig. 2(b). As a peculiarity of confined
CO the occurrence of a fcc phase upon heating has been found. The
orientational order of the molecules is lost while maintaining the
cubic lattice.

\subsection{Nonane and Nonadecane}

In the following we focus on the structure of more complex molecular
crystals, built out of chain-like molecules, where the length l of the
rectified molecules is of the order of the pore diameter. We have chosen the
linear hydrocarbons n-C$_{9}$H$_{20}$ and n-C$_{19}$H$_{40 }^{ }$with
l=1.3nm and l=2.6nm, resp. The C atoms of the zigzag backbone of these
linear hydrocarbons are all in the trans-configuration, so all of them are
located in a plane. The molecular crystals form layered structures. For
n-C$_{19}$H$_{40}$ the molecules are aligned perpendicular to the layers.
Within the layers the molecules are close packed, side by side, in a
quasi-two-dimensional array. For low temperatures the azimuth of the
rotation of the --C-C- plane around the long z-axis of the molecules
alternates in a herringbone fashion. In the short-length n-C$_{9}$H$_{20}$
the molecules are tilted by about 15deg with respect to the layer normals.

The diffraction pattern of confined n-C$_{9}$H$_{20}$ -- see Fig.
3 -- indicates a layering of the molecules (two peaks at low q)
and additionally a herringbone type ordering of the molecules
within the layers (6 peaks at q$>$1.4 {\AA}$^{-1})$. The
reflections at higher q can be indexed as (hk0) in terms of an
orthorhombic unit cell. This means that any correlations of the
lateral positions of the layers are lost in the pores. If such
correlations existed, peaks of the type (hkl), l$<>$0 should show
up. Moreover, the layering distance extracted from the (001)$_{o}$
and (002)$_{o}$ peaks at low q agree with the length of the
rectified molecules, thus the confinement imposes an alignment of
n-C$_{9}$H$_{20}$ parallel to the layer normal. Presumably, the
layer normals are oriented parallel to the pore axis, which
results in a structure reminiscent of the crystal-E phase of
rod-like liquid crystals \cite{Kumar2001}.

As can be seen by a comparison of Fig. 3(a) and (b) the
diffraction pattern of n-C$_{19}$H$_{40}$ is identical to the one
of n-C$_{9}$H$_{20}$ except for the missing (00l) layering peaks
at low q (q$<$1.4 {\AA}$^{-1})$. The resulting structure of
confined n-C$_{19}$H$_{40}$ is depicted in Fig. 3(b): The
molecules' position along the pore axes have no correlations. One
basic ordering principle of the bulk crystalline alkane, i.e. the
layering, is suppressed, rendering the system effectively
two-dimensional (2D) \cite{Huber2004}. Moreover, an analysis of
the coherence length of the 2D crystals based on the width of the
(hk)$_{r}$ reflections yields 7.5nm. This value is close to the
mean pore diameter, which suggests an alignment of the molecules
along the pore axis. Isomorphous structures, termed
``nematocrystalline'', have been reported for the bulk phases of
natural waxes, e.g. bee wax, consisting of complicated mixtures of
chain-like molecules, among them alkanes \cite{Dorset1999}.

\section{Summary}

Spherical close-packed structures can accommodate to the pore geometry by
introducing of a sizeable amount of stacking faults. The structures of the
confined chain-like molecules is affected in a more drastic way, in
particular the anisotropic pore structure calls for an alignment of the
molecules parallel to the pore axes. Nevertheless, the structures follow the
close packing principles; even the medium-length n-C$_{19}$H$_{40}$ pursues
this concept by establishing a ``nematocrystalline'' state.

Extreme cases of structural disorder such as random-stacking or
random close packing have not been found for the pore solids
investigated. The preference to form structures with higher
symmetry obeying subtleties of the symmetry of the molecules'
interaction potentials, which lead to the fcc-Ar, hcp- or bcc-
N$_{2}$, CO, and $^{4}$He, resp. and finally to the
herringbone-type ordering of the linear hydrocarbon chains,
prevails even for the crystallization in nano-confinement. If one
considers the distribution of the pore diameters and the
tortuosity of the pores, in general all deviations of the employed
porous hosts from an idealized pore space which presumably
additionally favor disordered structures, our findings testify
even more to the robustness of the basic crystallization
principles. As witnessed by the suppression of the bcc-hcp
transition in confined He, the absence of the $\alpha {\rm t}\beta
$ transition in confined N$_{2}$, and the occurrence of a fcc-CO
phase in the pores, the phase sequence in the pores can
nevertheless be significantly affected by the confinement. For
pore condensates embedded in well-defined nanopores of template
grown MCM-41 or SBA-15 silica matrices \cite{temppores} quite
similar structures have been observed \cite{Morishige2000}. Thus,
the detailed geometry and topology of the matrix is of minor
importance for the crystallization; they are, however, crucial for
an understanding of the thermodynamical aspects of pore
condensates, e.g. the freezing/melting process or
condensation/sublimation phenomena in the pores
\cite{Christenson2001}.

Another interesting aspect concerns the thermodynamic stability of
pore condensates. There is agreement that capillary condensed
cryogenic liquids such as Ar, He, CO and N$_{2}$ are stable in
mesoporous glasses such as Vycor. In the solid regime, however,
several authors report changes that have been interpreted by a
migration of the filling out of the pores and have been referred
to as ``mobility transition'', a ``new type of structural phase
transition'', and ``dewetting transition'' \cite{Silva2002}. We
could not find any hints for such transitions of the cryosolids
investigated. Nevertheless, we would like to mention that we
gather increasing evidence for a thermodynamic metastability of
the solid phases of medium- and long-chain n-alkanes in an ongoing
study aimed at an understanding of the structure and
thermodynamics of hydrocarbons in nanopores.

Finally we would like to mention that studies on crystallization
or, more generally spoken, structural transitions in
nanoconfinement are not only interesting by their own virtue, but
also of relevance for such different phenomena as friction, frost
heave, transport through biomembranes, and crystal growth \cite{
Urback2004}. For instance, recently the immobilization and
crystallization of proteins in nanopores of Vycor and porous
silicon attracted attention in the flourishing field of structural
genomics \cite{Chayen2001}. It could be demonstrated that these
pore confined protein structures promote the formation of protein
bulk crystallites, one of the pivotal goals in this area of
science.

\acknowledgments{This work has been supported by the Deutsche
Forschungsgemeinschaft (SFB 277).}

Mesoscale and Nanoscale Physics (cond-mat.mes-hall); Materials Science (cond-mat.mtrl-sci)

Solidified Fillings of Nanopores