Sunteți pe pagina 1din 49

7.3.

DESCRIEREA ROGRAMULUI PATCA PROGRAM


TOLERANELOR CIRCUITELOR ANALOGICE

DE

ANALIZA

Inevitabila distribuie a valorilor parametrilor din circuitele fabricate este asociat cu tolerana
parametrilor circuitului. Astfel, tolerana definete un interval de valori posibile pe care parametrii
circuitului le pot lua. De notat c, n circuitele fabricate pe scar larg, componentele pot varia de la
valoarea lor nominal, n procente de la 0.1% la mai mult de 30%.
Aceasta nseamn c analiza unui circuit trebuie fcut pentru un interval potrivit de valori ale
parametrilor, n jurul valorilor nominale. O astfel de analiz se refer la analiza de toleran.
Programul PATCA este o aplicaie, realizat n mediul de programare MATLAB versiunea 7.1, care
calculeaz si evideniaz, n mod grafic, contribuia toleranei fiecrui element de circuit la valoarea
unei funcii de transfer (amplificare n tensiune, impedan de transfer etc.) [43]. Listingul programului
PATCA este prezentat n ANEXA 14.
Fereastra de utilizare a programului PATCA este prezentat n figura 7.1, programul folosete
ca date de intrare un fiier de tip netlist pentru descrierea circuitului.

Fig. 7.1. Fereastra de utilizare a programului PATCA.


Metodele de formulare simbolic, parial simbolic sau numeric a ecuaiilor nodale
modificate pentru circuitele liniare electronice analogice au fost implementate ntr-un program numit
PATCA Program de Analiz a Toleranelor Circuitelor Analogice, pe un calculator Pentium Dual
Core compatibil IBM.
Programul PATCA genereaz n form simbolic, parial simbolic sau numeric, n raport cu
porile intrare ieire specificate de utilizator, oricare din cele patru tipuri de funcii de circuit
(impedana de transfer Zei, admitana de transfer Yei, factorul de transfer (amplificare) n tensiune
Aei i factorul de transfer (amplificare) n curent Bei) pentru circuitele electronice analogice liniare i
pentru cele neliniare, liniarizate n jurul unui punct de funcionare.
Pornind de la descrierea circuitului printr-un fiier de intrare de tip netlist, PATCA are,
conform cu fereastra de utilizare din figura 7.1, urmtoarele capabiliti:
> genereaz simbolic, parial simbolic sau numeric ecuaiile nodale modificate pentru
circuitele electrice i electronice liniare;

> formeaz simbolic matricea extins a sistemului de ecuaii i determin soluia simbolic,
parial simbolic sau numeric a sistemului i a circuitului (tensiunile i curenii laturilor ntregului
circuit);
> calculeaz valoarea determinantului matricei sistemului ecuaiilor nodale modificate
(ENM). n cazul analizei circuitelor liniare n operaional PATCA determin zerourile determinantului
i localizarea acestora n planul complex;
> calculeaz senzitivitatea oricrei mrimi (curent, tensiune sau potenial) specificat de
utilizator n raport cu oricare parametru al circuitului i reprezint grafic n spaiul 3D modulul
senzitivitii n raport cu frecvena i valorile parametrului considerat n domeniile de variaie ale
acestor mrimi indicate de utilizator;
> calculeaz tolerana circuitelor cu ajutorul metodei AVE i reprezint grafic modul de
variaie a acestora n raport cu frecvena i valoarea funciei;
> calculeaz tolerana circuitelor cu ajutorul metodei RSP i reprezint grafic modul de
variaie a acestora n raport cu frecvena i valoarea funciei;
> calculeaz tolerana circuitelor cu ajutorul metodei Monte Carlo, metoda Monte Carlo
Rapid i reprezint grafic modul de variaie a acestora n raport cu frecvena i valoarea funciei.
Reprezentare rezultatelor distribuiei normale sau distribuiei gaussiene sub form de histograme.
Programul PATCA este scris n limbaj Matlab i constituie un instrument interactiv care
mbin tehnicile de calcul simbolic i numeric ct i modul de reprezentare grafic a acestui utilitar.
Datele de intrare sunt un set de nl linii care descriu laturile circuitului. Fiecare latur de circuit
este descris de tipul elementului de circuit, nodul iniial, nodul final, valorea nominal i valoarea
toleranei parametrului. n cazul unei surse comandate trebuie de asemenea s se introduc nodurile
laturii de comand. Elementele de circuit sunt descrise similar cu cele de la programul SPICE.
Programul PATCA genereaz cele patru tipuri de funcii de circuit astfel: aplic la bornele
porii de intrare mrimea de excitaie corespunztoare funciei de circuit dorite, apoi calculeaz, cu
metoda nodal modificat, mrimea de ieire specific funciei de circuit generate i n final, fcnd
raportul dintre expresia mrimii de ieire i mrimea de intrare, se obine expresia funciei de circuit.
Pentru a descrie paii de utilizare a programului folosim un filtru universal prezentat n figura
7.2.

Fig. 7.2. Filtru universal.


n funcie de alegerea bornelor de ieire (bornele de intrare fiind 1 11), acesta poate fi:
> un filtru trece sus (ieire 4 - 11) - FTS;
> un filtru trece band (ieire 6 - 11) - FTB;
> un filtru trece jos (ieire 8 - 11) - FTJ;
> un filtru oprete band (ieire 10 - 11) - FOB.
Utilizarea aplicaiei presupune urmtorii pai:

Pasul 1. se ncarc fiierul cu descrierea circuitului (scris sub forma fiierelor Spice). Forma general
a unei linii din acest fiier arat astfel:
tipul_elem nod_iniial nod_final

valoare tolerana

Pentru exemplul din figura 7.2 fiierul filtruuniversal.cir are forma:


R1 1 2 100000 2
R2 2 0 100000 2
R3 3 4 10000 2
R4 4 5 20000 2
C5 5 6 0.000000001 10
R6 6 7 20000 2
R7 3 8 100000 2
C8 8 7 0.000000001 10
R9 8 9 10000 2
R10 9 10 100000 2
R11 4 9 10000 2
R12 6 2 100000 2
R13 2 3 100000000 2
A1 0 4 10000 10
R15 0 5 100000000 2
A2 0 6 10000 10
R17 0 7 100000000 2
A3 0 8 10000 10
R19 0 9 100000000 2
A4 0 10 10000 10

Pasul 2. Calculeaz funcia de transfer monitorizat n form simbolic (ca fiier text). Funcia parial
simbolic obinut cu ajutorul programului PATCA a factorului de amplificare n tensiune (pentru
filtrul trece band) este de forma:
Aei(s):=11/2*R12/((2e14*C5*C8+4e09*C5*R12*C8)*s^2+
11e09*s*C8+R12+5e04).

Dup ncrcarea celor dou fiiere i alegerea frecvenei iniiale respectiv a frecvenei finale n
partea dreapt a ferestrei de lucru va aprea forma de variaia a funciei n cazul valorilor nominale
forma este prezentat n figura 7.3.

Fig. 7.3. Caracteristica amplitudine frecven a filtrului trece band.


Pasul 3. La acest pas utilizatorul poate s ruleze circuitul de N ori prin apsarea unui buton. Aceste
rulri vor ine seama de efectele toleranelor componentelor din cadrul funciilor de circuit i se obine
astfel un grafic care s prezinte influena acestor tolerane asupra funcionrii circuitului. Cu ct
numrul de rulri N este mai mare cu att anliza de toleran este mai bun.

n lipsa unei analize de toleran, se pot ntlni cazuri n care, chiar dac fiecare element de
circuit se gsete ntre limitele sale de toleran, pe ansamblu, performana circuitului nu corespunde
specificaiilor impuse.
Pasul 4. n timpul pasului anterior se salveaz valorile maxime ale funciei de transfer sau ale mrimii
de ieire. Cu ajutorul acestor valori se construiete o histogram care prezint o distribuie a valorilor
ntr-o anumit gam de frecvene (fig. 7.4).
Atunci cnd cutm valoarea 3 a unei funcii, se presupune n general c funcia are o
variaie de tip Gaussian. Deviaia standard () are puine semnificaii pentru distribuiile ne-gaussiene
atunci cnd intenionm s vizualizm mereu locaia punctului 3. Majoritatea, dac nu toate circuitele
cu produsul senzitivitate-toleran mic sunt aproximativ Gaussiene cu intrri Gaussiene sau uniforme,
totui, acest fapt nu este general valabil. Dac funcia (de transfer) este linear atunci distribuia
valorilor este Gaussian cu mare probabilitate.

Fig. 7.4. Distribuia valorilor maxime pentru un numr de 100 de rulri.


Pasul 5. numrul de rulri este n unele cazuri n jur de 5 000/10 000 de ori dac s-ar reprezenta pe un
grafic variaiile complete ale funciei n toate aceste cazuri acel grafic ar fi indescifrabil. O soluie
pentru aceste situaii este s reprezentm doar valorile maxime unite printr-o linie, aa cum o s apar
n exemplele ce urmeaz.

Fig.7.5. Caracteristica amplitudine frecven a filtrului trece band n cazul a 10 rulri.


n ANEXA 12 este codul surs al acestui program care are n jur de 200 de linii.

Exemplul 1
1.1. Calculul toleranelor impedanei de intrare Z1_5_1_5

Fig. 1. Schema echivalnt pe o faz a unui motor asincron.

Fiierul de intrare,Motor_As_NG.cir, are structura:


*SPICE_NET
.AC LIN 100 10HZ 1000HZ
*ALIAS V(2)=UC
*ALIAS I(VIN)=IIN
.PRINT AC V(1) VP(1) IIN IP(IIN)
R1 1 2 0.053 TOL=2%
L2 2 3 0.001034 TOL=1%
L3 3 4 0.000955 TOL=1%
R4 4 0 2.5167 TOL=2%
R5 3 0 200.0 TOL=2%
L6 3 0 0.0281 TOL=1%
IIN 0 1 AC 1
.END

Rezultatele obinute n urma rulrii programului PATCA

Fig. 2. Caracteristicele de frecven nominale obinute cu programul Patca.

Fig. 3. Caracteristicele de frecven nominale obinute cu programul Asinom.

Fig. 4. Caracteristicele de frecven obinute cu metoda Monte Carlo (20 eantioane).

Fig. 5. Caracteristicele de frecven obinute cu metoda AVE (20 eantioane).

Fig. 6. Caracteristicele senzitiviti frecven n raport cu parametrii R1, L2 i L3, obinute cu programul Patca.

Fig. 7. Caracteristicele senzitiviti frecven n raport cu parametrii R1, L2 i L3, obinute cu programul
Asinom.

Fig. 8. Caracteristicele senzitiviti frecven n raport cu parametrii R4, R5 i L6, obinute cu programul Patca.

Fig. 9. Caracteristicele senzitiviti frecven n raport cu parametrii R4, R5 i L6, obinute cu programul
Asinom.

1.2. Calculul toleranelor factorului de transfer (amplificare) n


tensiune A4_5_1_5
Fiierul de intrare,Motor_As_A35_15.cir, are structura:
*SPICE_NET

.AC LIN 100 10HZ 1000HZ


*ALIAS V(2)=UC
*ALIAS I(VIN)=IIN
.PRINT AC V(1) VP(1) V(4) VP(4)
R1 1 2 0.053 TOL=2%
L2 2 3 0.001034 TOL=1%
L3 3 4 0.000955 TOL=1%
R4 4 0 2.5167 TOL=2%
R5 3 0 200.0 TOL=2%
L6 3 0 0.0281 TOL=1%
IIN 0 1 AC 1
.END

Fig. 10. Caracteristicele de frecven obinute cu metoda Monte Carlo (20 eantioane).

Fig. 11. Caracteristicele de frecven obinute cu programul Asinom.

Fig. 12. Caracteristicele de frecven obinute cu metoda AVE (64 eantioane).

Fig. 13. Caracteristicele senzitiviti frecven n raport cu parametrii R1, L2 i L3, obinute cu programul Patca.

Fig. 13. Caracteristicele senzitiviti frecven n raport cu parametrii R1, L2, L3, R4, R5 i L6 obinute cu
programul Asinom.

Fig. 14. Caracteristicele senzitiviti frecven n raport cu parametrii R4, R5 i L6, obinute cu programul Patca.

> restart;Digits:=8;with(linalg);

Fie circuitul din figura 1.


Fisierul de intrare Os2_CRLC_s.crt are structura:
11
5

