Hello to everyone,
I am sending you here, because I have a problem in this function. I also wrote my problem in the following link but I do not know if the group there is alive.
Inside the function dSbus_dV which a part from newtonpf for calculating the jacobian, in the second case of the if structure (matrix is not sparse as for my case) we have the following:
Ibus = Ybus * asmatrix(V).T
diagV = asmatrix(diag(V))
diagIbus = asmatrix(diag( asarray(Ibus).flatten() ))
diagVnorm = asmatrix(diag(V / abs(V)))
This creates problems at least for me, since in the next line
dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm
the multiplications can not be performed, since we Y_bus with (15,15) and diagVnorm with (1,1).
Do you think it should be changed to:
Ibus = Ybus * asmatrix(V).T
diagV = (diag(V))
diagIbus = (diag( asarray(Ibus).flatten() ))
diagVnorm = (diag(V / abs(V)))
Or this problem is due to my structure?
For my case, i have that:
type(Ybus) = numpy.ndarray and shape gives (15,15)
type(V) = numpy.ndarray and shape gives (15,1)
Thank you for your time.
Best,
Christos Antonakopoulos