summaryrefslogtreecommitdiff
path: root/2210/CH7/EX7.6/7_6.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2210/CH7/EX7.6/7_6.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2210/CH7/EX7.6/7_6.sce')
-rwxr-xr-x2210/CH7/EX7.6/7_6.sce38
1 files changed, 38 insertions, 0 deletions
diff --git a/2210/CH7/EX7.6/7_6.sce b/2210/CH7/EX7.6/7_6.sce
new file mode 100755
index 000000000..d6326e25d
--- /dev/null
+++ b/2210/CH7/EX7.6/7_6.sce
@@ -0,0 +1,38 @@
+//Chapter 7, Problem 6
+clc
+funcprot(0)
+// A = p2z(R,Theta) - Convert from polar to rectangular form.
+// R is a matrix containing the magnitudes
+// Theta is a matrix containing the phase angles (in degrees).
+function [A] = p2z(R,Theta)
+ A = R*exp(%i*%pi*Theta/180);
+endfunction
+
+// [R1, Theta1] = z2p(A1) - Display polar form of complex matrix.
+function [R1, Theta1] = z2p(A1)
+ Theta1 = atan(imag(A1),real(A1))*180/%pi;
+ R1=sqrt(real(A1)^2+imag(A1)^2)
+endfunction
+
+//transistor s-parameter
+s11=p2z(0.28,-58)
+s12=p2z(0.08,92)
+s21=p2z(2.1,65)
+s22=p2z(0.8,-30)
+Ds=p2z(0.333,-60.66)
+C2=p2z(0.719,-33.42)
+D2=0.529 //angle in degree
+K=1.168 //Rollett stability factor
+A=6.31 //desired gain
+[s11m,s11a]=z2p(s11)
+[s22m,s22a]=z2p(s22)
+[s21m,s21a]=z2p(s21)
+[s12m,s12a]=z2p(s12)
+
+//calculating the radius of constant gain circle of 9 dB
+G=A/s21m^2
+ro=conj(G*C2)/(1+(D2*G))
+[rom,roa]=z2p(ro)
+po=sqrt(1-(2*K*G*s12m*s21m)+((s12m*s21m)^2*G^2))/(1+(D2*G))
+
+printf("Constant gain circle of 8 dB = %.3f ",po)