1
1
1
1
1
2
3
3
3
3
3

5
5
5
5
2
3

C1
R2
L3
R4
R5
C6
4 L7
5 C8
5 R9
5 L10
5 R11

Fisierul de intrare Os2.CRLC_n.crt are structura:


11
5
1 5 C1 c= 0.01e-09
1 5 R2 r=-287.3563
1 5 L3 l=2.8095e-09
1 5 R4 r=3500.0
1 2 R5 r=113.5
2 3 C6 c=2.53e-12
3 4 L7 l=10.60786e-09
3 5 C8 c=0.02e-09
3 5 R9 r=-287.3563
3 5 L10 l=1.2678e-09
3 5 R11r=3500.0

Calculul lui G0 si frecventei de sincronizare pentru doua oscilatoare


cuplate rezistiv
*Two parallel resonant circuits coupled through a series RLC network,
*with: f01 = 950 MHz, f02 = 1GHz and f0c = 972 MHz
.OPTIONS RELTOL=1.0e-6 ABSTOL=1.0e-6
C1 0 1 0.01n ic=2.0
G2 1 0 POLY(1) 1 0 0.0 -0.0085 0.0 0.00071
L3 1 0 2.8095n ic=0.0m
R4 1 0 3500.0
R5 1 2 113.5
C6 2 3 2.53p
L7 3 4 10.60786n
C8 4 0 0.02n ic=2.0
G9 4 0 POLY(1) 4 0 0.0 -0.0085 0.0 0.00071
L10 4 0 1.2678n ic=0.0m
R11 4 0 3500.0
.TRAN 0.01p 500n uic
.OPT ACCT LIMPTS=1001
.WIDTH OUT=80
.PROBE
.end

Generarea factorului de transfer (amplificare) in tensiune A1_5_4_5


cu programul TFSYGP si calculul senzitivitatilor normalizate
> restart;Digits:=8;with(linalg);
> R222:=-1.0/0.00348;
> restart;Digits:=8;with(linalg);

The output file given by TFSYGP is:


>
sis:={
(+s*C1+1/R2+1/(s*L3)+1/R4+1/R5)*V1+(-1/R5)*V2+0+0+0=0,
(-1/R5)*V1+(+1/R5+s*C6)*V2+(-s*C6)*V3+0+0=0,
0+(-s*C6)*V2+(+s*C6+1/(s*L7))*V3+(-1/(s*L7))*V4+0=0,

0+0+(-1/(s*L7))*V3+(+1/(s*L7)+s*C8+1/R9+1/(s*L10)+1/R11)*V4+(+1)*I12=0,
0+0+0+(+1)*V4+0=-Ei
};
nec:={
V1,
V2,
V3,
V4,
I12
};
rez:=solve(sis,nec);
V1g:=subs(rez,V1);
V5g:=subs(rez,V5);
I12g:=subs(rez,I12);
rez1:={
Aei=collect(convert(limit(-evala(((V1g)-0)/Ei),inf=infinity),float),s)
};
save rez1,out3;
writeto(out4);
rez1;
writeto(terminal);

Generarea factorului de transfer (amplificare) in Tensiune A1_5_4_5


(n4 - n5 input port and n1 - n5 output port).
> A1_5_4_5:=collect(subs(rez1,Aei),s);
> A1_5_4_5 := R2*s^2*L3*R4*C6/(s^4*C1*R2*L3*R4*C6*L7+
(C1*R2*L3*R4*R5*C6+L3*R4*C6*L7+R2*L3*C6*L7)*s^3+
(L3*R4*R5*C6+R2*L3*R5*C6+C1*R2*L3*R4+R2*R4*C6*L7+R2*L3*R4*C6)*s^2+
(R2*L3+R2*R4*R5*C6+L3*R4)*s+R2*R4);
> numar_A1_5_4_5:=collect(numer(A1_5_4_5),s);
> numar_A1_5_4_5 := R2*s^2*L3*R4*C6;
> numit_A1_5_4_5:=collect(denom(A1_5_4_5),s);
> numit_A1_5_4_5 := s^4*C1*R2*L3*R4*C6*L7+
(C1*R2*L3*R4*R5*C6+L3*R4*C6*L7+R2*L3*C6*L7)*s^3+
(L3*R4*R5*C6+R2*L3*R5*C6+C1*R2*L3*R4+R2*R4*C6*L7+R2*L3*R4*C6)*s^2+
(R2*L3+R2*R4*R5*C6+L3*R4)*s+R2*R4;
> A1_5_4_5_ns:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,A1_5_4_5);
> A1_5_4_5_ns := -.71488851e-14*s^2/(-.75834372e-33*s^4-.78717481e23*s^3-.59805632e-13*s^2-.27977935e-3*s-1005747.0);
> A1_5_4_5_nf:=factor(subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,A1_5_4_5));
> A1_5_4_5_nf := .28194059e-12*f^2/(-.11795183e-29*f^4+.19496206e -

20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f-1005747.0);
A1_5_4_5_nf
:= 0.2819405910-12 f 2

( 0.1179518310-29 f 4 + 0.1949620610-20 I f 3

+ 0.2358638410-11 f 2 0.0017570143
I f 0.10057470107 )

> plot(abs(A1_5_4_5_nf),f=0.4e06..2.5e09);
Generarea senzitivitatilor lui A1_5_4_5 in raport cu parametrii: C1, R2,
L3, R4, R5, C6 si L5.
> SA_C1:=simplify(diff(A1_5_4_5,C1)*C1/A1_5_4_5);

> SA_C1 := -R2*L3*R4*s^2*(s^2*C6*L7+R5*C6*s+1)*C1/


(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_C1_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_C1);
> SA_C1_nf := -.11143897e-11*f^2*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f1005747.0);
SA_C1_nf:= 0.1114389710-11 f 2 ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-29 4

0.1179518310

-20

f +0.1949620610

-11 2

I f +0.2358638410

f 0.0017570143
If

0.1005747010 )

> SA_R2:=simplify(diff(A1_5_4_5,R2)*R2/A1_5_4_5);
> SA_R2 := s*L3*R4*(s^2*C6*L7+R5*C6*s+1)/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_R2_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R2);
> SA_R2_nf := .61752810e-4*I*f*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f1005747.0);
SA_R2_nf:= 0.000061752810
I f ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-29 4

0.1179518310

-20

f +0.1949620610

-11 2

I f +0.2358638410

f 0.0017570143
If

0.10057470107 )

> SA_L3:=simplify(diff(A1_5_4_5,L3)*L3/A1_5_4_5);
> SA_L3 := R2*R4*(s^2*C6*L7+R5*C6*s+1)/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_L3_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_L3);
> SA_L3_nf := -1005747.0*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f1005747.0);
SA_L3_nf:= 0.10057470107 ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-29 4

0.1179518310

-20

f + 0.1949620610

-11 2

I f + 0.2358638410

f 0.0017570143
If

0.1005747010 )

> SA_R4:=simplify(diff(A1_5_4_5,R4)*R4/A1_5_4_5);
> SA_R4 := R2*s*L3*(s^2*C6*L7+R5*C6*s+1)/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_R4_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R4);
> SA_R4_nf := -.50700168e-5*I*f*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f1005747.0);

SA_R4_nf:= -0.50700168
10-5 I f ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-29 4

0.1179518310

-20

f +0.1949620610

-11 2

I f +0.2358638410

f 0.0017570143
If

0.1005747010 )

> SA_R5:=simplify(diff(A1_5_4_5,R5)*R5/A1_5_4_5);
> SA_R5 := -s*C6*(s^2*C1*R2*L3*R4+s*L3*R4+R2*s*L3+R2*R4)*R5/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_R5_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R5);
> SA_R5_nf := -.18033334e-8*I*f*(.11143897e-11*f^2+.56682793e-4*I*f1005747.0)/(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e11*f^2-.17570143e-2*I*f-1005747.0);

SA_R5_nf:= -0.1803333410-8 I f ( 0.1114389710-11 f 2 + 0.000056682793


I f 0.10057470107 )
-29 4

0.1179518310

-20

f + 0.1949620610

-11 2

I f + 0.2358638410

f 0.0017570143
If

0.1005747010 )
> SA_C6:=simplify(diff(A1_5_4_5,C6)*C6/A1_5_4_5);
> SA_C6 := (s^2*C1*R2*L3*R4+s*L3*R4+R2*s*L3+R2*R4)/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_C6_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_C6);
> SA_C6_nf := (.11143897e-11*f^2+.56682793e-4*I*f-1005747.0)/(-.11795183e29*f^4+.19496206e-20*I*f^3+.23586384e-11*f^2-.17570143e-2*I*f-1005747.0);
SA_C6_nf:= ( 0.1114389710-11 f 2 + 0.000056682793
I f 0.10057470107 )

( 0.1179518310-29 f 4

+ 0.1949620610-20 I f 3 + 0.2358638410-11 f 2 0.0017570143


I f 0.10057470107 )

> SA_L7:=simplify(diff(A1_5_4_5,L7)*L7/A1_5_4_5);
> SA_L7 := -s^2*C6*(s^2*C1*R2*L3*R4+s*L3*R4+R2*s*L3+R2*R4)*L7/
(R2*R4*R5*s*C6+s^2*L3*R4*R5*C6+R2*s^2*L3*R5*C6+s^3*C1*R2*L3*R4*R5*C6+
R2*R4+s^4*C1*R2*L3*R4*C6*L7+s^3*L3*R4*C6*L7+R2*s*L3+R2*s^2*L3*R4*C6+s
^2*C1*R2*L3*R4+R2*R4*s^2*C6*L7+R2*s^3*L3*C6*L7+s*L3*R4);
> SA_L7_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_L7);
> SA_L7_nf := .10584433e-17*f^2*(.11143897e-11*f^2+.56682793e-4*I*f1005747.0)/(-.11795183e-29*f^4+.19496206e-20*I*f^3+.23586384e11*f^2-.17570143e-2*I*f-1005747.0);
SA_L7_nf:= 0.1058443310-17 f 2 ( 0.1114389710-11 f 2 +0.000056682793
I f 0.10057470107 )
-29 4

0.1179518310

-20

f +0.1949620610

-11 2

I f +0.2358638410

f 0.0017570143
If

0.1005747010 )

> with(plots):
Fs:=plot(abs(SA_C1_nf),f=0.4e06..2.5e09,style=line,color=blue):
Gs:=plot(abs(SA_R2_nf),f=0.4e06..2.5e09,style=line,color=red):Hs:=plot(abs(SA_L3_nf
),f=0.4e06..2.5e09,style=line,color=orange):Ks:=plot(abs(SA_R4_nf),f=0.4e06..2.5e09,
style=line,color=green):Ls:=plot(abs(SA_R5_nf),f=0.4e06..2.5e09,style=line,color=mar
oon):Ks1:=plot(abs(SA_C6_nf),f=0.4e06..2.5e09,style=line,color=violet):Ls1:=plot(abs(
SA_L7_nf),f=0.4e06..2.5e09,style=line,color=navy):display({Fs,Gs,Hs,Ks,Ls,Ks1,Ls1},ax
es=boxed,title=`abs(SA_C1_nf) - blue, abs(SA_R2_nf) - red, abs(SA_L3_nf) - orange,

abs(SA_R4_nf) - green, abs(SA_R5_nf) - maroon,abs(SA_C6_nf) - violet,abs(SA_L7_nf)


- navy`);

Cracteristicile modulul senzitivitatilor frecventa (abs(SA) f ).

Generarea factorului de transfer (amplificare) in tensiune A4_5_1_5


cu programul TFSYGP si calculul senzitivitatilor normalizate
> restart;Digits:=8;with(linalg);

The output file given by TFSYGP is:


>
sis:={
(+s*C1+1/R2+1/(s*L3)+1/R4+1/R5)*V1+(-1/R5)*V2+0+0+(+1)*I12=0,
(-1/R5)*V1+(+1/R5+s*C6)*V2+(-s*C6)*V3+0+0=0,
0+(-s*C6)*V2+(+s*C6+1/(s*L7))*V3+(-1/(s*L7))*V4+0=0,
0+0+(-1/(s*L7))*V3+(+1/(s*L7)+s*C8+1/R9+1/(s*L10)+1/R11)*V4+0=0,
(+1)*V1+0+0+0+0=-Ei
};
nec:={
V1,
V2,
V3,
V4,
I12
};
rez:=solve(sis,nec);
V4g:=subs(rez,V4);
V5g:=subs(rez,V5);
I12g:=subs(rez,I12);
rez1:={
Aei=collect(convert(limit(-evala(((V4g)-0)/Ei),inf=infinity),float),s)
};
save rez1,out3;
writeto(out4);
rez1;
writeto(terminal);

