-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_load_qucs_data.m
More file actions
42 lines (34 loc) · 852 Bytes
/
test_load_qucs_data.m
File metadata and controls
42 lines (34 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% test_load_qucs_data
clc
clear
close all
filePath = '/home/gadi/.qucs/Test_S_Params_prj';
fileName = 'main.dat';
[S,Z0,f] = readQucsSparams(fullfile(filePath,fileName));
% Extract sub matrices for mirror and single measurement
S_mirror = S(1:2,1:2,:);
S_1 = S(3,3,:);
% Extract exponent
E2 = S_mirror(1,2,:);
% De-Embed
S_deembed = S_1./E2;
% Extract impedances of de-embedded load
Z_deembed = Z0*(1+S_deembed(:))./(1-S_deembed(:));
% Resistive part
R = 1./real(1./Z_deembed);
% Imaginary part
Y_C = imag(1./Z_deembed);
C = Y_C./(2*pi*f);
figure;
subplot(2,1,1);
plot(f/1e9,R);
set(gca,'ylim',[0 50]);
set(gca,'fontsize',16);
xlabel('f [GHz]','fontsize',18);
ylabel('R [\Omega]','fontsize',18);
subplot(2,1,2);
plot(f/1e9,C/1e-12);
set(gca,'ylim',[0 5]);
set(gca,'fontsize',16);
xlabel('f [GHz]','fontsize',18);
ylabel('C [pF]','fontsize',18);