ONLY 3-2. PLOTS IN MATLAB, PLEASE SHOW CODE!!! Using rms values to represent the
ID: 2079143 • Letter: O
Question
ONLY 3-2. PLOTS IN MATLAB, PLEASE SHOW CODE!!!
Using rms values to represent their magnitudes, the voltage across and the current into a load are as follows in phasor form: V = Ve^j0' and I = le^-j phi' Show that the instantaneous power p(t) = v(t) middot i(t) can be written as p(t) = P + P cot 2 omega t + Q sin 2 omega t, where average power P = VI cos phi and reactive power Q = VI sin phi. In Problem 3-1, V = 120 V and I = e^-j30' A. Plot the following as a function of omega t: v, i, and p(t) i_p as defined in Eq. 3-12 and p_1 = v middot i_p i_q as defined in Eq. 3-13 and, p_2 = v middot i_q i_p(t) = squareroot 2 I_p cos omega t = (squareroot 2 I cos phi)cos omega t i_q(t) = squareroot I_q sin omega t = (squareroot I sin phi)sin omega tExplanation / Answer
%%%%%%%%%%%%%%%%%%%%solution for problems one%%%%%%%%%%%%%%
clc
Vrms=230
Irms=100
Vm=Vrms.*sqrt(2)
Im=Irms.*sqrt(2)
Iangle=36.86 % phase angle
wt=0:0.01:(4*pi);% angular frequency for one cycle
v=Vm*sin(wt);% instatnuous voltage
i=Im*sin(wt-((pi/180)*Iangle));% instatanous current
xline=zeros(1,length(wt));
P=Vrms.*Irms.*cos(wt-((pi/180)*Iangle));
Q=Vrms.*Irms.*sin(wt-((pi/180)*Iangle));
power=P+P.*cos(2.*wt)+Q.*sin(2.*wt);%instatanuos power.
figure(1)
plot(wt,v);
title('Instantaneous Voltage vs (wt)')
hold on
plot(wt,i,'r');
grid on
title('Instantaneous Current and voltage vs (wt)');
hold all
figure(2)
plot(wt,power);
title('Instantaneous Power vs (wt)');
grid on
%%%%%%%%%%%%%%%%%solution for problem two%%%%%%%%%%%%
clc
Vrms=120
% I=exp^(-30)
% I=cos(30)-i.*sin(30)
% I=1.*arg(-30)
I=1
Irms=1
Vrms=1
Vm=Vrms.*sqrt(2)
Im=Irms.*sqrt(2)
Iangle=30 % phase angle
wt=0:0.01:(4*pi);% angular frequency for one cycle
v=Vm*sin(wt);% instatnuous voltage
i=Im*sin(wt-((pi/180)*Iangle));% instatanous current
xline=zeros(1,length(wt));
P=Vrms.*Irms.*cos(wt-((pi/180)*Iangle));
Q=Vrms.*Irms.*sin(wt-((pi/180)*Iangle));
power=v.*i;%instatanuos power.
%%%%%%%%%%%%part.i%%%%%%%%%%%%
figure(1)
plot(wt,v);
title('Instantaneous Voltage vs (wt)')
hold on
plot(wt,i,'r');
grid on
title('Instantaneous Current and voltage vs (wt)');
hold all
figure(2)
plot(wt,power);
title('Instantaneous Power vs (wt)');
grid on
%%%%%%%%%%%%%%part ii%%%%%%%%%%%%
i1=Irms.*sqrt(2).*cos((pi/180)*Iangle).*cos(wt);% instatanous current
power1=v.*i1;%instatanuos power.
figure(3)
plot(wt,v);
title('Instantaneous Voltage vs (wt)')
hold on
plot(wt,i1,'g');
grid on
title('Instantaneous Current and voltage vs (wt)');
hold all
figure(4)
plot(wt,power1);
title('Instantaneous Power vs (wt)');
grid on
%%%%%%%%%%%%%%part iii %%%%%%%%%%%%
i2=Irms.*sqrt(2).*sin((pi/180)*Iangle).*sin(wt);% instatanous current
power2=v.*i2;%instatanuos power.
figure(5)
plot(wt,v);
title('Instantaneous Voltage vs (wt)')
hold on
plot(wt,i2,'y');
grid on
title('Instantaneous Current and voltage vs (wt)');
hold all
figure(6)
plot(wt,power2);
title('Instantaneous Power vs (wt)');
grid on
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.