\chapter{Methods}

\section{Simulation Software}

Simulation is performed using the OpenSim software platform \cite{Delp2007}. OpenSim is an open-source platform for modeling and analyzing neuromusculoskeletal structures and simulating their dynamic movement behavior. It's developed and maintained as part of the Simtk.org repository.

The software provides an extensive application programming interface (API) in order to develop custom simulation controllers. Additionally it contains a graphical user interface (GUI) used to visualize simulations, edit models and muscle excitation data, as well as to access predefined simulation controllers.

The provided controllers turned out to require a very specific data collection as input, which is typically generated during experiments using motion capturing systems and force plates.

In the context of this project, no such data is generated or used, but we rather solely rely on relatively sparse muscle activation data and have no ground force measurements available. Also we are interested in general principles of movement rather than the detailed analysis of the walking behaviour of an individual subject.

Thus a custom controller making use of the provided OpenSIM API was developed. This allows to specifically tune the simulation behavior to the requirements of this project and the data available.

For all tasks performed as part of this project, version 3.0 of OpenSim was used as provided on \url{http://www.simtk.org}.

\section{Muscoloskeletal Model}

The muscoloskeletal model used in the project was developed based on the Gait2354 model provided with OpenSim 3.0. This is a 23-degree-of-freedom model of the human muscoloskeletal system. By default it contains 54 musclotendon actuators and represents a subject with a height of 1.8 m and a mass of 75.16 kg\footnote{More information on the Gait2354 model and its kinematic and dynamic properties as well as references to the studies the model is based on can be found on \url{http://simtk-confluence.stanford.edu:8080/display/OpenSim/Gait+2392+and+2354+Models}}.

Gait model provided with OpenSim (\TODO{Add reference to paper describing model}), muscles removes where no data was available from the paper. Muscles which were measured in combination in the study (hamstring, \dots) needed to be properly accounted for.

\TODO{Add Screenshot}

In order to verify the principal working of the OpenSim model, random data was generated and applied to it.

\section{Muscle Model}

For all muscles in the model, the Thelen muscle model \cite{Thelen2003} was used. This model is the default muscle model used OpenSim 3.0\footnote{\TODO{Add note about deprecated model of same name from previous versions of OpenSim}} and is employed in all muscloloskeletal models provided with OpenSim. The Thelen muscle model is based on the well-known and widely used Hill muscle-tendon model (\TODO{add reference}), but incorporates adjustments in order to better account for age-related changes in the muscle properties.

The behavior of the Thelen muscles can be tuned using various parameters, see table \ref{table:thelen2003_parameters}. These were left in their 

\begin{table}[htb!]
\label{table:thelen2003_parameters}
\centering
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Parameter} & \textbf{Description} & \textbf{Value range} & \textbf{Chosen Value} \\
\hline
\end{tabular}
\caption{Parameters of the Thelen muscle model \cite{Thelen2003}}
\end{table}%

\section{Simulation Controller}

\section{Data Preparation}

Since the original data from the publication by Dominici et al. \cite{Dominici2011} could not be used, the respective pattern curves had to be extracted from the paper. In order to gather the data from there, a graph digitizer software (GraphClick by Arizona Software) was used. The data was then preprocessed by applying a curve interpolation in order to allow arbitrary, linearly spaced sampling of data points later on in the OpenSim model controller.