Generarea factorului de transfer (amplificare) in Tensiune


(n1 - n5 input port and n4 - n5 output port).

A4_5_1_5

> A4_5_1_5:=factor(subs(rez1,Aei));
> A4_5_1_5 := R9*L10*R11*s^2*C6/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> numar_A4_5_1_5:=collect(numer(A4_5_1_5),s);
> numar_A4_5_1_5 := R9*L10*R11*s^2*C6;
> numit_A4_5_1_5:=collect(denom(A4_5_1_5),s);
> numit_A4_5_1_5 := s^4*C8*L7*R9*L10*R11*C6+
(C8*R9*L10*R11*C6*R5+L7*L10*R11*C6+L7*R9*L10*C6)*s^3+
(L7*R9*R11*C6+R9*L10*R11*C6+L10*R11*C6*R5+C8*R9*L10*R11+R9*L10*C6*R5)
*s^2+(L10*R11+R9*R11*C6*R5+R9*L10)*s+R9*R11;
> A4_5_1_5_ns:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,A4_5_1_5);
> A4_5_1_5_ns := -.32259678e-14*s^2/(-.72136365e-23*s^3-.54550236e13*s^2-.68441230e-33*s^4-1005747.0-.28473230e-3*s);
> A4_5_1_5_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,A4_5_1_5);
> A4_5_1_5_nf := .12722701e-12*f^2/(.17866241e-20*I*f^3+.21513740e11*f^2-.10645263e-29*f^4-1005747.0-.17881188e-2*I*f);
A4_5_1_5_nf
:= 0.1272270110-12 f 2

( 0.1786624110-20 I f 3 + 0.2151374010-11 f 2

0.1064526310-29 f 4 0.10057470107 0.0017881188


I f)

> plot(abs(A4_5_1_5_nf),f=0.4e06..2.5e09);
> with(plots):Fs:=plot(abs(A1_5_4_5_nf),f=0.4e06..2.5e09,style=line,color=blue):
Gs:=plot(abs(A4_5_1_5_nf),f=0.4e06..2.5e09,style=line,color=red):display({Fs,Gs},axe
s=boxed,title=`abs(A1_5_4_5_nf) - blue, abs(A4_5_1_5_nf) - red`);

Cracteristicile amplitudine frecventa (abs(A1_5_4_5) f si abs(A4_5_1_5 f ).

Generarea senzitivitatilor lui A4_5_1_5 in raport cu parametrii: R5, C6,


L7, C8, R9, L10 si R11.

> SA_R5:=simplify(diff(A4_5_1_5,R5)*R5/A4_5_1_5);
> SA_R5 := -s*C6*(R9*R11+s*L10*R11+s^2*C8*R9*L10*R11+s*R9*L10)*R5/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_R5_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R5);
> SA_R5_nf := -.18033334e-8*I*f*(-1005747.0+.25578375e-4*I*f+.10057471e11*f^2)/(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_R5_nf:= -0.1803333410-8 I f ( 0.10057470107 +0.000025578375
I f + 0.1005747110-11 f 2 )
-20

-11 2

0.1786624110 I f +0.2151374010
0.0017881188
I f)

-29 4

f 0.1064526310

f 0.1005747010

> SA_C6:=simplify(diff(A4_5_1_5,C6)*C6/A4_5_1_5);
> SA_C6 := (R9*R11+s*L10*R11+s^2*C8*R9*L10*R11+s*R9*L10)/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_C6_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_C6);
> SA_C6_nf := (-1005747.0+.25578375e-4*I*f+.10057471e-11*f^2)/(.17866241e20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^4-1005747.0-.17881188e-2*I*f);

SA_C6_nf:= ( 0.10057470107 + 0.000025578375


I f + 0.1005747110-11 f 2 )

( 0.1786624110-20 I f 3

+ 0.2151374010-11 f 2 0.1064526310-29 f 4 0.10057470107 0.0017881188


I f)
> SA_L7:=simplify(diff(A4_5_1_5,L7)*L7/A4_5_1_5);
> SA_L7 := -s^2*C6*(R9*R11+s*L10*R11+s^2*C8*R9*L10*R11+s*R9*L10)*L7/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_L7_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_L7);
> SA_L7_nf := .10584433e-17*f^2*(-1005747.0+.25578375e-4*I*f+.10057471e11*f^2)/(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_L7_nf:= 0.1058443310-17 f 2 ( 0.10057470107 + 0.000025578375
I f + 0.1005747110-11 f 2 )
-20

-11 2

0.1786624110 I f + 0.2151374010
0.0017881188
I f)

-29 4

f 0.1064526310

f 0.1005747010

> SA_C8:=simplify(diff(A4_5_1_5,C8)*C8/A4_5_1_5);
> SA_C8 := -R9*L10*R11*s^2*(s^2*L7*C6+s*C6*R5+1)*C8/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_C8_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_C8);

> SA_C8_nf := -.10057471e-11*f^2*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/


(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_C8_nf:= 0.1005747110-11 f 2 ( 0.1058443310-17 f 2 + 0.1803333410-8 I f + 1 )
-20

-11 2

0.1786624110 I f + 0.2151374010
0.0017881188
I f)

-29 4

f 0.10057470107

f 0.1064526310

> SA_R9:=simplify(diff(A4_5_1_5,R9)*R9/A4_5_1_5);
> SA_R9 := s*L10*R11*(s^2*L7*C6+s*C6*R5+1)/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_R9_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R9);
> SA_R9_nf := .27866244e-4*I*f*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_R9_nf:= 0.000027866244
I f ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-20

-11 2

0.1786624110 I f +0.2151374010
0.0017881188
I f)

-29 4

f 0.10057470107

f 0.1064526310

> SA_L10:=simplify(diff(A4_5_1_5,L10)*L10/A4_5_1_5);
> SA_L10 := R9*R11*(s^2*L7*C6+s*C6*R5+1)/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_L10_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_L10);
> SA_L10_nf := -1005747.0*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_L10_nf:= 0.10057470107 ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )
-20

-11 2

0.1786624110 I f +0.2151374010
0.0017881188
I f)

-29 4

f 0.1064526310

f 0.10057470107

> SA_R11:=simplify(diff(A4_5_1_5,R11)*R11/A4_5_1_5);
> SA_R11 := s*R9*L10*(s^2*L7*C6+s*C6*R5+1)/
(s^3*L7*R9*L10*C6+L7*R9*R11*s^2*C6+s^4*C8*L7*R9*L10*R11*C6+s^3*L7*L10*
R11*C6+R9*R11+R9*L10*R11*s^2*C6+s*L10*R11+R9*R11*s*C6*R5+s^2*R9*L10*C
6*R5+s^3*C8*R9*L10*R11*C6*R5+s^2*L10*R11*C6*R5+s^2*C8*R9*L10*R11+s*R9
*L10);
> SA_R11_nf:=subs(C1=0.01e-09,R2=-287.3563,L3=2.8095e09,R4=3500.0,R5=113.5,C6=2.53e-12,L7=10.60786e-09,C8=0.02e-09,R9=287.3563,L10=1.2678e-09,R11=3500.0,s=6.28*f*I,SA_R11);
> SA_R11_nf := -.22878688e-5*I*f*(-.10584433e-17*f^2+.18033334e-8*I*f+1)/
(.17866241e-20*I*f^3+.21513740e-11*f^2-.10645263e-29*f^41005747.0-.17881188e-2*I*f);
SA_R11_nf:= -0.22878688
10-5 I f ( 0.1058443310-17 f 2 +0.1803333410-8 I f +1 )

0.1786624110-20 I f 3 +0.2151374010-11 f 2 0.1064526310-29 f 4 0.10057470107


0.0017881188
I f)

> with(plots):

Fs:=plot(abs(SA_R5_nf),f=0.4e06..2.5e09,style=line,color=blue):
Gs:=plot(abs(SA_C6_nf),f=0.4e06..2.5e09,style=line,color=red):Hs:=plot(abs(SA_L7_nf
),f=0.4e06..2.5e09,style=line,color=orange):Ks:=plot(abs(SA_C8_nf),f=0.4e06..2.5e09,
style=line,color=green):Ls:=plot(abs(SA_R9_nf),f=0.4e06..2.5e09,style=line,color=blac
k):Ks1:=plot(abs(SA_L10_nf),f=0.4e06..2.5e09,style=line,color=violet):Ls1:=plot(abs(S
A_R11_nf),f=0.4e06..2.5e09,style=line,color=navy):display({Fs,Gs,Hs,Ks,Ls,Ks1,Ls1},a
xes=boxed,title=`abs(SA_R5_nf) - blue, abs(SA_C6_nf) - red, abs(SA_L7_nf) - orange,
abs(SA_C8_nf) - green, abs(SA_R9_nf) - black,abs(SA_L10_nf) - violet,abs(SA_R11_nf)
- navy`);

Cracteristicile modulul senzitivitatilor frecventa (abs(SA) f ).

>

Fig. 4. Rezultate obinute cu metoda EVA i VRSS.

Listingul programului EVA_VRSS_Os2_CRLC.m este:


% Dou oscilatoare cuplate printru circuit RLC serie
% Metoda EVA si metoda VRSS
clear;clc
C1=1.0e-11;R2=-287.35632;L3=2.8095e-09;R4=3500.0;R5=113.5;C6=2.53e-12;L7=10.60786e09;C8=2.0e-11;
R9=-287.35632;L10=1.2678e-09;R11=3500.0;
BF=0.1e08;LF=2.0e09;DF=1.0e07;
Nc=11;dpf=0.0001;Q=dpf*eye(Nc)+1;
Tr=0.02;Tc=0.02;TL=0.02;
T=[-Tc -Tr -TL -Tr -Tr -Tc -TL -Tc -Tr -TL -Tr; Tc Tr TL Tr Tr Tc TL Tc Tr TL Tc];
F=linspace(BF,LF,(LF-BF)/DF+1);
for i=1:(LF-BF)/DF+1
s=0+2*pi*F(i)*j;
%disp(s);
D=G11(C1,R2,L3,R4,R5,C6,L7,C8,R9,L10,R11,s);
%disp(D);
Vo(i)=D;
for p=1:Nc
F(i)=BF+DF*(i-1);s=0+2*pi*F(i)*j;
D=G11(C1*Q(p,1),R2*Q(p,2),L3*Q(p,3),R4*Q(p,4),R5*Q(p,5),C6*Q(p,6),L7*Q(p,7),
C8*Q(p,8),R9*Q(p,9),L10*Q(p,10),R11*Q(p,11),s);
Vr(i,p)=D;
Sen(i,p)=(Vr(i,p)/Vo(i)-1)/dpf;
if Sen(i,p)>0
L(i,p)=1+T(1,p);H(i,p)=1+T(2,p);
else

L(i,p)=1+T(2,p);H(i,p)=1+T(1,p);
end
end
for k=1:2
for p=1:Nc
if k==1
M(i,p)=L(i,p);
else
M(i,p)=H(i,p);
end
end
D=G11(C1*M(i,1),R2*M(i,2),L3*M(i,3),R4*M(i,4),R5*M(i,5),C6*M(i,6),L7*M(i,7),
C8*M(i,8),R9*M(i,9),L10*M(i,10),R11*M(i,11),s);
if k==1
VL(i)=D;
else
VH(i)=D;
end
end
sum1(i)=0;sum2(i)=0;
for p=1:Nc
sum1(i)=sum1(i)+(Sen(i,p)*(L(i,p)-1))^2;
sum2(i)=sum2(i)+(Sen(i,p)*(H(i,p)-1))^2;
end
Vrss1(i)=Vo(i)*(1-sqrt(sum1(i)));
Vrss2(i)=Vo(i)*(1+sqrt(sum2(i)));
end
%
subplot(2,2,3)
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c',F,Sen(:,4),'m');
hold on
g=plot(F,Sen(:,5),'y',F,Sen(:,6),'r',F,Sen(:,7),'b');
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -7.0 7.0])
xlabel('Freq (Hz)','FontSize',8)
ylabel('%/%','FontSize',8)
title('Senzitivities','FontSize',8)
text(0.015e09,-6.5,'C1-k,R2 -g,L3-c,R4-m,R5-y,C6-r,L7-b','FontSize',8)
hold off
%
subplot(2,2,4)
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c',F,Sen(:,4),'m');
hold on
g=plot(F,Sen(:,5),'y',F,Sen(:,6),'r',F,Sen(:,7),'b');
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -7.0 7.0])
xlabel('Freq (Hz)','FontSize',8)
ylabel('%/%','FontSize',8)
xlabel('Freq (Hz)','FontSize',8);
title('Senzitivities Near fo','FontSize',8)
text(0.015e09,-6.5,'C1-k,R2-g,L3-c,R4-m,R5-y,C6-r,L7-b','FontSize',8)
hold off
%
subplot(2,2,1)
Vmax=max(VH);
Vmin=max(VL);
m=plot(F,VL,'r',F,VH,'g',F,Vo,'k');
set(m,'LineWidth',2)
grid on
axis([BF LF 0 1.75])
xlabel('Frecventa (Hz)','FontSize',8);

