  Composing systems is a fundamental concept in modern control systems, yet it
remains challenging to formally analyze how controllers designed for individual
subsystems can differ from controllers designed for the composition of those
subsystems. To address this challenge, we propose a novel approach to composing
control systems based on resource sharing machines, a concept from applied
category theory. We use resource sharing machines to investigate the
differences between (i) the linear-quadratic regulator (LQR) designed directly
for a composite system and (ii) the LQR that is attained through the
composition of LQRs designed for each subsystem. We first establish novel
formalisms to compose LQR control designs using resource sharing machines. Then
we develop new sufficient conditions to guarantee that the LQR designed for a
composite system is equal to the LQR attained through composition of LQRs for
its subsystems. In addition, we reduce the developed condition to that of
checking the controllability and observability of a certain linear,
time-invariant system, which provides a simple, computationally efficient
procedure for evaluating the equivalence of controllers for composed systems.
