0% found this document useful (0 votes)
113 views

Analysis of RLC Circuits Using MATLAB

This document discusses using MATLAB to analyze RLC circuits. It first defines component values and calculates damping coefficient, natural frequency, and damped resonance frequency. It then calculates voltage values for these coefficients and plots the results. Additional plots are made by varying the resistance and adding labels and a legend to the final graph.

Uploaded by

Desy Kumala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views

Analysis of RLC Circuits Using MATLAB

This document discusses using MATLAB to analyze RLC circuits. It first defines component values and calculates damping coefficient, natural frequency, and damped resonance frequency. It then calculates voltage values for these coefficients and plots the results. Additional plots are made by varying the resistance and adding labels and a legend to the final graph.

Uploaded by

Desy Kumala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Analysis of RLC Circuits Using MATLAB https://www.wiley.com/legacy/college/elec/dorf192465/matlab/RLCCi...

9.m-1 Analysis of RLC Circuits Using MATLAB


First, set component values >> L=0.1;
>> C=0.001;
>> R=25/3;

Next, calculate the damping coefficient, natural >> a=1/(2*R*C)


a =
frequency, and the damped resonance frequency 60.0000
based on:
>> w0=1/sqrt(L*C)
w0 =
100

>> wd=sqrt(w0^2 - a^2)


wd =
80.0000

Next, calculate the values of B1 and B2 based >> B1=10;


>> B2=(a/wd)*B1 - 10/(wd*R*C) + 0.6/(wd*C)
on the fact that B1 will always be 10 and B2 can B2 =
be calculated as shown in the book. -1.7764e-15

To start the analysis, calculate the voltage for >> t=0:0.001:0.12;


>> v=B1*exp(-a*t).*cos(wd*t) + B2*exp(-a*t).*sin(wd*t);
these coefficients and plot them. Note that the >> hold off
hold on command allows you to use multiple >> plot(1000*t,v,'b+-')
plot commands on the same graph while the >> hold on
hold off command makes sure you create a new
plot with the next graphing command. The
graph right now looks like Figure 9.m-m1

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-');

Finally, add some labels and a legend. The >> legend('R=25/3','R=20','R=50','R=100')


>> ylabel('v_n(t), V');
legend command is used by specifying labels >> xlabel('t, ms');
for each of the curves in the order they were >> title('Natural Response of an Underdamped Parallel RLC Circuit');
created. The final graph is shown in Figure
9.m-2

1 of 1 12/24/2017, 2:16 PM

You might also like