ylabel('Volti VL-r Vh-g Vo-k','FontSize',8)


title('Metoda EVA','FontSize',8)
text(0.015e09,1.65,['N= ',num2str(Nc)],'FontSize',9, 'color','k');
Vpmax=max(Vmax)
text(0.015e09,1.25,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin)
text(0.015e09,0.85,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
Vomax=max(Vo)
text(0.015e09,0.45,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
subplot(2,2,2)
Vmax=max(Vrss2);
Vmin=max(Vrss1);
m=plot(F,Vrss1,'r',F,Vrss2,'g',F,Vo,'k');
set(m,'LineWidth',2)
grid on
axis([BF LF 0 1.75])
xlabel('Frecventa (Hz)','FontSize',8);
ylabel('Volti','FontSize',8)
title('Metoda Vrss','FontSize',8)
text(0.015e09,1.65,['N= ',num2str(Nc)],'FontSize',9, 'color','k');
Vpmax=max(Vmax)
text(0.015e09,1.25,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin)
text(0.015e09,0.85,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
Vomax=max(Vo)
text(0.015e09,0.45,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');

Fig. 5. Rezultate obinute cu metoda Monte Carlo (MC).

Listingul programului mc_os2_CRLC.m este:

% MC pentru mc_os2_CRLC.m
% Transfer function method;
% uses function MC44.m
clear;clc;
C1=1.0e-11;R2=-287.35623;L3=2.8095e-09;R4=3500.0;R5=113.5;C6=2.53e-12;
L7=10.60786e-09;C8=2.0e-11;R9=-287.35623;L10=1.2678e-09;R11=3500.0;
BF=2.0e07;LF=2.0e09;DF=0.5e07;Lit=(LF-BF)/DF+1;dpf=0.05;
F=linspace(BF,LF,Lit);
TC1=0.02;TR2=0.02;TL3=0.02;TR4=0.02;TR5=0.02;TC6=0.02;TL7=0.02;TC8=0.02;TR9=0.02;TL
10=0.02;TR11=0.02;
T=[-TC1 -TR2 -TL3 -TR4 -TR5 -TC6 -TL7 -TC8 -TR9 -TL10 -TR11; TC1 TR2 TL3 TR4 TR5
TC6 TL7 TC8 TR9 TL10 TR11];
M=11;N=2^M;dpf=0.02;Q=dpf*eye(N)+1;
Lit=(LF-BF)/DF+1;
randn('state',sum(100*clock));
NN1=zeros(N,1);DD1=zeros(N,1);DD0=zeros(N,1);
Vo=zeros(Lit,1);
Vm=zeros(N,Lit);Tn=zeros(N,M);
F=linspace(BF,LF,Lit);
% mc=1 normal dist; mc=2 uniform dist
Lit=(LF-BF)/DF+1;N=1000;
randn('state',sum(100*clock));
NN1=zeros(N,1);DD1=zeros(N,1);DD0=zeros(N,1);
Vo=zeros(Lit,1);
Vm=zeros(N,Lit);Tn=zeros(N,M);
F=linspace(BF,LF,Lit);
% mc=1 normal dist; mc=2 uniform dist
for mc=1:2
for k=1:N
for w=1:M
if mc==1
Tn(k,w)=((T(2,w)-T(1,w))/6)*...
(randn+3)+T(1,w)+1;
else
Tn(k,w)=(T(2,w)-T(1,w))*...
rand+T(1,w)+1;
end
end
end
for i=1:Lit
s=2*pi*F(i)*j;
Vo(i)=MC44(C1,R2,L3,R4,R5,C6,L7,C8,R9,L10,R11,s);
for k=1:N
Vm(k,i)=MC44(C1*Tn(k,1),R2*Tn(k,2),...
L3*Tn(k,3),R4*Tn(k,4),R5*Tn(k,5),C6*Tn(k,6),L7*Tn(k,7),C8*Tn(k,8),R9*Tn(k,9),...
L10*Tn(k,10),R11*Tn(k,11),s);
end
end
% get statistics
if mc==1
Vmax1=max(Vm);Vmin1=min(Vm);
else
Vmax2=max(Vm);Vmin2=min(Vm);
end
for mc=1:2
for k=1:N
for w=1:M
if mc==1
Tn(k,w)=((T(2,w)-T(1,w))/6)*...
(randn+3)+T(1,w)+1;
else
Tn(k,w)=(T(2,w)-T(1,w))*...
rand+T(1,w)+1;
end
end
end

for i=1:Lit
s=2*pi*F(i)*j;
Vo(i)=MC44(C1,R2,L3,R4,R5,C6,L7,C8,R9,L10,R11,s);
for k=1:N
Vm(k,i)=MC44(C1*Tn(k,1),R2*Tn(k,2),...
L3*Tn(k,3),R4*Tn(k,4),R5*Tn(k,5),...
C6*Tn(k,6),L7*Tn(k,7),C8*Tn(k,8),R9*Tn(k,9),...
L10*Tn(k,10),R11*Tn(k,11),s);
Sen(i,k)=(Vm(k,i)/Vo(i)-1)/dpf;
end
end
% get statistics
if mc==1
Vmax1=max(Vm);Vmin1=min(Vm);
else
Vmax2=max(Vm);Vmin2=min(Vm);
end
end
Vmax1=max(Vm);
Vmin1=min(Vm);
subplot(2,1,1);
Vmax=max(Vm);
Vmin=min(Vm);
h=plot(F,Vmax,'g',F,Vo,'k',F,Vmin,'r');
set(h,'LineWidth',2);grid on;
axis ([BF LF 0 1.8]);
xlabel('Freq(Hz)');ylabel('Volts');
s1='N = ';s2='Vpmax = ';s3='Vpmin'
text(1.0e08,1.35,['N= ',num2str(N)],'FontSize',9, 'color','k');
Vpmax=max(Vmax);%Vpj=min(Vmin);
text(1.0e08,1.05,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin);
text(1.0e08,0.55,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
Vomax=max(Vo);
text(1.0e08,0.25,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
SC1max=max(Sen(:,1));disp('SC1max=');disp(SC1max);
SC1min=min(Sen(:,2));disp('SC1min=');disp(SC1min);
SR2max=max(Sen(:,2));disp('SR2max=');disp(SR2max);
SR2min=min(Sen(:,2));disp('SR2min=');disp(SR2min);
SL3max=max(Sen(:,3));disp('SL3max=');disp(SL3max);
SL3min=min(Sen(:,3));disp('SL3min=');disp(SL3min);
SR4max=max(Sen(:,4));disp('SR4max=');disp(SR4max);
SR4min=min(Sen(:,4));disp('SR4min=');disp(SR4min);
SR5max=max(Sen(:,5));disp('SR5max=');disp(SR5max);
SR5min=min(Sen(:,5));disp('SR5min=');disp(SR2min);
SC6max=max(Sen(:,6));disp('SC6max=');disp(SC6max);
SC6min=min(Sen(:,6));disp('SC6min=');disp(SC6min);
SL7max=max(Sen(:,7));disp('SL7max=');disp(SL7max);
SL7min=min(Sen(:,7));disp('SL7min=');disp(SL7min);
SC8max=max(Sen(:,8));disp('SC8max=');disp(SC8max);
SC8min=min(Sen(:,8));disp('SC8min=');disp(SC8min);
SR9max=max(Sen(:,9));disp('SR9max=');disp(SR9max);
SR9min=min(Sen(:,9));disp('SR9min=');disp(SR9min);
SL10max=max(Sen(:,10));disp('SL10max=');disp(SL10max);
SL10min=min(Sen(:,10));disp('SL10min=');disp(SL10min);
SR11max=max(Sen(:,11));disp('SR2max=');disp(SR11max);
SR11min=min(Sen(:,11));disp('SR2min=');disp(SR11min);
X1=max(SR2max,SL3max);X2=max(SC1max,SC6max);X12=max(X1,X2);Xmax=max(X12,SR4max);
Y1=min(SR2min,SL3min);Y2=min(SR5min,SR4min);Y12=max(Y1,Y2);Ymin=max(Y12,SR4min);
disp('Xmax=');disp(Xmax);disp('Ymin=');disp(Ymin);
%disp('Sen(:,2)=');disp(Sen(:,2));
subplot(2,1,2);
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c');grid;
hold on
g=plot(F,Sen(:,4),'r',F,Sen(:,5),'b',F,Sen(:,6),'m',F,Sen(:,7),'y');grid;
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on

axis([BF LF -6.5 6.5]);


xlabel('Freq (Hz)','FontSize',8);
ylabel('%/%','FontSize',8);
title('Senzitivities Near fo','FontSize',8);
s1='At 0.9478GHz high to low order is:'
text(1.2e09,4.5,s1,'FontSize',8)
text(1.1e09,-4.5,'C1-k, R2-g, L3-c, R4-r, R5-b, C6-m, L7-y','FontSize',8)
hold off
end;

Fig. 6. Rezultate obinute cu metoda Monte Carlo Rapid (MCR).

Listingul programului mcr_os2_CRLC.m este:


%Program pentru calculul tolerantelor cu Metoda Monte Carlo Rapida
%pentru OScilatoarele cuplate printr-un circuit cu un circuit RLC serie
%intrarea U4_5 iesirea U1_5
% File: mcr_os2_CRLC.m
% functions not used
clc;clear;
% Numarator pentru A4_5_1_5
%PBFNUM=R2*s^2*L3*R4*C6;
%Numitor pentru A1_5_4_5
%PBFNUMIT=s^4*C1*R2*L3*R4*C6*L7+(C1*R2*L3*R4*R5*C6+...
%L3*R4*C6*L7+R2*L3*C6*L7)*s^3+(L3*R4*R5*C6+R2*L3*R5*C6+...
%C1*R2*L3*R4+R2*R4*C6*L7+R02*L3*R4*C6)*s^2+...
%(R2*L3+R2*R4*R5*C6+L3*R4)*s+R2*R4;
clc;clear;
C1=1.0e-11;R2=-287.35623;L3=2.8095e-09;R4=3500.0;R5=113.5;C6=2.53e-12;
L7=10.60786e-09;C8=2.0e-11;R9=-287.35623;L10=1.2678e-09;R11=3500.0;

BF=2.0e07;LF=3.0e09;DF=0.5e07;Lit=(LF-BF)/DF+1;dpf=0.05;
F=linspace(BF,LF,Lit);
TC1=0.02;TR2=0.02;TL3=0.02;TR4=0.02;TR5=0.02;TC6=0.02;TL7=0.02;TC8=0.02;TR9=0.02;TL
10=0.02;TR11=0.02;
T=[-TC1 -TR2 -TL3 -TR4 -TR5 -TC6 -TL7 -TC8 -TR9 -TL10 -TR11;TC1 TR2 TL3 TR4 TR5 TC6
TL7 TC8 TR9 TL10 TR11];
M=11;Lit=(LF-BF)/DF+1;N=2^M;N=100;
% generate 2^M FMCA
% extreme tolerance combinations
Tn=zeros(M,N);Dr=zeros(M,N);
for k=1:N;for w=1:M;Re(w,k)=k;end;end
for k=1:N
for w=1:M
Re(w+1,k)=floor(Re(w,k)/2);
Dr(w,k)=Re(w,k)-2*Re(w+1,k);
if Dr(w,k)==0
Tn(w,k)=1+T(1,w);
else
Tn(w,k)=1+T(2,w);
end
end
end
for i=1:Lit
s=2*pi*F(i)*j;
SBFNUM=R2*s^2*L3*R4*C6;
SBFNUMIT=s^4*C1*R2*L3*R4*C6*L7+(C1*R2*L3*R4*R5*C6+...
L3*R4*C6*L7+R2*L3*C6*L7)*s^3+(L3*R4*R5*C6+R2*L3*R5*C6+...
C1*R2*L3*R4+R2*R4*C6*L7+R2*L3*R4*C6)*s^2+...
(R2*L3+R2*R4*R5*C6+L3*R4)*s+R2*R4;
V0(i)=(SBFNUM)/(SBFNUMIT);
Vo(i)=abs((SBFNUM)/(SBFNUMIT));
for k=1:N
SBFNUM(k)=R2*Tn(2,k)*s^2*L3*Tn(3,k)*R4*Tn(4,k)*C6*Tn(6,k);
SBFNUMIT(k)=s^4*C1*Tn(1,k)*R2*Tn(2,k)*L3*Tn(3,k)*R4*Tn(4,k)*...
C6*Tn(6,k)*L7*Tn(7,k)+(C1*Tn(1,k)*R2*Tn(2,k)*L3*...
Tn(3,k)*R4*Tn(4,k)*R5*Tn(5,k)*C6*Tn(6,k)+...
L3*Tn(3,k)*R4*Tn(4,k)*C6*Tn(6,k)*L7*Tn(7,k)+...
R2*Tn(2,k)*L3*Tn(3,k)*C6*Tn(6,k)*L7*Tn(7,k))*s^3+...
(L3*Tn(3,k)*R4*Tn(4,k)*R5*Tn(5,k)*C6*Tn(6,k)+...
R2*Tn(2,k)*L3*Tn(3,k)*R5*Tn(5,k)*C6*Tn(6,k)+...
C1*Tn(2,k)*R2*Tn(2,k)*L3*Tn(3,k)*R4*Tn(4,k)+...
R2*Tn(2,k)*R4*Tn(4,k)*C6*Tn(6,k)*L7*Tn(7,k)+...
R2*Tn(2,k)*L3*Tn(3,k)*R4*Tn(4,k)*C6*Tn(6,k))*s^2+...
(R2*Tn(2,k)*L3*Tn(3,k)
+R2*Tn(2,k)*R4*Tn(4,k)*R5*Tn(5,k)*...
C6*Tn(6,k)
+L3*Tn(3,k)*R4*Tn(4,k))*s+R2*Tn(2,k)*R4*Tn(4,k);
Vm(k,i)=abs((SBFNUM(k))/(SBFNUMIT(k)));
Sen(i,k)=(Vm(k,i)/Vo(i)-1)/dpf;
%if Sen(t,p)>0
%L(t,p)=1+T(1,p);H(i,p)=1+T(2,p);
%else
%L(t,p)=1+T(2,p);H(t,p)=1+T(1,p);
%end
end
end
subplot(2,1,1);
Vmax=max(Vm);
Vmin=min(Vm);
h=plot(F,Vmax,'g',F,Vo,'k',F,Vmin,'r');
set(h,'LineWidth',2);grid on;
%h1=plot(F,Vmin,'k',F,Vo,'k');
%set(h1,'LineWidth',2);grid on;
axis ([BF LF 0 2.5]);

xlabel('Freq(Hz)');ylabel('Volts');
s1='N = ';s2='Vpmax = ';s3='Vpmin'
text(1.0e08,1.75,['N= ',num2str(N)],'FontSize',9, 'color','k');
Vpmax=max(Vmax);%Vpj=min(Vmin);
text(1.0e08,1.25,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin)
text(1.0e08,0.75,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
%text(410,13,['Vpj =',num2str(Vpk)],'FontSize',8);
%disp(Vpk);
Vomax=max(Vo)
text(1.0e08,0.25,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
SC1max=max(Sen(:,1));disp('SC1max=');disp(SC1max);
SC1min=min(Sen(:,2));disp('SC1min=');disp(SC1min);
SR2max=max(Sen(:,2));disp('SR2max=');disp(SR2max);
SR2min=min(Sen(:,2));disp('SR2min=');disp(SR2min);
SL3max=max(Sen(:,3));disp('SL3max=');disp(SL3max);
SL3min=min(Sen(:,3));disp('SL3min=');disp(SL3min);
SR4max=max(Sen(:,4));disp('SR4max=');disp(SR4max);
SR4min=min(Sen(:,4));disp('SR4min=');disp(SR4min);
SR5max=max(Sen(:,5));disp('SR5max=');disp(SR5max);
SR5min=min(Sen(:,5));disp('SR5min=');disp(SR2min);
SC6max=max(Sen(:,6));disp('SC6max=');disp(SC6max);
SC6min=min(Sen(:,6));disp('SC6min=');disp(SC6min);
SL7max=max(Sen(:,7));disp('SL7max=');disp(SL7max);
SL7min=min(Sen(:,7));disp('SL7min=');disp(SL7min);
SC8max=max(Sen(:,8));disp('SC8max=');disp(SC8max);
SC8min=min(Sen(:,8));disp('SC8min=');disp(SC8min);
SR9max=max(Sen(:,9));disp('SR9max=');disp(SR9max);
SR9min=min(Sen(:,9));disp('SR9min=');disp(SR9min);
SL10max=max(Sen(:,10));disp('SL10max=');disp(SL10max);
SL10min=min(Sen(:,10));disp('SL10min=');disp(SL10min);
SR11max=max(Sen(:,11));disp('SR2max=');disp(SR11max);
SR11min=min(Sen(:,11));disp('SR2min=');disp(SR11min);
X1=max(SR2max,SL3max);X2=max(SC1max,SC6max);X12=max(X1,X2);Xmax=max(X12,SR4max);
Y1=min(SR2min,SL3min);Y2=min(SR5min,SR4min);Y12=max(Y1,Y2);Ymin=max(Y12,SR4min);
disp('Xmax=');disp(Xmax);disp('Ymin=');disp(Ymin);
%disp('Sen(:,2)=');disp(Sen(:,2));
subplot(2,1,2);
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c');grid;
hold on
g=plot(F,Sen(:,4),'r',F,Sen(:,5),'b',F,Sen(:,6),'m',F,Sen(:,7),'y');grid;
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -6.0 11.5]);
xlabel('Freq (Hz)','FontSize',8);
ylabel('%/%','FontSize',8);
title('Senzitivities Near fo','FontSize',8);
s1='At 0.9478GHz high to low order is:'
text(1.2e09,7.5,s1,'FontSize',8)
text(1.2e09,-3.25,'C1-k, R2-g, L3-c, R4-r, R5-b, C6-m, L7-y','FontSize',8)
hold off

Exemplul 2

Fig. 7. Dou oscilatoare cuplate printr-un rezistor.

Fiierul de intrare, Os2_CRLC.cir, are structura:


*SPICE_NET
.AC LIN 1000 0.18e9HZ 0.2E9HZ
*ALIAS V(1)=V1
.PRINT AC V(1) VP(1)
R2 1 0 -193.6084 TOL=2%
L3 1 0 1.6E-9 TOL=2%
R4 1 0 200 TOL=2%
C6 2 0 0.443E-12 TOL=2%
R7 2 0 -193.6084 TOL=2%
L8 2 0 1.6E-9 TOL=2%
R9 2 0 200 TOL=2%
V2 2 0 AC 1
R5 1 2 3000 TOL=2%
C1 1 0 0.443E-12 TOL=2%
.END
> restart;Digits:=8;with(linalg);

Fie circuitul din figura 7.


Fisierul de intrare Os2.C.Rez_s.crt are structura:
9
3
1
1
1
1
1
2
2
2
2

3
3
3
3
2
3
3
3
3

C1
R2
L3
R4
R5
C6
R7
L8
R9

Fisierul de intrare Os2.C.Rez_n.crt are structura


9
3

1
1
1
1
1
2
2
2
2

3
3
3
3
2
3
3
3
3

C1
R2
L3
R4
R5
C6
R7
L8
R9

c=0.443e-12
r=-193.6084
l=1.6e-09
r=200.0
r=3000.0
c=0.433e-12
r=-193.6084
l=1.6e-09
r=200.0

Calculul lui G0 si frecventei de sincronizare pentru doua oscilatoare


cuplate rezistiv
*Two parallel resonant circuits coupled through a series RLC network,
*with: f01 = 950 MHz, f02 = 1GHz and f0c = 972 MHz
.OPTIONS RELTOL=1.0e-8 ABSTOL=1.0e-7
C1 1 0 0.443p ic=0.0
V2 2 1 dc 0.2
G3 2 0 TABLE {V(2,0)} = (-3.0,6.33m),(-2.5,10.15625m),(-2.0,11.32m),(1.5,10.35375m),(-1.0,7.79m),(-0.5,4.1625m),
+(0.5,-4.1625m),(1.0,-7.79m),(1.5,-10.35375m),(2.0,-11.32m),(2.5,-10.15625m),(3.0,6.33m)
*G3 2 0 TABLE {V(2,0)} = (-1.0,-20.0m),(0,0m),(1.0,20.0m),(3.0,10.0m),(4.0,20.0m)
L4 1 0 1.6n ic=0.0m
R5 1 0 200.0
R6 1 3 5000.0
C7 3 0 0.433p ic=0.0
V8 4 3 dc 0.2
*G11 6 0 TABLE {V(6,0)} = (-1.0,-20.0m),(0,0m),(1.0,20.0m),(3.0,10.0m),(4.0,20.0m)
G9 4 0 TABLE {V(4,0)} = (-3.0,6.33m),(-2.5,10.15625m),(-2.0,11.32m),(1.5,10.35375m),(-1.0,7.79m),(-0.5,4.1625m),
+(0.5,-4.1625m),(1.0,-7.79m),(1.5,-10.35375m),(2.0,-11.32m),(2.5,-10.15625m),(3.0,6.33m)
*G11 6 0 TABLE {V(6,0)} = (-6.0,-40.0m),(-3.0,-10.0m),(-1.0,-20.0m),(0,0m),
(1.0,20.0m),(3.0,10.0m),(6.0,40.0m)
L10 3 0 1.6n ic=0.0m
R11 3 0 200.0
*R12 5 0 200.0
.TRAN 0.01p 20n uic
.OPT ACCT LIMPTS=1001
.WIDTH OUT=80
.PROBE
.end

Generarea factorului de transfer (amplificare) in tensiune A1_3_2_3


cu programul TFSYGP si calculul senzitivitatilor normalizate
> restart;Digits:=8;with(linalg);
> R222:=-1.0/0.005165;
> restart;Digits:=8;with(linalg);

The output file given by TFSYGP is:

>
sis:={
(+s*C1+1/R2+1/(s*L3)+1/R4+1/R5)*V1+(-1/R5)*V2+0=0,
(-1/R5)*V1+(+1/R5+s*C6+1/R7+1/(s*L8)+1/R9)*V2+(+1)*I10=0,
0+(+1)*V2+0=-Ei
};
nec:={
V1,
V2,
I10

};
rez:=solve(sis,nec);
V1g:=subs(rez,V1);
V3g:=subs(rez,V3);
I10g:=subs(rez,I10);
rez1:={
Aei=collect(convert(limit(-evala(((V1g)-0)/Ei),inf=infinity),float),s)
};
save rez1,out3;
writeto(out4);
rez1;
writeto(terminal);

Generarea factorului de transfer (amplificare) in Tensiune A1_3_2_3 (n2 - n3


input port and n1 - n3 output port).
> A1_3_2_3:=factor(subs(rez1,Aei));
> A1_3_2_3 := R2*s*L3*R4/
(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4);
> numar_A1_3_2_3:=collect(numer(A1_3_2_3),s);
> numar_A1_3_2_3 := R2*s*L3*R4;
> numit_A1_3_2_3:=collect(denom(A1_3_2_3),s);
> numit_A1_3_2_3 := s^2*C1*R2*L3*R4*R5+
(R2*L3*R4+L3*R4*R5+R2*L3*R5)*s+R2*R4*R5;
> A1_3_2_3_ns:=factor(subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,A1_3_2_3));
> A1_3_2_3_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,A1_3_2_3);
> A1_3_2_3_nf := -.38908034e-3*I*f/(.32473112e-11*f^2-.19648542e3*I*f-.11616650e9);

A1_3_2_3_nf
:=

-0.00038908034
If
f 0.00019648542
I f 0.11616650109

-11 2

0.3247311210

> plot(abs(A1_3_2_3_nf),f=4.0e09..8.0e09);

Generarea senzitivitatilor lui A1_3_2_3 in raport cu parametrii: C1, R2,


L3, R4 si R5.
> SA_C1:=simplify(diff(A1_3_2_3,C1)*C1/A1_3_2_3);
> SA_C1 := -R2*s^2*L3*R4/
(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4)*R5*C1;
> SA_C1_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,SA_C1);
> SA_C1_nf := -.32473112e-11*f^2/(.32473112e-11*f^2-.19648542e3*I*f-.11616650e9);

SA_C1_nf:=

0.3247311210-11 f 2
0.3247311210-11 f 2 0.00019648542
I f 0.11616650109

> SA_R2:=simplify(diff(A1_3_2_3,R2)*R2/A1_3_2_3);
> SA_R2 := s*L3*R4*R5/
(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4);
> SA_R2_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,SA_R2);
> SA_R2_nf := .60288000e-2*I*f/(.32473112e-11*f^2-.19648542e3*I*f-.11616650e9);

SA_R2_nf:=

0.0060288000
If
f 0.00019648542
I f 0.11616650109

-11 2

0.3247311210

> SA_L3:=simplify(diff(A1_3_2_3,L3)*L3/A1_3_2_3);
> SA_L3 := R2*R4*R5/
(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4);
> SA_L3_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,SA_L3);
> SA_L3_nf := -.11616650e9/(.32473112e-11*f^2-.19648542e-3*I*f-.11616650e9);

SA_L3_nf:=

0.11616650109
0.3247311210-11 f 2 0.00019648542
I f 0.11616650109

> SA_R4:=simplify(diff(A1_3_2_3,R4)*R4/A1_3_2_3);

> SA_R4 := s*R2*L3*R5/


(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4);
> SA_R4_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,SA_R4);
> SA_R4_nf := -.58362051e-2*I*f/(.32473112e-11*f^2-.19648542e3*I*f-.11616650e9);

