Created
March 21, 2024 17:26
-
-
Save n7275/1398f1c38be910de429c2cdf00b70f3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
clc; | |
RA = 0.1; | |
RB = 0.1; | |
Power = 50; | |
RO = (28^2)/Power; | |
VA = 28.2; | |
VB = 28; | |
IA = (RO*VA - RO*VB + RB*VA)/(RO*RA + RO*RB + RA*RB); | |
IB = (RA*VA - (RO + RA)*(VA - VB))/(RO*RA + RO*RB + RA*RB); | |
PA = IA*VA + IA^2*RA | |
PB = IB*VB + IB^2*RB | |
if(IA < 0.0) | |
RA = 1E15; | |
IA = 0.0; | |
PA = 0; | |
IB = VB/(RO + RB); | |
PB = IB*VB + IB^2*RB | |
endif | |
if(IB < 0.0) | |
RB = 1E15; | |
IA = VA/(RO + RA); | |
PA = IA*VA + IA^2*RA | |
IB = 0.0; | |
PB = 0; | |
endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment