'Electronic power measurement'

Power measurement in mathlab
1.3K Downloads
Updated 7 Aug 2008

No License

clear;
f=50;
tmax=5/f;
Vmax=250;
Imax=10;
N=512;
tstep=1/(f*N);
t=tstep:tstep:tmax;
w=2*pi*f;
v=Vmax*sin(w*t);
il=Imax*sin(w*t);
p=v.*il;
a=[1 -2.99314850229460 2.98632045600046 -.99317191363767];
b=1e-006*[.1548 -.1347 -.1347 .1548];
y=filter(b,a,p);
energy=y.*t;
plot(t,p,'g');
hold on;
plot(t,y);
hold on;
plot(t,energy,'m');
legend('Instantaneous power','Chebysheb 3rd order low pass fitered');
xlabel('Time in second');
ylabel('Power in watts');
title('Electronic power measurement'

Cite As

Mir Mohammad Abu Kyum (2024). 'Electronic power measurement' (https://www.mathworks.com/matlabcentral/fileexchange/20998-electronic-power-measurement), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Communities

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0