Thursday, 24 October 2013

To plot V(t) and I(t) for an electrical RL circuit: Matlab Program


Numerical # 1 For an R-L circuit, the voltage v(t ) and current i(t ) are given as V(t) = 10cos(377t); i(t) = 5 cos(377t+60˚) Sketch v(t ) and i(t ) for t = 0 to 20 milliseconds. Solution MATLAB Script % RL circuit % current i(t) and voltage v(t) are generated; t is time t = 0:1e-3:20e-3; v = 10*cos(377*t); a_rad = (60*pi/180); % angle in radians i = 5*cos(377*t + a_rad); plot(t,v,'r*',t,i,'go') title('Voltage and Current of an RL circuit') xlabel('Sec') ylabel('Voltage(V) and Current(mA)') text(0.003, 1.5, 'v(t)'); text(0.009,2, 'i(t)') The output of program can be seen in figure below

1 comment:

  1. Can u tell the procedure to perform this experiment?

    ReplyDelete