making counter for partial discharge due to high voltage in solids
Mostra commenti meno recenti
I'm writing a program to calculate the number of discharges happen in solid material the user enter applied voltage and voltage at which the breakdown occur . By calculating the voltage on void and comparing it with inception voltage if they are equal, counter must increase one and the void voltage become zero and start rising again and so on.
if true
% code
end
er =5;
d=1.2*10^-2;
promot=('enter the peak voltage');
vm=input (promot);
promot=('enter the inception voltage');
vi=input (promot);
promot=('enter void thickness ');
s=input(promot);
t= 0 :.1:3.14;
va = vm *sin(2*t);
vc=((va*s)/(s+((d-s)/er)));
for t=0 :.1:3.14
if vc==vi
vc=0;
n=n+1;
else if vc==-vi
vc=0;
n=n+1;
end
end
end
disp(n);
this is the code but i can't make counter work or makes voltage on void rise again
need help please !
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Switches and Breakers in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!