From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 165/CH14/EX14.1/ex14_1.sce | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 165/CH14/EX14.1/ex14_1.sce (limited to '165/CH14/EX14.1/ex14_1.sce') diff --git a/165/CH14/EX14.1/ex14_1.sce b/165/CH14/EX14.1/ex14_1.sce new file mode 100644 index 000000000..b4d22abb8 --- /dev/null +++ b/165/CH14/EX14.1/ex14_1.sce @@ -0,0 +1,40 @@ +//Example 14.1 +clc; + +//Design a differentiator +fa=800; //Given Frequency in Hz +C1=0.1*10^-6; //Assumed value of capacitor + +//Feedback resistence +Rf=invr(2*%pi*fa*C1); +//Assume a std value of feedback resistence +Rf=2.2*10^3; + +//Gain limiting frequency; fb=20fa +fb=20*fa; +R1=invr(2*%pi*fb*C1); +//Assume a std value of input resistence +R1=100; + +//Feedback Capacitance +Cf=R1*C1/Rf; +//Assume a std value of feedback Capacitance +Cf=4.7*10^-9; + +printf('\nAssumed value of Input capacitor C1 = %.2f uF \n',C1*10^6) +printf('\nValue of Input Resistor R1 = %.2f ohm \n',R1) +printf('\nValue of Feedback capacitor Cf = %.2f nF \n',Cf*10^9) +printf('\nValue of Feedback Resistor Rf = %.2f k ohm \n',Rf/1000) + +Vp=2; //Peak voltage in V +w=2*%pi*fa; +T=2*w; +t=0:50:T; +Vin=Vp*sin(t/2); +a=gca(); +subplot(2,1,1); +plot(Vin); +Vpo=Rf*C1*2*2*%pi*800; +Vo=-Vpo*cos(t/2); +subplot(2,1,2); +plot(Vo); \ No newline at end of file -- cgit