SA_R4_nf:=

-0.0058362051
If
f 0.00019648542
I f 0.11616650109

-11 2

0.3247311210

> SA_R5:=simplify(diff(A1_3_2_3,R5)*R5/A1_3_2_3);
> SA_R5 := -1/
(s^2*C1*R2*L3*R4*R5+s*L3*R4*R5+R2*R4*R5+R2*s*L3*R5+R2*s*L3*R4)*(s*L3*R4+R2*
R4+s*R2*L3+s^2*C1*R2*L3*R4)*R5;
> SA_R5_nf:=subs(C1=0.443e-12,R2=-193.61084,L3=1.6e09,R4=200.0,R5=3000.0,s=6.28*I*f,SA_R5);
> SA_R5_nf := -3000.0/(.32473112e-11*f^2-.19648542e3*I*f-.11616650e9)*(.64198305e-7*I*f-38722.168+.10824371e-14*f^2);

SA_R5_nf:=

3000.0( 0.6419830510-7 I f 38722.168+ 0.1082437110-14 f 2 )


0.3247311210-11 f 2 0.00019648542
I f 0.11616650109

> with(plots):
Fs:=plot(abs(SA_C1_nf),f=4.0e09..8.0e09,style=line,color=blue):
Gs:=plot(abs(SA_R2_nf),f=4.0e09..8.0e09,style=line,color=red):Hs:=plot(abs(SA_L3_nf
),f=4.0e09..8.0e09,style=point,color=brown):Ks:=plot(abs(SA_R4_nf),f=4.0e09..8.0e09
,style=point,color=green):Ls:=plot(abs(SA_R5_nf),f=4.0e09..8.0e09,style=line,color=bl
ack):display({Fs,Gs,Hs,Ks,Ls},axes=boxed,title=`abs(SA_C1_nf) - blue, abs(SA_R2_nf)
- red, abs(SA_L3_nf) - brown, abs(SA_R4_nf) - green, abs(SA_R5_nf) - black`);

