Chapter 1
Introduction
This chapter explains why the controllability and observability of a dynamical system can be studied on the network of its state variables, what the network view can and cannot tell, and how the analysis proceeds from the state equations to a configuration of inputs and outputs. It introduces the workflow that the rest of the book follows, the NOCAD toolbox and its Python successor, and a first session with the package. The theory starts in chapter 2.
1.1 Problem and idea
A process plant, a power grid, or a neural circuit is described by state variables that change in time and influence each other. Two questions come before any controller or estimator can be designed. Can the system be driven from any initial state to any desired state by the available inputs? This is controllability. Can the state be reconstructed from the measured outputs? This is observability. For a linear time-invariant system both questions have exact answers in the rank conditions of Kalman [4]. The answers, however, presuppose that the inputs and outputs are already given. When they are to be designed, the number of candidate configurations explodes: a system with state variables has non-empty sets of driven states, and every set requires a rank test of an matrix whose entries grow or decay with the powers of the state matrix. For systems with more than a few dozen states the enumeration is impossible, and the rank tests themselves are numerically fragile.
Structural systems theory, founded by Lin [5] and developed by Shields and Pearson, Reinschke, Murota, and Dion, Commault and van der Woude [6, 7, 8, 9], takes a different view: it ignores the numerical values of the system matrices and asks which properties follow from their zero pattern alone. A pattern is structurally controllable if almost all numerical systems with this pattern are controllable, and Lin’s theorem characterizes this property by two conditions on a graph. In 2011 Liu, Slotine and Barabási turned the idea into a tool of network science [10]: the minimum number of inputs that make a network of nodes structurally controllable is the number of nodes left unmatched by a maximum matching, computable in time even for networks with millions of edges. The dual result for observability followed two years later [11], and a large literature on the controllability of complex networks has grown since [12].
The network view is powerful, but it is only as good as the network it is applied to. Most networks studied in the early literature were physical or logical topologies (who is connected to whom), not the networks of the state variables of a dynamical system, and the number of inputs computed from them can be far too large [13, 14]. Leitold, Vathy-Fogarassy and Abonyi showed that the balance equations of mass, energy and momentum add two kinds of edges to the topology: self-loops, because the change of a state variable depends on the variable itself, and reverse edges, because the flow between two variables depends on both of them [1]. With these edges the networks of real dynamical systems need very few inputs and outputs, while the networks without system dynamics lose more than 95% of their driver and sensor nodes. The lesson is the starting point of this book: the network must be the network of the state variables, and the analysis must follow a workflow that starts from the state equations (fig. 1.1).
1.2 What the network view can and cannot tell
The structural approach answers questions about almost all parameter values of a pattern. Its answers are therefore robust to uncertain parameters, cheap to compute, and independent of numerical conditioning. They are also limited in three ways that the reader should keep in mind.
First, a structurally controllable system can be uncontrollable for special values of its parameters, for example when two identical subsystems are driven by the same input; section 2.4 shows such a case. Structural results describe the generic case, and symmetries of real systems must be checked numerically. Second, controllability says nothing about the effort needed to steer the system. The energy of the control signal can be astronomically large when a few inputs have to drive many states through long chains [15, 16]. The relative degree, the number of integrations between an input and an output, measures this effect in network terms, and chapter 8 places additional inputs and outputs to keep it small. Third, the theory is linear. For nonlinear systems the network of the linearization gives local information only, and the counts of driver nodes computed for nonlinear dynamics can mislead [14]. The relative degree of nonlinear systems [17, 18] has the same network interpretation, which is why the placement methods are useful beyond the linear case.
1.3 The toolbox
The NOCAD toolbox for MATLAB and Octave [19] was published with the study of the connection types [1] and described in a software paper [2]; the sensor placement methods appeared in [20], the analysis of heat exchanger networks in [21, 22], and the whole methodology in a SpringerBriefs monograph [3]. Its three modules are reproduced by nocad:
- network mapping: maximum matching corrected by the path-finding or the signal-sharing method, and the state-space matrices of a controllable and observable system (nocad.design);
- system characterisation: about fifty network, node, and edge measures, among them the control and observe centralities and the driver, sensor, endpoint, and edge similarities (nocad.measures, nocad.structural, nocad.profiles);
- improvement and robustness: set covering, centrality-based, mCLASA and GDFCMSA placement of additional nodes, and node-removal robustness (nocad.placement, nocad.robustness).
The package adds an exact minimum of dedicated inputs, node roles and edge classes across all maximum matchings, control profiles, the study of connection types and their heat maps, bundled benchmark networks, the visualization module nocad.viz, whose layout algorithms are the subject of chapter 4, and a data-exchange layer (nocad.io, nocad.annotation) that reads networks and systems from NetworkX, igraph, pandas, python-control and a dozen file formats and writes them back with every node and edge labelled by its role (section 2.3.1). It is built on NumPy, SciPy (sparse matrices, Hopcroft–Karp matching, strongly connected components, shortest paths), NetworkX, pandas, and matplotlib [23, 24, 25].
1.4 A first session
The nine-state network of the NOCAD manual serves as the running example of the book. Three lines design a controllable and observable system on it, and two more show why it is controllable and how deep the influence of its single input has to travel:
import nocad from nocad.datasets import load_nocad_example from nocad.viz import plot_control_cacti, plot_operability_plane adj = load_nocad_example().adj # network of the state variables design = nocad.InputOutputDesign("path_finding").fit(adj) design.driver_nodes_, design.sensor_nodes_ # (array([7]), array([0, 8])) A, B, C, D = design.matrices() # controllable and observable plot_control_cacti(adj) # why: one stem and two buds plot_operability_plane(adj, design.driver_nodes_, design.sensor_nodes_)
The code numbers the nodes from zero; the book prints them as , so the driver node 7 is and the sensor nodes are and . A network is passed as its adjacency matrix adj, whose row lists the successors of ; this matrix is the transpose of the state matrix (section 2.2.3).
1.5 How the book is organized
Chapter 2 introduces state-space models, controllability and observability, structured systems, and Lin’s theorem. Chapter 3 develops maximum matching and the design of inputs and outputs: the minimum input theorem, the problem of perfectly matched source components, signal sharing, path finding, and the exact minimum. Chapter 4 presents the visualization algorithms: the hierarchy of strongly connected components, the bipartite view, control cacti, the block-triangular system matrix, depth maps, and the operability plane. Chapter 5 studies what all maximum matchings share (node roles, edge classes, control profiles) and the robustness of configurations. Chapter 6 treats the connection types and their effect on networks with and without system dynamics. Chapter 7 collects the measures of the system characterisation module, chapter 8 the relative degree and the placement methods, and chapter 9 applies the toolbox to heat exchanger networks, the neural network of C. elegans, and the state matrices of engineering benchmark systems. Every chapter follows the same plan: the problem and the idea, the theory with algorithm and summary boxes, the use of the package, the examples, and further reading.
1.6 Further reading
The review of Liu and Barabási [12] covers the network-science literature on controllability up to 2016; the survey of Dion, Commault and van der Woude [9] and the books of Reinschke and Murota [7, 8] cover structured systems from the control-theoretic side. The monograph of Leitold, Vathy-Fogarassy and Abonyi [3] is the most complete account of the methods implemented in NOCAD, and Hangos and Cameron [26] explain how the structure of process models follows from their balance equations.