Homework Problems for Basic Electronic Circuits (기초전자회로)
lectured by Professor Won Y. YangChapter 3 Diodes
HW172E_03: E3.4(5점), E3.6(10점), P3.6(10점), P3.9(5점), P3.10(10점), P3.32(10점), E3.7(10점), P3.55(10점), P3.60(10점), P3.78(10점)
PSpice simulation of Precision Half-Wave Rectifier in Fig. 3.27(6th ed.)/3.29(7th ed.) Plot of Fig. 3.31(6th ed.)/3.33(7th ed.) using MATLAB (10점)
E3.4(5) Example 3.4
To determine IDQ and VDQ of the circuit in Fig. 3.10 where VDD=5V and R=1kΩ, run the following MATLAB script “Sedra03e04.m”. Explain about the three methods implemented in the script.
%Sedra03e04.m clear, clf
VD=0.7; VT=25e-3; % Thermal voltage
Is= 1e-3/(exp(VD/VT)-1); % Saturation current iD = @(vD)Is*(exp(vD/VT)-1); %.*(vD>0); % Eq.(3.1) vD = @(iD)VT*log(iD/Is+1).*(iD>0); % Eq.(3.1) VDD=5; R=1e3;
vDs=[0:0.0001:0.8]; % Voltage range including the solution point iDs = iD(vDs); % iD values over the voltage range
iD_load_line = (VDD-vDs)/?; % Load line
[emin,imin]=min(abs(iDs-iD_load_line)); % The intersection point VDQ = vDs(imin); IDQ=iDs(imin); % Operating point
fprintf(' VDQ=%8.3f[V], IDQ=%8.3f[mA] from load line analysis\n', VDQ,IDQ*1e3);
% To plot the iD-v curve and load line
plot(vDs,iDs, vDs,iD_load_line,'k', VDQ,IDQ,'mo') axis([vDs([1 end]) 0 10e-3])
% Node equation using 'fsolve()'
options = optimset('TolFun',1e-10, 'Display','off');
eqv = @(v)iD(v)-(VDD-?)/R; % The node equation to solve v0 = 0; % Initial guess of VDQ
[VDQ,err] = fsolve(eqv,v0,options);
IDQ = (VDD-VDQ)/R;
fprintf(' VDQ=%8.3f[V], IDQ=%8.3f[mA] based on node equation\n', VDQ,IDQ*1e3);
% Mesh equation using 'fsolve()'
eqi = @(i)R*i+vD(?)-VDD; % The mesh equation to solve i0 = 0; % Initial guess of IDQ
IDQ = Newtons(eqi,v0);
%[IDQ,err] = fsolve(eqi,i0,options);
VDQ = VDD-R*IDQ;
fprintf(' VDQ=%8.3f[V], IDQ=%8.3f[mA] based on mesh equation\n', VDQ,IDQ*1e3);
iD +
vD - Figure 3.10
R VDD
1
E3.6(10) Example 3.6
Consider the circuit of Fig. 3.17 where a string of three diodes with a voltage source of 10±1[V]
is used to provide a constant voltage of about 2.1V for the load of RL.
(a) Find the theoretical minimum value of RL such that vo(t) to vI(t) =Vdc+sin t is not distorted.
%Sedra03e06_1.m clear, clf
t=[0:0.01:2]; % Simulation time interval 0~2[sec]
Vs=10; vs=1; f=1; w=2*pi*f;
vit = Vs + vs*sin(w*t); % Input (DC+small signal) voltage Rs=1e3; T=27; VT=(273+T)/11605; %VT=25.9e-3;
Is=1e-14; % Saturation current of the diode
VDQ=0.7; IDQ=(Vs-3*VDQ)/Rs; % V and I of the diode at bias point Q rd=VT/IDQ % Diode small-signal resistance
RLmin=3*VDQ/(min(vit)-3*VDQ)*Rs % Eq.(E3.6.2) RLs=[354 254]; N_RLs = length(RLs);
options=optimoptions('fsolve','Display','off');
for i=1:N_RLs RL = RLs(i);
for n=1:length(vit) vi = vit(n);
vot(n)=fsolve(@(vo)Is*(exp(vo/?/VT)-1)+v?/RL+vo/Rs-vi/Rs, VDQ*3,options);
iDt(n) = Is*(exp(vot(n)/3/V?)-1);
vot1(n) = (vi/??+3*VDQ/3/rd)/(1/Rs+1/3/r?+1/?L);
iDt1(n) = (vot1(n)-3*V??)/3/rd;
if iDt1(n)<0, iDt1(n)=0; vot1(n)=vi*RL/(Rs+R?); end end
dv = max(vot)-min(vot) % Peak-to-peak change in vo(t) dv1 = max(vot1)-min(vot1) % Peak-to-peak change in vo(t) subplot(2,2,i), plot(t,vot, t,vot1,'r:'); ylabel('vo(t)') subplot(2,2,i+2), plot(t,iDt, t,iDt1,'r:'); ylabel('iD(t)') end
(b) Complete and run the above MATLAB script “Sedra03e06.m” to check the validity of RL,min
obtained in (a). Explain about the equations to be solved by the statements in the 15th and 17th lines. What are the values of RL for which the MATLAB analysis has been done in the script?
From the MATLAB analysis results shown in Fig. E3.6.1, tell whether vo(t) is distorted or not.
iD
+ vo -
Fig. 3.17 A voltage regulator using the diode forward drop
Rs vs= sin t Vdc= 10V
RL
1
Figure E3.6.1 MATLAB analysis result
Figure E3.6.2 PSpice simulation
(c) Perform the PSpice simulation two times, once with RL=354Ω and once with RL=254Ω. Based on the simulation results about vo(t), tell whether the value of RL,min obtained in (a) is valid or not. Which one of the MATLAB analyses, one based on the PWL model and one based on the exponential, is closer to the PSpice simulation result shown in Fig. E3.6.2?
Using the exponential model Using the PWL model
P3.6(10) Consider the circuit of Fig. P3.6, which is a model for a battery charger where vI is a 6V peak sine wave vI(t) =Vmsin(ω1t) = 6 sin(2πt), D1 and D2 are diodes (with Is=10-14[A]), I is a 60mA current source, and B is a 3V battery. Do {(a) or (b)} and (c).
60mA
6 sin(2πt)[A]
vx
3V Figure P3.6
%Sedra03p06.m
Is=1e-14; VT=25e-3; % Saturation current and Thermal voltage iD1=@(vD)Is*(exp(vD/VT)-1);
iD2=@(vD)Is*(exp(vD/VT)-1);
I=0.06; % 60mA-current source
eq=@(vx,vI,VB)iD?(vx-v?)+iD2(vx-V?)-I; % (Nonlinear) KCL at Node x dt=1e-3; t=0:dt:1; % Time range
Vm=6; w=2*pi; vIt=Vm*sin(w*t); VB=3; % Input AC voltage, Battery voltage options=optimset('Display','off');
for n=1:length(t)
vI=vIt(n); % The value of the input voltage at each instant if n<2, vx0=1; else vx0=vxt(n-1); end % Initial guess
vxt(n)=fsolve(eq,vx0,options,vI,VB); % Solve the NLE.
iD1t(n)=iD1(vxt(n)-vI); % D1 current
iD2t(n)=iD2(vxt(n)-V?); % D2 current equal to iB end
plot(t,vIt, t,vxt,'r', t,iD2t*10,'m') tON = asin(VB/Vm)/w;
hold on, plot(t([1 end]),[VB VB],'g:', tON*[1 1],[0 VB],'g:') grid on, legend('v_I (t)','v_x(t)','i_{D2}(t)*10')
Peak_of_iB = max(iD2t) % This will be equal to I.
Average_of_iB = mean(iD2t)
Average_of_iB1 = (pi-2*w*tON)/2/pi*I
Figure P3.6.1 MATLAB simulation result
(a) (b)Figure P3.10 vx
D1
+ vD2
- D2
+ vD1
- I
V
vx D1
+vD2
- D2
+vD1
- I
V
R1 R1
R2 R2
12kΩ
6kΩ 12kΩ
6kΩ +3V
-3V
+3V
-3V
(a) Assuming that D1 and D2 are ideal diodes, sketch the waveform of the battery current iB=iD2
for t =0~1s.
(b) Referring to the above MATLAB script, compose an m-file named “Sedra03p06.m” and run it to plot vI(t), vx(t), and 10iB=10iD2 for t =0~1s.
(b1) Write the equation to solve by using the nonlinear equation solver ‘fsolve()’ in the for loop.
(b2) What are the meaning and purpose of the following MATLAB statement in the 18th line?
tON = asin(VB/Vm)/2/pi;
(c) Find the peak and average values of iB from the results of running the MATLAB script. Explain about the second method used to find the average value of iB.
P3.9(5) Consider the circuit of Fig. P3.9 where the diodes are assumed to be ideal. Use Thevenin theorem to simplify the circuits and find the values of the labeled currents and voltages.
Figure P3.9
P3.10(10) Consider the circuit of Fig. P3.10 where the diodes are assumed to be ideal. Find the values of the labeled currents and voltages.
P3.32(10) Consider the circuit of Fig. 3.10 where VDD=1V, R =1kΩ, and the saturation current of the diode is Is=10-15A. Find the operating point in one of the following two ways:
Figure 3.10
(a) Calculate a small number of points, say, the values of iD=Is(evD/VT-1) for vD=0.6, 0.65, and 0.7V, on the diode characteristic in the vicinity of where you expect the load line to intersect it, and use a graphical process to refine your estimate of diode current. What value of diode current and voltage do you find? Analytically, find the voltage corresponding to your estimate of current. By how much does it differ from the graphically estimated value?
(b) Complete and run the following MATLAB script “Sedra03p32.m” to plot the diode characteristic curve, the load line, and their intersection (VDQ, IDQ), called the operating point.
What value of diode current and voltage do you see from the graph? Explain the two methods to find the operating point in the script.
%Sedra03p32.m
VD=0.7; VT=25e-3; % Thermal voltage Is= 1e-15; % Saturation current
iD = @(vD)Is*(exp(vD/VT)-1).*(vD>0); % Eq.(3.1) VDD=1; R=1e3;
vDs=[0:1e-4:0.8]; % Voltage range including the solution point iDs = iD(vDs); % iD values over the voltage range
iD_load_line = (VDD-vDs)/?; % Load line
[emin,imin]=min(abs(iDs-iD_load_line)); % Find the intersection point
% Operating point
VDQ = vDs(imin); IDQ=iDs(imin);
fprintf(' VDQ=%8.3f[V], IDQ=%8.3f[mA]\n', VDQ,IDQ*1e3);
% To plot the iD-v curve and load line
plot(vDs,iDs, vDs,iD_load_line,'k', VDQ,IDQ,'mo') text(VDQ+0.02,IDQ,['Q(' num2str(VDQ,'%7.3fV') ','
num2str(IDQ*1e3,'%8.3fmA') ')']);
% Another method using 'fsolve()'
options = optimset('TolFun',1e-10,'Display','off');
eq = @(v)iD(v)-(VDD-?)/R; % The nonlinear equation to solve v0 = 0; % Initial guess of VDQ
%[VDQ,err] = fsolve(eq,v0,options);
VDQ = Newtons(eq,v0); IDQ = (VDD-VDQ)/R;
fprintf(' VDQ=%8.3f[V], IDQ=%8.3f[mA]\n', VDQ,IDQ*1e3);
E3.7(10) Example 3.7
Consider the regulator circuit of Fig. 3.21(a) where the Zener diode has VZ=6.8V at IZ=5mA, rZ=20Ω, and IZK=0.2mA, and the supply voltage vS varies by ±1V around its nominal value 10V.
(a) Determine VZ0 of the linear iZ-vZ relation (3.20): vZ=VZ0+ rZiZ describing the almost-straight line part of the i-v characteristic curve:
(a) A zener diode regulator circuit (b) Its equivalent Figure 3.21 A zener diode regulator circuit
vS
rz VZ0
iZ
RL +
vO
- RL iZ
iL
Rs
Rs
vZ
vZ
+ vO=vZ
- VZ =6.8V
at IZ =5mA
(b) Find vO with RL=2kΩ and vS=10V(nominal value)/9V/8.3V. If vO turns out to be lower than VZ0, check if Rs=500Ω/RL=2kΩ is greater/smaller than Rs,max/RL,min obtained from Eq. (3.4.5) and discuss why vO<VZ0.
>>VZ=6.8; IZ=5e-3; rz=20; IZK=0.2e-3;
vss=[10 9 8.3]; Rs=500; RL=2e3;
[vos,iZ,dvodvs,dvodRL,dvodIL,Rsmax,RLmin,VZ0]=...
Zener_regulator(VZ,IZ,r?,IZK,RL,Rs,vss);
VZ0, vos, Rsmax, RLmin
(c) Find vO with RL=2kΩ/1.5kΩ/1.4kΩ and vS=9V.
>>vs=9; Rs=500; RLs=[2e3 1.5e3 1.4e3];
[vos,iZ,dvodvs,dvodRL,dvodIL,Rsmax,RLmin,VZ0]=...
Zener_regulator(VZ,IZ,rz,I??,RLs,Rs,vs);
vos, RLmin
P3.55(10) Consider the voltage regulator circuit of Fig. P3.55 where the diodes have a voltage drop of 0.7V at a current of 10mA. Use the iterative analysis based on the diode exponential model to answer the following questions:
(a) Find the regulator output voltage vO with RL=150kΩ connected.
%Sedra03p55a.m
VT=25e-3; %(273+27)/11605; % Thermal voltage
% To find Is for the diode having iD=10mA at vD=0.7V ID=10e-3; VD=0.7; Is = ID/(exp(VD/??)-1)
iDvD = @(vD)Is*(exp(??/VT)-1);
options = optimset('Display','off');
vI=5; R=200; RL=150;
disp('(a) with RL=150[Ohm]')
eq = @(v)(??-v)/R-iDvD(v/2)-v/??; % Nonlinear KCL eq to be solved v0 = vI/2; % Initial guess of the solution of this equation Voa = Newtons(eq,v0) % Voa = fsolve(eq,v0,options);
IDa = iDvD(Voa/2)
iD
Figure P3.55
vI
=5V
RL R
=200 Ω
vO iL
D1
D2 A
B
(b) Find vO with no load.
%Sedra03p55b.m disp('(b) No load')
eq = @(v)(vI-?)/R-iDvD(v/2); % Nonlinear KCL eq to be solved v0=vI/2; Vob = Newtons(eq,v0) % Vob = fsolve(eq,v0,options) IDb = iDvD(Vob/?)
(c) With the load RL=150kΩ connected, to what value can the 5V supply voltage be lowered while maintaining the loaded output voltage vO within 0.1V of its nominal value?
%Sedra03p55c.m
disp('(c) What value of Vi will lower Vo by 0.1V?') Voc = Voa-0.1, Vic = Voc + R*(iDvD(Voc/2)+???/RL)
(d) Find vO (with the load RL=150kΩ connected) when the 5V supply is raised by the same amount as the drop found in (c).
%Sedra03p55d.m
disp('(d) Find Vo if Vi increases by dVi obtained in (c)') Vid = vI+(vI-Vic)
eq=@(v)(Vid-v)/R-iDvD(?/2)-v/RL; % Nonlinear KCL eq to be solved v0=Vid/2; Vod = Newtons(eq,v0) % Voa = fsolve(eq,v0,options);
IDd = iDvD(Vod/?)
P3.60(10) Design a 7.5V Zener regulator circuit (like Fig. 3.21(a)) using a VZ=7.5V Zener diode specified at 10mA where the Zener diode has an incremental resistance rz=30Ω and a knee current of IZK=0.5mA. You can complete and run the following MATLAB script “Sedra03p60.m” to find the answers.
(a) Determine the value of Rs so that it can operate with vO=VZ where vS=10V and RL=1.5kΩ.
(b) Find the values of the regulator output voltage vO when the supply is 10% high and 10% low.
(c) Find vO when the supply is 10% high, i.e., vs=9V and the load is removed.
(d) Find the smallest possible load resistance RL,min such that the Zener diode can operate at a current no lower than IZK= 0.5mA while the supply is 10% low, i.e., vs=9V. Also find the load voltage vO in this case.
%Sedra03p60.m
VZ=7.5; IZ=10e-3; rz=30; IZK=???e-3; %VZ0=VZ-rz*IZ RL=???e3; vs=10; dvs=0.1*vs;
disp('(a)')
Rs=(vs-VZ)/(IZ+VZ/??) disp('(b)')
vs=10*[0.9 1 1.1];
[vo,iZ]=Zener_regulator(VZ,IZ,rz,IZK,RL,Rs,vs); vo, iZ disp('(c)')
vs=??; RL=inf;
[vo,iZ]=Zener_regulator(VZ,IZ,rz,IZK,RL,Rs,vs); vo disp('(d)')
vs=?; %RL=inf;
[vo,iZ,dvodvs,dvodRL,dvodIL,Rsmax,RLmin,VZ0] = Zener_regulator(VZ,IZ,rz,IZK,RL,Rs,vs); RLmin [vo,iZ] = Zener_regulator(VZ,IZ,rz,IZK,RL???,Rs,vs);
vo_with_RLmin=vo
(a) A Zener diode regulator circuit (b) Its equivalent Figure 3.21 A Zener diode regulator circuit
vS S 10 1[V]
v = ±
rz VZO
iZ
RL +
vO -
RL
iZ
iL
Rs
Rs vZ
vZ
+ vO=vZ
- VZ =7.5V
at IZ =10mA
Figure P3.78 Peak rectifier D iD
R + vD -
C + vO
- iR
iC
vS
P3.78(10) Consider a half-wave peak rectifier fed by a triangular voltage source vS with 24V peak-to- peak amplitude, zero average, and 1kHz frequency where the diode D is assumed to have a 0.7V drop when conducting. Complete the following MATLAB script “Sedra03p78_rectifier_RC.m”
to find the peak-to-peak ripple voltage Vr (Eq. (3.28)), average DC output voltage Vo, the time interval during which the diode conducts, and the average diode current during conduction. Fill in the table below with the MATLAB analysis/simulation results.
100μF 100Ω
Table P3.78
Solution MATLAB (analytical) MATLAB (numerical simulation)
Vr 1.13V 1.075V
Vo,avg 10.74V 10.65V
Ton(Δt) 23.5μs 22.4μs
ID_on,avg 4.913A 3.974A
function y=tri_wave(t) global P D
tmp= min(abs(mod(t,P)),abs(mod(-t,P)));
y=(tmp<=D).*(1-tmp/D);
%Sedra03p78_rectifier_RC.m clear, clf
global P D
P=1/1000; D=P/2; % Period/Duration of the triangular voltage source VD=0.7; % Turn-on voltage of the diode
R=100; C=100e-6;
Vm=??; f=1/P; w=2*pi*f; % Amplitude/Frequency of the input voltage tf=2*P; dt=tf/5000; t=0:dt:tf; % Time range
Vp=Vm-VD; voL=Vp*exp(-P/R/?), vo_avg=(Vp+voL)/2, Vr=Vp-voL, T_ON=P/4*??/Vm, iC_avg=C*Vr/T_??, iD_avg=iC_avg+vo_avg/R
% Input voltage
vs = 2*Vm*tri_wave(t-D/2)-Vm; % Input voltage waveform
% Rectification
[vo,vD,iD,iR,vo_ana]=rectifier_RC([vs; t],R,C,VD);
plot(t,vs,'g', t,vo,'r',t([1 end]),[0 0],'k') legend('v_s (t)','v_o (t)')
nf=length(t); n0=floor((tf-P)/dt); nn=n0:nf;
nn_on = nn(find(vD(nn)>=VD)); % Time indices for ON time Vp_sim=max(vo)
T_ON_sim=length(nn_on)*dt vo_avg_sim=mean(vo(nn)) iD_avg_sim=mean(iD(nn_on))
iC_avg_sim=mean(iD(nn_on)-iR(nn_on)) iD_max_sim=max(iD(nn))
Vr_sim=max(vo(nn))-min(vo(nn)) % Peak-to-peak ripple voltage
F3.29(10): PSpice simulations of Precision Half-Wave Rectifier in Fig. 3.29(7th ed.)/3.27(6th ed.)
(a)(5) To perform the PSpice simulation of the “superdiode” precision half-wave rectifier (Fig. 3.29) with the Analysis type of ‘Time Domain (Transient)’, take the following steps:
1. Run OrCAD Capture Cadence CIS, click on the menu File>Open>Project, and select (load) the OrCAD project file “halfwave_rectifier_1opamp_student.opj” so that you can see the Capture CIS window including the Schematic window as shown in Fig. 3.29.1 below.
2. Click the New Simulation Profile button on the toolbar to open the New Simulation dialog box as shown in Fig. 3.29.2 below.
Figure 3.29.1
Figure 3.29.2
3. Fill the Name field with ‘tran’ (without the single quotation marks) and click on the Create button to open the Simulation Settings dialog box as shown in Fig. 3.29.3 below.
Figure 3.29.3
4. Fill in the dialog box as shown above and click the OK (확인) button to close it.
5. Click the Voltage Marker button on the toolbar and drag it to the points of vi and vo as shown in the above PSpice schematic (Fig. 3.29.1).
6. Click the Run button to start the PSpice simulation and capture the voltage waveforms that have appeared in the Probe (PSpice A/D) window.
Figure 3.29.4
(b)(5) To perform the PSpice simulation of the “superdiode” precision half-wave rectifier (Fig. 3.29) with the Analysis type of ‘DC Sweep’, take the following steps:
7. In the PSpice schematic, replace the VSIN part by a VDC part named ‘vi’.
8. Click the New Simulation Profile button on the toolbar to open the New Simulation dialog box, fill the Name field with ‘DC Sweep’, and click on the Create button to open the Simulation Settings dialog box (Fig. 3.29.5).
9. Fill in the dialog box as shown above and click the OK (확인) button to close it.
10. Click the Voltage Marker button on the toolbar and drag it to the point of vo.
11. Click the Run button to start the PSpice simulation and capture the voltage waveforms that have appeared in the Probe (PSpice A/D) window.
Figure 3.29.5
Figure 3.29.6
F3.33(15): Plot of Fig. 3.33(p219, 7th ed.)/3.31(p199, 6th ed.) using MATLAB
Referring to Fig. 3.33, the following MATLAB script “do_clippers_Sedra.m”, and Fig. 3.33.1 (except (h)) obtained by running the script, answer the following questions where the lines 4~6 in the script define the v-i relationships of a (normal) diode and Zener diode as
(3.1) D/ D
(
D)
s( v VT 1)i v = I e − (F3.33.1)
ZK D s D
Fig. 3.19
Dz D Z0 ZK D ZK D
z
Z0 D D ZK
ln( / 1) for 0
( / ) for 0
for
( )
i I i
V
v i V I i I i
V r i i I
+ ≥
= − ≤ <
− <−
, (F3.33.2)
%do_clippers_Sedra.m
%Copyleft: Won Y. Yang, [email protected], for academic use only clear, clf
Is=10e-15; VT=(273+27)/11605; % Saturation current, Thermal voltage iDvD = @(vD)Is*(exp(vD/VT)-1);
VZ0=6.8; rz=20; IZK=2e-4;
vDziD = @(iD,VZ0,rz,IZK)VT*log(iD/Is+1).*(iD>=0) +...
(VZ0/IZK)*iD.*(-IZK<=iD&iD<0) -(iD<-IZK).*(VZ0-rz*iD);
% Plot the v-i characteristic curve of a (normal) diode subplot(331)
v=[-5:0.01:0.9];
plot([-5 1],[0 0],'k', [0 0],[-0.01 0.1],'k', v,iDvD(v)) axis([-5 1 -0.01 0.1])
% Plot the v-i characteristic curve of a Zener diode subplot(332)
i=[-1e-2:1e-5:1e-2];
plot([-8 2],[0 0],'k', [0 0],[-0.01 0.01],'k', vDziD(i,VZ0,rz,IZK),i) options = optimset('TolFun',1e-10, 'Display','off');
R = 1e3; vI = [-5:0.02:5]; % Range of the input signal
vO = zeros(size(vI)); % Initialize the output voltage values to zero for n=1:length(vI)
eq = @(vO)(vI(n)-vO)/?-iDvD(vO);
if n<2, vO0 = 0; else vO0 = vO(n-1); end
vO(n) = Newtons(eq,vO0); %vO(n) = fsolve(eq,vO0,options);
end
subplot(334)
plot(vI,vO,'r:', vI([1 end]),[0 0],'k', [0 0],[-5 5],'k') R = 1e3; vI = [-5:0.02:5]; % Range of the input signal
vO = zeros(size(vI)); % Initialize the output voltage values to zero for n=1:length(vI)
eq = @(vO)(vI(n)-v?)/R+iDvD(-vO);
if n<2, vO0 = 0; else vO0 = vO(n-1); end
vO(n) = Newtons(eq,vO0); %vO(n) = fsolve(eq,vO0,options);
end
subplot(335)
plot(vI,vO,'r:', vI([1 end]),[0 0],'k', [0 0],[-5 5],'k') R = 250; vI = [-5:0.02:5]; % Range of the input signal
vO = zeros(size(vI)); % Initialize the output voltage values to zero for n=1:length(vI)
eq = @(vO)(vI(n)-vO)/R-iDvD(vO)+iDvD(?vO);
if n<2, vO0 = 0; else vO0 = vO(n-1); end %vO(n) = fsolve(eq,vO0,options);
vO(n) = Newtons(eq,vO0);
end
subplot(336)
plot(vI,vO,'r:', vI([1 end]),[0 0],'k', [0 0],[-1 1],'k') axis([vI([1 end]) -1 1])
R=1e3; V1=4; vI=[-7:0.02:7]; % Range of the input signal
vO = zeros(size(vI)); % Initialize the output voltage values to zero for n=1:length(vI)
eq = @(vO)(vI(n)-vO)/R-iDvD(vO-V?);
if n<2, vO0 = 0; else vO0 = vO(n-1); end
vO(n) = Newtons(eq,vO0); %vO(n) = fsolve(eq,vO0,options);
end
subplot(337)
plot(vI,vO,'r:', vI([1 end]),[0 0],'k', [0 0],[-5 5],'k') axis([vI([1 end]) -6 6])
VZ0=6.8; rz=20; IZK=2e-4; R=100;
vI = [-10:0.05:10]; % Range of the input signal
vO = zeros(size(vI)); % Initialize the output voltage values to zero for n=1:length(vI)
eq=@(i,VZ0,rz,IZK)vDziD(i,VZ0,rz,IZK)-vDziD(?i,VZ0,rz,IZK)+R*i -vI(n);
if n<2, i0 = -1; else i0 = i(n-1); end %i(n) = fsolve(eq,i0,options,VZ0,rz,IZK);
i(n) = Newtons(eq,i0,1e-6,100,VZ0,rz,IZK);
vO(n) = vI(n) - R*i(n);
end
subplot(338), hold on
plot(vI,vO,'r:', vI([1 end]),[0 0],'k', [0 0],[-10 10],'k') plot(vI,-(VZ0+0.7)*(vI<-VZ0-0.7)+vI.*(-VZ0-0.7<=vI&vI<=VZ0+0.7)
+(VZ0+0.7)*(vI>VZ0+0.7))
Figure 3.33.1
(a)(2) What are the graphs shown in Figs. 3.33.1(1) and (2)?
(b)(4) Having identified which limiter in Fig. 3.33 the v-i curves (3)~(7) in Fig. 3.33.1 corresponds to, write the equations that have been solved to analyze each limiter.
I O
D( O) 0 v v
R i v
− − = (F3.33.3a)
O
D( ) 0
v
R− +i = (F3.33.3b)
I
D( O) D( ) 0
v
R i v i
− − + = (F3.33.3c)
I
D( 1) 0
v V
R i
− − − = (F3.33.3d)
Dz( ) Dz( ) I
v i −v + =v (F3.33.3e)
Figure 3.33.2
(c)(5+4) For the limiter using two diodes shown in Fig. 3.33.2, write the node equation in the unknown node voltages v1, v2, and v3. Then complete and run the following MATLAB script
“diode2_limiter.m” to plot the v-i curve of the limiter as depicted in Fig. 3.33.1(8).
I 1
D 2 1 D 1 3
1
2
D 2 1
2 3
D 1 3
3
( 5 ) ( 5 ) 0
( 5 ) 0
( 5 ) 0
v v
i v v i v v
R
i v v v R i v v v
R
− + − − − − − =
− − + =
− − − =
(F3.33.4)
Referring the limiter circuit (shown in Fig. 3.33.2) and the 2nd & 3rd lines to the last in the script
“diode2_limiter.m”, write the analytical v-i relationship of the limiter.
I I I
1
I I
I I I
1
( 5.7) if V
if 5.7V 5.7V
( ) if 5.7V
R
R
v v v
v v
v v v
− + <
+
− < <
− >
+
(F3.33.5)
%diode2_limiter.m
vI=[-10:0.05:10]; % Range of the input signal
vO=zeros(length(vI),3); % Initialize the output voltage values to zero R1=1e4; R2=5e3; R3=500;
vDziD = @(iD,VZ0,rz,IZK)VT*log(iD/Is+1).*(iD>=0) +...
(VZ0/IZK)*iD.*(-IZK<=iD&iD<0) -(iD<-IZK).*(VZ0-rz*iD);
for n=1:length(vI)
eq = @(v)[(vI(n)-v(1))/R1+iDvD(v(2)-5-v(1))-iDvD(v(1)-5-v(3));
iD??(v(2)-5-v(1))+v(?)/R?;
??vD(v(1)-5-v(3))-v(?)/R?];
if n<2, vO0=[-5 1 -1]; else vO0=vO(n-1,:); end
vO(n,:)=Newtons(eq,vO0); %vO(n,:)=fsolve(eq,vO0,options);
end
subplot(339), hold on
plot(vI,vI+((-R1/(R1+R2)*(vI+5.7)).*(vI<-5.7)+
(-R1/(R1+R3)*(vI-5.7)).*(vI>5.7)))
plot(vI,vO(:,1),'r:', vI([1 end]),[0 0],'k', [0 0],[-7 7],'k')