微波传输线三种工作状态分析的MATLAB实现
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
(一)主程序变量说明:
输入变量:
zo 传输线特性阻抗
zl 传输线终端负载阻抗
Er 传输线介电常数
f 传输电磁波的频率
由输入变量计算得出的变量:
w 传输电磁波的数字角频率
len 传输电磁波的相波长
beita 相移常数
gama 传输线个点反射系数复值
gamal 传输线终端反射系数的模
rou 驻波系数
k 行波系数
Zi 传输线各点输入阻抗的复值
Ui 传输线各点输入电压的复值
Uo 传输线各点输出电压的复值
Uit 传输线各点输入电压的瞬时值
Uot 传输线各点输出电压的瞬时值
Ii 传输线各点输入电流的复值
Io 传输线各点输出电流的复值
Is 传输线各点合成电流的复值
Us 传输线各点合成电压的复值
Ist 传输线各点合成电流的瞬时值
Ust 传输线各点合成电压的瞬时值
ph 传输线各点合成电压的相位
(二)主程序流程说明:
本程序的界面中共有三个输入编辑框,三个输出编辑框和五个波形显示窗口,分别用来输入:传输线特性阻抗Z0、传输线终端负载阻抗Z L、传输的电磁波的频率f、传输线传输介质的相对介电常数εr;输出:传输线的终端反射系数ΓL、行波系数ρ、驻波系数K;
具体的程序思路如下:
1.由输入编辑框获得用户输入的Z0、Z L、f和εr;
2.在“开始”按钮的callback函数中进行运算,并控制各个axis的显示;
3.图形的动态显示由一个while循环实现,并由全局标记变量flag控制;
4.在“停止”按钮的callback函数中令flag = 1,while循环跳出。
(三)程序运行效果
1.行波演示
中端接匹配负载
zo = zl = 50Ω
2.驻波演示
1)终端短路
zo = 50Ω
zl = 0
2)终端开路
zo = 50Ω
zl = inf
3)终端接纯电抗负载
zo = 50Ω
zl = X * j
3.行驻波演示
(四)主程序代码
function varargout = StatusAnaly(varargin)
%********************************************************%
% Copyright (C), 2009-2012,Lyric %
% FileName: StatusAnaly.m %
% Author: Lyric %
% Version: 1.0 %
% Date: 2010-05-11 %
%********************************************************%
% STATUSANALY M-file for StatusAnaly.fig
% STATUSANALY, by itself, creates a new STATUSANALY or raises the existing
% singleton*.
%
% H = STATUSANALY returns the handle to a new STATUSANALY or the handle to % the existing singleton*.
%
% STATUSANALY('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in STATUSANALY.M with the given input arguments. %
% STATUSANALY('Property','Value',...) creates a new STATUSANALY or raises the % existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before StatusAnaly_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to StatusAnaly_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help StatusAnaly
% Last Modified by GUIDE v2.5 11-May-2010 14:30:20
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @StatusAnaly_OpeningFcn, ...
'gui_OutputFcn', @StatusAnaly_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before StatusAnaly is made visible.
function StatusAnaly_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to StatusAnaly (see VARARGIN)
% Choose default command line output for StatusAnaly
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes StatusAnaly wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.