Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
inverting opamp simulation: rapid component variation
Hi,
In an inverting amplifier(Uploaded File: ), suppose R2 fluctuates very rapidly (say at 10KHz or even higher, may be due to some environmental condition). How do I simulate this behavior, given input is some fixed dc voltage and opamp is 741 type (I have not attached any specific opamp model so far, use what you have). I am basically interested in perhaps frequency response- I want to see how output varies if rate of variation of R2 keeps increasing. |
--- In LTspice@..., "MOHAMMAD A MAKTOOMI" <amaktoomamu@...> wrote:
Hello, I have uploaded an example with a time-variable resistance. R=1k+5k*(V(ctrl)+1) Files > Temp > ni-opamp_.asc Best regards, Helmut |
Hello Helmut. Thank you for your example. I have no issue in performing transient. Question is how do I simulate this behavior in terms of frequency response.
toggle quoted message
Show quoted text
I want to see how output varies if the rate of variation of R2 keeps on increasing. So, I wish to get a plot Vout vs frequency, where frequency shows the rate of fluctuation of R2. Higher the frequency on horizontal scale, more rapid the variation in the value of R2. Any help/suggestions would be greatly appreciated. (This is a part of a paper that I aim at submitting in conference). PS: I have posted similar question in edaboard to get help in manual analysis of this problem.( more details: ) --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
|
Hi Maktoomi
Helmut example is absolutely right. This is because a quick analysis of the circuit you have given shows the following:- Vo/Vin = R2(f)/R1 . It follows that Vo= [R2(f)/Rin]*Vin = Iin*R2(f) Now Vo = Iin*R2(f) shows the variation of the output with increasing frequency for a simulation time of 100mS. It does not take a lot of imagination to deduce that if your inverting amplifier can be represented by a single exponential lag, Vo will follow the response shown by Helmut's example and then its envelope will roll off at 20dB per decade at high frequencies at the half power point. You can sketch this manually when you know the frequency response of the inverting amplifier you want to use from the data sheet. (refer to Bode). Once you define your R2 the rest is easy. Best regards, Michael P Kiwanuka To: LTspice@... From: amaktoomamu@... Date: Sat, 13 Apr 2013 16:46:27 +0000 Subject: [LTspice] Re: inverting opamp simulation: rapid component variation Hello Helmut. Thank you for your example. I have no issue in performing transient. Question is how do I simulate this behavior in terms of frequency response. I want to see how output varies if the rate of variation of R2 keeps on increasing. So, I wish to get a plot Vout vs frequency, where frequency shows the rate of fluctuation of R2. Higher the frequency on horizontal scale, more rapid the variation in the value of R2. Any help/suggestions would be greatly appreciated. (This is a part of a paper that I aim at submitting in conference). PS: I have posted similar question in edaboard to get help in manual analysis of this problem.( more details: ) --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
[Non-text portions of this message have been removed] |
Hello Helmut. Thank you for your example. I have no issue in performing transient.The quickest way to get a frequency response is to use an .AC analysis, rather than .TRANsient. Then you can sweep and plot output amplitude versus frequency. The thing to always remember about .AC analysis, is that it is a "small-signal" analysis, and the entire circuit is first linearized at the operating point. If there is anything nonlinear in your circuit, its effects would be ignored. For the op-amp circuit, if you want to see the response from resistor R2 to the output, that should work. But if you want to do something like look at the frequency response between the source VDC and the output, while R2 varies sinusoidally, that would not work because R2 modulates the response, i.e., its effect on VDC (and vice-versa) would be nonlinear. The other possible problem with .AC analysis is getting a modulated resistance that works in AC analysis too. Sometimes you just need to use a transient analysis. Then you can use the .STEP command to vary the frequency in steps. Andy |
Dear Michael, Thanks.
toggle quoted message
Show quoted text
Of course example but Helmut make sense (a modified version is here: ) in time domain. But, I don't want to be in time-domain. All I wish is a frequency domain plot. Also, expressing R2 as R2(f) is perhaps not suitable in my case. one doesn't write for example, a sinusoid voltage as V(f) because sinusoid is a single frequency signal. so consider R2 as a single frequency 'signal'. Just as you plot Bode to know how the output voltage changes as the frequency of input voltage changes, I wish to know how the output will changes if the frequency of variation of R2 changes. I have gone through many books on circuit analysis; they all talk in terms of input/ouput as a voltage or current signal. --- In LTspice@..., Michael Peter Kiwanuka <michael883575@...> wrote:
|
Janiel Feng
Hi,
toggle quoted message
Show quoted text
I imported models from Pspice to LTspice from TI and Analog Devices. But most of them have Convergence Problem. Is there anybody know how to solve this problem? Thanks. Janiel --- On Sat, 4/13/13, Andy <Andrew.Ingraham@...> wrote:
From: Andy <Andrew.Ingraham@...> Subject: Re: [LTspice] Re: inverting opamp simulation: rapid component variation To: LTspice@... Date: Saturday, April 13, 2013, 8:13 PM ? > Hello Helmut. Thank you for your example. I have no issue in performing transient. Question is how do I simulate this behavior in terms of frequency response. The quickest way to get a frequency response is to use an .AC analysis, rather than .TRANsient. Then you can sweep and plot output amplitude versus frequency. The thing to always remember about .AC analysis, is that it is a "small-signal" analysis, and the entire circuit is first linearized at the operating point. If there is anything nonlinear in your circuit, its effects would be ignored. For the op-amp circuit, if you want to see the response from resistor R2 to the output, that should work. But if you want to do something like look at the frequency response between the source VDC and the output, while R2 varies sinusoidally, that would not work because R2 modulates the response, i.e., its effect on VDC (and vice-versa) would be nonlinear. The other possible problem with .AC analysis is getting a modulated resistance that works in AC analysis too. Sometimes you just need to use a transient analysis. Then you can use the .STEP command to vary the frequency in steps. Andy [Non-text portions of this message have been removed] |
Janiel Feng <m_zhao12@...> wrote:
I imported models from Pspice to LTspice from TI and Analog Devices. But mostYou should have created a new message topic with its own Subject, rather than hijacking someone else's question. Response forthcoming with a new Subject line. Andy |
MOHAMMAD A MAKTOOMI <amaktoomamu@...> wrote:
...Note: In your circuit, you may need to decrease the maximum timestep down to about 10ns. (.tran 0 0.1m 0 10n) The output waveform is highly distorted at the highest frequency and LTspice was missing the narrow peak before doing that, making the amplitude look a lot less. It probably also means the result is unrealistic at that frequency, but that's another matter. Andy |
Thank you, Andy for your hints.
toggle quoted message
Show quoted text
But, in '.AC' we need to have an AC voltage or current source. Here, I don't have any such thing (as I wish to vary the frequency of R2, NOT that of any source), so how do I proceed? --- In LTspice@..., Andy <Andrew.Ingraham@...> wrote:
|
John Woodgate
In message <kkdb2u+pa7l@...>, dated Sun, 14 Apr 2013, MOHAMMAD A MAKTOOMI <amaktoomamu@...> writes:
Here, I don't have any such thing (as I wish to vary the frequency of R2, NOT that of any source), so how do I proceed?Varying the value of R2, with no other input signal, doesn't produce any output, unless it's from DC offset voltage or current, or noise. You can add offset and/or noise voltage and current generators at the input and run, but only by using .TRAN. Time does not exist in an .AC or AC sweep analysis. -- OOO - Own Opinions Only. See www.jmwa.demon.co.uk They took me to a specialist burns unit - and made me learn 'To a haggis'. John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
Hello John,
toggle quoted message
Show quoted text
Actually, a DC input voltage is present. But, I don't know if it will be ground in AC analysis.If that's grounded then how could I have output (ignore offsets at this moment). --- In LTspice@..., John Woodgate <jmw@...> wrote:
|
John Woodgate
In message <kkdlr2+p199@...>, dated Sun, 14 Apr 2013, MOHAMMAD A MAKTOOMI <amaktoomamu@...> writes:
Actually, a DC input voltage is present. But, I don't know if it will be ground in AC analysis.It will be ignored, which is equivalent. If that's grounded then how could I have output (ignore offsets at this moment).I don't see a solution if R2 varies at frequencies as high as the op-amp will handle. If R2 varies more slowly (*), you could put in a sine wave signal at a higher frequency to act purely as a 'carrier' which is amplitude modulated by the variation of R2. Your output would then be the peak-detected and filtered carrier. (*) However rapidly R2 might vary in reality, you can always slow it down for simulation, e.g. using a frequency range of 0.1 Hz to 1000 Hz with a 10 kHz carrier. Obvious, you need to simulate for several tens of seconds in such a case. -- OOO - Own Opinions Only. See www.jmwa.demon.co.uk They took me to a specialist burns unit - and made me learn 'To a haggis'. John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
Hello,
toggle quoted message
Show quoted text
You can only use .STEP to change the values of components in the .AC simulation. Best regards, Helmut --- In LTspice@..., "MOHAMMAD A MAKTOOMI" <amaktoomamu@...> wrote:
|
Helmut, is it possible to represent the information available from transient analysis of () in frequency domain? I mean, just as one can perform a transient of an RC circuit to see its charging-discharging profile and and AC analysis to see a first order low pass behavior, can the problem in thread have these two views?
toggle quoted message
Show quoted text
Andy, how could you guess so quickly that waveform was missing some peaks and the step-size be reduced in the setup ()? I ask this because this will help me start thinking the way an experienced user thinks. --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
|
MOHAMMAD A MAKTOOMI <amaktoomamu@...> wrote:
Thank you, Andy for your hints.Yes indeed, and I think that is why you must do this as a .TRAN analysis. .AC analysis just doesn't work for your case. Then .STEP the frequency. With your 741 op-amp model, you do have an interesting situation because of the severe distortion at higher frequencies (which by the way only a .TRAN analysis would show, if there was a way to do this as a .AC analysis). Given that, you need to consider what parameter of output amplitude you measure: peak-to-peak vs. RMS vs. fundamental amplitude? Andy |
MOHAMMAD A MAKTOOMI <amaktoomamu@...> wrote:
Andy, how could you guess so quickly that waveform was missing some< ()? I ask this because this will help me start thinking the way an experiencedWhen I looked at the waveforms, I noticed that the positive peaks of the 1 MHz output were irregular, even when zoomed in. It looked to me as if it suffered from aliasing, being sampled but not with a high enough sampling rate. That led me to check for the plotwinsize=0 option, and then to add the max timestep parameter. Andy |
You would expect one peak to be quite a different from the other, because it is basically nonlinear. Consider a step input going from low resistance to high; the loop gain will be high and the bandwidth low. Step change in the opposite direction is to a higher bandwidth regime with low feedback resistance and low loop gain. So, rise and fall times could be quite different (so long as neither test exceeds the op-amp slew rate).
toggle quoted message
Show quoted text
Thus, when driven with a sine, depending on the dR/dt, the waveform COULD be quite different at the positive and negative peaks. Jim Wagner Oregon Research Electronics On Apr 14, 2013, at 7:33 PM, Andy wrote:
MOHAMMAD A MAKTOOMI <amaktoomamu@...> wrote:Andy, how could you guess so quickly that waveform was missing some< ()? |
Jim Wagner <wagnejam99@...> wrote:
You would expect one peak to be quite a different from the other, because it isIndeed they were; VERY different. But that was not what stood out. I expected all of the positive peaks (at a given frequency, and perhaps after the first couple of cycles) to look about the same as each other and to reach the same value as one another. Instead, what I saw was that the positive peaks never "leveled off" to the same value. Some were only 0.38V while others reached 0.55V. Zooming in showed that some peaks were very narrow and others were broader, and had a distinctly "sampled" appearance. Turning on "Mark Data Points" (right-click on the waveform plot window) showed that it had something to do with how closely spaced the data points were: not enough to reveal the true detail of the peaks. The negative peaks, by contrast, were smooth and round. But I wasn't looking at those. If this doesn't make sense, run the simulation and see what I mean. I doubt there is much loop gain at all at 1 MHz. Andy |
Hello All,
toggle quoted message
Show quoted text
@ Andy& Jim:Thanks for your input on tmax in .tran analysis. It was really useful and I plan to have a different thread on this soon. Now coming to the issue in thread, I have this feeling that frequency is just a frequency for an opamp, Whether it is that of input source or that of any component variation. This motivates me to put this hypothesis that i can plot the Bode due to rapid variation of R2 by just assuming R2 to be constant at its maximum value and sweeping the frequency of input vi (Vi should be changed to AC source). Here is setup files to show this: In inv_opm_freq_respns.asc I have setup to plot frequency sweep. I select three frequncies: 10KHz, 200KHz, 750KHz. I noticed that at the first two frequencies output is constant and at around 750KHz it rolls down by 3dB. Now in setup inv_opm_tran.asc, I do a transient analysis. I stepped R2 with above three frequencies and found that as suspected, output have same amplitude at 10KHz and 200KHz,and lower at 750KHz. As always, I especially seek views of people like Helmut, Andy, Jim, John , analogspiceman,chris to see if there is any fallacy in my understanding. Conference date has been extended to I have ample time to go deep down the problem. Thanks. --- In LTspice@..., Jim Wagner <wagnejam99@...> wrote:
|
to navigate to use esc to dismiss