浏览代码

Kommit igång med att få figurerna för pulser som jag vill ha dem

Jonatan Gezelius 5 年之前
父节点
当前提交
6aa83d9ff9
共有 5 个文件被更改,包括 17 次插入6 次删除
  1. 二进制
      rapport/fig/doubleexpfunc.png
  2. 1 1
      rapport/methods.tex
  3. 二进制
      scilab/pulses/doubleexpfunc.png
  4. 11 4
      scilab/pulses/many pulses.sce
  5. 5 1
      scilab/pulses/pulse shape.sce

二进制
rapport/fig/doubleexpfunc.png


+ 1 - 1
rapport/methods.tex

@@ -35,7 +35,7 @@ In either case, the following tasks should be considered if there is time:
 \end{enumerate}
 
 \section{Examination and initial measurement of the old equipment}
-To decide the forthcoming of the project, the equipment first had to be checked to see if it's performance were within the limits for use with the newer standard. Because there is no dummy loads available at this point of the project, only open load measurements could be done.
+To decide the forthcoming of the project, the equipment first had to be checked to see if its performance were within the limits for use with the newer standard. Because there is no dummy loads available at this point of the project, only open load measurements could be done.
 
 With exception for Pulse 3a and Pulse 3b, all of these pulses were measured with the use of the high voltage differential probe described in \autoref{sec:hv-diff-probe}. The pulses are measured both directly on each generator connected according to \autoref{fig:manual-measurement-hv-diff} and also through the coupling network CNA~200, as depicted in \autoref{fig:manual-measurement-hv-diff-cna}. 
 \todo[figure of connection]

二进制
scilab/pulses/doubleexpfunc.png


+ 11 - 4
scilab/pulses/many pulses.sce

@@ -6,32 +6,39 @@ a = 1;
 b = 2;
 k = 1;
 
+offset = 0;
+
 y = k*(exp(-a*t) - exp(-b*t) );
 ymax = max(y)*ones(1,length(y));
 
+// Create repetetive puses
 ylong=[];
 tlong=[];
 for i = [-1:11]
-    if(modulo(i, 5) == 0)
+    if(modulo(i, 5) == 0) // Only each fifth should be pulse
         disp('yoman!')
         ylong = [ylong y];
-    else
+    else // The rest is zero
         disp('shitdude!')
         ylong = [ylong zeros(1,length(y))];
     end
 end
 
+// Add offset voltage and create x axis
+ylong = ylong + offset;
 xlong = [1:length(ylong)];
 
+// Plot vertical lines
 xpts = [1 1];
 ypts = [-1 0];
 plot(xpts*1000, ypts, '--');
 plot(xpts*6000, ypts, '--');
 //plot(xpts*8.96, ypts, '--');
 
+// Plot lines
 plot(ylong, 'black');
-plot(ones(1,length(ylong))*-.01, 'white');
-plot(ones(1,length(ylong))*max(ylong)*1.01, 'white');
+//plot(ones(1,length(ylong))*-.01, 'black');
+//plot(ones(1,length(ylong))*max(ylong)*1.01, 'black');
 //plot(t,ymax.*0.9, '--');
 
 // titletxt = ['$y = k(e^{-\alpha t} - e^{-\beta t})$' ; strcat(['$k=', string(k), ', \alpha=', string(a), ', \beta=', string(b), '$']) ];

+ 5 - 1
scilab/pulses/pulse shape.sce

@@ -1,7 +1,7 @@
 xdel(winsid())
 clear;
 
-t = [0:0.01:10];
+t = [0:0.01:20];
 a = 0.5;
 b = 0.6;
 k = 1;
@@ -9,6 +9,8 @@ k = 1;
 y = k*(exp(-a*t) - exp(-b*t) );
 ymax = max(y)*ones(1,length(y));
 
+//y = [zeros(1,500) y];
+
 xpts = [1 1];
 ypts = [0 max(y)];
 plot(xpts*0.07, ypts, '--');
@@ -28,3 +30,5 @@ ylabel('U (V)', 'fontsize', 7, 'rotation', 0);
 
 a = get("current_axes");
 a.axes_visible = "off";
+a.data_bounds = [0,-0.01;20,0.07];
+