We describe a methodology for solving boundary control problems for th
e viscous Burgers' equation. The aim is to identify boundary forcing i
n order to ensure the ''best'' fit between data and model results, by
minimizing a functional which measures model and data discrepancies. A
continuous variational formulation involving the adjoint technique is
used, and its counterpart discretized version is obtained with a matr
ix approach as a guideline. A particular discretization of the nonline
ar term of the equation is performed in order to insure, for the gradi
ent of the functional to be minimized, a discretized expression which
can be directly deduced from its continuous counterpart. Numerical exp
eriments validate the proposed optimization algorithm.