Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 6) Consider the following RC circuit. Ys The voltage across the capacito

ID: 2248868 • Letter: P

Question

Problem 6) Consider the following RC circuit. Ys The voltage across the capacitor, Ve(t), in Volts and the current in the loop in Amps are given by Ve(t-k(1-e-t/r) V. i(t) = e-t/r 3800 and where = RC is the time constant. Consider the case where Vs = 24 V, R C = 4000 × 10-6F . a) Create a vector with values of times from 0 to 20 sec with spacing of 2 sec. b) Calculate Vc(t) and i(t) for each value of t from part (a). c) Display the results in a three-column table, where the values of time, voltage, and current are displayed in the first, second, and third columns, respectively. Hint: To create a table, you can use the command 'table' in MATLAB. Use MATLAB Help to learn how to use this command.

Explanation / Answer

(a)

>> t=0:2:20

t =

0 2 4 6 8 10 12 14 16 18 20

(b)

>> Vs=24;
>> R=3800;
>> C=4000e-6;
>> T=R*C;
>> Vc=Vs.*(1-exp(-t./T))

Vc =

Columns 1 through 9

0 2.9590 5.5531 7.8274 9.8213 11.5694 13.1020 14.4456 15.6236

Columns 10 through 11

16.6563 17.5617

>> i=(Vs./R).*exp(-t./T)

i =

Columns 1 through 9

0.0063 0.0055 0.0049 0.0043 0.0037 0.0033 0.0029 0.0025 0.0022

Columns 10 through 11

0.0019 0.0017