Thiết kế bộ thu anten Parabol cho hệ thống TVRO

GIỚI THIỆU CHUNG Thông tin vệ tinh là lĩnh vực kỹ thuật có tuổi đời khá trẻ so với nhiều lĩnh vực khoa học kỹ thuật khác. Nó chỉ thực sự ra đời vào năm 1957, khi Liên Xô lần đầu tiên phóng thành công vệ tinh lên quỹ đạo. Với sự phát triển nhanh chóng, và thành tựu, lợi ích to lớn, thông tin vệ tin đang dần đưa xã hội chúng ta tới một xã hội tiên tiến. Ngày nay, chúng ta có thể cảm nhận một phần của thế giới hiện đại đó nhờ các phương tiện truyền hình vệ tinh TVRO hay điện thoại vô tuyến quốc tế .

doc193 trang | Chia sẻ: lvcdongnoi | Lượt xem: 2497 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Thiết kế bộ thu anten Parabol cho hệ thống TVRO, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
'edit3'),'String','d1'); set(findobj('Tag','edit4'),'String',strcat(str1,str2)); set(findobj('Tag','edit5'),'String','d2'); set(findobj('Tag','edit6'),'String',strcat(str3,str4)); %Show ocsillator circuit designed...............% set(findobj('Tag','Axes2'),'Visible','on'); axes(Axes2); cla; if dev<=10 oscbjtcircuit3; else oscfetcircuit3; end end else cla; end %EOF oscdesign.m %........................................................................% %Subroutine inputs value of source reflection coefficient for oscillator design. %File GMSinput.m %Created: Tuesday,October 18,2001 %Modified: Monday, November 12, 2001 h2 = figure('Units','points', ... 'Color',[0 0.65 0.60], ... 'FileName','C:\Program Files\matlabR12\work\microwave.m', ... 'Name','OSCILLATOR DESIGN _ Input Value Of Source Reflection Coefficient', ... 'NumberTitle','off', ... 'Position',[10 25 580 385], ... 'ToolBar','none'); h1 = axes('Parent',h2, ... 'Units','pixels', ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[1 1 1], ... 'Position',[55 55 425 425], ... 'Tag','Axes1',... 'XColor',[1 1 1],... 'YColor',[1 1 1]); h1 = uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.815686279804 0.78431372596], ... 'ForegroundColor',[1 1 1], ... 'Position',[400 40 175 320], ... 'Style','frame'); h1 = uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[0.831372549018 0.8156862749804 0.78431372596], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 0], ... 'HorizontalAlignment','center', ... 'Position',[425 320 125 30], ... 'String','Source reflection coefficient', ... 'Style','text'); h1= uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Position',[425 290 125 20.5], ... 'Style','edit',... 'Tag','SourceReflection'); h1 = uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[0.831372549018 0.815686274504 0.784313725196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 0], ... 'HorizontalAlignment','center', ... 'Position',[425 255 125 30], ... 'String','Output normalized impedance', ... 'Style','text'); h1= uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Position',[425 225 125 20.5], ... 'Style','edit',... 'Tag','OutputImpedance'); h1 = uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[0.831372549008 0.815686274804 0.784313720196], ... 'Callback',['[x,y]=ginput(1);'... 'GMS=x+i*y;'... 'if abs(abs(GMS)-1)<0.05 '... ' GMS=cos(angle(GMS))+i*sin(angle(GMS));'... ' plot(real(GMS),imag(GMS),''+r'');'... ' set(findobj(''Tag'',''SourceReflection''), ''String'',num2str(angle(GMS)*180/pi));'... 'elseif abs(imag(GMS))<0.01 '... ' GMS=real(GMS);'... ' plot(GMS,0,''+r'');'... ' set(findobj(''Tag'',''SourceReflection''), ''String'',num2str(GMS));'... 'else '... ' plot(x,y,''+r'');'... ' set(findobj(''Tag'',''SourceReflection''), ''String'',num2str(real(GMS)+i*imag(GMS)));'... 'end;'... 'GMO=(S22-Delta*GMS)/(1-S11*GMS);'... 'Zout=(1+GMO)/(1-GMO);'... 'set(findobj(''Tag'',''OutputImpedance''), ''String'',num2str(real(Zout)+i*imag(Zout)));'... 'Zload=-(real(Zout)/3+i*imag(Zout));'... 'set(findobj(''Tag'',''LoadImpedance''), ''String'',num2str(real(Zload)+i*imag(Zload)));'... ],... 'Fontname','VNI-Times',... 'FontSize',16, ... 'Position',[425 155 125 30], ... 'String','Input',... 'Style','Pushbutton'); h1 = uicontrol('Parent',h2, ... 'Units','points', ... 'BackgroundColor',[0.83137254908 0.815686274804 0.78431372546], ... 'Callback','close(gcf);ocsdesign;',... 'Fontname','VNI-Times',... 'FontSize',18, ... 'Position',[425 55 125 30], ... 'String','Close',... 'Style','Pushbutton'); %Plot Smith chart...................................% smith([0 0.33 1 3],[0.2 0.5 1 2 5]); %Plot source stability circle.......................% CentreSC=(S22*conj(Delta)-conj(S11))/(abs(Delta)^2-abs(S11)^2); RadiusSC=abs(S12*S21)/(abs(Delta)^2-abs(S11)^2); circle(CentreSC,RadiusSC,'r'); text(real(CentreSC),imag(CentreSC),{'\GammaSC'}); %Plot load stability circle.........................% CentreLC=(S11*conj(Delta)-conj(S22))/(abs(Delta)^2-abs(S22)^2); RadiusLC=abs(S12*S21)/(abs(Delta)^2-abs(S22)^2); circle(CentreLC,RadiusLC,'k'); text(real(CentreLC),imag(CentreLC),{'\GammaLC'}); %EOF GMSinput.m %.......................................................................% %Function plots ocsillator circuit with dielectric resonator designed. %File ocsbjtcircuit4.m %Created: Wednesday,November 7,2001 axis('equal') hold on %Plot input matching network.............................% plot([1 5],[5 5],'b','linewidth',8); text(1,5.5,{'\lambda/4'}); text(3,5.5,{'\lambda/2'}); %%%Plot dielectric resonator.............................% x=linspace(1.6,2.4,100); y=abs(sqrt(0.4^2-(x-2).^2)); plot(x,y+4.25,'.b'); plot(x,-y+4.25,'.b'); text(2.5,4.25,'DR'); %Tranmission line,bias voltage is applied................% plot([2 2],[5 6.975],'b','linewidth',3); text(2.2,6,{'\lambda/4'}); % Cbp....................................................% plot([1.25 1.25],[6.5 7],'r'); plot([0.75 1.75],[6.5 6.5],'r'); plot([0.75 1.75],[6.25 6.25],'r'); plot([1.25 1.25],[5.75 6.25],'r'); plot([1 1.5],[5.75 5.75],'b'); text(1.25,6.75,'Cbp'); %Rb......................................................% plot([1.25 2.75],[7 7],'r'); plot([2.75 2.85],[7 7.25],'r'); plot([2.85 3.05],[7.25 6.75],'r'); plot([3.05 3.25],[6.75 7.25],'r'); plot([3.25 3.45],[7.25 6.75],'r'); plot([3.45 3.55],[6.75 7],'r'); text(3,7.5,'Rb'); %Vb......................................................% plot([3.55 4.25],[7 7],'r'); plot([4.25 4.25],[6.5 7],'r'); plot([3.75 4.75],[6.5 6.5],'r'); plot([4 4.5],[6.25 6.25],'r'); plot([4.25 4.25],[5.75 6.25],'r'); plot([4 4.5],[5.75 5.75],'b'); text(4.75,6.25,'Vb'); %BJT.....................................................% plot([5 6],[5 5],'r'); plot([6 6],[4.5 5.5],'r'); plot([6 7],[5 4.5],'r'); plot([6 7],[5 5.5],'r'); plot([6.9 7],[4.7 4.5],'r'); plot([6.8 7],[4.5 4.5],'r'); plot([7 7],[4 4.5],'r'); %Zs......................................................% plot([7 7],[3.75 4.5],'r'); plot([7 7],[2 3.75],'b','linewidth',8); plot([7 7],[1.5 2],'b'); plot([6.75 7.25],[1.5 1.5],'b'); text(7.25,3,'d1'); %Plot output matching network.............................% plot([7 10],[5.5 5.5],'b','linewidth',8); text(8.25,5,'d2'); plot([10 10],[3.75 5.5],'b','linewidth',8); text(9.35,4.5,'d3'); %Tranmission line,bias voltage is applied................% plot([10 10],[5.5 7.475],'b','linewidth',3); text(9.25,6.5,{'\lambda/4'}); %Vc......................................................% plot([7.75 7.75],[7 7.5],'r'); plot([7.25 8.25],[7 7],'r'); plot([7.5 8],[6.75 6.75],'r'); plot([7.75 7.75],[6.25 6.75],'r'); plot([7.5 8],[6.25 6.25],'b'); text(6.75,7,'Vc'); %Rc......................................................% plot([7.75 8.45],[7.5 7.5],'r'); plot([8.45 8.55],[7.5 7.75],'r'); plot([8.55 8.75],[7.75 7.25],'r'); plot([8.75 8.95],[7.25 7.75],'r'); plot([8.95 9.15],[7.75 7.25],'r'); plot([9.15 9.25],[7.25 7.5],'r'); plot([9.25 10.75],[7.5 7.5],'r'); text(8.5,8,'Rc'); %Cbp.....................................................% plot([10.75 10.75],[7 7.5],'r'); plot([10.25 11.25],[7 7],'r'); plot([10.25 11.25],[6.75 6.75],'r'); plot([10.75 10.75],[6.25 6.75],'r'); plot([10.5 11],[6.25 6.25],'b'); text(10.85,7.25,'Cbp'); %Ccoupling...............................................% plot([10 10.5],[5.5 5.5],'r'); plot([10.5 10.5],[4.95 6.05],'r'); plot([10.75 10.75],[4.95 6.05],'r'); plot([10.75 11.25],[5.5 5.5],'r'); text(10.85,5.75,'Cc'); %EOF ocsbjtcircuit4.m %Function plots ocsillator circuit with dielectric resonator designed. %File ocsfetcircuit4.m %Created: Wednesday,November 7,2001 axis('equal') hold on %Plot input matching network.............................% plot([1 5],[5 5],'b','linewidth',8); text(1,5.5,{'\lambda/4'}); text(3,5.5,{'\lambda/2'}); %%%Plot dielectric resonator.............................% x=linspace(1.6,2.4,100); y=abs(sqrt(0.4^2-(x-2).^2)); plot(x,y+4.25,'.b'); plot(x,-y+4.25,'.b'); text(2.5,4.25,'DR'); %Tranmission line,bias voltage is applied................% plot([2 2],[5 6.975],'b','linewidth',3); text(2.2,6,{'\lambda/4'}); % Cbp....................................................% plot([1.25 1.25],[6.5 7],'r'); plot([0.75 1.75],[6.5 6.5],'r'); plot([0.75 1.75],[6.25 6.25],'r'); plot([1.25 1.25],[5.75 6.25],'r'); plot([1 1.5],[5.75 5.75],'b'); text(1.25,6.75,'Cbp'); %Rg......................................................% plot([1.25 2.75],[7 7],'r'); plot([2.75 2.85],[7 7.25],'r'); plot([2.85 3.05],[7.25 6.75],'r'); plot([3.05 3.25],[6.75 7.25],'r'); plot([3.25 3.45],[7.25 6.75],'r'); plot([3.45 3.55],[6.75 7],'r'); text(3,7.5,'Rg'); %Vg......................................................% plot([3.55 4.25],[7 7],'r'); plot([4.25 4.25],[6.5 7],'r'); plot([4 4.5],[6.5 6.5],'r'); plot([3.75 4.75],[6.25 6.25],'r'); plot([4.25 4.25],[5.75 6.25],'r'); plot([4 4.5],[5.75 5.75],'b'); text(4.5,6.5,'Vg'); %FET.....................................................% plot([5 6],[5 5],'r'); plot([6 6],[4.25 5.75],'r'); plot([6 7],[4.5 4.5],'r'); plot([6 7],[5.5 5.5],'r'); %Zs......................................................% plot([7 7],[3.75 4.5],'r'); plot([7 7],[2 3.75],'b','linewidth',8); plot([7 7],[1.5 2],'b'); plot([6.75 7.25],[1.5 1.5],'b'); text(7.25,3,'d1'); %Plot output matching network.............................% plot([7 10],[5.5 5.5],'b','linewidth',8); text(8.25,5,'d2'); plot([10 10],[3.75 5.5],'b','linewidth',8); text(9.35,4.5,'d3'); %Tranmission line,bias voltage is applied................% plot([10 10],[5.5 7.475],'b','linewidth',3); text(9.25,6.5,{'\lambda/4'}); %Vd......................................................% plot([7.75 7.75],[7 7.5],'r'); plot([7.25 8.25],[7 7],'r'); plot([7.5 8],[6.75 6.75],'r'); plot([7.75 7.75],[6.25 6.75],'r'); plot([7.5 8],[6.25 6.25],'b'); text(6.75,7,'Vd'); %Rd......................................................% plot([7.75 8.45],[7.5 7.5],'r'); plot([8.45 8.55],[7.5 7.75],'r'); plot([8.55 8.75],[7.75 7.25],'r'); plot([8.75 8.95],[7.25 7.75],'r'); plot([8.95 9.15],[7.75 7.25],'r'); plot([9.15 9.25],[7.25 7.5],'r'); plot([9.25 10.75],[7.5 7.5],'r'); text(8.5,8,'Rd'); %Cbp.....................................................% plot([10.75 10.75],[7 7.5],'r'); plot([10.25 11.25],[7 7],'r'); plot([10.25 11.25],[6.75 6.75],'r'); plot([10.75 10.75],[6.25 6.75],'r'); plot([10.5 11],[6.25 6.25],'b'); text(10.85,7.25,'Cbp'); %Ccoupling...............................................% plot([10 10.5],[5.5 5.5],'r'); plot([10.5 10.5],[4.95 6.05],'r'); plot([10.75 10.75],[4.95 6.05],'r'); plot([10.75 11.25],[5.5 5.5],'r'); text(10.85,5.75,'Cc'); %EOF ocsfetcircuit4.m %........................................................................% %File kfilter.m %Created Monday, December 17, 2001. h0 = figure('Units','points', ... 'Color',[0 0.65 0.60], ... 'FileName','C:\Program Files\matlabR12\work\ kfilter.m', ... 'MenuBar','none', ... 'Name','FILTER DESIGN', ... 'NextPlot','add', ... 'NumberTitle','off', ... 'PaperPosition',[15 30 575 385], ... 'PaperUnits','points', ... 'Position',[10 25 580 400], ... 'ToolBar','none'); h1 = uicontrol('Parent',h0, ... 'BackgroundColor',[0.83137254908 0.8156862749804 0.784313720196], ... 'ForegroundColor',[1 1 1], ... 'Position',[5 50 360 475], ... 'Style','frame'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549008 0.815686209804 0.784313490196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 365 150 20], ... 'String','Type of filter', ... 'Style','text'); type=1; h1= uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Callback',['type=get(findobj(''Tag'',''TypeFilter''),''Value'');'... 'if type==3 '... 'set(findobj(''Tag'',''Frequency''),''String'',''Center frequency'');'... 'set(findobj(''Tag'',''Bandwidth''),''Visible'',''on'');'... 'set(findobj(''Tag'',''bandwidth''),''Visible'',''on'');'... 'set(findobj(''Tag'',''Unitbandwidth''),''Visible'',''on'');'... 'else '... 'set(findobj(''Tag'',''Frequency''),''String'',''Cutofffrequency'');''set(findobj(''Tag'',''Bandwidth''),''Visible'',''off'');'... 'set(findobj(''Tag'',''bandwidth''),''Visible'',''off'');'... 'set(findobj(''Tag'',''Unitbandwidth''),''Visible'',''off'');'... 'end;'],... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'Position',[115 365 155 20], ... 'String',{'Low pass filter ';... 'High pass filter';... 'Bandpass filter '},... 'Style','popupmenu',... 'Tag','TypeFilter',... 'Value',1); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313729019608 0.815686209804 0.78725490196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 340 150 20], ... 'String','Response filter', ... 'Style','text'); load filter_r0; h1= uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Callback',['switch get(findobj(''Tag'',''Respond''),''Value''),'... 'case 1, load filter_r0;'... 'case 2, load filter_r001;'... 'case 3, load filter_r01;'... 'case 4, load filter_r02;'... 'case 5, load filter_r05;'... 'case 6, load filter_r3;'... 'end;'],... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'Position',[115 340 155 20], ... 'String',{'Butterworth response ';... 'Chebyshev response 0.01dB';... 'Chebyshev response 0.1dB';... 'Chebyshev response 0.2dB';... 'Chebyshev response 0.5dB';... 'Chebyshev response 3dB';},... 'Style','popupmenu',... 'Tag','Respond',... 'Value',1); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549019608 0.815686274509804 0.784313725490196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 315 150 20], ... 'String','Order of filter', ... 'Style','text'); order=2; h1= uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Callback','order=get(findobj(''Tag'',''OrderFilter''),''Value'')+1;' 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'Position',[115 315 35 20], ... 'String',{'2';'3';'4';'5';'6';'7';'8';'9';'10'},... 'Style','popupmenu',... 'Tag','OrderFilter',... 'Value',1); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372519608 0.815686274504 0.784313490196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 290 150 20], ... 'String','Cutoff frequency', ... 'Style','text',... 'Tag','Frequency'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Callback','f0=get(findobj(''Tag'',''frequency''),''string'');f0=str2num(f0);',... 'Position',[115 290 105 20.5], ... 'Style','edit',... 'Tag','frequency'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 0], ... 'HorizontalAlignment','right', ... 'Position',[185 292.5 30 16], ... 'String','MHz', ... 'Style','text'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831349019608 0.8156274509804 0.78431370196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 265 150 20], ... 'String','Bandwidth', ... 'Style','text',... 'Tag','Bandwidth',... 'Visible','off'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'Callback','BW=get(findobj(''Tag'',''bandwidth''),''string'');BW=str2num(BW);',... 'Position',[115 265 105 20.5], ... 'Style','edit',... 'Tag','bandwidth',... 'Visible','off'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[1 1 1], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 0], ... 'HorizontalAlignment','right', ... 'Position',[185 267.5 30 16], ... 'String','MHz', ... 'Style','text',... 'Tag','Unitbandwidth',... 'Visible','off'); %Show design resutl............................% h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.8156862745804 0.78431490196], ... 'FontName','VNI-TIMES', ... 'FontSize',14, ... 'ForegroundColor',[1 0 0], ... 'HorizontalAlignment','left', ... 'Position',[10 240 150 20], ... 'String','Design resutl', ... 'Style','text'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725499608 0.815686209804 0.78431390196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 220 125 20], ... 'Style','text',... 'Tag','LC1'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725490608 0.815686279804 0.78431370196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 200 125 20], ... 'Style','text',... 'Tag','LC2'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725419608 0.815686209804 0.78725490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 180 125 20], ... 'Style','text',... 'Tag','LC3'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.815686279804 0.78431372546], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 160 125 20], ... 'Style','text',... 'Tag','LC4'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725019608 0.815686274504 0.78431490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 140 125 20], ... 'Style','text',... 'Tag','LC5'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725499608 0.815686209804 0.78431370196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 120 125 20], ... 'Style','text',... 'Tag','LC6'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831379019608 0.815686279804 0.784315490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 100 125 20], ... 'Style','text',... 'Tag','LC7'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.815686274509 0.784313725196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 80 125 20], ... 'Style','text',... 'Tag','LC8'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.815686509804 0.784315490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 60 125 20], ... 'Style','text',... 'Tag','LC9'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725019608 0.815686274504 0.78431490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[10 40 125 20], ... 'Style','text',... 'Tag','LC10'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725490608 0.815686279804 0.78435490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 220 125 20], ... 'Style','text',... 'Tag','LC11'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725490108 0.815686509804 0.78431490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 200 125 20], ... 'Style','text',... 'Tag','LC12'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.8156862709804 0.78431372546], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 180 125 20], ... 'Style','text',... 'Tag','LC13'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725490108 0.815686279804 0.78431370196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 160 125 20], ... 'Style','text',... 'Tag','LC14'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549008 0.815686274504 0.78431370196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 140 125 20], ... 'Style','text',... 'Tag','LC15'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549008 0.815686274804 0.784313790196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 120 125 20], ... 'Style','text',... 'Tag','LC16'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549608 0.815686274804 0.784313490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 100 125 20], ... 'Style','text',... 'Tag','LC17'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372519608 0.815686209804 0.784315490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 80 125 20], ... 'Style','text',... 'Tag','LC18'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725419608 0.815686274804 0.78435490196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 60 125 20], ... 'Style','text',... 'Tag','LC19'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549018 0.815686274504 0.784313790196], ... 'FontName','VNI-TIMES', ... 'FontSize',12, ... 'ForegroundColor',[0 0 1], ... 'HorizontalAlignment','left', ... 'Position',[145 40 125 20], ... 'Style','text',... 'Tag','LC20'); %Plot Attenuation vs. frequency.................% Axes1= axes('Parent',h0, ... 'Units','pixels', ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[1 1 1], ... 'Position',[435 315 320 210], ... 'Tag','Axes1',... 'XColor',[0 0 0],... 'YColor',[0 0 0]); %Plot filter circuit desinged...................% Axes2= axes('Parent',h0, ... 'Units','pixels', ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[0 0.85 0.80], ... 'Position',[435 75 320 200], ... 'Tag','Axes2',... 'Visible','on',... 'XColor',[0 0.65 0.60],... 'YColor',[0 0.65 0.60]); %Control Pushbutton...............................% h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.8313725019608 0.815686279804 0.78435490196], ... 'Callback',['switch type,'... 'case 1,LPFdesign;'... 'case 2,HPFdesign;'... 'case 3,BPFdesign;'... 'end;'],... 'FontName','VNI-TIMES', ... 'FontSize',18, ... 'Position',[310 15 100 25], ... 'String','Design',... 'Style','Pushbutton'); h1 = uicontrol('Parent',h0, ... 'Units','points', ... 'BackgroundColor',[0.831372549008 0.815686274504 0.784313490196], ... 'Callback','close;', ... 'FontName','VNI-TIMES', ... 'FontSize',18, ... 'Position',[420 15 100 25], ... 'String','Close',... 'Style','Pushbutton'); %EOF kfilter.m %.........................................................................% %File LPFdesign.m %Created Monday, December 17, 2001. %.........................................................% set(findobj('Tag','LC1'),'Visible','off'); set(findobj('Tag','LC2'),'Visible','off'); set(findobj('Tag','LC3'),'Visible','off'); set(findobj('Tag','LC4'),'Visible','off'); set(findobj('Tag','LC5'),'Visible','off'); set(findobj('Tag','LC6'),'Visible','off'); set(findobj('Tag','LC7'),'Visible','off'); set(findobj('Tag','LC8'),'Visible','off'); set(findobj('Tag','LC9'),'Visible','off'); set(findobj('Tag','LC10'),'Visible','off'); set(findobj('Tag','LC11'),'Visible','off'); set(findobj('Tag','LC12'),'Visible','off'); set(findobj('Tag','LC13'),'Visible','off'); set(findobj('Tag','LC14'),'Visible','off'); set(findobj('Tag','LC15'),'Visible','off'); set(findobj('Tag','LC16'),'Visible','off'); set(findobj('Tag','LC17'),'Visible','off'); set(findobj('Tag','LC18'),'Visible','off'); set(findobj('Tag','LC19'),'Visible','off'); set(findobj('Tag','LC20'),'Visible','off'); %.........................................................% R0=50; i=sqrt(-1); n=100; fre=linspace(0.01,2.5*f0,n); switch order, case 2, L1=R0*gs(order,2)/(2*pi*f0*10^6); C2=gs(order,3)/R0/(2*pi*f0*10^6); RL=R0*gs(order,4); for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C2); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L1; GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L1 :',num2str(L1*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C2 :',num2str(C2*10^12),' pF')); case 3, C1=gs(order,2)/R0/(2*pi*f0*10^6); L2=R0*gs(order,3)/(2*pi*f0*10^6); C3=gs(order,5)/R0/(2*pi*f0*10^6); RL=R0; for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C3); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L2; Ztemp=1/(i*2*pi*fre(k)*10^6*C1); Z=Z*Ztemp/(Z+Ztemp); GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L2 :',num2str(L2*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C1 :',num2str(C1*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C3 :',num2str(C3*10^12),' pF')); case 4, L1=R0*gs(order,2)/(2*pi*f0*10^6); C2=gs(order,3)/R0/(2*pi*f0*10^6); L3=R0*gs(order,4)/(2*pi*f0*10^6); C4=gs(order,5)/R0/(2*pi*f0*10^6); RL=R0*gs(order,6); for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C4); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L3; Ztemp=1/(i*2*pi*fre(k)*10^6*C2); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L1; GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L1 :',num2str(L1*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L3 :',num2str(L3*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C2 :',num2str(C2*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C4 :',num2str(C4*10^12),' pF')); case 5, C1=gs(order,2)/R0/(2*pi*f0*10^6); L2=R0*gs(order,3)/(2*pi*f0*10^6); C3=gs(order,4)/R0/(2*pi*f0*10^6); L4=R0*gs(order,5)/(2*pi*f0*10^6); C5=gs(order,6)/R0/(2*pi*f0*10^6); RL=R0; for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C5); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L4; Ztemp=1/(i*2*pi*fre(k)*10^6*C3); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L2; Ztemp=1/(i*2*pi*fre(k)*10^6*C1); Z=Z*Ztemp/(Z+Ztemp); GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L2 :',num2str(L2*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L4 :',num2str(L4*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C1 :',num2str(C1*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C3 :',num2str(C3*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C5 :',num2str(C5*10^12),' pF')); case 6, L1=R0*gs(order,2)/(2*pi*f0*10^6); C2=gs(order,3)/R0/(2*pi*f0*10^6); L3=R0*gs(order,4)/(2*pi*f0*10^6); C4=gs(order,5)/R0/(2*pi*f0*10^6); L5=R0*gs(order,6)/(2*pi*f0*10^6); C6=gs(order,7)/R0/(2*pi*f0*10^6); RL=R0*gs(order,8); for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C6); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L5; Ztemp=1/(i*2*pi*fre(k)*10^6*C4); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L3; Ztemp=1/(i*2*pi*fre(k)*10^6*C2); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L1; GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC3'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L1 :',num2str(L1*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L3 :',num2str(L3*10^9),' nH')); set(findobj('Tag','LC3'),'String',strcat('* L5 :',num2str(L5*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C2 :',num2str(C2*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C4 :',num2str(C4*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C6 :',num2str(C6*10^12),' pF')); case 7, C1=gs(order,2)/R0/(2*pi*f0*10^6); L2=R0*gs(order,3)/(2*pi*f0*10^6); C3=gs(order,4)/R0/(2*pi*f0*10^6); L4=R0*gs(order,5)/(2*pi*f0*10^6); C5=gs(order,6)/R0/(2*pi*f0*10^6); L6=R0*gs(order,7)/(2*pi*f0*10^6); C7=gs(order,8)/R0/(2*pi*f0*10^6); RL=R0; for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C7); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L6; Ztemp=1/(i*2*pi*fre(k)*10^6*C5); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L4; Ztemp=1/(i*2*pi*fre(k)*10^6*C3); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L2; Ztemp=1/(i*2*pi*fre(k)*10^6*C1); Z=Z*Ztemp/(Z+Ztemp); GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC3'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC14'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L2 :',num2str(L2*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L4 :',num2str(L4*10^9),' nH')); set(findobj('Tag','LC3'),'String',strcat('* L6 :',num2str(L6*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C1 :',num2str(C1*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C3 :',num2str(C3*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C5 :',num2str(C5*10^12),' pF')); set(findobj('Tag','LC14'),'String',strcat('* C7 :',num2str(C7*10^12),' pF')); case 8, L1=R0*gs(order,2)/(2*pi*f0*10^6); C2=gs(order,3)/R0/(2*pi*f0*10^6); L3=R0*gs(order,4)/(2*pi*f0*10^6); C4=gs(order,5)/R0/(2*pi*f0*10^6); L5=R0*gs(order,6)/(2*pi*f0*10^6); C6=gs(order,7)/R0/(2*pi*f0*10^6); L7=R0*gs(order,8)/(2*pi*f0*10^6); C8=gs(order,9)/R0/(2*pi*f0*10^6); RL=R0*gs(order,10); for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C8); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L7; Ztemp=1/(i*2*pi*fre(k)*10^6*C6); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L5; Ztemp=1/(i*2*pi*fre(k)*10^6*C4); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L3; Ztemp=1/(i*2*pi*fre(k)*10^6*C2); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L1; GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC3'),'Visible','on'); set(findobj('Tag','LC4'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC14'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L1 :',num2str(L1*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L3 :',num2str(L3*10^9),' nH')); set(findobj('Tag','LC3'),'String',strcat('* L5 :',num2str(L5*10^9),' nH')); set(findobj('Tag','LC4'),'String',strcat('* L7 :',num2str(L7*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C2 :',num2str(C2*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C4 :',num2str(C4*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C6 :',num2str(C6*10^12),' pF')); set(findobj('Tag','LC14'),'String',strcat('* C8 :',num2str(C8*10^12),' pF')); case 9, C1=gs(order,2)/R0/(2*pi*f0*10^6); L2=R0*gs(order,3)/(2*pi*f0*10^6); C3=gs(order,4)/R0/(2*pi*f0*10^6); L4=R0*gs(order,5)/(2*pi*f0*10^6); C5=gs(order,6)/R0/(2*pi*f0*10^6); L6=R0*gs(order,7)/(2*pi*f0*10^6); C7=gs(order,8)/R0/(2*pi*f0*10^6); L8=R0*gs(order,9)/(2*pi*f0*10^6); C9=gs(order,10)/R0/(2*pi*f0*10^6); RL=R0; for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C9); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L8; Ztemp=1/(i*2*pi*fre(k)*10^6*C7); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L6; Ztemp=1/(i*2*pi*fre(k)*10^6*C5); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L4; Ztemp=1/(i*2*pi*fre(k)*10^6*C3); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L2; Ztemp=1/(i*2*pi*fre(k)*10^6*C1); Z=Z*Ztemp/(Z+Ztemp); GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC3'),'Visible','on'); set(findobj('Tag','LC4'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC14'),'Visible','on'); set(findobj('Tag','LC15'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L2 :',num2str(L2*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L4 :',num2str(L4*10^9),' nH')); set(findobj('Tag','LC3'),'String',strcat('* L6 :',num2str(L6*10^9),' nH')); set(findobj('Tag','LC4'),'String',strcat('* L8 :',num2str(L8*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C1 :',num2str(C1*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C3 :',num2str(C3*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C5 :',num2str(C5*10^12),' pF')); set(findobj('Tag','LC14'),'String',strcat('* C7 :',num2str(C7*10^12),' pF')); set(findobj('Tag','LC15'),'String',strcat('* C9 :',num2str(C9*10^12),' pF')); case 10, L1=R0*gs(order,2)/(2*pi*f0*10^6); C2=gs(order,3)/R0/(2*pi*f0*10^6); L3=R0*gs(order,4)/(2*pi*f0*10^6); C4=gs(order,5)/R0/(2*pi*f0*10^6); L5=R0*gs(order,6)/(2*pi*f0*10^6); C6=gs(order,7)/R0/(2*pi*f0*10^6); L7=R0*gs(order,8)/(2*pi*f0*10^6); C8=gs(order,9)/R0/(2*pi*f0*10^6); L9=R0*gs(order,10)/(2*pi*f0*10^6); C10=gs(order,11)/R0/(2*pi*f0*10^6); RL=R0*gs(order,12); for k=1:n Z=1/(i*2*pi*fre(k)*10^6*C10); Z=Z*RL/(Z+RL); Z=Z+i*2*pi*fre(k)*10^6*L9; Ztemp=1/(i*2*pi*fre(k)*10^6*C8); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L7; Ztemp=1/(i*2*pi*fre(k)*10^6*C6); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L5; Ztemp=1/(i*2*pi*fre(k)*10^6*C4); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L3; Ztemp=1/(i*2*pi*fre(k)*10^6*C2); Z=Z*Ztemp/(Z+Ztemp); Z=Z+i*2*pi*fre(k)*10^6*L1; GM=(Z-R0)/(Z+R0); PLR(k)=-10*log10(1/(1-abs(GM)^2)); end set(findobj('Tag','LC1'),'Visible','on'); set(findobj('Tag','LC2'),'Visible','on'); set(findobj('Tag','LC3'),'Visible','on'); set(findobj('Tag','LC4'),'Visible','on'); set(findobj('Tag','LC5'),'Visible','on'); set(findobj('Tag','LC11'),'Visible','on'); set(findobj('Tag','LC12'),'Visible','on'); set(findobj('Tag','LC13'),'Visible','on'); set(findobj('Tag','LC14'),'Visible','on'); set(findobj('Tag','LC15'),'Visible','on'); set(findobj('Tag','LC1'),'String',strcat('* L1 :',num2str(L1*10^9),' nH')); set(findobj('Tag','LC2'),'String',strcat('* L3 :',num2str(L3*10^9),' nH')); set(findobj('Tag','LC3'),'String',strcat('* L5 :',num2str(L5*10^9),' nH')); set(findobj('Tag','LC4'),'String',strcat('* L7 :',num2str(L7*10^9),' nH')); set(findobj('Tag','LC5'),'String',strcat('* L9 :',num2str(L9*10^9),' nH')); set(findobj('Tag','LC11'),'String',strcat('* C2 :',num2str(C2*10^12),' pF')); set(findobj('Tag','LC12'),'String',strcat('* C4 :',num2str(C4*10^12),' pF')); set(findobj('Tag','LC13'),'String',strcat('* C6 :',num2str(C6*10^12),' pF')); set(findobj('Tag','LC14'),'String',strcat('* C8 :',num2str(C8*10^12),' pF')); set(findobj('Tag','LC15'),'String',strcat('* C10 :',num2str(C10*10^12),' pF')); end axes(Axes1); plot(fre,PLR,'r'); grid on; xlabel('Frequency [MHz]'); ylabel('Attenuation [dB]'); axes(Axes2); cla; LPFcircuit; %EOF LPFdesign.m %........................................................................% %File LPFcircuit.m %Created Monday, December 17, 2001. hold on axis equal if order==2 plot(1,2.5,'.r'); plot([1 2],[2.5 2.5],'r'); t=0:0.01:1; plot(t+2,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([3 5],[2.5 2.5],'r'); text(2.5,2.25,'L1'); plot([4 4],[0 1.25],'r'); plot([3.65 4.35],[1.25 1.25],'r'); plot([3.65 4.35],[1.5 1.5],'r'); plot([4 4],[1.5 2.5],'r'); plot([3.75 4.25],[0 0],'b'); text(4.45,1.35,'C2'); plot(5,2.5,'.r'); elseif order==3 plot(1,2.5,'.r'); plot([2 2],[0 1.25],'r'); plot([1.65 2.35],[1.25 1.25],'r'); plot([1.65 2.35],[1.5 1.5],'r'); plot([2 2],[1.5 2.5],'r'); plot([1.75 2.25],[0 0],'b'); text(2.45,1.35,'C1'); plot([1 3],[2.5 2.5],'r'); t=0:0.01:1; plot(t+3,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([4 6],[2.5 2.5],'r'); text(3.5,2.25,'L2'); plot([5 5],[0 1.25],'r'); plot([4.65 5.35],[1.25 1.25],'r'); plot([4.65 5.35],[1.5 1.5],'r'); plot([5 5],[1.5 2.5],'r'); plot([4.75 5.25],[0 0],'b'); text(5.45,1.35,'C3'); plot(6,2.5,'.r'); elseif order==4 plot(1,2.5,'.r'); plot([1 2],[2.5 2.5],'r'); t=0:0.01:1; plot(t+2,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([3 5],[2.5 2.5],'r'); text(2.5,3.25,'L1'); plot([4 4],[0 1.25],'r'); plot([3.65 4.35],[1.25 1.25],'r'); plot([3.65 4.35],[1.5 1.5],'r'); plot([4 4],[1.5 2.5],'r'); plot([3.75 4.25],[0 0],'b'); text(4.45,1.35,'C2'); plot([4 5],[2.5 2.5],'r'); t=0:0.01:1; plot(t+5,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([6 8],[2.5 2.5],'r'); text(5.5,3.25,'L3'); plot([7 7],[0 1.25],'r'); plot([6.65 7.35],[1.25 1.25],'r'); plot([6.65 7.35],[1.5 1.5],'r'); plot([7 7],[1.5 2.5],'r'); plot([6.75 7.25],[0 0],'b'); text(7.45,1.35,'C4'); plot(8,2.5,'.r'); elseif order==5 plot(1,2.5,'.r'); plot([2 2],[0 1.25],'r'); plot([1.65 2.35],[1.25 1.25],'r'); plot([1.65 2.35],[1.5 1.5],'r'); plot([2 2],[1.5 2.5],'r'); plot([1.75 2.25],[0 0],'b'); text(2.45,1.35,'C1'); plot([1 3],[2.5 2.5],'r'); t=0:0.01:1; plot(t+3,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([4 6],[2.5 2.5],'r'); text(3.5,3.25,'L2'); plot([5 5],[0 1.25],'r'); plot([4.65 5.35],[1.25 1.25],'r'); plot([4.65 5.35],[1.5 1.5],'r'); plot([5 5],[1.5 2.5],'r'); plot([4.75 5.25],[0 0],'b'); text(5.45,1.35,'C3'); t=0:0.01:1; plot(t+6,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([7 9],[2.5 2.5],'r'); text(6.5,3.25,'L4'); plot([8 8],[0 1.25],'r'); plot([7.65 8.35],[1.25 1.25],'r'); plot([7.65 8.35],[1.5 1.5],'r'); plot([8 8],[1.5 2.5],'r'); plot([7.75 8.25],[0 0],'b'); text(8.45,1.35,'C5'); plot(9,2.5,'.r'); elseif order==6 plot(1,2.5,'.r'); plot([1 2],[2.5 2.5],'r'); t=0:0.01:1; plot(t+2,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([3 5],[2.5 2.5],'r'); text(2.5,3.25,'L1'); plot([4 4],[0 1.25],'r'); plot([3.65 4.35],[1.25 1.25],'r'); plot([3.65 4.35],[1.5 1.5],'r'); plot([4 4],[1.5 2.5],'r'); plot([3.75 4.25],[0 0],'b'); text(4.45,1.35,'C2'); plot([4 5],[2.5 2.5],'r'); t=0:0.01:1; plot(t+5,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([6 8],[2.5 2.5],'r'); text(5.5,3.25,'L3'); plot([7 7],[0 1.25],'r'); plot([6.65 7.35],[1.25 1.25],'r'); plot([6.65 7.35],[1.5 1.5],'r'); plot([7 7],[1.5 2.5],'r'); plot([6.75 7.25],[0 0],'b'); text(7.45,1.35,'C4'); plot([7 8],[2.5 2.5],'r'); t=0:0.01:1; plot(t+8,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([9 11],[2.5 2.5],'r'); text(8.5,3.25,'L5'); plot([10 10],[0 1.25],'r'); plot([9.65 10.35],[1.25 1.25],'r'); plot([9.65 10.35],[1.5 1.5],'r'); plot([10 10],[1.5 2.5],'r'); plot([9.75 10.25],[0 0],'b'); text(10.45,1.35,'C6'); plot(11,2.5,'.r'); elseif order==7 plot(1,2.5,'.r'); plot([2 2],[0 1.25],'r'); plot([1.65 2.35],[1.25 1.25],'r'); plot([1.65 2.35],[1.5 1.5],'r'); plot([2 2],[1.5 2.5],'r'); plot([1.75 2.25],[0 0],'b'); text(2.45,1.35,'C1'); plot([1 3],[2.5 2.5],'r'); t=0:0.01:1; plot(t+3,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([4 6],[2.5 2.5],'r'); text(3.5,3.25,'L2'); plot([5 5],[0 1.25],'r'); plot([4.65 5.35],[1.25 1.25],'r'); plot([4.65 5.35],[1.5 1.5],'r'); plot([5 5],[1.5 2.5],'r'); plot([4.75 5.25],[0 0],'b'); text(5.45,1.35,'C3'); t=0:0.01:1; plot(t+6,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([7 9],[2.5 2.5],'r'); text(6.5,3.25,'L4'); plot([8 8],[0 1.25],'r'); plot([7.65 8.35],[1.25 1.25],'r'); plot([7.65 8.35],[1.5 1.5],'r'); plot([8 8],[1.5 2.5],'r'); plot([7.75 8.25],[0 0],'b'); text(8.45,1.35,'C5'); t=0:0.01:1; plot(t+9,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([10 12],[2.5 2.5],'r'); text(9.5,3.25,'L6'); plot([11 11],[0 1.25],'r'); plot([10.65 11.35],[1.25 1.25],'r'); plot([10.65 11.35],[1.5 1.5],'r'); plot([11 11],[1.5 2.5],'r'); plot([10.75 11.25],[0 0],'b'); text(11.45,1.35,'C7'); plot(12,2.5,'.r'); elseif order==8 plot(1,2.5,'.r'); plot([1 2],[2.5 2.5],'r'); t=0:0.01:1; plot(t+2,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([3 5],[2.5 2.5],'r'); text(2.5,3.25,'L1'); plot([4 4],[0 1.25],'r'); plot([3.65 4.35],[1.25 1.25],'r'); plot([3.65 4.35],[1.5 1.5],'r'); plot([4 4],[1.5 2.5],'r'); plot([3.75 4.25],[0 0],'b'); text(4.45,1.35,'C2'); plot([4 5],[2.5 2.5],'r'); t=0:0.01:1; plot(t+5,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([6 8],[2.5 2.5],'r'); text(5.5,3.25,'L3'); plot([7 7],[0 1.25],'r'); plot([6.65 7.35],[1.25 1.25],'r'); plot([6.65 7.35],[1.5 1.5],'r'); plot([7 7],[1.5 2.5],'r'); plot([6.75 7.25],[0 0],'b'); text(7.45,1.35,'C4'); plot([7 8],[2.5 2.5],'r'); t=0:0.01:1; plot(t+8,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([9 11],[2.5 2.5],'r'); text(8.5,3.25,'L5'); plot([10 10],[0 1.25],'r'); plot([9.65 10.35],[1.25 1.25],'r'); plot([9.65 10.35],[1.5 1.5],'r'); plot([10 10],[1.5 2.5],'r'); plot([9.75 10.25],[0 0],'b'); text(10.45,1.35,'C6'); plot([10 11],[2.5 2.5],'r'); t=0:0.01:1; plot(t+11,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([12 14],[2.5 2.5],'r'); text(11.5,3.25,'L7'); plot([13 13],[0 1.25],'r'); plot([12.65 13.35],[1.25 1.25],'r'); plot([12.65 13.35],[1.5 1.5],'r'); plot([13 13],[1.5 2.5],'r'); plot([12.75 13.25],[0 0],'b'); text(13.45,1.35,'C8'); plot(14,2.5,'.r'); elseif order==9 plot(1,2.5,'.r'); plot([2 2],[0 1.25],'r'); plot([1.65 2.35],[1.25 1.25],'r'); plot([1.65 2.35],[1.5 1.5],'r'); plot([2 2],[1.5 2.5],'r'); plot([1.75 2.25],[0 0],'b'); text(2.45,1.35,'C1'); plot([1 3],[2.5 2.5],'r'); t=0:0.01:1; plot(t+3,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([4 6],[2.5 2.5],'r'); text(3.5,3.25,'L2'); plot([5 5],[0 1.25],'r'); plot([4.65 5.35],[1.25 1.25],'r'); plot([4.65 5.35],[1.5 1.5],'r'); plot([5 5],[1.5 2.5],'r'); plot([4.75 5.25],[0 0],'b'); text(5.45,1.35,'C3'); t=0:0.01:1; plot(t+6,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([7 9],[2.5 2.5],'r'); text(6.5,3.25,'L4'); plot([8 8],[0 1.25],'r'); plot([7.65 8.35],[1.25 1.25],'r'); plot([7.65 8.35],[1.5 1.5],'r'); plot([8 8],[1.5 2.5],'r'); plot([7.75 8.25],[0 0],'b'); text(8.45,1.35,'C5'); t=0:0.01:1; plot(t+9,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([10 12],[2.5 2.5],'r'); text(9.5,3.25,'L6'); plot([11 11],[0 1.25],'r'); plot([10.65 11.35],[1.25 1.25],'r'); plot([10.65 11.35],[1.5 1.5],'r'); plot([11 11],[1.5 2.5],'r'); plot([10.75 11.25],[0 0],'b'); text(11.45,1.35,'C7'); t=0:0.01:1; plot(t+12,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([13 15],[2.5 2.5],'r'); text(12.5,3.25,'L8'); plot([14 14],[0 1.25],'r'); plot([13.65 14.35],[1.25 1.25],'r'); plot([13.65 14.35],[1.5 1.5],'r'); plot([14 14],[1.5 2.5],'r'); plot([13.75 14.25],[0 0],'b'); text(14.45,1.35,'C9'); plot(15,2.5,'.r'); elseif order==10 plot(1,2.5,'.r'); plot([1 2],[2.5 2.5],'r'); t=0:0.01:1; plot(t+2,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([3 5],[2.5 2.5],'r'); text(2.5,3.25,'L1'); plot([4 4],[0 1.25],'r'); plot([3.65 4.35],[1.25 1.25],'r'); plot([3.65 4.35],[1.5 1.5],'r'); plot([4 4],[1.5 2.5],'r'); plot([3.75 4.25],[0 0],'b'); text(4.45,1.35,'C2'); plot([4 5],[2.5 2.5],'r'); t=0:0.01:1; plot(t+5,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([6 8],[2.5 2.5],'r'); text(5.5,3.25,'L3'); plot([7 7],[0 1.25],'r'); plot([6.65 7.35],[1.25 1.25],'r'); plot([6.65 7.35],[1.5 1.5],'r'); plot([7 7],[1.5 2.5],'r'); plot([6.75 7.25],[0 0],'b'); text(7.45,1.35,'C4'); plot([7 8],[2.5 2.5],'r'); t=0:0.01:1; plot(t+8,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([9 11],[2.5 2.5],'r'); text(8.5,3.25,'L5'); plot([10 10],[0 1.25],'r'); plot([9.65 10.35],[1.25 1.25],'r'); plot([9.65 10.35],[1.5 1.5],'r'); plot([10 10],[1.5 2.5],'r'); plot([9.75 10.25],[0 0],'b'); text(10.45,1.35,'C6'); plot([10 11],[2.5 2.5],'r'); t=0:0.01:1; plot(t+11,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([12 14],[2.5 2.5],'r'); text(11.5,3.25,'L7'); plot([13 13],[0 1.25],'r'); plot([12.65 13.35],[1.25 1.25],'r'); plot([12.65 13.35],[1.5 1.5],'r'); plot([13 13],[1.5 2.5],'r'); plot([12.75 13.25],[0 0],'b'); text(13.45,1.35,'C8'); plot([13 14],[2.5 2.5],'r'); t=0:0.01:1; plot(t+14,2.5+0.35*abs(sin(2*pi*2*t)),'r'); plot([15 17],[2.5 2.5],'r'); text(14.5,3.25,'L9'); plot([16 16],[0 1.25],'r'); plot([15.65 16.35],[1.25 1.25],'r'); plot([15.65 16.35],[1.5 1.5],'r'); plot([16 16],[1.5 2.5],'r'); plot([15.75 16.25],[0 0],'b'); text(16.45,1.35,'C10'); plot(17,2.5,'.r'); end %EOF LPFcircuit.m %........................................................................% function [d1,l1,d2,l2]=matchingstub(Z) %File matchingstub.m %Created: Wednesday,October,12,2001 %.......................................% a=real(1/Z); b=imag(1/Z); %.......................................% A=a-a^2-b^2; B=2*b; C=a-1; Delta=B^2-4*A*C; %.......................................% if Delta >= 0 d1=(-B-sqrt(Delta))/2/A; d2=(-B+sqrt(Delta))/2/A; l1=a^2*d1-(1-b*d1)*(b+d1); l1=l1/((1-b*d1)^2+a^2*d1^2); l2=a^2*d2-(1-b*d2)*(b+d2); l2=l2/((1-b*d2)^2+a^2*d2^2); else errordlg('Error was found while analizing impedance matching network!!','ERROR...'); return end %.......................................% d1=atan(d1)/2/pi; if d1<0 d1=d1+0.5; end d2=atan(d2)/2/pi; if d2<0 d2=d2+0.5; end l1=atan(l1)/2/pi; if l1<0 l1=l1+0.5; end l2=atan(l2)/2/pi; if l2<0 l2=l2+0.5; end %EOF matchingnetwork.m %........................................................................% function circle(Centre,Radius,Color) %File circle.m %Created: Monday,October 12,2001 a=real(Centre); b=imag(Centre); axis('equal'); hold on x=linspace(a-Radius,a+Radius,200); y=abs(sqrt(Radius^2-(x-a).^2)); plot(x,y+b,Color); plot(x,-y+b,Color); plot(a,b,strcat('.', Color)); %EOF circle.m %.........................................................................% function smith(r,x) %Function plots Smith chart %File smith.m %Created: Wednesday,October,12,2001 %Modified: Wednesday,October,12,2001 axis('equal') hold on %Plot circles of constant r.........................% for i=1:length(r) a0=r(i)/(r(i)+1); Radius=1/(1+r(i)); a=linspace(a0-Radius,a0+Radius); b=abs(sqrt(Radius^2-(a-a0).^2)); plot(a,b,'b'); plot(a,-b,'b'); end %Plot circles of constant x........................% for i=1:length(x) b0=1/x(i); Radius=1/x(i); b=linspace(0,2*b0/(b0^2+1),100); a=1-sqrt(Radius^2-(b-b0).^2); plot(a,b,'b'); plot(a,-b,'b'); end plot([-1 1],[0 0],'b'); %Plot the center of smith chart....................% plot(0,0,'*b'); %EOF smith.m %.........................................................................% Phuï Luïc

Các file đính kèm theo tài liệu này:

  • docThesis.DOC
  • rarProgram.rar
Luận văn liên quan