-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_supply_droop.m
More file actions
54 lines (44 loc) · 1.11 KB
/
process_supply_droop.m
File metadata and controls
54 lines (44 loc) · 1.11 KB
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
43
44
45
46
47
48
49
50
51
52
53
clear; close all; clc;
D = readmatrix('supply_droop.csv');
time = D(:,1)./1E-6;
vin = D(:,3);
current = D(:,4);
vout = D(:,2);
time_zoom_start = 0.9;
time_zoom_end = 1.2;
idx_zoom = (time > time_zoom_start) & (time < time_zoom_end);
time_zoom = time(idx_zoom);
vout_zoom = vout(idx_zoom);
fig_droop = figure('Position', [100 100 900 600]); clf;
ax(1) = subplot(211);
plot(time, current, 'b', 'LineWidth', 2); hold on;
xlim([0 10]);
ylim([0.05 0.1]);
grid on;
title('Load current vs. time');
% xlabel('Time (us)');
ylabel('Current (A)');
set(gca, 'FontName', 'calibri');
set(gca, 'FontSize', 16);
ax(2) = subplot(212);
title_str = sprintf('V_{DD} vs. time');
plot(time, vout, 'b', 'LineWidth', 2); hold on;
title(title_str);
xlim([0 10]);
ylim([0.88 1.02]);
xlabel('Time (us)');
ylabel('Voltage (V)');
set(gca, 'FontName', 'calibri');
set(gca, 'FontSize', 16);
hold off;
grid on;
axes('Position', [0.3 0.26 0.4 0.15]);
box on;
plot(time_zoom, vout_zoom, 'b', 'LineWidth', 2); hold on;
set(gca, 'FontName', 'calibri');
set(gca, 'FontSize', 12);
axis tight;
grid on;
hold off;
linkaxes(ax,'x');
saveas(fig_droop, 'fig_droop.png');