This repository contains the calculation of the PTDFs and LODFs of the test system described in the book "Power Generation, operation and control" by Allen J. Wood. The input file corresponds to data.xlsx which contains the information corresponding the topology of the system; the output file contains the values of the PTDFs and LODFs, and finally, the Python File contains the code for doing the corresponding calculation.