Cracteristicile modulul senzitivitatilor frecventa (abs(SA) f ).

Generarea factorului de transfer (amplificare) in tensiune A2_3_1_3 cu


programul TFSYGP si calculul senzitivitatilor normalizate
> restart;Digits:=8;with(linalg);

The output file given by TFSYGP is:


>
sis:={
(+s*C1+1/R2+1/(s*L3)+1/R4+1/R5)*V1+(-1/R5)*V2+(+1)*I10=0,
(-1/R5)*V1+(+1/R5+s*C6+1/R7+1/(s*L8)+1/R9)*V2+0=0,
(+1)*V1+0+0=-Ei
};
nec:={
V1,
V2,
I10
};
rez:=solve(sis,nec);
V2g:=subs(rez,V2);
V3g:=subs(rez,V3);
I10g:=subs(rez,I10);
rez1:={
Aei=collect(convert(limit(-evala(((V2g)-0)/Ei),inf=infinity),float),s)
};
save rez1,out3;
writeto(out4);
rez1;
writeto(terminal);

Generarea factorului de transfer (amplificare) in Tensiune A2_3_1_3


(n1 - n3 input port and n2 - n3 output port).
> A2_3_1_3:=factor(subs(rez1,Aei));
> A2_3_1_3 := R7*s*L8*R9/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8);
> numar_A2_3_1_3:=collect(numer(A2_3_1_3),s);

> numar_A2_3_1_3 := R7*s*L8*R9;


> numit_A2_3_1_3:=collect(denom(A2_3_1_3),s);
> numit_A2_3_1_3 := s^2*C6*R5*R7*L8*R9+
(L8*R7*R9+R5*L8*R9+R5*R7*L8)*s+R5*R7*R9;
> A2_3_1_3_ns:=factor(subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,A2_3_1_3));
> A2_3_1_3_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,A2_3_1_3);
> A2_3_1_3_nf := -.38908034e-3*I*f/(-.19648542e-3*I*f+.31740085e11*f^2-.11616650e9);

A2_3_1_3_nf
:=

-0.00038908034
If
-11 2
0.00019648542
I f + 0.3174008510 f 0.11616650109

> plot(abs(A2_3_1_3_nf),f=4.0e09..8.0e09);
> with(plots):Fs:=plot(abs(A1_3_2_3_nf),f=4.0e09..8.0e09,style=line,color=blue):
Gs:=plot(abs(A2_3_1_3_nf),f=4.0e09..8.0e09,style=line,color=red):display({Fs,Gs},axe
s=boxed,title=`abs(A1_3_2_3_nf) - blue, abs(A2_3_1_3_nf) - red`);

Cracteristicile amplitudine frecventa (abs(A1_3_2_3) f si abs(A2_3__3 f ).

Generarea senzitivitatilor lui A2_3_1_3 in raport cu parametrii: C6, R7,


L8, R9 si R5.
> SA_C6:=simplify(diff(A2_3_1_3,C6)*C6/A2_3_1_3);
> SA_C6 := -R7*s^2*L8*R9/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8)*R5*C6;
> SA_C6_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,SA_C6);
> SA_C6_nf := -.31740085e-11*f^2/(-.19648542e-3*I*f+.31740085e11*f^2-.11616650e9);

SA_C6_nf:=

0.3174008510-11 f 2
0.00019648542
I f +0.3174008510-11 f 2 0.11616650109

> SA_R7:=simplify(diff(A2_3_1_3,R7)*R7/A2_3_1_3);
> SA_R7 := s*L8*R9*R5/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8);
> SA_R7_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,SA_R7);

> SA_R7_nf := .60288000e-2*I*f/(-.19648542e-3*I*f+.31740085e11*f^2-.11616650e9);

0.0060288000
If
0.00019648542
I f + 0.3174008510-11 f 2 0.11616650109

SA_R7_nf:=

> SA_L8:=simplify(diff(A2_3_1_3,L8)*L8/A2_3_1_3);
> SA_L8 := R7*R9*R5/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8);
> SA_L8_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,SA_L8);
> SA_L8_nf := -.11616650e9/(-.19648542e-3*I*f+.31740085e-11*f^2-.11616650e9);

SA_L8_nf:=

0.11616650109
0.00019648542
I f + 0.3174008510-11 f 2 0.11616650109

> SA_L8_nf := -.11616650e9/(-.19648542e-3*I*f+.31740085e-11*f^2-.11616650e9);


> SA_R9:=simplify(diff(A2_3_1_3,R9)*R9/A2_3_1_3);
> SA_R9 := R7*s*L8*R5/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8);
> SA_R9_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,SA_R9);
> SA_R9_nf := -.58362051e-2*I*f/(-.19648542e-3*I*f+.31740085e11*f^2-.11616650e9);

SA_R9_nf:=

-0.0058362051
If
0.00019648542
I f + 0.3174008510-11 f 2 0.11616650109

> SA_R55:=simplify(diff(A2_3_1_3,R5)*R5/A2_3_1_3);
> SA_R55 := -1/
(R7*s*L8*R9+s^2*C6*R5*R7*L8*R9+R5*s*L8*R9+R5*R7*R9+R5*R7*s*L8)*(s^2*C6
*R7*L8*R9+s*L8*R9+R7*R9+R7*s*L8)*R5;
> SA_R55_nf:=subs(C6=0.433e-12,R7=-193.61084,L8=1.6e09,R9=200.0,R5=3000.0,s=6.28*I*f,SA_R55);
> SA_R55_nf := -3000.0/(-.19648542e-3*I*f+.31740085e11*f^2-.11616650e9)*(.10580028e-14*f^2+.64198305e-7*I*f-38722.168);

SA_R55_nf:=

3000.0( 0.1058002810-14 f 2 + 0.6419830510-7 I f 38722.168)


0.00019648542
I f + 0.3174008510-11 f 2 0.11616650109

> with(plots):
Fs:=plot(abs(SA_C6_nf),f=4.0e09..8.0e09,style=line,color=blue):
Gs:=plot(abs(SA_R7_nf),f=4.0e09..8.0e09,style=line,color=red):Hs:=plot(abs(SA_L8_nf
),f=4.0e09..8.0e09,style=point,color=brown):Ks:=plot(abs(SA_R9_nf),f=4.0e09..8.0e09
,style=point,color=green):Ls:=plot(abs(SA_R55_nf),f=4.0e09..8.0e09,style=line,color=b
lack):display({Fs,Gs,Hs,Ks,Ls},axes=boxed,title=`abs(SA_C6_nf) - blue, abs(SA_R7_nf)
- red, abs(SA_L8_nf) - brown, abs(SA_R9_nf) - green, abs(SA_R5_nf) - black`);

Cracteristicile modulul senzitivitatilor frecventa (abs(SA) f ).


> with(plots):
Fs:=plot(abs(SA_C1_nf),f=4.0e09..8.0e09,style=line,color=blue):
Gs:=plot(abs(SA_R2_nf),f=4.0e09..8.0e09,style=line,color=red):Hs:=plot(abs(SA_L3_nf
),f=4.0e09..8.0e09,style=point,color=brown):Ks:=plot(abs(SA_R4_nf),f=4.0e09..8.0e09
,style=point,color=green):Ls:=plot(abs(SA_R5_nf),f=4.0e09..8.0e09,style=line,color=bl
ack):Fs1:=plot(abs(SA_C6_nf),f=4.0e09..8.0e09,style=line,color=plum):
Gs1:=plot(abs(SA_R7_nf),f=4.0e09..8.0e09,style=line,color=turquoise):Hs1:=plot(abs(
SA_L8_nf),f=4.0e09..8.0e09,style=point,color=violet):Ks1:=plot(abs(SA_R9_nf),f=4.0e
09..8.0e09,style=point,color=magenta):Ls1:=plot(abs(SA_R55_nf),f=4.0e09..8.0e09,sty
le=line,color=black):display({Fs,Gs,Hs,Ks,Ls,Fs1,Gs1,Hs1,Ks1,Ls1},axes=boxed,title=`a
bs(SA_C1_nf) - blue, abs(SA_R2_nf) - red, abs(SA_L3_nf) - brown, abs(SA_R4_nf) green, abs(SA_R5_nf) - black, abs(SA_C6_nf) - plum, abs(SA_R7_nf) - turquoise,
abs(SA_L8_nf) - violet, abs(SA_R9_nf) - magenta, abs(SA_R55_nf) - black`);

Rezultatele obinute n urma rulrii programului PATCA

Caracteristica Amplitudine - Frecventa


40

[V / V]

30

20

10

0
1.8

1.82

1.84

1.86

1.88

