Skip to Main Content
Switching time optimization (STO) arises in systems that have a finite set of control modes, where a particular mode can be chosen to govern the system evolution at any given time. The STO problem has been extensively studied for switched systems that consists of time continuous ordinary differential equations with switching laws. However, it is rare that an STO problem can be solved analytically, leading to the use of numerical approximation using time discretized approximations of trajectories. Unlike the smooth optimal control problem, where differentiability of the discrete time control problem is inherited from the continuous time problem, in this contribution we show that the STO problem will in general be nondifferentiable in discrete time. Nevertheless, at times when it is differentiable the derivative can be computed using adjoint equations and when it is nondifferentiable the left and right derivatives can be computed using the same adjoint equation. We illustrate the results by a hybrid model of a double pendulum.