Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
Loading...
Searching...
No Matches
Functions | Variables
Zbus_Python Namespace Reference

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)
 

Function Documentation

◆ calculate_admittance_matrix()

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

◆ calculate_zbus()

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

◆ display_matrix()

Zbus_Python.display_matrix (   matrix)
Displays the matrix to the console

Args:
    matrix(np.array): The matrix to be displayed

◆ get_input()

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

◆ main()

Zbus_Python.main ( )
The main function

Variable Documentation

◆ n

Zbus_Python.n = int(input())

◆ y

Zbus_Python.y = np.zeros((n,n),dtype=complex)

◆ Ybus

Zbus_Python.Ybus = np.array([[0+0j for i in range(n)] for j in range(n)])