From 7bc77cb1ed33745c720952c92b3b2747c5cbf2df Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Sat, 3 Feb 2018 11:01:52 +0530 Subject: Added new code --- 3871/CH9/EX9.1/Ex9_1.sce | 15 +++++++++++++++ 3871/CH9/EX9.2/Ex9_2.sce | 16 ++++++++++++++++ 3871/CH9/EX9.3/Ex9_3.sce | 14 ++++++++++++++ 3871/CH9/EX9.4/Ex9_4.sce | 27 +++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 3871/CH9/EX9.1/Ex9_1.sce create mode 100644 3871/CH9/EX9.2/Ex9_2.sce create mode 100644 3871/CH9/EX9.3/Ex9_3.sce create mode 100644 3871/CH9/EX9.4/Ex9_4.sce (limited to '3871/CH9') diff --git a/3871/CH9/EX9.1/Ex9_1.sce b/3871/CH9/EX9.1/Ex9_1.sce new file mode 100644 index 000000000..b1343b88c --- /dev/null +++ b/3871/CH9/EX9.1/Ex9_1.sce @@ -0,0 +1,15 @@ +//=========================================================================== +//chapter 9 example 1 + +clc;clear all; + +//variable declaration +N = 1500; //speed of shaft in rm +T =120; //number of teeth on rotator + +//calculatins +f = (N/60)*T; //frequency of output pulses in pulses per second + +//result +mprintf("frequency of output pulses in pulses = %3.2f pulses per second",f); + diff --git a/3871/CH9/EX9.2/Ex9_2.sce b/3871/CH9/EX9.2/Ex9_2.sce new file mode 100644 index 000000000..7febc3cd6 --- /dev/null +++ b/3871/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,16 @@ +//=========================================================================== +//chapter 9 example 2 + +clc;clear all; + +//variable declaration +R = 4; //digital counter reading +G = 0.001; //gatting period in s +T = 150; //number of teeth on rotor + +//calculations +f = R/(G); //number of pulses per second +N = (f/T)*60; //rotational speed in rpm + +//result +mprintf("rotational speed = %3.2f rpm",N); diff --git a/3871/CH9/EX9.3/Ex9_3.sce b/3871/CH9/EX9.3/Ex9_3.sce new file mode 100644 index 000000000..2af2527a4 --- /dev/null +++ b/3871/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,14 @@ +//=========================================================================== +//chapter 9 example 3 + +clc;clear all; + +//variable declaration +H = 120; //number of holes on the rotating disc +f = 5400; //frequency of output pulses in per second + +//calculations +N = (f/(H))*60; //rotational speed in rpm + +//result +mprintf("rotational speed = %3.2f rpm",N); diff --git a/3871/CH9/EX9.4/Ex9_4.sce b/3871/CH9/EX9.4/Ex9_4.sce new file mode 100644 index 000000000..3d6e35306 --- /dev/null +++ b/3871/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,27 @@ +//=========================================================================== +//chapter 9 example 4 +clc; +clear all; + +//variable declaration +f1 = 60; //frequency in Hz +f2 = 50; //frequency in Hz +C1 = 10^-6; //inductance of circuit +R1 = 100; //resistance in Ω +C2 = 1.5*10^-6; //capacitance + +//calculations +L1 = 1/(4*((%pi)^2)*((f1)^2)*C1); //inductance of circuit in H +w = 2*%pi*f2; +Z1 = R1+(%i)*((w*L1)-(1/(w*C1))); //impedance of circuit at 50 Hz Ω +//Z2 = R1+(%i)*((w*L2)-(1/(w*C2))); //impedance of circuit at 50 Hz Ω +//real(Z2) = real(Z1) +//((w*L2)-(1/(w*C2))) = real(Z1)=963 +x =abs((w*L1)-(1/(w*C1))) +y = 1/(w*C2); +L2 =(x+y)/w; +z = sqrt(1/(L2*C2)); +f2 = (1/(2*%pi))*(z); + +//result +mprintf("resonant frequency of circuit = %3.1f Hz",f2); -- cgit