Summary
This paper proposes the use of calculus of variations to solve the problem of state and parameter estimation for a class of switched 1‐dimensional hyperbolic partial differential equations coupled with an ordinary differential equation. The term “switched” here refers to a system changing its characteristics according to a switching rule, which may depend on time, parameters of the system, and/or state of the system. The estimation method is based on a smooth approximation of the system dynamics and the use of variational calculus on an augmented Lagrangian cost functional to get the sensitivity with respect to the initial state and some (possibly distributed) parameters of the system. Those sensitivities or variations, together with related adjoint systems, are used as inputs for an optimization algorithm to identify the values of the variables to be estimated. Two examples are provided to demonstrate the effectiveness of the proposed method. The first one is concerned with a switched overland flow model, developed from Saint‐Venant equations and Green‐Ampt law; the second example deals with a switched free traffic flow model based on the Lighthill‐Whitham‐Richards representation, modified by the presence of a relief route.