Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc;
- clear;
- close all;
- figure()
- Lag = 45;
- V_a = plotVector(115.47, 0, [0 0], 'Voltage', 'E_1^A');
- V_b = plotVector(115.47, -120, [0 0], 'Voltage', 'E_1^B');
- V_c = plotVector(115.47, -240, [0 0], 'Voltage', 'E_1^C');
- V_a2 = plotVector(112.58, -V_a.Angle - Lag, [0 0], 'Current', 'E_2^A');
- V_b2 = plotVector(112.58, -V_b.Angle - Lag, [0 0], 'Current', 'E_2^B');
- V_c2 = plotVector(112.58, -V_c.Angle - Lag, [0 0], 'Current', 'E_2^C');
- dummy_1 = plotVector(10, V_a.Angle-30-180, V_a.Head, 'Voltage', ' ');
- dummy_2 = plotVector(10, V_a.Angle+30-180, V_a.Head, 'Voltage', ' ');
- dummy_3 = plotVector(10, 90, V_b.Head, 'Voltage', ' ');
- dummy_4 = plotVector(10, 30, V_b.Head, 'Voltage', ' ');
- dummy_5 = plotVector(10, -30, V_c.Head, 'Voltage', ' ');
- dummy_6 = plotVector(10, -90, V_c.Head, 'Voltage', ' ');
- dummy_5 = plotVector(10, 100, V_a2.Head, 'Current', ' ');
- dummy_6 = plotVector(10, -190, V_a2.Head, 'Current', ' ');
- dummy_7 = plotVector(10, 45, V_b2.Head, 'Current', ' ');
- dummy_8 = plotVector(10, -15, V_b2.Head, 'Current', ' ');
- dummy_9 = plotVector(10, -70, V_c2.Head, 'Current', ' ');
- dummy_10 = plotVector(10, -140, V_c2.Head, 'Current', ' ');
- showAngle(Lag, 25, 'black', 13, 5, ...
- ' ')
- hold on
- showAngle(120, 30, 'blue', -50, 35, ...
- 'phase')
- title('Φασικό διάγραμμα');
- subtitle('3Φ τάσεις στα άκρα γραμμής με φορτίο R = 171.4Ω ');
- xlim([-150 150])
- ylim([-150 150])
- xlabel("Πραγματικός Άξονας");
- ylabel("Φανταστικός Άξονας (jω)");
- function arrow = plotVector(length, angle, tail, type, name)
- arrow = vector;
- arrow.Angle = -angle;
- arrow.Length = length;
- arrow.Type = type;
- arrow.Tail = tail;
- arrow.Head = arrow.setHead();
- arrow.Name = name;
- arrow.vplot();
- end
- function [] = showAngle (lag, r, col, posx, posy, pointer)
- crcm = 2*pi*r; % Arc Length Fraction Of Circumference
- angfrac = deg2rad(lag); % Angle Fraction Of Circumference (rad)
- angv = linspace(deg2rad(45), deg2rad(45) + angfrac); % Angle Vector
- x = r*cos(angv);
- y = r*sin(angv);
- plot(x, y, col, 'LineWidth', 0.5)
- hold on
- plot([0 0; 1 1]*x(1), [0 0; 1 1]*y(1), [0 0; 1 1]*x(end), [0 0; 1 1]*y(end), col, 'LineWidth', 0.5)
- hold off
- axis equal
- axis([-150 150 -150 150])
- text(posx, posy, sprintf('\\delta_{%s} = \\angle%2.f\\circ',pointer, rad2deg(angfrac)))
- end
Advertisement
Add Comment
Please, Sign In to add comment