Solving OPAMP Circuit Analysis Problem

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
12 replies · 3K views
etf
Messages
179
Reaction score
2
Hi!
Here is my task:

OPAMP circuit and output voltag are shown in image below. Assuming that OPAMP is ideal, come up with a solution by hand.

postavka.jpg


Then change capacitor's value from 200nF to 33nF and output voltage will be:

postavka2.jpg


Explain why output voltages are different ( first has triangle shape and gradually decreases and second has cut off bottom and doesn't decrease).

Here is what I have done:
Since there are two sources, one DC and one time dependent pulse waveform, I used superposition method. When time dependent source is active, our circuit is:
sema1.jpg

[tex]v2(t)=0\rightarrow v1(t)=0[/tex]

[tex]i2(t)=0\rightarrow iin(t)=ic(t)[/tex]

[tex]iin(t)=\frac{vin(t)}{R1}[/tex]

[tex]v3(t)+\frac{1}{C}\int ic(t)dt+R1iin(t)-vin(t)=0[/tex]

For positive input voltage [tex]vin(t)=1V[/tex] we have:

[tex]v3(t)=-\frac{1}{RC1}\int vin(t)dt=-50\int 1dt=-50t,\,\, 0\leq t\leq 100*10^{-3}s[/tex]

For negative input voltage [tex]vin(t)=-1V[/tex] we have:
[tex]v3(t)=-\frac{1}{RC1}\int vin(t)dt=-50\int (-1)dt=50t,\,\,100*10^{-3}s\leq t\leq 200*10^{-3}s[/tex]
But I don't know what to do next :(
 
on Phys.org
The output should comprise a triangle wave produced by integrating the squarewave, plus a slow ramp produced by integrating a small fixed current. Does your mathematical derivation exhibit these two features?

The waveform from your simulation is what I'd expect to see.
 
Here is how I have done it:
I found Fourier series of [tex]vin(t)[/tex], [tex]vin(t)=\sum_{n=1}^{\infty}\frac{2(1-(-1)^{n})}{n\pi }\sin{(nw0t)}[/tex]. Then I used superposition method to find [tex]viz(t)[/tex]. When [tex]vin(t)[/tex] is active, our circuit is (I didn't show OPAMP power supply):
sema1.jpg

Using KVL I got:
[tex]viz(t)+\frac{1}{C}\int i(t)+Ri(t)=vin(t)[/tex]

[tex]viz(t)+\frac{1}{C}\int\frac{vin(t)}{R1}dt+Ri(t)=vin(t)[/tex]

[tex]viz(t)+\frac{1}{R1C}\int vin(t)+R1\frac{vin(t)}{R1}=vin(t)[/tex]
[tex]viz(t)=\frac{-1}{R1C}\int (\sum_{1}^{\infty}2\frac{1-(-1)^{n}}{n\pi }\sin{(nw0t)})dt[/tex]
[tex]viz(t)=\frac{-2}{R1C}\sum_{n=1}^{\infty}\frac{1-(-1)^{n}}{n\pi }\int \sin(nw0t)dt=\frac{2}{R1C}\sum_{n=1}^{\infty}\frac{1-(-1)^{n}}{n^{2}\pi w0 }\cos{(nw0t)}[/tex]
 
Here is plot of viz(t)
111.jpg


Now it is necessary to do DC analysis and add viz(t) and Viz and (hopefully) we will get output as in simulator. I didn't do DC analysis yet.
 
Last edited:
With referece to your infinite series... Uh huh. That's all well and good, but what does but tell you? I think you are expected to come up with an analysis and explanation of what you see in the waveforms. Along the lines of what I outlined.

OPAMP circuit and output voltage are shown in image below. Assuming that OPAMP is ideal, come up with a solution by hand.

I don't see much call for Fourier here. Not explicitly, anyway.
 
Last edited:
Well, I thought I must have explicit expression of input voltage for analysis. How would I express output voltage (viz(t)) if I hadn't expression for input voltage?
 
etf said:
Well, I thought I must have explicit expression of input voltage for analysis. How would I express output voltage (viz(t)) if I hadn't expression for input voltage?
I think you should express each input as a function of time, then integrate and sum the result.

What I think you are doing is expressing the input as a Fourier series and integrating that, then using a computer program to convert that back to a function of time and plot it. That is a roundabout process I doubt you would have time to pursue in any exam.

Have you memorised the Fourier series of a triangle wave?
 
Now I'm completely lost. I did analysis in Multisim and I got same shape for output voltage but different peak to peak value of signal. I give up. Here is code in Matlab I used to plot viz(t) I got by hand:
clear
clc
R1=100000;
C=200*10^(-9);
t=linspace(0,1,10000);
w0=2.*pi./0.2;
suma=0;
for n=1:10000
suma = suma + ((1-(-1).^n).*(cos(n.*w0.*t))./(n.*n.*pi.*w0));
end
red=(2./(R1.*C)).*suma;
plot(t,red)
grid
 
Last edited:
In my view, you've shown all the mathematics that's needed back in your first post: the integral of a step. Now, apply that to one cycle and show how the squarewave input becomes a triangular wave at the output, and how the other input leads to a ramp at the output. Then combine them.

It might be instructive if you were to extend the duration of your simulation, so you capture some "interesting output" when non-linear things start to appear.

Before you dive into complicated maths you should look back at what you are specifically asked to explain, in post #1. I interpret it to be they want you to demonstrate a practical understanding of that circuit's behaviour under the two different conditions.
 
  • Like
Likes   Reactions: etf
I think I solved it (without Fourier series :) )
Firstly I analysed circuit for t between 0 and 0.1s (VCC=15V, vin(t)=1V). I got vout(t)=-57.5t. Then I analysed circuit for t between 0.1s and 0.2s (VCC=15V, vin(t)=-1V). I got vout(t)=42.5t. On time interval between 0s and 0.2s our output voltage vout(t) is

graf.jpg


What do you think? I didn't plot it on some wider interval since it's a little bit tricky to connect those lines and plot :)
 
Here is code I used for plot:
>> t1=linspace(0,0.1,100000);
>> t2=linspace(0.1,0.2,100000);
>> vout1=-57.5.*t1;
>> vout2=-5.75+42.5.*(t2-0.1);
>> plot(t1,vout1,t2,vout2)
>> grid
>>
It is necessary to plot decreasing line, then on it's end increasing one etc. :)
 
That looks good, providing it agrees with your actual circuit. You don't need to do anymore computations in order to be able to sketch a dozen or more cycles, because each will drop by 5.75V and then rise by 4.25V --- so you can fill in the rest of the waveform by hand.