summaryrefslogtreecommitdiff
path: root/3885/CH2/EX2.1/Ex2_1.sci
blob: 7368c124e55d7f21f24a9ec13fd0044f1e6900c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//control systems by Nagoor Kani A
//Edition 3
//Year of publication 2015
//Scilab version 6.0.0
//operating systems windows 10
// Example 2.1
clc;
clear;
n=300;// number of turns
li=0.01//linearity =1%
v=30//voltage=30V
kp=v/n
disp(kp,'potentiometer constant in (volts/turn)')
nmid=n/2
vmid=kp*nmid
disp(vmid,'voltage at mid point is;')
disp('range of voltage at mid point with 1% linearoty is 14.7volts to 15.3 volts')//vmid(+-)0.3
//assuming potentiometer is perfectly linear so the resistance at midpoint setting from reference is 50kohm
//load resistance of 500Kohm  is connected in parallel with potentiometer
req=(500*50)/(500+50)
v0=(v*req)/(50+req)//using voltage divison rule
disp(v0,'voltage at midpoint with load resistance 500Kohm (in volts)')