-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.asv
More file actions
24 lines (22 loc) · 1.11 KB
/
temp.asv
File metadata and controls
24 lines (22 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
%% 1. Three-Phase Plot (ABC)
fig1 = figure('Position', [100, 100, 450, 250], 'Color', 'w');
% Column 1 is Time | Columns 2 to end are the 3 phases
plot(out.phases_current3(:,1), out.phases_current3(:, 2:end), 'LineWidth', 1.5);
grid on; xlabel('Time (s)'); ylabel('Current (A)');
legend('I_a', 'I_b', 'I_c');
exportgraphics(fig1, 'graph_abc.pdf', 'ContentType', 'vector');
%% 2. Clarke Transform Plot (Alpha-Beta)
fig2 = figure('Position', [100, 100, 450, 250], 'Color', 'w');
% Column 1 is Time | Columns 2 to end are alpha and beta
plot(clarke_t(:,1), clarke_t(:, 2:end), 'LineWidth', 1.5);
grid on; xlabel('Time (s)'); ylabel('Current (A)');
legend('I_\alpha', 'I_\beta');
exportgraphics(fig2, 'graph_clarke.pdf', 'ContentType', 'vector');
%% 3. Park Transform Plot (DQ)
fig3 = figure('Position', [100, 100, 450, 250], 'Color', 'w');
% Column 1 is Time | Columns 2 to end are d and q
plot(park_t(:,1), park_t(:, 2:end), 'LineWidth', 1.5);
grid on; xlabel('Time (s)'); ylabel('Current (A)');
legend('I_d', 'I_q');
ylim([-0.2, 1.2]); % Centers the 0.5 line beautifully
exportgraphics(fig3, 'graph_dq.pdf', 'ContentType', 'vector');