home *** CD-ROM | disk | FTP | other *** search
/ Explore the World of Soft…e: Engineering & Science / Explore_the_World_of_Software_Engineering_and_Science_HRS_Software_1998.iso / programs / physics / buford1.exe / RECTIFIR.SIM < prev    next >
Text File  |  1991-01-20  |  629b  |  29 lines

  1. [
  2. This is a model of a single phase half wave rectifier driving a parallel
  3. RC network
  4. ]
  5.  
  6. e=2.7182818;         [ the constant e ]
  7.  
  8. C=1e-4;          [ capacitance, in farads ]
  9. R=300;             [ resistance, in ohms ]
  10.  
  11. Is=1e-12;         [ diode parameters ]
  12. Vt=.026;
  13.  
  14. V=sin(_T_*377);      [ 60 Hz sine wave source ]
  15. Vs=10*V;         [   at 120V ]
  16.  
  17. Ic=Id-Vc/R;
  18. Vc=inta(Ic/C);
  19. Vd=Vs-Vc;
  20. Id=Is*(e^(Vd/Vt)-1);     [ the diode equation  Id=Is*(exp(Vd/Vt)-1) ]
  21.  
  22. print(Vd,Id,Vc,Ic);     [ This won't execute, because of the plot statements ]
  23. plot(_T_,Vd):0,.03,-20,1;
  24. plot(_T_,Id,Ic):0,.03,-.1,.6;
  25. plot(_T_,Vc):0,.03,-1,10;
  26.  
  27. timing .000005,.03;
  28. end;
  29.