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 /1529/CH16/EX16.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 '1529/CH16/EX16.1')
-rwxr-xr-x | 1529/CH16/EX16.1/16_01.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/1529/CH16/EX16.1/16_01.sce b/1529/CH16/EX16.1/16_01.sce new file mode 100755 index 000000000..63ce13481 --- /dev/null +++ b/1529/CH16/EX16.1/16_01.sce @@ -0,0 +1,18 @@ +//Chapter 16, Problem 1
+clc;
+V=60; //voltage
+R=20; //resistance in ohm
+f=1000; //frequency in hertz
+L=2.387e-3; //inductance in henry
+Ir=V/R; //current flowing in the resistor
+Xl=2*%pi*f*L; //inductive reactance
+Il=V/Xl; //current flowing in the inductance
+I=sqrt(Ir^2+Il^2); //supply current from phasor diagram fig 16.1
+phi=atan(Il/Ir);
+Z=V/I; //impedance
+P=V*I*cos(phi); //power consumed
+printf("(a) Current flowing in the resistor = %d A\n\tCurrent flowing in the inductance = %d A\n\n",Ir,Il);
+printf("(b) Supply current = %d A\n\n",I);
+printf("(c) Circuit phase angle = %.2f deg (lagging)\n\n",phi*(180/%pi));
+printf("(d) Circuit impedance = %.1f ohm\n\n",Z);
+printf("(e) Power consumed = %d W",P);
|