Kron Reduction using Matlab Code

Kron Reduction
In power system anylasis, kron reduction is a way of reducing buses in Y bus matrix of the power system. It usually used for two reasons
  1.             To remove a bus where current injection is zero to reduce size of matrix thereby effectively making computation easy. Buses with no load or source don't inject currents.
  2.            To use only some buses specific buses instead of whole system to know required voltages only. This way we can get voltages of our interest with less computational power of our computer.

If Y j ,k  is our matrix to be kron reduced and p is number of row and coloum to be reduced then this formula is used to find kron reduced elements.

Matlab Code:
%Author: Muhammad Awais fb/awais12506
%Kron Reduction
%p is row and colum to be removed
%Y is array to be kron reduced

clear all
clc
p=2;
Y=[-16.75i 11.75i 2.5i 2.5i
    11.75i -19.25i 2.5i 5i
    2.5i 2.5i -5.8i 0
    2.5i 5i 0 8.3i];
[row,col]=size(Y);   
Y_new=zeros(row,col);  %Produces 4 by 4 matrixes of zeros

%In this loop all p colum and row is replaced by 0 and other by respective
%value
for k=1 :row
    for l=1 : col
        if k==p || l==p
            Y_new(k,l)=0;
        else 
           Y_new(k,l)=Y(k,l)-((Y(k,p)*Y(p,l))/(Y(p,p)));
           
        end
    end
end
% To remove p row and colum
Y_new(:, p) = [];
Y_new(p, :) = [];
Y_new




Example:

Kron Reduction by calculation

Kron Reduction by our Program:
Y_new =
        0 - 9.5779i        0 + 4.0260i        0 + 5.5519i
        0 + 4.0260i        0 - 5.4753i        0 + 0.6494i
        0 + 5.5519i        0 + 0.6494i        0 + 9.5987i

There was a mistake while entering data so answer was a bit wrong. Mistake is corrected and now also I have written the code in function form ....

MATLAB Code:
%Author: Muhammad Awais fb/awais12506
%Descrption: Function uses Kron Reduction to reomove a column
%Input:Y==> Matrix to be reduced, p==> Row and Colum to be removed
%OutPut: Reduced Matrix
function Y_Reduced=KronReduction(Y,p)
[row,col]=size(Y);
Y_new=zeros(row,col);  %Produces 4 by 4 matrixes of zeros

%In this loop all p colum and row is replaced by 0 and other by respective
%value
for k=1 :row
    for l=1 : col
        if k==p || l==p
            Y_new(k,l)=0;
        else
           Y_new(k,l)=Y(k,l)-((Y(k,p)*Y(p,l))/(Y(p,p)));

        end
    end
end
% To remove p row and colum
Y_new(:, p) = [];
Y_new(p, :) = [];
Y_Reduced=Y_new;
end

Output:


21 comments:

  1. I think your code is ok, but you have a mistake when declaring the (4,4) element on the z matrix, its -8.3i(you missed the negative), thats why the result is different. Thanks!!!

    ReplyDelete
    Replies
    1. Oh Yeah, Thanks for the helping. :)
      Stay connected

      Delete
    2. I have corrected the mistake and also updated the code a little bit. Thanks. I hope you will stay connected with the blog in future.

      Delete
    3. Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download Now

      >>>>> Download Full

      Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download LINK

      >>>>> Download Now

      Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download Full

      >>>>> Download LINK MC

      Delete
  2. Thank you :)

    ReplyDelete
  3. "Y_new=zeros(row,col);"and "p=2;", what does this mean? can you reply on this one? thank you!

    ReplyDelete
  4. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in MATLAB, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on MATLAB. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/




    ReplyDelete
  5. if i want to remove two or more rows of a matrix, how can it be done. For example matrix size is (10,10) and removing no of 4 and 7 row?

    ReplyDelete
  6. Thanks for the code... and let tell you that i have also write code for fft matlab not even that you will also find some useful tuts for Radix-2 fft and Radix-4 fft.

    ReplyDelete
  7. Can you please tell how to remove multiple rows?

    ReplyDelete
  8. thanks a lot bro zabardast

    ReplyDelete
  9. ham b ye he book follow kr rahy hain stevenson ki

    ReplyDelete
  10. I'm really impressed with your writing skills, as smart as the structure of your


    Latest Software Free Download



    weblog. Is this a paid topic



    Webmmax crack



    do you change it yourself? However, stopping by with great quality writing, it's hard to see any good blog today.



    Usb disk security-crack





    Bluestacks -crack





    zookaware -crack




    matlab pro crack

    ReplyDelete
  11. I'm really impressed with your writing skills, as smart as the structure of your


    Latest Software Free Download



    weblog. Is this a paid topic



    Diskdigger crack



    do you change it yourself? However, stopping by with great quality writing, it's hard to see any good blog today.



    Program4pc audio converter-crack





    Diskdigger-crack





    Reimage pc reapir -crack




    Matalab pro crack

    ReplyDelete
  12. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
    Very interesting blog.
    getmacsoftware.com
    LastPass Password Manager Crack

    ReplyDelete
  13. Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download Now

    >>>>> Download Full

    Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download LINK

    >>>>> Download Now

    Uetian Blogger: Kron Reduction Using Matlab Code >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  14. I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to Easy to Direct Download All Software With Full Activation Key But thankfully, I recently visited a website named vstpirate
    FxSound Enhancer Premium Crack

    ReplyDelete
  15. After reading a few of the blog pages on your website, we like your writing style.
    fullgetpc.com
    Visit the website and share your thoughts with us.

    ZookaWare Pro Crack

    ReplyDelete

Thank you for your response.