The circuit in Figure P4-62 has V_{CC} = 15 V and V_N = −2 V. Sketch the output voltage v_O on the range 0 # t # 2 s for v_S(t) = 10 sin(2πt) V.
The circuit is connected as a comparator. When the input signal is above -2 V, it will produce its maximum output voltage. When the input signal is below -2 V, it will produce its minimum output voltage. The following MATLAB code simulates the response.
clear all
t = 0:0.001:2;
vs = 10*sin(2*pi*t);
vo = zeros(size(vs));
v_max = 15;
v_min = 0;
v_compare = -2;
% Compare the signal to the threshold
vo_max = vs>v_compare;
vo_min = vs<=v_compare;
% Construct the output signal
vo = v_max*vo_max+v_min*vo_min;
% Plot the results
plot(t,vs,'b','LineWidth',3)
hold on
grid on
plot(t,vo,'g','LineWidth',3)
xlabel('Time (s)')
ylabel('v_O(t), (V)')
axis([0 2 -15 20])
The following OrCAD simulation verifies the MATLAB results.
Answer:
Presented above.