We propose a general approach for the numerical approximation of
optimal control problems governed by a linear advection–diffusion
equation, based on a stabilization method applied to the
Lagrangian functional, rather than stabilizing the state and
adjoint equations separately. This approach yields a coherently
stabilized control problem. Besides, it allows a straightforward
a posteriori error estimate in which estimates of higher order terms
are needless. Our a posteriori estimates stems from splitting the
error on the cost functional into the sum of an iteration error
plus a discretization error. Once the former is reduced below a
given threshold (and therefore the computed solution is “near”
the optimal solution), the adaptive strategy is operated on the
discretization error. To prove the effectiveness of the proposed
methods, we report some numerical tests, referring to problems in
which the control term is the source term of the
advection–diffusion equation.