  This work discusses a novel framework for simultaneous synthesis of optimal
watermarking signal and robust controllers in cyber-physical systems to
minimize the loss in performance due to added watermarking signal and to
maximize the detection rate of the attack. A general dynamic controller is
designed to improve system performance with respect to the $\mathcal H_2$ norm,
while a watermarking signal is added to improve security performance concerning
the detection rate of replay attacks. The attack model considered in the paper
is a replay attack, a natural attack mode when the dynamics of the system is
unknown to the attacker. The paper first generalizes the existing result on the
detection rate of $\chi^2$ detector from a static-LQR controller to a general
dynamic controller. The design improvements on both robustness and security
fronts are obtained by iteratively solving the convex subsets of the formulated
non-convex problem in terms of the controller and watermarking signal. A
semi-definite programming optimization is formulated using Linear Matrix
Inequality (LMI) results to solve the larger system-level design optimization
problem. We highlight the effectiveness of our method over a simplified
three-tank chemical system.
