SHARE
TWEET

Objective function

Ailili1997 Nov 11th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %===========================================%
  2. %Power Electronics in Distribution Networks %
  3. %Coursework Task 2 Objective function       %
  4. %===========================================%
  5. function f=Psop(x)
  6. global V1;
  7. global G12;
  8. global B12;
  9. global G13;
  10. global B13;
  11. global G14;
  12. global B14;
  13. global G22;
  14. global B22;
  15. global G23;
  16. global B23;
  17. global G33;
  18. global B33;
  19. global G24;
  20. global B24;
  21. global G34;
  22. global B34;
  23. global G44;
  24. global B44;
  25. global PG;
  26. global PSOP;
  27. %Psop=PG-P2
  28. %When calculate maximum value of Psop, change signe of f
  29. f=(PG-(V1*x(1)*(G12*cos(x(4))+B12*sin(x(4)))+x(1)^2*G22+x(1)*x(2)*(G23*cos(x(4)-x(5))+B23*sin(x(4)-x(5)))+x(3)*x(1)*(G24*cos(x(4)-x(6))+B24*sin(x(4)-x(6)))));
  30. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top