Assessment of controllability–observability from the impedance matrix