Analysis of RLC Circuits Using MATLAB
Analysis of RLC Circuits Using MATLAB
Now you can calculate three more solution sets >> R=20;
>> a=1/(2*R*C);
with differing resistances. Since the hold on >> wd=sqrt(w0*w0 - a*a);
command was used, each of the curves will be >> B2=(a/wd)*B1 - 10/(wd*R*C) + 0.6/(wd*C);
placed on the same graph. Pay special attention >> v=B1*exp(-a*t).*cos(wd*t) + B2*exp(-a*t).*sin(wd*t);
>> plot(1000*t,v,'mo-');
to the plot commands used - specifically which
>> R=50;
line style refers to a particular resistance. >> a=1/(2*R*C);
>> wd=sqrt(w0*w0 - a*a);
Also, you should note that the initial value for >> B2=(a/wd)*B1 - 10/(wd*R*C) + 0.6/(wd*C);
>> v=B1*exp(-a*t).*cos(wd*t) + B2*exp(-a*t).*sin(wd*t);
all four curves is the same - 10V. This is
>> plot(1000*t,v,'kx-');
because the initial condition specified in the >> R=100;
problem is that the voltage at time 0 is 10V. >> a=1/(2*R*C);
>> wd=sqrt(w0*w0 - a*a);
>> B2=(a/wd)*B1 - 10/(wd*R*C) + 0.6/(wd*C);
>> v=B1*exp(-a*t).*cos(wd*t) + B2*exp(-a*t).*sin(wd*t);
>> plot(1000*t,v,'rd-');
1 of 1 12/24/2017, 2:16 PM