diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /3041/CH8/EX8.1 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '3041/CH8/EX8.1')
-rwxr-xr-x | 3041/CH8/EX8.1/Ex8_1.sce | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/3041/CH8/EX8.1/Ex8_1.sce b/3041/CH8/EX8.1/Ex8_1.sce new file mode 100755 index 000000000..e61eef580 --- /dev/null +++ b/3041/CH8/EX8.1/Ex8_1.sce @@ -0,0 +1,28 @@ +//Variable declaration +C=0.1 //capacitance(uF) +R1=10 //resistance(k ohms) +R2=2.3 //resistance(k ohms) +Vcc=12. //supply voltage(V) +Rl=10**3. //resistance(k ohms) + +//Calculations +//Part a +f=1/(0.693*C*(R2+R1/2)) //frequency(Hz) + +//Part b +D=(1+(R2/R1))/(1+2*(R2/R1))*100 //duty cycle + +//Part c +//(i) +T1=0.693*C*(R1+R2) //time period through R1(ms) +T2=0.693*R2*C //time period through R2(ms) +Pavg=(Vcc/Rl)**2*(T1/(T1+T2)) //average power dissipated during current sourcing(mW) + +//Part d +Pavg1=(T2/(T1+T2))*(Vcc/Rl)**2 //average power dissipated during current sinking(mW) + +//Results +printf (" %.2f kHz",f) +printf ("duty cycle is %.2f %%",D) +printf ("average power dissipated in current sourcing is %.3f mW",Pavg/1E-3) +printf ("average power dissipated in current sinking is %.3f mW",Pavg1/1e-3) |