sn2sg.m

来自「mimo系统的matlab仿真程序」· M 代码 · 共 25 行

M
25
字号
% 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 + =
减小字号Ctrl + -
显示快捷键?