Control System

Contains control system elements. More...

## Namespaces

FunctionsOfTime
Contains functions of time to support the dual frame system.

## Classes

class  Averager< DerivOrder >
A weighted exponential averager of $Q$ and its derivatives implementing Appendix A in [11]. More...

class  Controller< DerivOrder >
A PND (proportional to Q and N derivatives of Q) controller that computes the control signal:

$U(t) = \sum_{k=0}^{N} a_{k} \frac{d^kQ}{dt^k}$

where N is specified by the template parameter DerivOrder. More...

class  FunctionOfTime
Base class for FunctionsOfTime. More...

class  FunctionOfTimeUpdater< DerivOrder >
Responsible for updating the FunctionOfTime map parameters. modify: updates the FunctionOfTime map parameters, changing the maps. measure: provides updated information to the ControlSystem, without modifying the maps. More...

class  FunctionsOfTime::PiecewisePolynomial< MaxDeriv >
A function that has a piecewise-constant MaxDerivth derivative. More...

class  FunctionsOfTime::SettleToConstant
Given an initial function $f(t)$ and its first two derivatives at the matching time $t_0$, the constant coefficients $A,B,C$ are computed such that the resulting function of time $g(t)$ satisfies $g(t=t_0)=f(t=t_0)$ and approaches a constant value for $t > t_0$ on a timescale of $\tau$. The resultant function is

$g(t) = A + (B+C(t-t_0)) e^{-(t-t_0)/\tau}$

where $\tau$=decay_time and $t_0$=match_time. More...

class  TimescaleTuner
Manages control system timescales. More...

## Detailed Description

Contains control system elements.

The control system manages the time-dependent mapping between frames, such as the fixed computational frame (grid frame) and the inertial frame. The time-dependent parameters of the mapping are adjusted by a feedback control system in order to follow the dynamical evolution of objects such as horizons of black holes or surfaces of neutron stars. For example, in binary black hole simulations the map is typically a composition of maps that include translation, rotation, scaling, shape, etc. Each map under the governance of the control system has an associated time-dependent map parameter $\lambda(t)$ that is a piecewise Nth order polynomial. At discrete times (called reset times), the control system resets the Nth time derivative of $\lambda(t)$ to a new constant value, in order to minimize an error function $Q(t)$ that is specific to each map. At each reset time, the Nth derivative of $\lambda(t)$ is set to a function $U(t)$, called the control signal, that is determined by $Q(t)$ and its time derivatives and time integral. Note that $\lambda(t)$, $U(t)$, and $Q(t)$ can be vectors.

The key components of the control system are:

• FunctionsOfTime: each map has an associated FunctionOfTime that represents the map parameter $\lambda(t)$ and relevant time derivatives.
• ControlError: each map has an associated ControlError that computes the error, $Q(t)$. Note that for each map, $Q(t)$ is defined to follow the convention that $dQ = -d \lambda$ as $Q \rightarrow 0$.
• Averager: an averager can be used to average out the noise in the 'raw' $Q(t)$ returned by the ControlError.
• Controller: the map controller computes the control signal $U(t)$ from $Q(t)$ and its time integral and time derivatives. The control is accomplished by setting the Nth derivative of $\lambda(t)$ to $U(t)$. Two common controllers are PID (proportional/integral/derivative)

$U(t) = a_{0}\int_{t_{0}}^{t} Q(t') dt'+a_{1}Q(t)+a_{2}\frac{dQ}{dt}$

or PND (proportional/N derivatives)

$U(t) = \sum_{k=0}^{N} a_{k} \frac{d^kQ}{dt^k}$

The coefficients $a_{k}$ in the computation of $U(t)$ are chosen at each time such that the error $Q(t)$ will be critically damped on a timescale of $\tau$ (the damping time), i.e. $Q(t) \propto e^{-t/\tau}$.
• TimescaleTuner: each map has a TimescaleTuner that dynamically adjusts the damping timescale $\tau$ appropriately to keep the error $Q(t)$ within some specified error bounds. Note that the reset time interval, $\Delta t$, is a constant fraction of this damping timescale, i.e. $\Delta t = \alpha \tau$ (empirically, we have found $\alpha=0.3$ to be a good choice).

For additional details describing our control system approach, see [11].