VE2 Questão 1
This commit is contained in:
BIN
VE2/Questão 1.zip
Normal file
BIN
VE2/Questão 1.zip
Normal file
Binary file not shown.
31
VE2/Schematics.dpl
Normal file
31
VE2/Schematics.dpl
Normal file
@@ -0,0 +1,31 @@
|
||||
<Qucs Schematic 0.0.19>
|
||||
<Properties>
|
||||
<View=0,-60,1414,1139,1,0,240>
|
||||
<Grid=10,10,0>
|
||||
<DataSet=Schematics.dat>
|
||||
<DataDisplay=Schematics.sch>
|
||||
<OpenDisplay=1>
|
||||
<Script=Schematics.m>
|
||||
<RunScript=0>
|
||||
<showFrame=0>
|
||||
<FrameText0=Title>
|
||||
<FrameText1=Drawn By:>
|
||||
<FrameText2=Date:>
|
||||
<FrameText3=Revision:>
|
||||
</Properties>
|
||||
<Symbol>
|
||||
</Symbol>
|
||||
<Components>
|
||||
</Components>
|
||||
<Wires>
|
||||
</Wires>
|
||||
<Diagrams>
|
||||
<Rect 240 484 1127 434 3 #c0c0c0 1 00 1 0 0.2 1 1 -0.1 0.5 1.1 1 -0.1 0.5 1.1 315 0 225 "" "" "">
|
||||
<"dBVo1" #0000ff 0 3 0 0 0>
|
||||
</Rect>
|
||||
<Rect 240 1043 1122 453 3 #c0c0c0 1 00 1 0 0.2 1 1 -0.1 0.5 1.1 1 -0.1 0.5 1.1 315 0 225 "" "" "">
|
||||
<"dBVo2" #0000ff 0 3 0 0 0>
|
||||
</Rect>
|
||||
</Diagrams>
|
||||
<Paintings>
|
||||
</Paintings>
|
||||
162
VE2/Schematics.sch
Normal file
162
VE2/Schematics.sch
Normal file
@@ -0,0 +1,162 @@
|
||||
<Qucs Schematic 0.0.19>
|
||||
<Properties>
|
||||
<View=147,31,1544,707,1.30422,236,0>
|
||||
<Grid=10,10,1>
|
||||
<DataSet=Schematics.dat>
|
||||
<DataDisplay=Schematics.dpl>
|
||||
<OpenDisplay=1>
|
||||
<Script=Schematics.m>
|
||||
<RunScript=0>
|
||||
<showFrame=0>
|
||||
<FrameText0=Título>
|
||||
<FrameText1=Desenhado por:>
|
||||
<FrameText2=Data:>
|
||||
<FrameText3=Revisão:>
|
||||
</Properties>
|
||||
<Symbol>
|
||||
</Symbol>
|
||||
<Components>
|
||||
<R R13 5 1000 200 15 -26 0 1 "50" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
|
||||
<GND * 5 610 240 0 0 0 0>
|
||||
<GND * 5 870 240 0 0 0 0>
|
||||
<.DC DC1 1 1120 240 0 48 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0>
|
||||
<Eqn Eqn3 1 1350 210 -32 17 0 0 "dBVo2=dB(Pr2.v)" 1 "yes" 0>
|
||||
<Vac V1 5 250 170 -63 -5 0 1 "1 V" 0 "1 GHz" 0 "0" 0 "0" 0>
|
||||
<GND * 5 250 240 0 0 0 0>
|
||||
<R R12 5 460 130 -26 15 0 0 "50" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
|
||||
<GND * 5 420 470 0 0 0 0>
|
||||
<GND * 5 350 410 0 0 0 0>
|
||||
<GND * 5 460 430 0 0 0 0>
|
||||
<GND * 5 550 450 0 0 0 0>
|
||||
<GND * 5 560 570 0 0 0 0>
|
||||
<GND * 5 660 490 0 0 0 0>
|
||||
<GND * 5 730 410 0 0 0 0>
|
||||
<GND * 5 810 450 0 0 0 0>
|
||||
<GND * 5 840 430 0 0 0 0>
|
||||
<GND * 5 930 450 0 0 0 0>
|
||||
<GND * 5 950 570 0 0 0 0>
|
||||
<GND * 5 1060 490 0 0 0 0>
|
||||
<GND * 5 1120 410 0 0 0 0>
|
||||
<GND * 5 1200 450 0 0 0 0>
|
||||
<GND * 5 1220 430 0 0 0 0>
|
||||
<GND * 5 1290 450 0 0 0 0>
|
||||
<GND * 5 1330 570 0 0 0 0>
|
||||
<GND * 5 1410 490 0 0 0 0>
|
||||
<GND * 5 1050 130 0 0 0 0>
|
||||
<VProbe Pr1 1 1040 110 28 -31 0 0>
|
||||
<Eqn Eqn2 1 1350 100 -32 17 0 0 "dBVo1=dB(Pr1.v)" 1 "yes" 0>
|
||||
<GND * 5 1460 420 0 0 0 0>
|
||||
<VProbe Pr2 1 1450 400 28 -31 0 0>
|
||||
<GND * 5 1000 250 0 0 0 0>
|
||||
<.AC AC1 1 1120 80 0 48 0 0 "log" 1 "5kHz" 1 "35 kHz" 1 "8451" 1 "no" 0>
|
||||
<C C16 5 420 440 -84 12 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C17 5 660 460 24 -4 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C18 5 810 420 -67 18 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C19 5 1060 460 24 -4 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C20 5 1200 420 -66 13 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C21 5 1410 460 24 -4 0 3 "1 uF" 1 "" 0 "neutral" 0>
|
||||
<C C15 5 610 190 24 -4 0 3 "1.6418 uF" 1 "" 0 "neutral" 0>
|
||||
<L L9 5 560 180 -121 25 0 1 "38.668 uH" 1 "" 0>
|
||||
<L L6 5 820 180 -121 25 0 1 "38.668 uH" 1 "" 0>
|
||||
<C C12 5 870 190 21 12 0 3 "1.6418 uF" 1 "" 0 "neutral" 0>
|
||||
<C C14 5 790 130 -26 -41 0 2 "13.906 nF" 1 "" 0 "neutral" 0>
|
||||
<L L8 5 700 130 -55 12 0 0 "4.5653 mH" 1 "" 0>
|
||||
<Lib OTA1 1 380 400 -10 -108 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.118154540198247" 1>
|
||||
<Lib OTA2 1 490 400 -33 77 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.118154540198247" 1>
|
||||
<Lib OTA11 1 770 400 -10 -108 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.133315982591182" 1>
|
||||
<Lib OTA12 1 870 400 -25 77 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.133315982591182" 1>
|
||||
<Lib OTA15 1 1160 400 -10 -108 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.125506528213231" 1>
|
||||
<Lib OTA16 1 1250 400 -36 81 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.125506528213231" 1>
|
||||
<Lib OTA3 1 580 440 -29 -107 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.005723725095292" 1>
|
||||
<Lib OTA13 1 970 440 -17 -114 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.006458186320055" 1>
|
||||
<Lib OTA17 1 1330 440 -10 -108 1 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.012181911415347" 1>
|
||||
<Lib OTA10 1 580 540 -10 70 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.012205667290396" 1>
|
||||
<Lib OTA14 1 970 540 -10 70 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.013771883207112" 1>
|
||||
<Lib OTA18 1 1340 540 9 63 0 0 "C:/Users/Gabriel/.qucs/user_lib/OTA" 0 "OTA" 0 "0.009668789497853" 1>
|
||||
</Components>
|
||||
<Wires>
|
||||
<560 240 610 240 "" 0 0 0 "">
|
||||
<560 210 560 240 "" 0 0 0 "">
|
||||
<560 130 560 150 "" 0 0 0 "">
|
||||
<610 220 610 240 "" 0 0 0 "">
|
||||
<560 130 610 130 "" 0 0 0 "">
|
||||
<610 130 610 160 "" 0 0 0 "">
|
||||
<610 130 670 130 "" 0 0 0 "">
|
||||
<610 240 820 240 "" 0 0 0 "">
|
||||
<820 240 870 240 "" 0 0 0 "">
|
||||
<820 210 820 240 "" 0 0 0 "">
|
||||
<820 130 820 150 "" 0 0 0 "">
|
||||
<870 220 870 240 "" 0 0 0 "">
|
||||
<1000 130 1000 170 "" 0 0 0 "">
|
||||
<820 130 870 130 "" 0 0 0 "">
|
||||
<870 130 1000 130 "" 0 0 0 "">
|
||||
<870 130 870 160 "" 0 0 0 "">
|
||||
<250 130 250 140 "" 0 0 0 "">
|
||||
<250 200 250 240 "" 0 0 0 "">
|
||||
<250 130 310 130 "" 0 0 0 "">
|
||||
<490 130 560 130 "" 0 0 0 "">
|
||||
<350 310 530 310 "" 0 0 0 "">
|
||||
<350 310 350 370 "" 0 0 0 "">
|
||||
<350 370 360 370 "" 0 0 0 "">
|
||||
<310 130 430 130 "" 0 0 0 "">
|
||||
<420 390 420 410 "" 0 0 0 "">
|
||||
<350 410 360 410 "" 0 0 0 "">
|
||||
<460 430 470 430 "" 0 0 0 "">
|
||||
<420 390 470 390 "" 0 0 0 "">
|
||||
<530 310 530 410 "" 0 0 0 "">
|
||||
<620 430 630 430 "" 0 0 0 "">
|
||||
<530 410 560 410 "" 0 0 0 "">
|
||||
<550 450 560 450 "" 0 0 0 "">
|
||||
<630 430 660 430 "" 0 0 0 "">
|
||||
<630 430 630 550 "" 0 0 0 "">
|
||||
<620 550 630 550 "" 0 0 0 "">
|
||||
<310 130 310 530 "" 0 0 0 "">
|
||||
<310 530 560 530 "" 0 0 0 "">
|
||||
<530 310 660 310 "" 0 0 0 "">
|
||||
<660 310 660 430 "" 0 0 0 "">
|
||||
<660 430 690 430 "" 0 0 0 "">
|
||||
<730 410 750 410 "" 0 0 0 "">
|
||||
<740 310 910 310 "" 0 0 0 "">
|
||||
<740 310 740 370 "" 0 0 0 "">
|
||||
<740 370 750 370 "" 0 0 0 "">
|
||||
<840 430 850 430 "" 0 0 0 "">
|
||||
<810 390 850 390 "" 0 0 0 "">
|
||||
<910 310 910 410 "" 0 0 0 "">
|
||||
<1010 430 1030 430 "" 0 0 0 "">
|
||||
<910 410 950 410 "" 0 0 0 "">
|
||||
<930 450 950 450 "" 0 0 0 "">
|
||||
<1030 430 1060 430 "" 0 0 0 "">
|
||||
<1030 430 1030 550 "" 0 0 0 "">
|
||||
<1010 550 1030 550 "" 0 0 0 "">
|
||||
<690 430 690 530 "" 0 0 0 "">
|
||||
<690 530 950 530 "" 0 0 0 "">
|
||||
<910 310 1060 310 "" 0 0 0 "">
|
||||
<1060 310 1060 430 "" 0 0 0 "">
|
||||
<1120 410 1140 410 "" 0 0 0 "">
|
||||
<1130 310 1130 370 "" 0 0 0 "">
|
||||
<1130 370 1140 370 "" 0 0 0 "">
|
||||
<1200 390 1230 390 "" 0 0 0 "">
|
||||
<1130 310 1290 310 "" 0 0 0 "">
|
||||
<1290 310 1290 410 "" 0 0 0 "">
|
||||
<1060 430 1090 430 "" 0 0 0 "">
|
||||
<1220 430 1230 430 "" 0 0 0 "">
|
||||
<1370 430 1380 430 "" 0 0 0 "">
|
||||
<1290 410 1310 410 "" 0 0 0 "">
|
||||
<1290 450 1310 450 "" 0 0 0 "">
|
||||
<1290 310 1410 310 "" 0 0 0 "">
|
||||
<1380 430 1410 430 "" 0 0 0 "">
|
||||
<1410 310 1410 430 "" 0 0 0 "">
|
||||
<1000 130 1030 130 "" 0 0 0 "">
|
||||
<1410 430 1440 430 "" 0 0 0 "">
|
||||
<1440 420 1440 430 "" 0 0 0 "">
|
||||
<1000 230 1000 250 "" 0 0 0 "">
|
||||
<1380 430 1380 550 "" 0 0 0 "">
|
||||
<1320 570 1330 570 "" 0 0 0 "">
|
||||
<1090 430 1090 530 "" 0 0 0 "">
|
||||
<1090 530 1320 530 "" 0 0 0 "">
|
||||
<730 130 760 130 "" 0 0 0 "">
|
||||
</Wires>
|
||||
<Diagrams>
|
||||
</Diagrams>
|
||||
<Paintings>
|
||||
</Paintings>
|
||||
8452
VE2/VE2.csv
Normal file
8452
VE2/VE2.csv
Normal file
File diff suppressed because it is too large
Load Diff
107
VE2/VE2.m
Normal file
107
VE2/VE2.m
Normal file
@@ -0,0 +1,107 @@
|
||||
clear
|
||||
clc
|
||||
|
||||
s = tf('s');
|
||||
|
||||
% 1) Especificações de projeto
|
||||
fc = 20000; wc = 2*pi*fc;
|
||||
BWp = 2000; Ap = 0.01;
|
||||
BWs = 20000; As = 50;
|
||||
At = 1/2;
|
||||
|
||||
% 2) Determinacao da ordem
|
||||
wp = 1; ws = BWs/BWp;
|
||||
n = cheb1ord(wp,ws,Ap,As,'s');
|
||||
[A,B,C,D] = cheby1(n, Ap, wp,'s');
|
||||
G = tf(ss(A,B,C,D));
|
||||
|
||||
% Conferindo....
|
||||
G_wp = freqresp(G,wp);
|
||||
abs_G_wp = mag2db(abs(G_wp));
|
||||
G_ws = freqresp(G,ws);
|
||||
abs_G_ws = mag2db(abs(G_ws));
|
||||
[dcgain(G) abs_G_wp abs_G_ws]
|
||||
|
||||
|
||||
p = pole(G);
|
||||
|
||||
f0 = fc; Qbp = fc/BWp;
|
||||
%A0 = At^(1/n); %ordem impar
|
||||
A0 = At*db2mag(-Aripple)^(1/n); %ordem par
|
||||
|
||||
%% 1a Seção biquadrática
|
||||
ctsec = 1;
|
||||
|
||||
polo = p(2); % CUIDADO!!!
|
||||
|
||||
% POLOS COMPLEXO CONJUGADO
|
||||
alpha = abs(real(polo)); beta = abs(imag(polo));
|
||||
|
||||
C = alpha^2+beta^2;
|
||||
D = 2*alpha/Qbp;
|
||||
E = C/Qbp^2+4;
|
||||
G = sqrt(E^2-4*D^2);
|
||||
Q = sqrt( (E+G)/(2*D^2) );
|
||||
M = alpha*Q/Qbp;
|
||||
W = M + sqrt(M ^2-1);
|
||||
fra = f0/W;
|
||||
frb = W*f0;
|
||||
Ara = A0*sqrt(1+Q^2*(f0/fra-fra/f0)^2);
|
||||
Arb = A0*sqrt(1+Q^2*(f0/frb-frb/f0)^2);
|
||||
|
||||
ff(2*ctsec-1) = fra; ff(2*ctsec) = frb;
|
||||
Qf(2*ctsec-1) = Q; Qf(2*ctsec) = Q;
|
||||
Af(2*ctsec-1) = Ara; Af(2*ctsec) = Arb;
|
||||
|
||||
% %% 2a Seção biquadrática
|
||||
% ctsec = ctsec+1;
|
||||
%
|
||||
% polo = p(3); % CUIDADO!!!
|
||||
%
|
||||
% % POLOS COMPLEXO CONJUGADO
|
||||
% alpha = abs(real(polo)); beta = abs(imag(polo));
|
||||
%
|
||||
% C = alpha^2+beta^2;
|
||||
% D = 2*alpha/Qbp;
|
||||
% E = C/Qbp^2+4;
|
||||
% G = sqrt(E^2-4*D^2);
|
||||
% Q = sqrt( (E+G)/(2*D^2) );
|
||||
% M = alpha*Q/Qbp;
|
||||
% W = M + sqrt(M ^2-1);
|
||||
% fra = f0/W;
|
||||
% frb = W*f0;
|
||||
% Ara = A0*sqrt(1+Q^2*(f0/fra-fra/f0)^2);
|
||||
% Arb = A0*sqrt(1+Q^2*(f0/frb-frb/f0)^2);
|
||||
%
|
||||
% ff(2*ctsec-1) = fra; ff(2*ctsec) = frb;
|
||||
% Qf(2*ctsec-1) = Q; Qf(2*ctsec) = Q;
|
||||
% Af(2*ctsec-1) = Ara; Af(2*ctsec) = Arb;
|
||||
|
||||
%% 2a Seção biquadrática
|
||||
ctsec = ctsec+1;
|
||||
|
||||
polo = p(1); % CUIDADO!!!
|
||||
|
||||
% POLO REAL
|
||||
alpha0 = abs(real(polo));
|
||||
Q = Qbp/alpha0;
|
||||
fr = f0;
|
||||
|
||||
ff(2*ctsec-1) = fr;
|
||||
Qf(2*ctsec-1) = Q;
|
||||
Af(2*ctsec-1) = A0;
|
||||
|
||||
|
||||
|
||||
|
||||
%% COMPONENTES
|
||||
C = 10e-6;
|
||||
% C1=C; C2=C;
|
||||
|
||||
for ct=1:size(Qf,2)
|
||||
gm1(ct) = sqrt(C^2*(2*pi*ff(ct))^2); %gm2=gm1
|
||||
gm3(ct) = C*(2*pi*ff(ct))/Qf(ct);
|
||||
gm4(ct) = gm3(ct)*Af(ct);
|
||||
end
|
||||
[gm1 ; gm3; gm4]
|
||||
|
||||
BIN
VE2/VE2.mlx
Normal file
BIN
VE2/VE2.mlx
Normal file
Binary file not shown.
41
VE2/analisa_BP.m
Normal file
41
VE2/analisa_BP.m
Normal file
@@ -0,0 +1,41 @@
|
||||
clc
|
||||
|
||||
%------- carrega resultado da simulação no QUCS
|
||||
questao = 'VE2.csv';
|
||||
M = readtable(questao);
|
||||
f = M(:,1).Variables;
|
||||
dBVout = M(:,2).Variables;
|
||||
|
||||
InsLoss = mag2db(Rl/(Rs+Rl)); % Perda de inserção
|
||||
maxdBVout = max(dBVout); % Mínima perda na banda de passagem
|
||||
|
||||
indl = find(f > flp,1,'first');
|
||||
indu = find(f < fup,1,'last');
|
||||
|
||||
maxdBVoutPB = max(dBVout(indl:indu));
|
||||
mindBVoutPB = min(dBVout(indl:indu));
|
||||
|
||||
figure(1)
|
||||
semilogx(f(indl:indu),dBVout(indl:indu),...
|
||||
[f(indl) f(indu)],(InsLoss-Ap)*[1 1],...
|
||||
[f(indl) f(indu)],maxdBVoutPB*[1 1],...
|
||||
[f(indl) f(indu)],mindBVoutPB*[1 1])
|
||||
xlabel('f (Hz)'),ylabel('dB(Vout)'),grid
|
||||
title('Passband')
|
||||
|
||||
fprintf(1,'Minimum relative attenuation in the passband: %6.2f \n',maxdBVout-maxdBVoutPB);
|
||||
fprintf(1,'Maximum relative attenuation in the passband: %6.2f \n',maxdBVout-mindBVoutPB);
|
||||
fprintf(1,'Passband Ripple: %6.2f \n',maxdBVoutPB-mindBVoutPB);
|
||||
|
||||
indl = find(f < fls,1,'last');
|
||||
indu = find(f > fus,1,'first');
|
||||
|
||||
figure(2)
|
||||
semilogx(f(1:indl),dBVout(1:indl),...
|
||||
f(indu:end),dBVout(indu:end),...
|
||||
[f(1) f(end)],(InsLoss-As)*[1 1])
|
||||
xlabel('f (Hz)'),ylabel('dB(Vout)'),grid
|
||||
title('Stop band')
|
||||
|
||||
fprintf(1,'Minimum relative attenuation in the lower reject band: %6.2f \n',maxdBVout-max(dBVout(1:indl)));
|
||||
fprintf(1,'Minimum relative attenuation in the upper reject band: %6.2f \n',maxdBVout-max(dBVout(indu:end)));
|
||||
BIN
VE2/proj2.mlx
Normal file
BIN
VE2/proj2.mlx
Normal file
Binary file not shown.
Reference in New Issue
Block a user