summaryrefslogtreecommitdiff
path: root/3871/CH5/EX5.27/Ex5_27.sce
blob: 63e5bf63ab9692beb75b186fb3e87ec8201d75a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//=============================================================
//Chapter 5 example 27

clc;
clear all;


//variable declaration
//V   = (5*sin(theta))+(0.6*sin(3*theta))\

a       = 5;        
b       = 0.6;
rd          = 35;       //resistance in Ω
ra          = 30;       //resistance in Ω

//calculations
R       = (3*rd)+ra;            //resitance in  Ω
//i       = v/R
//i         = (5*sin(theta)/R)+(0.6*(sin(3*theta)/R))
x1          = a/R;
y1          =b/R;
//i         = (x1*sin(theta))+(y1*sin(3*theta))
//Iav       = ((1/%pi)*{(integral(i*dtheta))}(0-%pi)))
//Iav       = (1/%pi)*((0.5*sin(theta))-(0.006/3)*(cos(3*theta)))  
//solving above equation we get (1/%pi)*(1)
p           = (-0.05*((cos((180*%pi/180))-cos(0))))-((0.002*((cos(3*180*%pi/180))-cos(3*0))));
z       = (1/%pi)*p;            //average value in mA


//result
mprintf("average value reading of PMMC ammeter = %3.1f mA",(z*10^3));