1.9
Freq [Hz]

1.92

1.94

1.96

1.98

2
8

x 10

Caracteristica Faza - Frecventa


100

[Deg]

50

-50

-100
1.8

1.82

1.84

1.86

1.88

1.9
Freq [Hz]

1.92

1.94

1.96

1.98

Fig. 8. Caracteristicele de frecven obinute cu metoda Monte Carlo (20 eantioane).

Rezultate senzitivitati:

x 10

Fig. 9. Caracteristicile senzitivitilor n raport cu: C1, R2, L3, R4, R5 i R9 = R10.

Fig. 10. Rezultate obinute cu metoda EVA i VRSS.

Listingul programului AVE_VRSS_Os2_CRez.m este:


% Dou oscilatoare cuplate printru circuit RLC serie
% Metoda EVA si metoda VRSS
clear;clc

% File AVE_VRSS_Os2_CRez.m
clear;clc;
C1=0.443e-12;R2=-193.6108;L3=1.6e-09;R4=200.0;R5=3000.0;C7=0.433e-12;
R8=-193.6108;L9=1.6e-09;R10=200.0;
BF=4.0e09;LF=8.0e09;DF=8.0e06;Lit=(LF-BF)/DF+1;
Nc=9;dpf=0.0001;Q=dpf*eye(Nc)+1;
Tr=0.02;Tc=0.02;TL=0.02;
T=[-Tc -Tr -TL -Tr -Tr -Tc -Tr -TL -Tr; Tc Tr TL Tr Tr Tc Tr TL Tr];
F=linspace(BF,LF,Lit);
TC1=0.02;TR2=0.02;TL3=0.02;TR4=0.02;TR5=0.02;TC7=0.02;TR8=0.02;TL9=0.02;TR10=0.02;
M=9;N=2^M;dpf=0.0001;Q=dpf*eye(N)+1;
Lit=(LF-BF)/DF+1;
%C1=1.0e-11;R2=-287.356;L3=2.8095e-09;R4=3500.0;R5=113.5;C6=2.53e-12;L7=10.60786e09;C8=2.0e-11;
%R9=-287.356;L10=1.2678e-09;R11=3500.0;
%BF=4.0e08;LF=1.6e09;DF=1.0e07;
%Tr=0.02;Tc=0.01;TL=0.01;
T=[-TC1 -TR2 -TL3 -TR4 -TR5 -TC7 -TR8 -TL9 -TR10; TC1 TR2 TL3 TR4 TR5 TC7 TR8 TL9
TR10];
M=9;N=2^M;dpf=0.05;Q=dpf*eye(N)+1;N=1000;
Lit=(LF-BF)/DF+1;
F=linspace(BF,LF,(LF-BF)/DF+1);
for i=1:(LF-BF)/DF+1
s=0+2*pi*F(i)*j;
%disp(s);
D=G11(C1,R2,L3,R4,R5,C7,R8,L9,R10,s);
%disp(D);
Vo(i)=D;
for p=1:Nc
F(i)=BF+DF*(i-1);s=0+2*pi*F(i)*j;
D=G11(C1*Q(p,1),R2*Q(p,2),L3*Q(p,3),R4*Q(p,4),R5*Q(p,5),C7*Q(p,6),R8*Q(p,7),L9*Q(p,
8),R10*Q(p,9),s);
Vr(i,p)=D;
Sen(i,p)=(Vr(i,p)/Vo(i)-1)/dpf;
if Sen(i,p)>0
L(i,p)=1+T(1,p);H(i,p)=1+T(2,p);
else
L(i,p)=1+T(2,p);H(i,p)=1+T(1,p);
end
end
for k=1:2
for p=1:Nc
if k==1
M(i,p)=L(i,p);
else
M(i,p)=H(i,p);
end
end
D=G11(C1*M(i,1),R2*M(i,2),L3*M(i,3),R4*M(i,4),R5*M(i,5),C7*M(i,6),R8*M(i,7),...
L9*M(i,8),R10*M(i,9),s);
if k==1
VL(i)=D;
else
VH(i)=D;
end
end
sum1(i)=0;sum2(i)=0;
for p=1:Nc
sum1(i)=sum1(i)+(Sen(i,p)*(L(i,p)-1))^2;
sum2(i)=sum2(i)+(Sen(i,p)*(H(i,p)-1))^2;
end
Vrss1(i)=Vo(i)*(1-sqrt(sum1(i)));
Vrss2(i)=Vo(i)*(1+sqrt(sum2(i)));

