Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.79 MB, 192 trang )
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
I. GIỚI THIỆU CHƯƠNG TRÌNH PHẦN MỀM:
Để việc thiết kế các mạch điện, đặc biệt là mạch siêu cao tần, được đơn giản và
thuận tiện hơn, tôi đã thực hiện chương trình thiết kế mạch siêu cao tần với tên
“microwave”. “Microwave” được viết trên môi trường Matlab 6.0, do chương trình chưa
được dòch sang dạng tự thực thi (*.exe), nên để sử dụng cần có chương trình Matlab được
cài đặt sẳn.
Chương trình microwave được viết trên cơ sở liên kết các chương trình thiết kế
nhỏ, là các chương trình thiết kế từng dạng mạch cụ thể như chương trình thiết kế mạch
dao động, chương trình thiết kế mạch khuếch đại,…, lại với nhau. Do đó, chương trình cho
phép người thiết kế có thể truy xuất nhanh đến một chương trình cần thiết kế cụ thể.
Một số loại mạch mà chương trình có thể thiết kế là: mạch dao động, mạch
khuếch đại, mạch trộn, mạch lọc và mạch phối hợp trở kháng. Hoạt động của một số
chương trình này, phần nào đã được giới thiệu trong phần thiết kế, đó là thiết kế tự động,
vẽ đáp ứng, và trong một số trường hợp cho người thiết kế hiệu chỉnh lại thiết kế của mình
để có được kết quả mong muốn.
Đối với các chương trình thiết kế mạch dao động, mạch khuếch đại và mạch trộn,
chương trình có hổ trợ một thư viện linh kiện có giao diện trực quan, tuy nhỏ nhưng rất
thuận tiện trong việc chọn lựa linh kiện và dể dàng trong thiết kế.
Tiêu biểu một số file nguồn của chương trình được trình bày trong mục sau.
Trang- 126 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
II. MỘT SỐ FILE CỦA CHƯƠNG TRÌNH
function microwave
%File microwave.m
%Created: Wednesday,October 3,2001
h0 = figure('Units','points', ...
'Color',[0 0.65 0.60], ...
'FileName','C:\Program Files\matlabR12\work\microwave.m', ...
'MenuBar','none', ...
'Name','MICROWAVE CIRCUIT DESIGN', ...
'NumberTitle','off', ...
'PaperPosition',[15 30 575 385], ...
'PaperUnits','points', ...
'Position',[10 25 580 400], ...
'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',16, ...
'ForegroundColor',[0 0.980 0.785], ...
'Position',[130 335 320 66], ...
'String',['Trường Đại Học Bách Khoa Tp.Hồ Chí Minh'; ...
'
'
Khoa Điện Điện Tử
Bộ môn Viễn Thông
'; ...
'], ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',32, ...
'ForegroundColor',[0.75 0.95 0.5], ...
'Position',[130 285 320 40], ...
'String','Luận Văn Tốt Nghiệp', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',24, ...
'ForegroundColor',[1 1 1], ...
'Position',[15 255 70 30], ...
'String','Đề tài:', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',24, ...
'ForegroundColor',[1 1 1], ...
'Position',[15 190 70 30], ...
'String','Phần:', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
Trang- 127 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',34, ...
'ForegroundColor',[1 1 1], ...
'HorizontalAlignment','left', ...
'Position',[85 220 500 45], ...
'String','Thiết Kế Bộ Thu Anten Parabol', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',34, ...
'ForegroundColor',[1 1 1], ...
'HorizontalAlignment','left', ...
'Position',[85 110 500 90], ...
'String',['Thiết Kế Mạch Siêu Cao Tần '; ...
'
Dùng MATLAB
'], ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0 0.65 0.60], ...
'FontName','VNI-Times', ...
'FontSize',14, ...
'ForegroundColor',[0.50 1 1], ...
'HorizontalAlignment','left', ...
'Position',[365 55 220 54], ...
'String',[ 'GVHD: TẠ CÔNG ĐỨC
'; ...
'SVTH: NGUYỄN THÀNH KHOA'; ...
'MSSV: 49700699
'], ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372549018 0.815686270984 0.784313590196], ...
'Callback','close(gcf);', ...
'FontSize',18, ...
'Position',[50 30 100 30], ...
'String','Exit', ...
'Style','Pushbutton');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372549608 0.815682745094 0.784313725490], ...
'Callback','close(gcf);mainprog;', ...
'FontSize',18, ...
'Position',[200 30 100 30], ...
'String','Enter', ...
'Style','Pushbutton');
%EOF microwave.m
%.........................................................................%
Trang- 128 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
%File amplifier.m
%Created: Wednesday,October 10,2001
%Modified: Saturday,November 17,2001
h0 = figure('Units','points', ...
'Color',[0 0.65 0.60], ...
'FileName','C:\Program Files\matlabR12\work\amplifier.m', ...
'MenuBar','none', ...
'Name','MAXGAIN AMPLIFIER DESIGN', ...
'NumberTitle','off', ...
'Position',[10 25 580 400], ...
'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.831372549968 0.815686274984 0.784313724916], ...
'ForegroundColor',[1 1 1], ...
'Position',[5 75 360 450], ...
'Style','frame');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8313725419608 0.815686274804 0.78431370196], ...
'FontName','VNI-TIMES', ...
'FontSize',14, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 365 150 20], ...
'String','Working frequency', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback',['f=get(findobj(''Tag'',''frequency''),''string'');’...
‘f=str2num(f);' ...
'set(findobj(''Tag'',''Recondition''),''Visible'',''off'');'],...
'Position',[160 365 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',[235 367.5 30 16], ...
'String','GHz', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8313725468 0.815686279804 0.784312549196], ...
'FontName','VNI-TIMES', ...
'FontSize',14, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 340 150 20], ...
'String','Choose device', ...
'Style','text');
h1= uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Position',[160 340 82.5 20.5], ...
Trang- 129 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
'Style','edit',...
'Tag','DeviceName');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137219608 0.8156864509804 0.784313725496], ...
'Callback',['device;' ...
'set(findobj(''Tag'',''Recondition''),''Visible'',''off'');'],...
'FontSize',18, ...
'Position',[242.5 340 22.5 20.5], ...
'String','...', ...
'Style','Pushbutton');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137254908 0.81568627904 0.784313725496], ...
'FontName','VNI-TIMES', ...
'FontSize',14, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 315 150 20], ...
'String','Characteristic impedance', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','set(findobj(''Tag'',''Recondition''),''Visible'',''off'')
;',...
'Position',[160 315 105 20.5], ...
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'String','50',...
'Style','edit',...
'Tag','CharacteristicImpedance');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 0], ...
'HorizontalAlignment','right', ...
'Position',[235 317.5 30 16], ...
'String','Ohm', ...
'Style','text');
%Show design resutl................................%
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137254901 0.8156862745004 0.784313790196], ...
'FontName','VNI-TIMES', ...
'FontSize',14, ...
'ForegroundColor',[1 0 0], ...
'HorizontalAlignment','left', ...
'Position',[10 290 150 20], ...
'String','Design resutl', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372549008 0.815686259804 0.784313725496], ...
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
Trang- 130 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
'Position',[10 265 120 20], ...
'String','Stability parameter K', ...
'Style','text',...
'Tag','StabilityParameter');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137254608 0.8156862749804 0.784313790196],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 245 120 20], ...
'String','Power Gain Gp', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372549019 0.8156862745004 0.78431372546],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 225 120 20], ...
'String','Noise Figure F', ...
'Style','text');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372519608 0.8156864509804 0.78431390196],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 205 120 20], ...
'String','Input VSWR', ...
'Style','text');
h1= uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137254908 0.8156862749804 0.784313725196],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 185 120 20], ...
'String','Output VSWR',...
'Style','text');
h1= uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372019608 0.8156862745804 0.78431372196],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'Position',[10 165 120 20], ...
'String','Source impedance',...
'Style','text');
h1= uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.83137259008 0.8156862745094 0.784313725496],
'FontName','VNI-TIMES', ...
'FontSize',12, ...
'ForegroundColor',[0 0 1], ...
Trang- 131 -
...
...
...
...
...
...
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
'HorizontalAlignment','left', ...
'Position',[10 145 120 20], ...
'String','Load impedance',...
'Style','text');
%Plot Smith chart..................................%
Axes1= axes('Parent',h0, ...
'Units','pixels', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[0.831372549019608 0.815686274509804 0.784313725490196], ...
'Position',[435 315 320 210], ...
'Tag','Axes1',...
'XColor',[1 1 1],...
'YColor',[1 1 1]);
smith([0 0.33 1 2 5],[0.2 0.5 1 2 5]);
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','amprespond', ...
'FontName','VNI-Times',...
'FontSize',12, ...
'Position',[530 375 35 17.5], ...
'String','Gp',...
'Style','Pushbutton');
stage=1;
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback',['Gain(stage,:)=10*log10(GP);'...
'gp(stage)=Gp;'...
'stage=stage+1;'...
'set(findobj(''Tag'',''Stage''),''String'',strcat(''Gp..'',num2str(st
age)));’],...
'FontSize',12, ...
'Position',[530 357.5 35 17.5], ...
'String','Gp..1',...
'Style','Pushbutton',...
'Tag','Stage');
%Show designed amplifier circuit.................%
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','off',...
'XColor',[0 0.65 0.60],...
'YColor',[0 0.65 0.60]);
%Control Pushbutton...............................%
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372519608 0.8156864509804 0.78431390196], ...
'Callback','ampanalyze;',...
'FontName','VNI-TIMES', ...
'FontSize',18, ...
'Position',[310 15 100 25], ...
'String','Design',...
'Style','Pushbutton');
h1 = uicontrol('Parent',h0, ...
Trang- 132 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
'Units','points', ...
'BackgroundColor',[0.831372549198 0.815686250904 0.784313725496], ...
'Callback',['GMSLinput;' ...
'set(findobj(''Tag'',''SourceReflection''),''String'',num2str(GMS));'
'set(findobj(''Tag'',''LoadReflection''),''String'',num2str(GML));'..
'plot(real(GMS),imag(GMS),''+r'');'...
'plot(real(GML),imag(GML),''+k'');'],...
'FontName','VNI-TIMES', ...
'FontSize',18, ...
'Position',[200 15 100 25], ...
'String','Recondition',...
'Style','Pushbutton',...
'Tag','Recondition',...
'Visible','off');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.831372549008 0.815686274804 0.784313720196], ...
'Callback','close;', ...
'FontName','VNI-TIMES', ...
'FontSize',18, ...
'Position',[420 15 100 25], ...
'String','Close',...
'Style','Pushbutton');
%EOF amplifier.m
%.........................................................................%
%File ampanalyze.m
%Created: Wednesday,October 10,2001
%Modified: Saturday,November 17,2001
%..................................................%
i=sqrt(-1);
S11=interp1(Ss(:,1),Ss(:,2),f,'cubic');...
S11=S11*exp(i*pi*interp1(Ss(:,1),Ss(:,3),f,'cubic')/180);...
S21=interp1(Ss(:,1),Ss(:,4),f,'cubic');...
S21=S21*exp(i*pi*interp1(Ss(:,1),Ss(:,5),f,'cubic')/180);...
S12=interp1(Ss(:,1),Ss(:,6),f,'cubic');...
S12=S12*exp(i*pi*interp1(Ss(:,1),Ss(:,7),f,'cubic')/180);...
S22=interp1(Ss(:,1),Ss(:,8),f,'cubic');...
S22=S22*exp(i*pi*interp1(Ss(:,1),Ss(:,9),f,'cubic')/180);...
%..................................................%
if exist('Ns')==1
Fmin=interp1(Ns(:,1),Ns(:,2),f,'cubic');
GMopt=interp1(Ns(:,1),Ns(:,3),f,'cubic');
GMopt=GMopt*exp(i*pi*interp1(Ns(:,1),Ns(:,4),f,'cubic')/180);
rn=interp1(Ns(:,1),Ns(:,5),f,'cubic');
end
%..................................................%
Delta=S11*S22-S12*S21;
K=(1+abs(Delta)^2-abs(S11)^2-abs(S22)^2)/(2*abs(S12)*abs(S21));
%..................................................%
set(findobj('Tag','StabilityParameter'),'String',num2str(K));
Trang- 133 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
if K<=1
ButtonName=questdlg('You have to input values of source reflection
coefficient and load reflection coefficient ',...
'AMPLIFIER DESIGN_Device is potentially unstable','Yes','No','Yes');
switch ButtonName,
case 'Yes'
GMSLinput;
case 'No'
return;
end
else
%Calculate GMS........................%
B=1+abs(S11)^2-abs(S22)^2-abs(Delta)^2;
C=S11-Delta*conj(S22);
if B>0
GMS=(B-sqrt(B^2-4*abs(C)^2))/2/C;
else
GMS=(B+sqrt(B^2-4*abs(C)^2))/2/C;
end
%Calculate GML........................%
B=1+abs(S22)^2-abs(S11)^2-abs(Delta)^2;
C=S22-Delta*conj(S11);
if B>0
GML=(B-sqrt(B^2-4*abs(C)^2))/2/C;
else
GML=(B+sqrt(B^2-4*abs(C)^2))/2/C;
end
%.....................................%
ampanalyze2;
end
%EOF ampanalyze.m
%.........................................................................%
%File ampanalyze2.m
%Created: Wednesday,October 10,2001
%Modified: Saturday,November 17,2001
%..................................................%
i=sqrt(-1);
S11=interp1(Ss(:,1),Ss(:,2),f,'cubic');...
S11=S11*exp(i*pi*interp1(Ss(:,1),Ss(:,3),f,'cubic')/180);...
S21=interp1(Ss(:,1),Ss(:,4),f,'cubic');...
S21=S21*exp(i*pi*interp1(Ss(:,1),Ss(:,5),f,'cubic')/180);...
S12=interp1(Ss(:,1),Ss(:,6),f,'cubic');...
S12=S12*exp(i*pi*interp1(Ss(:,1),Ss(:,7),f,'cubic')/180);...
S22=interp1(Ss(:,1),Ss(:,8),f,'cubic');...
S22=S22*exp(i*pi*interp1(Ss(:,1),Ss(:,9),f,'cubic')/180);...
%Calculate Power Gain.............................%
Delta=S11*S22-S12*S21;
Gp=abs(S21)^2*(1-abs(GML)^2);
Gp=Gp/(1-abs(S11)^2+abs(GML)^2*(abs(S22)^2-abs(Delta)^2)-2*real(GML*(S22Delta*conj(S11))));
Gp=10*log10(Gp);
%Calculate Noise Figure...........................%
if exist('Ns')==1
F=10^(Fmin/10)+4*rn*abs(GMS-GMopt)^2/(1-abs(GMS)^2)/abs(1+GMopt)^2;
F=10*log10(F);
Trang- 134 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
end
%Calculate VSWR....................................%
GMin=(S11-Delta*GML)/(1-S22*GML);
GMout=(S22-Delta*GMS)/(1-S11*GMS);
MS=(1-abs(GMin)^2)*(1-abs(GMS)^2)/abs(1-GMS*GMin)^2;
if MS>1 MS=1; end
ML=(1-abs(GMout)^2)*(1-abs(GML)^2)/abs(1-GML*GMout)^2;
if ML>1 ML=1; end
VSWRin=(1+sqrt(1-MS))/(1-sqrt(1-MS));
VSWRout=(1+sqrt(1-ML))/(1-sqrt(1-ML));
%Calculate source impedance, load impedance.........%
%and impedance matching network.....................%
ZS=(1+GMS)/(1-GMS);
ZL=(1+GML)/(1-GML);
[d2,d1]=matchingstub(conj(ZS));
[d3,d4]=matchingstub(conj(ZL));
ZS=ZS*str2num(get(findobj('Tag','CharacteristicImpedance'),'String'));
ZL=ZL*str2num(get(findobj('Tag','CharacteristicImpedance'),'String'));
ampresutl;
%EOF ampanalyze2.m
%........................................................................%
%File ampresutl.m
%Created: Sunday,November 18, 2001
%....................................................%
set(findobj('Tag','Axes2'),'Visible','off');
set(findobj('Tag','PowerGain'),'Visible','off');
set(findobj('Tag','NoiseFigure'),'Visible','off');
set(findobj('Tag','InputVSWR'),'Visible','off');
set(findobj('Tag','OutputVSWR'),'Visible','off');
set(findobj('Tag','InputImpedance'),'Visible','off');
set(findobj('Tag','OutputImpedance'),'Visible','off');
set(findobj('Tag','d1'),'Visible','off');
set(findobj('Tag','Value_d1'),'Visible','off');
set(findobj('Tag','d2'),'Visible','off');
set(findobj('Tag','Value_d2'),'Visible','off');
set(findobj('Tag','d3'),'Visible','off');
set(findobj('Tag','Value_d3'),'Visible','off');
set(findobj('Tag','d4'),'Visible','off');
set(findobj('Tag','Value_d4'),'Visible','off');
%Gp..................................................%
set(findobj('Tag','PowerGain'),'Visible','on');
set(findobj('Tag','PowerGain'),'String',strcat(num2str(Gp),' dB'));
%F...................................................%
if exist('Ns')==1
set(findobj('Tag','NoiseFigure'),'Visible','on');
set(findobj('Tag','NoiseFigure'),'String',strcat(num2str(F),' dB'));
end
%VSWR................................................%
set(findobj('Tag','InputVSWR'),'Visible','on');
set(findobj('Tag','OutputVSWR'),'Visible','on');
set(findobj('Tag','InputVSWR'),'String',num2str(VSWRin));
set(findobj('Tag','OutputVSWR'),'String',num2str(VSWRout));
%ZS and ZL............................................%
Trang- 135 -
LVTN: Thiết Kế Bộ Thu Anten Parabol Cho Hệ Thống TVRO
set(findobj('Tag','SourceImpedance'),'Visible','on');
set(findobj('Tag','LoadImpedance'),'Visible','on');
set(findobj('Tag','SourceImpedance'),'String',strcat(num2str(ZS),'
Omhs'));
set(findobj('Tag','LoadImpedance'),'String',strcat(num2str(ZL),' Omhs'));
%Impedace-matching network............................%
set(findobj('Tag','d1'),'Visible','on');
set(findobj('Tag','d2'),'Visible','on');
set(findobj('Tag','d3'),'Visible','on');
set(findobj('Tag','d4'),'Visible','on');
set(findobj('Tag','Value_d1'),'Visible','on');
set(findobj('Tag','Value_d2'),'Visible','on');
set(findobj('Tag','Value_d3'),'Visible','on');
set(findobj('Tag','Value_d4'),'Visible','on');
str1=strcat(num2str(d1),' wavelengths');
str2=strcat(' (',num2str(d1*300/f),' mm',')');
set(findobj('Tag','Value_d1'),'String',strcat(str1,str2));
str1=strcat(num2str(d2),' wavelengths');
str2=strcat(' (',num2str(d2*300/f),' mm',')');
set(findobj('Tag','Value_d2'),'String',strcat(str1,str2));
str1=strcat(num2str(d3),' wavelengths');
str2=strcat(' (',num2str(d3*300/f),' mm',')');
set(findobj('Tag','Value_d3'),'String',strcat(str1,str2));
str1=strcat(num2str(d4),' wavelengths');
str2=strcat(' (',num2str(d4*300/f),' mm',')');
set(findobj('Tag','Value_d4'),'String',strcat(str1,str2));
%Plot amplifier circuit designed......................%
set(findobj('Tag','Axes2'),'Visible','on');
axes(Axes2);
cla;
if dev <=11
ampbjtcircuit1;
else
ampfetcircuit1;
end
%Plot gain power in tern function of frequency........%
axes(Axes1);
hold off;
cla;
bandwidth;
set(findobj('Tag','Recondition'),'Visible','on');
%EOF ampresutl.m
%.........................................................................%
%Subroutine plots gain power in tern function of frequency
%File bandwidth.m
%Created, Monday,December 10, 2001
n=100;
len=length(Ss(:,1));
fre=linspace(f-0.2*f,f+0.2*f,n);
for m=1:n
S11=interp1(Ss(:,1),Ss(:,2),fre(m),'cubic');...
S11=S11*exp(i*pi*interp1(Ss(:,1),Ss(:,3),fre(m),'cubic')/180);...
Trang- 136 -