En este tutorial, calcularemos la potencia promedio, el voltaje RMS, la corriente RMS y el factor de potencia usando Matlab.
Digamos que tenemos los siguientes valores de voltaje y corriente:
$begin{align} & v
% Power and Power Factor Calculations using Matlab
T = 2*pi/(120*pi); % Sine Wave period (T=2*pi/Omega) where Omega=2*pi*f
x = 0; %Integration Lower Limit for Voltage and Current
y = T; %Integration upper Limit for Voltage and Current
k = 0:0.2:1;
t = k.*y; % Horizontal (x-axis) Scale for one complete cycle (which is from 0 to T=1/f)
% quad command is used to compute integration. Write "help quad" in Maltab GUI for
% detailed understanding
%% Calculating Voltage, Current, and Power using Formulas given in text
v_integ = quad('Voltage1', x, y); % See the formula in text for computing RMS Voltage
v_rms = sqrt(v_integ/y); % RMS Voltage
i_integ = quad('Current1',x,y); % See the formula in text for computing RMS Current
i_rms = sqrt(i_integ/y); % RMS Current
p_integ = quad('Inst_pr', x, y); % See the formula in text for computing Average Power
p_average = p_integ/y; % Average Power
power_factor = p_average/(i_rms*v_rms); % See the formula in text for computing Power Factor
%% Printing the Results
fprintf('Average Power:%f n',p_average)
fprintf('RMS voltage: %f n',v_rms)
fprintf('Power Factor %f n', power_factor)
fprintf('RMS Current %f n', i_rms)
Voltaje de trabajo 1.m
function vsq = Voltage1 % we just defined the voltage as mentioned in the text vsq = (10*cos(120*pi*t + 60*pi/180)).^2; end
Función actual1.m
function isq = Current1 % % we just defined the voltage as mentioned in the text isq = (6*cos(120*pi*t + 30.0*pi/180)).^2; end
Función inst_pr.m
function pt = Inst_pr % This function is used to compute instantaneous power as mentioned in the % text it = 6*cos(120*pi*t + 30.0*pi/180); vt = 10*cos(120*pi*t + 60*pi/180); pt = it.*vt; end
Resultados:
Potencia media: 25,980762
Voltaje efectivo: 7.071068
Factor de potencia 0,866025
Corriente efectiva 4.242641
¡Más Contenido!