Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
|
Functions | |
get_input (choice, n) | |
calculate_admittance_matrix (y) | |
calculate_zbus (Ybus) | |
display_matrix (matrix) | |
main () | |
Variables | |
n = int(input()) | |
Ybus = np.array([[0+0j for i in range(n)] for j in range(n)]) | |
y = np.zeros((n,n),dtype=complex) | |
Zbus_Python.calculate_admittance_matrix | ( | y | ) |
Forms admittance matrix using the admittance value matrix y Args: y(np.array): Line Admittance Matrix Returns: Ybus(np.array) : Bus Admittance Matrix
Zbus_Python.calculate_zbus | ( | Ybus | ) |
Calculates the bus impedance matrix from the bus admittance matrix Args: Ybus(np.array): Bus Admittance Matrix Returns: Zbus(np.array) : Bus Impedance Matrix
Zbus_Python.display_matrix | ( | matrix | ) |
Displays the matrix to the console Args: matrix(np.array): The matrix to be displayed
Zbus_Python.get_input | ( | choice, | |
n | |||
) |
Gets the input from the user based on the choice of impedance or admittance , calculates admittance values and returns them Args: choice(int) : the choice of the user(1 for impedance and 2 for admittance) n(int) : Total no.of buses in the system Returns: y(np.array) : Line Admittance matrix
Zbus_Python.main | ( | ) |
The main function
Zbus_Python.n = int(input()) |