nocad: network-based controllability and observability analysis#

nocad

nocad analyses the controllability and observability of dynamical systems on the network of their state variables. It is the Python successor of the NOCAD toolbox for MATLAB and Octave (Leitold, Vathy-Fogarassy and Abonyi) and contains its three modules — network mapping, system characterisation, improvement and robustness — together with an exact minimum-input design, matching-invariant node roles and edge classes, control profiles, and a set of visualization algorithms that show why a system is controllable or observable.

Input/output design

Maximum matching, path finding, signal sharing and the exact minimum of dedicated inputs; state-space matrices that are controllable and observable.

Input and output design
Structural tests

Lin’s structural controllability test, Kalman and PBH tests, generic dimension of the controllable subspace, control centrality.

Controllability and observability tests
Matchings and roles

Critical, intermittent and redundant nodes; critical, ordinary and redundant edges; enumeration of maximum matchings.

Matchings, node roles and edge classes
Visualization

SCC hierarchy, bipartite view, control cacti, block-triangular system matrix, depth maps, operability plane, profiles, heat maps.

Visualization
System characterisation

About fifty network, node and edge measures of the MATLAB toolbox, including driver/sensor similarity and endpoint/edge similarity.

System characterisation
Placement and robustness

Relative degree, set covering, centrality-based retrofit, mCLASA and GDFCMSA; node- and edge-removal robustness.

Placement of additional inputs and outputs
Connection types

Self-influence and interactions, the seven connection types and the heat maps of the NOCAD study.

Connection types
Import, export, annotations

NetworkX, igraph, pandas, python-control and MATLAB; GraphML, GEXF, Cytoscape, DOT, CSV and Excel files; every node and edge labelled by its role.

Interoperability
Data sets

The benchmark networks of the NOCAD study, the C. elegans frontal network, water tanks and heat exchanger networks.

Data sets
The book

Network-Based Controllability and Observability Analysis in Python: theory, algorithms and every example of the gallery.

The book

Quick start#

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 (A transposed)
design = nocad.InputOutputDesign("path_finding").fit(adj)
design.driver_nodes_, design.sensor_nodes_   # nodes that need an input / an output
A, B, C, D = design.matrices()               # a controllable and observable system
design.is_controllable(), design.is_observable()

plot_control_cacti(adj)                      # why it is controllable
plot_operability_plane(adj, design.driver_nodes_, design.sensor_nodes_)