1/10
Solving Circuits with Periodic Sources
FS makes it easy to find the response of an RLC circuit to a periodic source!
• Use the FS to convert the source into a sum of sinusoids
• Do phasor analysis for each of the input sinusoids (think superposition!)
• Add up the sinusoidal responses to get the output signal
Example: In electronics you have seen (or will see) Obviously we can’t do this for
how to use diodes and an RC filter circuit to all infinitely many terms…
create a DC power supply: but we can do it for enough…
and if we do it numerically it
is not hard!
60Hz Sine wave
(Period = 16.67 ms)
x(t) R C
Periodic Signal
x(t)
t
Periodic!! Think
Fourier Series!!
0 240 rad/sec
T = 8.33ms
2/10
Progression of Ideas
Periodic Source
x(t) y(t)
t
x(t) R C ? t
T = 8.33ms
Periodic Source as FS
y(t)
x(t ) ck e jk0t x(t) R C ? t
k
ZC 1 jkoC
kth Phasor Term of FS dk c ck
ZC R 1 jkoC R
k
R
ck @ ko Z C 1 jkoC ? = Phasor to 1
ck
Find 1 jko RC
Need to find the ck values… numerically or analytically 3/10
For this scenario we can find the ck analytically…
1 T 2
The equation for the FS coefficients is: ck
T 0
x (t )e jk0t dt 0
T
Over this interval:
x(t)
A
x (t ) A sin t 0 t T
T
T t
2
jk T t
1 T Now apply Calc I ideas
ck
T 0
A sin t e
T
dt to evaluate….
A
Change of variable: t ck sin e jk 2 d
T 0
3
0 30 20 0
50 4 0 20 30 40 50
ck
50 40 30 20 0 0 20 30 40 50
k K k K (1 4k )
2
k K (1 4k 2 )
5/10
We can look at the ratio of these two as a good measure:
2 2
K
4A 1
Papprox 2 (1 4 k 2
) 8 K
1
2
P
k K
A2
2
k K (1 4k 2 )
2
Numerically evaluating this for different K values
shows that K = 10 retains more than 99.99% of the
power. So we can use that value. 2A
ck
(1 4k 2 )
So… our numerical approach is now this:
1. Numerically evaluate ck for k = –10 to 10 1
2. Numerically convert them into the dk phasors dk ck
3. Convert the phasors into corresponding FS 1 jko RC
sinusoidal terms and add them up
10
Fs = 4*K*fo; % Compute sampling rate (set here to twice the minimum value of 2Kfo)
Ts = 1/Fs; % Compute sample spacing
t = (-3*T):Ts:(3*T);
x_apprx = zeros(size(t)); % sets up vector of zeros as first “partial sum”
for k = (-K):K % loop through “all” coefficients
x_apprx = x_apprx + ck(k+K+1)*exp(j*k*wo*t); % Add current term to partial sum
end
x_apprx = real(x_apprx);
y_apprx = zeros(size(t)); % sets up vector of zeros as first “partial sum”
for k = (-K):K % loop through “all” coefficients
y_apprx = y_apprx + dk(k+K+1)*exp(j*k*wo*t); % Add current term to partial sum
end
y_apprx = real(y_apprx); % theory says imaginary parts cancel… so enforce this in case
% of numerical round-off issues
10
8
Input and Output (volts)
0
-0.025 -0.02 -0.015 -0.01 -0.005 0 0.005 0.01 0.015 0.02 0.025
time (seconds)
8/10
8
6
|ck|
4
1 0
dk ck -10 -5 0 5 10
1 jko RC k
8
Changed via
Multiplication! 6 Effect of RC circuit:
|dk| Make all non-DC FS
4 coefficients negligible
0
-10 -5 0 5 10
k
Multiplicative factor has small magnitude here! 9/10
Big Idea: “Frequency Response”
Input Output
x(t ) ck e
k
jk0t Linear
Circuit
y (t ) k
d e
k
jk0t
Input’s FS Output’s FS
Coefficients Coefficients
d k H ( ko )ck
H() is the “Frequency Response”
of the Circuit