summaryrefslogtreecommitdiff
path: root/Working_Examples/215/CH11/EX11.1
diff options
context:
space:
mode:
authorSiddharth Agarwal2019-09-03 18:27:40 +0530
committerSiddharth Agarwal2019-09-03 18:27:40 +0530
commit8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch)
treee1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Working_Examples/215/CH11/EX11.1
parent52a477ec613900885e29c4a0b02806a415b4f83a (diff)
downloadXcos_block_examples-master.tar.gz
Xcos_block_examples-master.tar.bz2
Xcos_block_examples-master.zip
Xcos examples from textbooks and for blocksHEADmaster
Diffstat (limited to 'Working_Examples/215/CH11/EX11.1')
-rwxr-xr-xWorking_Examples/215/CH11/EX11.1/ex11_1.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/Working_Examples/215/CH11/EX11.1/ex11_1.sce b/Working_Examples/215/CH11/EX11.1/ex11_1.sce
new file mode 100755
index 0000000..57ef313
--- /dev/null
+++ b/Working_Examples/215/CH11/EX11.1/ex11_1.sce
@@ -0,0 +1,27 @@
+clc
+//Example 11.1
+//Calculate the powerr absorbed by capacitor and resistor
+printf("Given")
+disp('Capacitor 5uF, Resistor 200 ohm, Voltage source is 40+60*u(t)')
+C=5*10^-6;R=200;
+//For t<0 the value of u(t) is zero hence at t=0- the value of voltage is 40V
+//For t=0+ the voltage is 100V
+//At t=0+ the capacitor cannot charge instantaneously hence resistor voltage is 60V
+disp('For t=0+')
+VR=60;
+i0=VR/R
+T=R*C
+t=1.2*10^-3
+disp('The value of current is i(t)=i0*exp(-t/T)')
+ival=i0*exp(-t/T)
+printf("Value of resistor current at 1.2ms=%3.2f mA \n",ival*10^3)
+//Let PR be the power absorbed by the resistor
+PR=ival^2*R
+printf("Value of resistive power at 1.2ms=%3.2f W \n",PR)
+//Out of the 100V available at t>0 the voltage across the capacitor is
+disp('vC(t)=100-60*exp(-t/T)')
+vCval=100-60*exp(-t/T)
+printf("Value of capacitor voltage at 1.2ms=%3.2f V \n",vCval)
+//Let PC be the power absorbed by the capacitor
+PC=ival*vCval
+printf("Value of capacitive power at 1.2ms=%3.2f W \n",PC) \ No newline at end of file