diff options
Diffstat (limited to '62/CH6/EX6.43/ex_6_43.sce')
-rwxr-xr-x | 62/CH6/EX6.43/ex_6_43.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/62/CH6/EX6.43/ex_6_43.sce b/62/CH6/EX6.43/ex_6_43.sce new file mode 100755 index 000000000..5b1e47bc0 --- /dev/null +++ b/62/CH6/EX6.43/ex_6_43.sce @@ -0,0 +1,29 @@ +close;
+clear;
+clc;
+disp("the system can be represented as Yc(s)=Xc(s)/(1+RCs)");
+disp("therefore Hc(s)=1/(1+RCs) hence hc(t)=e^-t*u(t) by frequency shifting property")
+disp("therefore hd[n]=hc(t)=e^(-n*Ts)*u[n]");
+disp("taking z-transform Hd(z)=1/(1-e^(-n*Ts)*z^-1)");
+Ts=1;
+w=0:0.1:15;
+Hcw=ones(1,length(w))./(1+%i*w);
+subplot(2,1,1)
+plot(w,Hcw,'r')
+//z=%e^%i*w*Ts
+title("Ts=1")
+Hdw=ones(1,length(w))./(1-exp(-Ts-%i*w*Ts));
+plot(w,Hdw,'b')
+legend(["Hc(w)";"Hd(wTs)"])
+Ts=0.1;
+w=0:0.1:15;
+Hcw=ones(1,length(w))./(1+%i*w);
+subplot(2,1,2)
+plot(w,Hcw,'r')
+//z=%e^%i*w*Ts
+title("Ts=0.1")
+Hdw=ones(1,length(w))./(1-exp(-Ts-%i*w*Ts));
+//Hdw=ones(1,length(w))./(1+%e^(-2*Ts)-2*%e^(-Ts)*cos(w*Ts))^.5;
+plot(w,Hdw,'b')
+legend(["Hc(w)";"Hd(wTs)"])
+
|