end
%
subplot(2,2,3)
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c',F,Sen(:,4),'m');
hold on
g=plot(F,Sen(:,5),'r');
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -20.0 65.0])
xlabel('Freq (Hz)','FontSize',8)
ylabel('%/%','FontSize',8)
title('Senzitivities','FontSize',8)
text(4.2e09,-10.5,'C1-k,R2 -g,L3-c,R4-m,R5-r','FontSize',8)
hold off
%
subplot(2,2,4)
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c',F,Sen(:,4),'m');
hold on
g=plot(F,Sen(:,5),'r');
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -20.0 65.0])
xlabel('Freq (Hz)','FontSize',8)
ylabel('%/%','FontSize',8)
%title('Fig 5.19. Senzitivities','FontSize',8)
%axis([BF LF -100 100]);
%YT=linspace(-2,2,5);set(gca,'ytick',YT)
xlabel('Freq (Hz)','FontSize',8);
%ylabel('%/%','FontSize',8)
title('Senzitivities Near fo','FontSize',8)
text(4.2e09,-10.5,'C1-k,R2-g,L3-c,R4-m,R5-r','FontSize',8)
hold off
%
subplot(2,2,1)
Vmax=max(VH);
Vmin=max(VL);
m=plot(F,VL,'r',F,VH,'g',F,Vo,'k');
set(m,'LineWidth',2)
grid on
axis([BF LF 0 10.75])
xlabel('Frecventa (Hz)','FontSize',8);
ylabel('Volti VL-r Vh-g Vo-k','FontSize',8)
title('Metoda EVA','FontSize',8)
text(4.1e09,8.5,['N= ',num2str(Nc)],'FontSize',9, 'color','k');
Vpmax=max(Vmax)
text(4.1e09,6.5,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin)
text(4.1e09,4.5,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
%text(410,13,['Vpj =',num2str(Vpk)],'FontSize',8);
%disp(Vpk);
Vomax=max(Vo)
text(4.1e09,2.5,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
subplot(2,2,2)
Vmax=max(Vrss2);
Vmin=max(Vrss1);
m=plot(F,Vrss1,'r',F,Vrss2,'g',F,Vo,'k');
set(m,'LineWidth',2)
grid on
axis([BF LF 0 3.6])
xlabel('Frecventa (Hz)','FontSize',8);
ylabel('Volti','FontSize',8)
title('Metoda Vrss','FontSize',8)
text(4.1e09,3.25,['N= ',num2str(Nc)],'FontSize',9, 'color','k');
Vpmax=max(Vmax)

text(4.1e09,2.25,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');


Vpmin=max(Vmin)
text(4.1e09,1.25,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
%text(410,13,['Vpj =',num2str(Vpk)],'FontSize',8);
%disp(Vpk);
Vomax=max(Vo)
text(4.1e09,0.75,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');

Fig. 11. Rezultate obinute cu metoda Monte Carlo (MC).

Listingul programului mcr_os2_CRLC.m este:


% MC pentru MC_Os2_CRez.m
% File: d:\Mfiles\MC_Os2_CRez.m
% Transfer function method;
% uses function MC44.m
clear;clc;
C1=0.443e-12;R2=-193.6108;L3=1.6e-09;R4=200.0;R5=3000.0;C7=0.433e-12;
R8=-193.6108;L9=1.6e-09;R10=200.0;
BF=4.0e09;LF=8.0e09;DF=8.0e06;Lit=(LF-BF)/DF+1;
M=9;N=2^M;dpf=0.02;Q=dpf*eye(N)+1;N=200;
F=linspace(BF,LF,Lit);
TC1=0.02;TR2=0.02;TL3=0.02;TR4=0.02;TR5=0.02;TC7=0.02;TR8=0.02;TL9=0.02;TR10=0.02;
M=9;N=2^M;Q=dpf*eye(N)+1;
Lit=(LF-BF)/DF+1;
T=[-TC1 -TR2 -TL3 -TR4 -TR5 -TC7 -TR8 -TL9 -TR10; TC1 TR2 TL3 TR4 TR5 TC7 TR8 TL9
TR10];
Lit=(LF-BF)/DF+1;
randn('state',sum(100*clock));
NN1=zeros(N,1);DD1=zeros(N,1);DD0=zeros(N,1);
Vo=zeros(Lit,1);
Vm=zeros(N,Lit);Tn=zeros(N,M);
F=linspace(BF,LF,Lit);
% mc=1 normal dist; mc=2 uniform dist
for mc=1:2
for k=1:N
for w=1:M
if mc==1
Tn(k,w)=((T(2,w)-T(1,w))/6)*...

(randn+3)+T(1,w)+1;
else
Tn(k,w)=(T(2,w)-T(1,w))*...
rand+T(1,w)+1;
end
end
end
for i=1:Lit
s=2*pi*F(i)*j;
Vo(i)=MC44R(C1,R2,L3,R4,R5,C7,R8,L9,R10,s);
for k=1:N
Vm(k,i)=MC44R(C1*Tn(k,1),R2*Tn(k,2),...
L3*Tn(k,3),R4*Tn(k,4),R5*Tn(k,5),C7*Tn(k,6),R8*Tn(k,7),L9*Tn(k,8),R10*Tn(k,9),s);
Sen(i,k)=(Vm(k,i)/Vo(i)-1)/dpf;
end
end
% get statistics
if mc==1
Vmax1=max(Vm);Vmin1=min(Vm);
else
Vmax2=max(Vm);Vmin2=min(Vm);
end
end
Vmax1=max(Vm);
Vmin1=min(Vm);
subplot(2,1,1);
Vmax=max(Vm);
Vmin=min(Vm);
Vomax=max(Vo);
h=plot(F,Vmax,'g',F,Vo,'k',F,Vmin,'r');
set(h,'LineWidth',2);grid on;
%h1=plot(F,Vmin,'k',F,Vo,'k');
%set(h1,'LineWidth',2);grid on;
axis ([BF LF 0 16.2]);
xlabel('Freq(Hz)');ylabel('Volts');
s1='N = ';s2='Vpmax = ';s3='Vpmin'
text(4.3e09,14.5,['N= ',num2str(N)],'FontSize',9, 'color','k');
Vpmax=max(Vmax);%Vpj=min(Vmin);
text(4.3e09,11.5,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin);
text(4.3e09,8.5,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');
Vomax=max(Vo);%disp('Vomax=');disp(Vomax);
text(4.3e09,5.5,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
SC1max=max(Sen(:,1));disp('SC1max=');disp(SC1max);
SC1min=min(Sen(:,2));disp('SC1min=');disp(SC1min);
SR2max=max(Sen(:,2));disp('SR2max=');disp(SR2max);
SR2min=min(Sen(:,2));disp('SR2min=');disp(SR2min);
SL3max=max(Sen(:,3));disp('SL3max=');disp(SL3max);
SL3min=min(Sen(:,3));disp('SL3min=');disp(SL3min);
SR4max=max(Sen(:,4));disp('SR4max=');disp(SR4max);
SR4min=min(Sen(:,4));disp('SR4min=');disp(SR4min);
SR5max=max(Sen(:,5));disp('SR5max=');disp(SR5max);
SR5min=min(Sen(:,5));disp('SR5min=');disp(SR2min);
SC7max=max(Sen(:,6));disp('SC7max=');disp(SC7max);
SC7min=min(Sen(:,6));disp('SC7min=');disp(SC7min);
SR8max=max(Sen(:,7));disp('SR8max=');disp(SR8max);
SR8min=min(Sen(:,7));disp('SR8min=');disp(SR8min);
SL9max=max(Sen(:,8));disp('SL9max=');disp(SL9max);
SL9min=min(Sen(:,8));disp('SL9min=');disp(SL9min);
SR10max=max(Sen(:,9));disp('SR10max=');disp(SR10max);
SR10min=min(Sen(:,9));disp('SR10min=');disp(SR10min);
SL10max=max(Sen(:,10));disp('SL10max=');disp(SL10max);
SL10min=min(Sen(:,10));disp('SL10min=');disp(SL10min);
X1=max(SR2max,SL3max);X2=max(SC1max,SC7max);X12=max(X1,X2);Xmax=max(X12,SR4max);
Y1=min(SR2min,SL3min);Y2=min(SR5min,SR4min);Y12=max(Y1,Y2);Ymin=max(Y12,SR4min);
disp('Xmax=');disp(Xmax);disp('Ymin=');disp(Ymin);
%disp('Sen(:,2)=');disp(Sen(:,2));
subplot(2,1,2);

h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c');grid;
hold on
g=plot(F,Sen(:,4),'r',F,Sen(:,5),'b');grid;
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -40.0 110.0]);
xlabel('Freq (Hz)','FontSize',8);
ylabel('%/%','FontSize',8);
title('Senzitivities Near fo','FontSize',8);
s1='At 6.0GHz high to low order is:'
text(4.2e09,75.0,s1,'FontSize',8)
text(4.2e09,-30.5,'C1-k, R2-g, L3-c, R4-r, R5-b','FontSize',8)
hold off

Fig. 12. Rezultate obinute cu metoda Monte Carlo Rapid (MCR).

Listingul programului MCR_Os2_CRez.m este:


%Program pentru calculul tolerantelor cu Metoda Monte Carlo Rapida pentru
OScilatoarele intrarea U4_5 iesirea U1_5
%cuplate printr-un circuit
% File: MCR_Os2_CRLC45.m
% functions not used
clc;clear;
%Pentru doua Oscilatoare cuplate rezistiv (printr-un rezistor)
%Numarator pentru A1_3_2_3
%Os2Rez_num=s*L3*R2*R4;
%Numitor pentru A1_3_2_3
%Os2Rez_numit=s^2*C1*R2*L3*R4*R5+(L3*R2*R4+L3*R4*R5+R2*L3*R5)*s+R2*R4*R5;
clc;clear;
C1=0.443e-12;R2=-193.6108;L3=1.6e-09;R4=200.0;R5=3000.0;C7=0.433e-12;

R8=-193.6108;L9=1.6e-09;R10=200.0;
BF=4.0e09;LF=8.0e09;DF=8.0e06;Lit=(LF-BF)/DF+1;dpf=1.0;
F=linspace(BF,LF,Lit);
TC1=0.02;TR2=0.02;TL3=0.02;TR4=0.02;TR5=0.02;TC7=0.02;TR8=0.02;TL9=0.02;TR10=0.02;
T=[-TC1 -TR2 -TL3 -TR4 -TR5 -TC7 -TR8 -TL9 -TR10; TC1 TR2 TL3 TR4 TR5 TC7 TR8 TL9
TR10];
M=9;N=2^M;dpf=0.01;Q=dpf*eye(N)+1;
Lit=(LF-BF)/DF+1;
% generate 2^M FMCA
% extreme tolerance combinations
Tn=zeros(M,N);Dr=zeros(M,N);
for k=1:N;for w=1:M;Re(w,k)=k;end;end
for k=1:N
for w=1:M
Re(w+1,k)=floor(Re(w,k)/2);
Dr(w,k)=Re(w,k)-2*Re(w+1,k);
if Dr(w,k)==0
Tn(w,k)=1+T(1,w);
else
Tn(w,k)=1+T(2,w);
end
end
end
for i=1:Lit
s=2*pi*F(i)*j;
SBFNUM=s*L3*R2*R4;
SBFNUMIT=s^2*C1*R2*L3*R4*R5+(L3*R2*R4+L3*R4*R5+...
R2*L3*R5)*s+R2*R4*R5;
V0(i)=(SBFNUM)/(SBFNUMIT);
Vo(i)=abs((SBFNUM)/(SBFNUMIT));
for k=1:N
SBFNUM(k)=s*L3*Tn(3,k)*R2*Tn(2,k)*R4*Tn(4,k);
SBFNUMIT(k)=s^2*C1*Tn(1,k)*R2*Tn(2,k)*L3*Tn(3,k)*R4*Tn(4,k)*R5*Tn(5,k)
+...
(L3*Tn(3,k)*R2*Tn(2,k)*R4*Tn(4,k)
+L3*Tn(3,k)*R4*Tn(4,k)*R5*Tn(5,k)+...
R2*Tn(2,k)*L3*Tn(3,k)*R5*Tn(5,k))*s+R2*Tn(2,k)*R4*Tn(4,k)*R5*Tn(5,k);
Vm(k,i)=abs((SBFNUM(k))/(SBFNUMIT(k)));
Sen(i,k)=(Vm(k,i)/Vo(i)-1)/dpf;
%if Sen(t,p)>0
%L(t,p)=1+T(1,p);H(i,p)=1+T(2,p);
%else
%L(t,p)=1+T(2,p);H(t,p)=1+T(1,p);
%end
end
end
%end
%end
%Vmax=max(Vm);
%disp(Vmax);
subplot(2,1,1);
Vmax=max(Vm);
Vmin=min(Vm);
h=plot(F,Vmax,'g',F,Vo,'k',F,Vmin,'r');
set(h,'LineWidth',2);grid on;
%h1=plot(F,Vmin,'k',F,Vo,'k');
%set(h1,'LineWidth',2);grid on;
axis ([BF LF 0 10.5]);
xlabel('Freq(Hz)');ylabel('Volts');
s1='N = ';s2='Vpmax = ';s3='Vpmin'
text(4.2e09,7.5,['N= ',num2str(N)],'FontSize',9, 'color','k');
Vpmax=max(Vmax);%Vpj=min(Vmin);
text(4.2e09,5.5,['Vpmax =',num2str(Vpmax)],'FontSize',10, 'color','g');
Vpmin=max(Vmin)

text(4.2e09,3.5,['Vpmin =',num2str(Vpmin)],'FontSize',10, 'color','r');


Vomax=max(Vo)
text(4.2e09,1.5,['Vomax= ',num2str(Vomax)],'FontSize',9, 'color','k');
SC1max=max(Sen(:,1));disp('SC1max=');disp(SC1max);
SC1min=min(Sen(:,2));disp('SC1min=');disp(SC1min);
SR2max=max(Sen(:,2));disp('SR2max=');disp(SR2max);
SR2min=min(Sen(:,2));disp('SR2min=');disp(SR2min);
SL3max=max(Sen(:,3));disp('SL3max=');disp(SL3max);
SL3min=min(Sen(:,3));disp('SL3min=');disp(SL3min);
SR4max=max(Sen(:,4));disp('SR4max=');disp(SR4max);
SR4min=min(Sen(:,4));disp('SR4min=');disp(SR4min);
SR5max=max(Sen(:,5));disp('SR5max=');disp(SR5max);
SR5min=min(Sen(:,5));disp('SR5min=');disp(SR2min);
SC6max=max(Sen(:,6));disp('SC6max=');disp(SC6max);
SC6min=min(Sen(:,6));disp('SC6min=');disp(SC6min);
SL7max=max(Sen(:,7));disp('SL7max=');disp(SL7max);
SL7min=min(Sen(:,7));disp('SL7min=');disp(SL7min);
SC8max=max(Sen(:,8));disp('SC8max=');disp(SC8max);
SC8min=min(Sen(:,8));disp('SC8min=');disp(SC8min);
SR9max=max(Sen(:,9));disp('SR9max=');disp(SR9max);
SR9min=min(Sen(:,9));disp('SR9min=');disp(SR9min);
SL10max=max(Sen(:,10));disp('SL10max=');disp(SL10max);
SL10min=min(Sen(:,10));disp('SL10min=');disp(SL10min);
SR11max=max(Sen(:,11));disp('SR2max=');disp(SR11max);
SR11min=min(Sen(:,11));disp('SR2min=');disp(SR11min);
X1=max(SR2max,SL3max);X2=max(SC1max,SC6max);X12=max(X1,X2);Xmax=max(X12,SR4max);
Y1=min(SR2min,SL3min);Y2=min(SR5min,SR4min);Y12=max(Y1,Y2);Ymin=max(Y12,SR4min);
disp('Xmax=');disp(Xmax);disp('Ymin=');disp(Ymin);
%disp('Sen(:,2)=');disp(Sen(:,2));
subplot(2,1,2);
h=plot(F,Sen(:,1),'k',F,Sen(:,2),'g',...
F,Sen(:,3),'c');grid;
hold on
g=plot(F,Sen(:,4),'r',F,Sen(:,5),'b');grid;
set(h,'LineWidth',1);set(g,'LineWidth',1)
grid on
axis([BF LF -85.0 330.0]);
xlabel('Freq (Hz)','FontSize',8);
ylabel('%/%','FontSize',8);
title('Senzitivities Near fo','FontSize',8);
s1='At 6.0GHz high to low order is:'
text(4.3e09,175.0,s1,'FontSize',8)
text(4.3e09,-55.0,'C1-k, R2-g, L3-c, R4-r, R5-b','FontSize',8)
hold off

Rezultate afisate in fereastra principala MATLAB 7.1:


Fisier de date:
C:\Program Files\MATLAB71\work\Prog Tolerante 2011_AC\Fisiere_spice\Osc_R.cir
Numarul de laturi: 10
Numarul de noduri: 3
Numarul de cuplaje magnetice: 0
Laturile au fost indexate automat cu numere de la 1 la 10
Element ---> Index
R1 ---> 1
L1 ---> 2
R2 ---> 3
C2 ---> 4
R3 ---> 5
L2 ---> 6
R4 ---> 7

V2 ---> 8
R5 ---> 9
C1 ---> 10
Marimi de intrare posibile: V2
Marimi de iesire posibile: V(1)
====================================================================
Vectorul variabilelor MNM in domeniul operational:
X=
V1
V2
I8
====================================================================
====================================================================
Ecuatiile nodale modificate in domeniul operational (la intrare tip impuls):
(1/R1+1/s/L1+1/R2+1/R5+s*C1)*V1-1/R5*V2 = 0 ;
-1/R5*V1+(s*C2+1/R3+1/s/L2+1/R4+1/R5)*V2+I8 = 0 ;
V2 = 1 ;
====================================================================
============================================
Solutia simbolica: H(s) = V1(s)/V2(s) :
**************************
H(s) = 1/(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*R1*s*L1*R2
Numaratorul = R1*s*L1*R2
Numitorul = s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5
============================================
Solutia numerica: H(s) = V1(s)/V2(s) :
H(s) = 1558935079819629836212694251604008763392/
(786957511477410303771907351573820342272*s+292300327466180583640736966543256603931186508595
2000+2071824721080288151381851184390125*s^2)*s
Numaratorul = 1558935079819629836212694251604008763392*s
Numitorul =
786957511477410303771907351573820342272*s+292300327466180583640736966543256603931186508595
2000+2071824721080288151381851184390125*s^2
Functia de transfer in format numeric:
V1(s)/V2(s) = 5.3333e-013* Transfer function
Transfer function:
s
--------------------------------7.088e-019 s^2 + 2.692e-013 s + 1

Zeros =
0
Poles =
-1.8992e+005 +1.1878e+009i
-1.8992e+005 -1.1878e+009i
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Durata AMC = 34 sec.
55%
100%
Senzitivitatile functiei de transfer:
In raport cu R1 :
(-1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)^2*R1*s*L1*R2*(R2*R5+s*
L1*R5+s*L1*R2+s^2*C1*L1*R2*R5)+1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*s*L1*R2)*(s*L1*R2*R5+R
1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)/s/L1/R2
In raport cu L1 :
(-1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)^2*R1*s*L1*R2*(s*R2*R5+
R1*s*R5+R1*s*R2+s^2*C1*R1*R2*R5)+1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*R1*s*R2)*(s*L1*R2*R5+R
1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)/R1/s/R2
In raport cu R2 :
(-1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)^2*R1*s*L1*R2*(s*L1*R5+
R1*R5+R1*s*L1+s^2*C1*R1*L1*R5)+1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*R1*s*L1)*(s*L1*R2*R5+R
1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)/R1/s/L1
In raport cu C2 :
0
In raport cu R3 :
0
In raport cu L2 :
0
In raport cu R4 :
0
In raport cu R5 :

-1/
(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*(s*L1*R2+R1*R2+R1*s*L1
+s^2*C1*R1*L1*R2)*R5
In raport cu C1 :
-1/(s*L1*R2*R5+R1*R2*R5+R1*s*L1*R5+R1*s*L1*R2+s^2*C1*R1*L1*R2*R5)*R1*s^2*L1*R2*R5*C1

S-ar putea să vă placă și