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 --- 3554/CH14/EX14.1/Ex14_1.sce | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 3554/CH14/EX14.1/Ex14_1.sce (limited to '3554/CH14/EX14.1/Ex14_1.sce') diff --git a/3554/CH14/EX14.1/Ex14_1.sce b/3554/CH14/EX14.1/Ex14_1.sce new file mode 100644 index 000000000..1e65631f7 --- /dev/null +++ b/3554/CH14/EX14.1/Ex14_1.sce @@ -0,0 +1,45 @@ +// Exa 14.1 + + clc; +clear all; + + +// Given data + +fa=800; // The highest frequency(Hz) +Vp=2; //Volts + + +// Solution +disp("Let C1=0.1 micro farads") +C1=0.1; // micro farads +// Then Rf is given as +Rf=1/(2*%pi*C1*10^-6*fa);// Ohms +printf(' Calculated value of Rf = %.3f k Ohms. selecting nearest higher value of 2.2 k Ohms \n ',Rf/1000); + +fb=20*fa; +R1=1/(2*%pi*C1*10^-6*fb);// Ohms +printf('The calculated value of R1 = %.1f Ohms. Let R1=100 Ohms \n',R1); + +// Since R1*C1=Rf*Cf +Cf=R1*C1*10^-6/2200;//Rf is taken as 2.2 k Ohms as stated above +printf(' The value of Cf = %.5f micro farads. Let Cf=0.0047 micro farads \n',Cf*10^6); + +Rom=(1/100+1/2200)^-1; +printf(' Rom = %.1f Ohms \n',Rom); + +t=0:0.1*10^-3:1.5*2.50*10^-3; + +Vin=Vp*sin(2*%pi*fa*t);//Input Voltage equation +xlabel("Time(sec)"); +ylabel("Voltage(V)"); +title("Input Voltage"); +plot2d(t,Vin); +figure(1); + +Vo=-2200*0.1*10^-6*Vp*2*%pi*fa*cos(2*%pi*800*t);//Output voltage equation +xlabel("Time(sec)"); +ylabel("Voltage(V)"); +title("Output Voltage"); +plot2d(t,Vo); +// The answers vary due to round off error -- cgit