The v-i characteristic of a nonlinear resistor such as a diode or a transistor is often described by a curve on the v-i plane rather than by a mathematical relation. The v-i characteristic curve can be obtained by using a curve tracer for nonlinear resistors. To analyze circuits containing a nonlinear resistor, we should use the load line analysis. To grasp the concept of the load line, consider the graphical analysis of the circuit in Figure 1.1(a), which consists of a linear resistor R1, a nonlinear resistor R2, a DC voltage source Vs, and an AC voltage source of small amplitude vδ ≪ Vs. Kirchhoff's voltage law (KVL) can be applied around the mesh to yield the mesh equation as
where the v-i relationship of R2 is denoted by v2(i) and represented by the characteristic curve in Figure 1.1(b). We will consider a graphical method, which yields the quiescent, operating, or bias point Q = (IQ, VQ), that is, a pair of the current through and the voltage across R2 for vδ = 0.
Since no specific mathematical expression of v2(i) is given, we cannot use any analytical method to solve this equation and that is why we are going to resort to a graphical method. First, we may think of plotting the graph for the LHS (left‐hand side) of Eq. (1.1.1) and finding its intersection with a horizontal line for the RHS (right‐hand side), that is, v = Vs as depicted in Figure 1.1(b). Another way is to leave only the nonlinear term on the LHS and move the other term(s) into the RHS to rewrite Eq. (1.1.1) as
and find the intersection, called the operating point and denoted by Q (quiescent point), of the graphs for both sides as depicted in Figure 1.1(c). The straight line with the slope of −R1 is called the load line. This graphical method is better than the first one in the aspect that it does not require us to plot a new curve for v2(i) + R1i. That is why it is widely used to analyze nonlinear resistor circuits in the name of ‘load line analysis’. Note the following:
Consider the circuit in Figure 1.1(a), where a linear load resistor R1 = RL and a nonlinear resistor R connected in series are driven by a DC voltage source Vs in series with a small‐amplitude AC voltage source producing the virtual voltage as
The VCR v(i) of the nonlinear resistor R is described by the characteristic curve in Figure 1.2.
As depicted in Figure 1.2, the upper/lower limits as well as the equilibrium value of the current i through the circuit can be obtained from the three operating points, that is, the intersections (Q1, Q, and Q2) of the characteristic curve with the following three load lines.
Although this approach gives the exact solution, we gain no insight into the solution from it. Instead, we take a rather approximate approach, which consists of the following two steps.
Then we will have the current as
With the dynamic, small‐signal, or AC resistance rd defined to be the slope of the tangent to the characteristic curve at Q as
let us find the analytical expressions of IQ and iδ in terms of Vs and vδ, respectively. Referring to the encircled area around the operating point in Figure 1.2, we can express iδ in terms of vδ as
This corresponds to approximating the characteristic curve in the operation range by its tangent at the operating point. Noting that
we can write Eq. (1.1.8) as
Now we define the static or DC resistance of the nonlinear resistor R to be the ratio of the voltage VQ to the current IQ at the operating point Q as
so that the DC component of the current, IQ, can be written as
Finally, we combine the above results to write the current through and the voltage across the nonlinear resistor R as follows.
This result implies that the nonlinear resistor exhibits twofold resistance, that is, the static resistance Rs to a DC input and the dynamic resistance rd to an AC input of small amplitude. That is why rd is also called the (small‐signal) AC resistance, while Rs is called the DC resistance.
As an example of applying the load line analysis for a nonlinear first‐order circuit, consider the circuit of Figure 1.3.1(a), which consists of a nonlinear resistor, a linear resistor R = 2 Ω, and an inductor L = 14 H, and is driven by a DC voltage source of Vs = 12 V and an AC voltage source vδ sin ωt = 2.8 sin t[V]. The v-i relationship of the nonlinear resistor is v(i) = i3 and described by the characteristic curve in Figure 1.3.1(b). Applying KVL yields the following mesh equation:
First, we can draw the load line on the graph of Figure 1.3.1(b) to find the operating point Q from the intersection of the load line and the v-i characteristic curve of the nonlinear resistor. If the function v(i) = i3 of the characteristic curve is available, we can also find the operating point Q as the DC solution to Eq. (1.1.15) by removing the AC source and the time derivative term to write
and solving it as
Eq. (1.1.16) can be solved by running the following MATLAB statements:
>>eq_dc=@(i)2*i+i.^3-12; I0=0; IQ=fsolve(eq_dc,I0)
Then, as a preparation for analytical approach, we linearize the nonlinear differential equation (1.1.15) around the operating point Q by substituting i = IQ + δi = 2 + δi into it and neglecting the second or higher degree terms in δi as
Note that we can set the slope of the characteristic curve as the dynamic resistance rd of the nonlinear resistor:
and apply KVL to the circuit with the DC source Vs removed and the nonlinear resistor replaced by rd to write the same linearized equation as Eq. (1.1.18):
We solve the first‐order linear differential equation with zero initial condition δi(0) = 0 to get δi(t) by running the following MATLAB statements:
>>syms s
dIs=2.8/(s^2+1)/14/(s+1); dit_linearized=ilaplace(dIs)
dit1_linearized=dsolve('Dx=-x+0.2*sin(t)','x(0)=0') % Alternatively
This yields
dit_linearized = exp(-t)/10 - cos(t)/10 + sin(t)/10
which means
We add this AC solution to the DC solution IQ to write the approximate analytical solution for i(t) as
Now, referring to Appendix D, we use the MATLAB numerical differential equation (DE) solver ‘ode45()
’ to solve the first‐order nonlinear differential equation (1.1.15) by defining it as an anonymous function handle:
>>di=@(t,i)(12+2.8*sin(t)-2*i-i.^3)/14; % Eq. (1.1.15)
and then running the following MATLAB statements:
>>i0=IQ; tspan=[0 10]; % Initial value and Time span
[t,i_numerical]=ode45(di,tspan,i0); % Numerical solution
We can also plot the numerical solution together with the analytical solution as black and red lines, respectively, by running the following MATLAB statements:
>>i_linearized=eval(IQ+dit_linearized); % Analytical solution (1.1.22)
plot(t,i_numerical,'k', t,i_linearized,'r')
This will yield the plots of the numerical solution i(t) and the approximate analytical solution (1.1.22) for the time interval [0,10 s] as depicted in Figure 1.3.2.
Overall, we can run the above MATLAB script “elec01f03.m” to get Figure 1.3.1(b) (the load line together with the characteristic curve) and Figure 1.3.2 (the numerical nonlinear solution together with the analytical linearized solution) together.
Two electric circuits are said to be externally equivalent with respect to a pair of terminals if their terminal voltage-current relationships are identical so that they are indistinguishable from outside. The source transformation refers to the conversion of a voltage source in series with an element like a resistor (Figure 1.4(a)) to a current source in parallel with the element (Figure 1.4(b)), or vice versa in such a way that the two circuits are (externally) equivalent w.r.t. their terminal characteristics. What is the relationship among the values of the voltage source Vs, the current source Is, the series resistor Rs, and the parallel resistor Rp required for the external equivalence of the two source models? To find it out, we write the VCR of each circuit as
where the current through Rp is found to be (i + Is) by applying KCL at the top node of the resistor Rp in Figure 1.4(b). In order for these two polynomial equations (in i) to be identical for any value of v and i, their coefficients (including the constant term) should be the same:
This source equivalence condition is used for voltage‐to‐current or current‐to‐voltage source transformation.
Thevenin's theorem says that any network consisting of linear elements and independent/dependent sources as shown in Figure 1.5(a) may be replaced at a pair of its terminals (nodes) by the Thevenin equivalent circuit, which consists of a single element of impedance ZTh in series with a single independent voltage source VTh (see Figure 1.5(b)), where the values of ZTh and VTh are determined as follows:
Norton's theorem says that any linear network may be replaced at a pair of its terminals by the Norton equivalent circuit, which consists of a single element of impedance ZNt in parallel with a single independent current source INt (see Figure 1.5(c)), where the values of ZNt and INt are determined as follows:
Since Thevenin and Norton equivalents are equivalent in representing a linear circuit seen from a pair of two terminals, one can be obtained from the other by using the source transformation introduced in Section 1.2. This suggests another formula for finding the equivalent impedance as
Note that we should find the equivalent impedance after removing every independent source, that is, with every voltage/current source short‐/open‐circuited. For networks having no dependent source, the series/parallel combination and Δ‐Y/Y‐Δ conversion formulas often suffice for the purpose of finding the equivalent impedance. For networks having dependent sources, we should apply a test voltage source VT across the terminals, measure the current IT through the terminals (see Figure 1.6(a)), and write down the relationship between VT and IT as
In this relationship, we find the value of the equivalent impedance ZTh from the proportionality coefficient of the term in IT, and the equivalent source VTh from the constant term independent of IT. This suggests a one‐shot method of finding the values of the equivalent impedance ZTh and the equivalent source VTh or INt at a time. This one‐shot method of finding the equivalent may be applied for any linear networks with or without independent/dependent sources. Another way to find the equivalent circuit is to apply a test current source IT through the terminals (see Figure 1.6(b)), measure the voltage VT across the terminals, and write down the relationship between VT and IT as Eq. (1.3.2).
Miller's theorem states that an element of impedance Z connected between two nodes 1 and 2 as shown in Figure 1.11(a), each with node voltage V1 and V2 = AvV1, respectively, can be replaced by an equivalent consisting of two impedances Z1 and Z2:
each of which is connected between the nodes 1/2 and a common node 0 as shown in Figure 1.11(b). It can easily be shown that the two circuits of Figure 1.11(a) and (b) are equivalent both from terminals 1 to 0 and 2 to 0. If the element is a capacitor of impedance Z = 1/sC, the equivalent capacitances seen from terminals 1 to 0 and 2 to 0 will be
Here, C1 is referred to as the Miller (effective) capacitance where (1 − Av) is called the Miller multiplier and the increase in the equivalent input capacitance is the Miller effect.
A function x(t) of t is said to be periodic with period T if x(t) = x(t + T) ∀ t, where T[s] and ω0 = 2π/T[rad/s] are referred to as the fundamental period and fundamental (angular) frequency, respectively, if T is the smallest positive real number to satisfy the equation for periodicity. According to the theory on Fourier series, any practical periodic function x(t) can be represented as a sum of (infinitely) many trigonometric (cosine/sine) functions or complex exponential functions, which is called the Fourier series representation. There are four forms of Fourier series representation as follows:
where the Fourier coefficients a0, ak, and bk are
where the Fourier coefficients are
where the Fourier coefficients are
where the Fourier coefficients are
If a function x(t) has one of the following three symmetries, we can make use of it to reduce the computation for computing Fourier coefficients, as summarized in Table 1.1:
Table 1.1 Reduced computation of Fourier coefficients exploiting symmetries of x(t).
Fourier coefficients | Symmetry of a periodic function with period T | ||
Even symmetry: x(t) = x(−t) |
Odd symmetry: x(t) = − x(−t) |
Half‐wave symmetry: x(t) = − x(t + T/2) |
|
a0(DC term) | 0 | 0 | |
ak(k = odd) | 0 | ||
ak(k = even ) | 0 | 0 | |
bk(k = odd) | 0 | ||
bk(k = even ) | 0 | 0 |
Note that an even (symmetric) function can become an odd (symmetric) one just by translation and vice versa as illustrated in Figure 1.12.
In the previous section, we discussed how to represent a periodic function in Fourier series. In this section, we study how to analyze a linear circuit excited by a source whose value can be described as a periodic function of time, which is not necessarily a sinusoidal function. The procedure which we take to use Fourier series for analyzing circuits is as follows:
Figure 1.15(a) shows the PSpice schematic of an RC circuit excited by a rectangular (square) wave voltage source of height ±Vm = ±π, period T = 2 [s], and duration (pulse width) D = 1 [s], where the voltage across the capacitor is taken as the output. Figure 1.15(b) shows the input and output waveforms obtained from the PSpice simulation. Figure 1.15(c) shows the Fourier spectra of the input and output obtained by clicking the fast Fourier transform (FFT) button on the toolbar in the PSpice A/D (Probe) window. Figure 1.15(d) shows how to fill in the Simulation Settings dialog box to get the Fourier analysis results (for chosen variables) printed in the output file. Figure 1.15(e) shows the contents of the output file that can be viewed by clicking PSpice>View_Output_File on the top menu bar and pull‐down menu in the Capture window or View/Output_File on the top menu bar and pull‐down menu in the Probe window.
Thus, we can express vi(t) as
Since the RC circuit has the frequency response
its output to the input vi(t) (described by Eq. (E1.7.2)) can be written as
The three leading frequency components of the output phasor are
where the phases are taken with that of sin ωt as a reference as in Eq. (1.5.3b) (called the sine‐and‐phase form of Fourier series representation) in order to match this Fourier analysis result with that seen in the PSpice simulation output file (Figure 1.15(e)). The magnitude ratios among the leading three frequency components of the input and output are
This implies that the relative magnitudes of high‐frequency components to low ones become smaller after the input signal passes through the filter, resulting in a considerable decrease of the total harmonic distortion (THD) from 38.9 to 16.3% as can be seen in the output file (Figure 1.15(e)). This is a piece of evidence that the RC circuit with the capacitor voltage taken as the output functions as a low‐pass filter.
%solve_eqE178.m : to solve Eq. (E1.7.8)
eq=@(w0RC)sqrt(1+w0RC^2)-0.375*sqrt(1+9*w0RC^2);
w0RC0=1; w0RC=fsolve(eq,w0RC0); w0=pi; RC=w0RC/w0
>>elec01e07
Magnitude_and_phase_of_input_spectrum =
0 0.0000 0
1.0000 4.0000 0.0000
2.0000 0.0000 89.9999
3.0000 1.3333 0.0000
4.0000 0.0000 90.0001
5.0000 0.8000 0.0000
THD of input=3.8873e-001 and THD of output=1.6304e-001
Magnitude_and_phase_of_output_spectrum =
0 0.0000 0
1.0000 2.9109 -43.3038
2.0000 0.0000 27.9466
3.0000 0.4446 -70.5224
4.0000 0.0000 14.8561
5.0000 0.1661 -78.0192
%elec01e07.m : to solve Example 1.7
%Perform Fourier analysis to solve the RC circuit excited by a square wave
global T D Vm
T=2; w0=2*pi/T; D=1; Vm=pi; % Period, Frequency, Duration, Amplitude
N=5; kk=0:N; % Frequency indices to analyze using Fourier analysis
tt=[-300:300]*T/200; % Time interval of 3 periods
x='elec01e05_f'; % Bipolar square wave input function defined in an M-file
RC=0.3; n=1; d=[RC 1]; % Numerator/Denominator of xfer function (E1.7.3)
[Y,X,THDy,THDx]=Fourier_analysis(n,d,x,T,N);
Mag_and_phase_of_input_spectrum = [kk; abs(X); angle(X)*180/pi].'
fprintf('THD of input=%10.4e and THD of output=%10.4e',THDx,THDy)
Mag_and_phase_of_output_spectrum = [kk; abs(Y); angle(Y)*180/pi].'
xt = feval(x,tt); % Input signal for tt
yt= Y(1); % DC component of the output signal
for k=1:N % Fourier series representation of the output signal
yt = yt + abs(Y(k+1))*sin(k*w0*tt + angle(Y(k+1))); % Eq. (1.5.3a)
end
subplot(221), plot(tt,xt, tt,yt,'r') % plot input/output signal waveform
subplot(222), stem(kk,abs(X)), hold on, stem(kk,abs(Y),'r') % their spectra
function y=elec01e07_f(t)
% defines a bipolar square wave with period T, duration D, and amplitude Vm
global T D Vm
t= mod(t,T); y=((t<=D)-(t>D))*Vm;
function [Y,X,THDy,THDx]=Fourier_analysis(n,d,x,T,N)
%Input: n = Numerator polynomial of transfer function G(s)
% d = Denominator polynomial of transfer function G(s)
% x = Input periodic function
% T = Period of the input function
% N = Highest frequency index of Fourier analysis
%Output: Y = Fourier coefficients [Y0,Y1,Y2,...] of the output
% X = Fourier coefficients [X0,X1,X2,...] of the input
% THDy = Total Harmonic Distortion factor of the output
% THDx = Total Harmonic Distortion factor of the input
% Copyleft: Won Y. Yang, wyyang53@hanmail.net, CAU for academic use only
if nargin<5, N=10; end
w0=2*pi/T; kk=0:N; % Fundamental frequency and Frequency index vector
[a0,a,b] = CTFS_trigonometric(x,T,N); % trigonometric Fourier coefficients
Xmag = [a0 sqrt(a.^2+b.^2)]; Xph = [0 atan2(a,b)]; % Eq. (1.5.3b)
X= Xmag.*exp(j*Xph); % Input spectrum
Gw= freqs(n,d,kk*w0); % Frequency response
Y= X.*Gw; % Output spectrum
%Total Harmonic Distortion factors of the input and output
THDx= sqrt(Xmag(3:end)*Xmag(3:end).')/Xmag(2); % Eq. (1.5.11)
Ymag= abs(Y); % the magnitude of the output spectrum
THDy= sqrt(Ymag(3:end)*Ymag(3:end).')/Ymag(2);
Note that the MATLAB script “elec01e06.m” uses the function ‘Fourier_analysis()
’ (listed below), which takes the numerator (n) and denominator (d) of the transfer function G(s), the (periodic) input function (x) defined for at least one period [−T/2,+T/2], the period (T), and the order (N) of Fourier analysis as input arguments and produces the output (yt) for one period, the sine‐and‐phase form of Fourier coefficients Y and X of the output and input (for k =0, …, N), and the THDs of the output and input as output arguments.
Let a non‐sinusoidal periodic signal have the magnitude‐and‐phase or sine‐and‐phase form of Fourier series representation as
Then its rms (root‐mean‐square) or effective value can be computed as
which is the square root of the sum of the squared DC (average) value () and the squared rms values () of every (fundamental and harmonic) frequency component contained in the signal. In this derivation, we have made use of the fact that the integral of a product of two sinusoids of different frequencies over their common period is zero:
As a measure of how far a periodic signal is from its sinusoid of fundamental frequency, the THD (total harmonic distortion), also referred to as the distortion factor, is defined to be the ratio of the rms value of harmonic components to that of fundamental frequency component as follows:
Consider the circuit of Figure P1.2(a), which contains a nonlinear resistor whose voltage-current characteristic curve is depicted in Figure P1.2(b).
Consider the circuit of Figure P1.3(a) that consists of a nonlinear resistor, a linear resistor R = 500 kΩ, and a capacitor C = 14 [μF] and is driven by a DC voltage source of Vs = 6 [V] and an AC voltage source vδ sin t = 1.4 sin t [V]. The v-i relationship of the nonlinear resistor is i2(v) = v3[μA] and described by the characteristic curve in Figure P1.3(b). We can apply KCL at node 1 to write the following node equation:
Also, draw the load line on the graph of Figure P1.3(b) to find the operating point Q from the intersection of the load line and the v–i characteristic curve of the nonlinear resistor.
ode45()
’ to solve the nonlinear differential equation (P1.3.1) as done in Section 1.1.2. Also, try an iterative (dynamic) method to solve the nonlinear differential equation as coded in the following script “elec01p03b.m,” where the capacitor voltage or the voltage at node 1 is computed as
Plot the two solutions together for comparison.
%elec01p03b.m
% On-line iterative solution of Eq. (P1.3.1)
R=5e5; C=14e-6; Vs=6; vd=1.4;
ftn=@(v,R,Vs)(Vs-v)/R*1e6-v.^3;
VQ=fsolve(ftn,0,optimset('fsolve'),R,Vs), IQ=VQ^3/1e6;
t=[0:0.01:10]; % Time vector
v(1)=VQ; % To let v(t) begin with VQ
% To start the trapezoidal rule with the right-side integration rule
iC(1)=(Vs+vd*sin(t(1))-v(1))/R-v(1)^3/1e6; % Capacitor current
v(2)=v(1)+iC(1)/C*(t(2)-t(1)); % Voltage at node 1
for n=2:length(t)-1
iC(n)=(Vs+vd*sin(t(n))-v(n))/R-v(n)^3/1e6; % Eq. (P1.3.3)
v(n+1)=v(n)+(iC(n)+iC(n-1))/C/2*(t(n+1)-t(n)); % Eq. (P1.3.4)
end
plot(t,v)
Figure P1.5(a) shows the PSpice schematic of a rectifier circuit in which a full‐wave rectified voltage vi(t) = |10 cos(2π60t)| is made smooth by an LCR low‐pass filter as can be observed from the input and output signals and their spectra in Figure 2.11(b) and (c). Note that in the Simulation Settings dialog box, the PSpice simulation parameters for Time Domain (Transient) Analysis are set as
Note also that in the Transient Output File Options dialog box (opened by clicking on Output File Options button in the Simulation Settings dialog box), the parameters for FFT analysis are set as in the following:
Figure P1.5(b) shows the FFT analysis results for the input and output voltage waveforms of the LRC filter as listed in the PSpice simulation output file (opened by selecting PSpice>View_Output_File from the top menu bar of the schematic window).
and the Fourier series representation of the full‐wave rectified cosine input is
verify that the first two major frequency components of the output can be expressed as
Write the condition for the relative magnitude of the major harmonic to the DC component to be less than rmax. Run the MATLAB script “elec02f12.m” (Section 2.2.6) together with MATLAB function ‘elec02f12_f()
’ to plot the region of (C, L) satisfying the condition as shown in Figure 2.12. Is the point (C = 1 μF, L = 50 H) in the 5%‐admissible region?
Fourier_analysis()
’ to perform the spectral analysis of the input and output voltage waveforms for the full‐wave rectifier in Figure P1.5a and run it. Fill up Table P1.5 with the magnitudes of each frequency component obtained from the MATLAB analysis and PSpice simulation (up to four significant digits) for comparison. Is the relative magnitude of the major harmonic to the DC component less than 5%?Table P1.5 Fourier analysis results obtained using MATLAB and PSpice.
Components | PSpice | MATLAB | |
Input vi(t) | DC component (k = 0) | 5.091 | |
Fundamental (ω0) | 1.275 × 10− 3 |
0 | |
Second harmonic (2ω0) | |||
Output vo(t) | DC component (k = 0) | ||
Fundamental (ω0) | 2.089 × 10− 2 |
0 | |
Second harmonic (2ω0) |