📄 sn2sg.m
字号:
% MATLAB function sn2sg.m deals with mismatching
% effects at the Q terminals of a multi-port network.
% Function sn2sg.m needs as its inputs the
% normalizing impedance matrix Z0 (denoted Z0,
% diagonal format!), the mismatched impedance
% matrix Z0T, and the original normalized S matrix, SN.
% After a few intermediate steps (equations (1.76) -
% 1.78)), it delivers the generalized S' matrix, SG.
% Hence, the elements of SG take into account the
% network's actual terminations, including all possible
% mismatching effects.
%
% The MATLAB function call is SG = sn2sg(Z0, Z0T, SN).
function [SG] = sn2sg(Z0, Z0T, SN)
Q = length(Z0);
U = diag(ones(length(Z0),1))
for k=1:Q
xi(k)=(Z0T(k,k)-Z0(k,k))/(Z0T(k,k)+Z0(k,k));
psi(k)=(1-conj(xi(k)))*sqrt(1-(abs(xi(k))^2))/abs(1-xi(k));
end
Xi = diag(xi)
Psi = diag(psi)
SG = inv(Psi)*(SN-conj(Xi))*inv(U-(Xi*SN))*conj(Psi);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -