  This paper studies the problem of controlling linear dynamical systems
subject to point-wise-in-time constraints. We present an algorithm similar to
online gradient descent, that can handle time-varying and a priori unknown
convex cost functions while restraining the system states and inputs to
polytopic constraint sets. Analysis of the algorithm's performance, measured by
dynamic regret, reveals that sublinear regret is achieved if the variation of
the cost functions is sublinear in time. Finally, we present a simple example
to illustrate implementation details as well as the algorithm's performance and
show that the proposed algorithm ensures constraint satisfaction.
