AnonymousEng

Lab 001 - High Voltage

Feb 20th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.96 KB | None | 0 0
  1. % Data from the lab
  2.     % Gap distance
  3.     d = (1e-3)*[2 3 4 5 6];    
  4.     % Negative DC BD volt
  5.     Dc_neg = (1e3)*[6.4 9.5 12 13 14.5];
  6.     % Positive DC BD volt
  7.     Dc_pos = (1e3)*[7.6 10 14.5 15 17];
  8.     % AC BD volt
  9.     Ac = (1e3)*[5.5 7.4 8.8 10.1 11.8];
  10.    
  11. %Using the poly fit function to get the approximated curves (polynomials)
  12.     % I will take gap distances form (1mm) to (10mm) with step (1 micro m)
  13.     d_fit = [0.001:0.00001:0.01];
  14.     % Using the polyfit
  15.         p_Dc_neg = polyfit(d,Dc_neg,1)
  16.         p_Dc_pos = polyfit(d,Dc_pos,1)
  17.         p_Ac     = polyfit(d,Ac,1)
  18.        
  19. % Getting the y axis values using the approximated polynomials
  20.     Dc_neg_fit = polyval(p_Dc_neg,d_fit);
  21.     Dc_pos_fit = polyval(p_Dc_pos,d_fit);
  22.     Ac_fit = polyval(p_Ac,d_fit);
  23.  
  24. % Plotting the curves and the practical points
  25.     %Dc negative curve
  26.     subplot(3,3,1);
  27.     plot(d_fit,Dc_neg_fit,'--b',d,Dc_neg,'ob'),xlabel('Gap Distance'),ylabel('BreakDown Voltage');
  28.     title('Negative DC BreakDown Voltage Vs. Gap Distance'),grid on,legend('DC Negative','DC Negative(practical)');
  29.    
  30.     %Dc positive curve
  31.     subplot(3,3,2);
  32.     plot(d_fit,Dc_pos_fit,'-r',d,Dc_pos,'or'),xlabel('Gap Distance'),ylabel('BreakDown Voltage');
  33.     title('Positive DC BreakDown Voltage Vs. Gap Distance'),grid on,legend('DC Positive','DC Positive(practical)');
  34.    
  35.     %AC curve
  36.     subplot(3,3,3);
  37.     plot(d_fit,Ac_fit,'k',d,Ac,'ok'),xlabel('Gap Distance'),ylabel('BreakDown Voltage');
  38.     title('AC BreakDown Voltage Vs. Gap Distance'),grid on,legend('AC','AC(practical)');
  39.    
  40.     % All
  41.     subplot(3,3,4:9);
  42.     plot(d_fit,Dc_neg_fit,'--b',d,Dc_neg,'ob',d_fit,Dc_pos_fit,'-r',d,Dc_pos,'or',d_fit,Ac_fit,'k',d,Ac,'ok');
  43.     xlabel('Gap Distance'),ylabel('BreakDown Voltage')
  44.     title('Positive,Negative DC and Ac BreakDown Voltage Vs. Gap Distance'),grid on;
  45.     legend('DC Negative','DC Negative(practical)','DC Positive','DC Positive(practical)','AC','AC(practical)');
Advertisement
Add Comment
Please, Sign In to add comment