Now, I like to start a short discussion about some "stumbling blocks" which may appear during circuit simulation.
Here is my example circuit:
* Inverting opamp amplifier circuit with closed-loop gain Acl= -10.;
* Real opamp model LM741/NS with resistive feedback (R2=10k, R1=1k);
* Input voltage (left node of R1): Vdc=0 (no bias) and Vac=1V rms (f=1kHz)..
Erroneously, both opamp input nodes are exchanged (pos. feedback instead of neg. feedback).
Simulation results (output node):
* Operating point: Vdc= -10.43mV (output offset).
* DC analysis (input variation Vdc=-10mV....+10 mV): Vdc=+89.57mV.... - 110.43mV;
* Ac analysis: Vac=10.001 V rms for low frequencies (3dB point app. at 85 kHz).
Evaluation: These results do not show any anomalies - in spite of positive feedback.
Question: Are the results right or wrong?
If they are wrong - who is to blame? The simulator or the user?
Without doing any calculation or simulation of this circuit myself so far, I think the erroneous version should be non-inverting and show Schmitt-Trigger behavior. I would be amazed if the output signal were a monochromatic 1kHz wave. Does your simulation tool provide an "oscilloscope" function? If so, isn't there some distortion in the output signal near 0V? BTW, what is your supply voltage ?
Without knowing the specifics, there is a usability limit to circuit simulation.
I mean, in the simulation, an abstraction of some elements is used. Here, an op-amp is simulated, and in Spice it is replaced by a model of the op-amp that models it correctly under limited circumstances. It needs to be checked, if the model is sufficiently correct under the circumstances it is used.
It needs to be said, that most op-amps are used in linear operation, that means with the input in the common modo voltage range, and the difference of the voltage on the 2 inputs 'small'. If you go outside this set of circumstances, strange effects in the opamp can happen, and they are not necessarily modelled. It is of course possible to feed the accurate circuit diagram of the opamp in the simulation, and then the simulation result will be more accurate, but take more time to simulate.
If this results in error, the 'blame' is always on the user. Its up to the user to check the validity of the model used, and limit his use to this. (of course, simulation errors due to bugs in the models or the tools can be blamed on the tools.)
Note that the limited usability of analog models is very widespread. If you engage in analog circuit design, you need to know the models provided by any fab only have limited accuracy under circumstances of normal use of the analog elements, ie in circuits that follow normal biasing etc. For bipolar transistors, eg, it is common that the reverse parameters are not provided for transistors that are not intended to be used in saturation. If you do use these transistors in saturation, the simulation results are wrong.
Best Regards,
Henri.
Historical MCII program did not investigate the position of the poles of the transfer function. In the filter Sallen - Key then showed transmission also for amplification of more than 3 - when real circuit reliably oscillates.
Gentlemen, thank you for the answers. However, I kindly ask you to concentrate to the two main questions only.
I have described (a) the circuit to be simulated (any supply voltages) and (b) the obtained results. And the results are - let me say - somewhat "surprising" (I hesitate to say "wrong").
I did not ask what we can expect from the circuit - I only want an interpretation of the results.
(1) Are the results as expected ?
(2) If not - is there any error? In this case, who is "wrong" (the simulator or the user with his expectations?).
Lutz,
this reads contradictory (no offence meant):
"I did not ask what we can expect from the circuit ... Are the results as expected?"
I'm not sure if I understood your intention - after all you already wrote that you made an error (by exchanging the inputs). So, I assume we should take this error into account and expect a hysteresis. With about 1V rms at the input, 10V rms at the output, and R1/R2 = 1/10 we are at the brink between a rectangular output signal and no AC signal at all. Since there is an AC signal it should be "rectangular". But you didn't write anything about harmonics. (Since the 741 is quite slow the "rectangles" might look rather "rounded".)
Second, I guess we all would - after recognizing our error - have a look at the phase relation between input and output; but you did not provide this information.
Provided you gave us all the information you have, if I were in your place, I would return to the simulation in order to gather further facts before I would try to reach any conclusion about the cause of unexpected results.
Joerg - OK, I agree that my wording sounds a bit "contradictory". For a moment, let`s forget the ac anaylsis. In spite of positive DC feedback, the simulator has found a fixed DC operating point within the linear range of the device. More than that. variation of a DC input voltage leads to a corresponding (amplified) variation of the output voltage.
Computing error? Yes or no?
Lutz,
Computing Error !
You showed me a good lesson, thank you.
Intuitive investigation trumps a simple simulation by Spice.
Glen and Joerg - here is my interpretation of the results (open for discussion):
1.) Without knowing about the effects of feedback, we could find a stable DC operating point using paper and pencil. All the classical tools (KVL, KCL) will give the same result as the simulation program. However, during such a calculation we (and the program) have forgotten (a) the power supply switch-on effect (we have simply assumed that it does exist) and (b) that in reality, there are always small disturbance effects (noise, etc.) which does not allow such a theoretical equilibrium (similar to one ball riding upon a second ball).
2.) Something similar applies to the small-signal ac analysis: Provided that a fixed and finite DC operating point was found - which is the case, because of 1.) - the program linearizes the transfer function around this point and uses the slope of the tangent for gain calculations. This is the case, because the ac analysis also assumes an existing and stable power supply. Hence, the magnitude response looks as if everything would be OK.
(Joerg, you have mentioned the phase response: Yes, indeed, the phase response has an "abnormal" behaviour with a positive slope.).
3.) My interpretation: The simulator has made no error. The program has correctly applied all the relevant equations - but we could not tell the program that during real life situations we will switch-on the voltage at t=0 and that - under these realistic conditions (plus noise and other disturbances) - such a circuit with positive feedback never will find a stable bias point.
As a consequence, it is the user who is wrong - if he does not take into consideration the idealized conditions (and the corresponding validity limitations) .
4.) Hence, we need a simulation in the time domain (TRAN analysis with a realistic switch-on effect) to reveal the instability of the circuit. However, this is true for a real opamp model only. For an idealized opamp model (VCVS without power supply) even my TRAN analyses have shown no anomalies. So - we must be very careful by evaluating ac analyses (or TRAN analyses with a VCVS) only.
I have made these observations during loop gain analyses of a working harmonic oscillator circuit. The circuit does oscillate (TRAN analysis) with good THD values - however, an ac alaysis of the loop gain did NOT meet Barkhausen`s criterion.
Lutz,
When I took my particular circuit and did a TRAN analysis,
I got the following examples of Spice results.
The TRAN plots obviously do not support the AC analysis.
I should have been more surprised by the initial AC plot,
and the TRAN plots confounded the issue.
So, I am inclined to say the Spice implementation
is doing what it is programmed to do, run the given numbers.
In retrospect I should have disallowed the initial AC results.
The error is two fold:
(1) the simulator is following its program calculations,
using the data given, and not seeking reality.
Spice is not up to the job of calculating Reality,
given incomplete data.
(2) the investigator should have realized that
the DC feedback would drive the V(out) towards a limit.
(3) your note on initial oscillation should be expected,
and the damping by the tuned circuit should affect the oscillating.
A wise researcher will "put on the robes of the electron"
and intuitively walk through the circuit ( Barrie's proverb ).
just an apprentice, sometimes stumbling over reality.
Glen
When they do not take into consideration the natural conditions such as heat, they do not give real results.
Glen - I cannot confirm your results (decaying sinus in the time domain).
In my simulation (real opamp model and power switch-on at t=0) the output goes into saturation immediately. (as expected).
Lutz,
Thank you for checking.
So,
Some Simulators fail one way, sometimes,
and
Other Simulators fail another way, sometimes,
and
Always, Reality is the Winner !
It is up to the developer to Intuitively check the Sim Results.
This method Reminds me of using a Slide-Rule ( many years back ) :
First, We would estimate our results, write it down,
Secondly, we would compare our estimate with the Slide-Rule results
to see if we had read our scales correctly and were inside of reality.
Glen, I agree with you that - in any case - we should always make a realistic estimate for the expected result.
However - according to my experience - this is NOT because the simulator may fail, but primarily because the user has made an error while defining the circuit (remember my example with exchanged input terminals) or due to misinterpreting the results (not knowing the simulators assumptions).
I must admit that - within 20 years experience in circuit simulation - I do not remember one single case where the simulator was responsible for an observed anomaly. It was always the user.
Therefore, are you really sure that your simulator has failed during simulation in the time domain? I cannot imagine. Which circuit? Did you use a realistic opamp model? What was the input signal?
Lutz,
"which circuit?" ... the one in the diagram.
The simulator produced a normal Time Domain Bode plot
as if the circuit was an inverting MFB bandpass filter,
given a standard noise signal ,
and NOT having any positive feedback.
The setup is the same that I have used in my project
with 24 OPA filters with many cumulative effects.
The OPA is a most basic OpAmp
and the frequency requirement is easily 1/100 the OPA limit.
Following your lead (from the other thread),
I went back and added the TRAN analysis,
which makes it clear that amplitudes are quickly squelched
towards zero. This follows your comment that the DC feedback would strongly act on the signal stream to squelch the signal stream
or push it towards Vcc or Vee .
My intuition, looking closely at the circuit in the TRAN plot,
is that the positive feedback, being slightly lagging phase ,
will pull the signal stream towards zero. And it does that.
My intuition, looking closely at the circuit in the Bode Time plot,
is that the DC positive feedback ( lagging phase )
should inhibit the filter action.
But the filter action is calculated in this Time Domain
as if the tuned circuits are all that matters.
It is very possible
that I have not asked this question of Spice before
and now I am surprised by the answers.
(1) Spice may be showing the calculations at each Time division
and the positive feedback is not part of that calculation.
(2) Spice shows the Tran plot as the cumulative effect,
including the positive lagging phase feedback.
(3) that would mean that Spice is doing its function OK,
and I am making my interpretation naively
without strict attention to the mathematical function.
The "proof will be in the pudding" when I cook it up
on the protoboards, and measure with the O'scope.
I will return to this on the weekend.
Thank you for your comments.
The old apprentice has something new to learn here.
This follows your comment that the DC feedback would strongly act on the signal stream to squelch the signal stream or push it towards Vcc or Vee .
Hi Glen - your time domain response surprises me. What was the input signal? The resistor Rgain provides 100% DC feedback. Therefore, in practice (and also for realistic simulations), this does not allow any operating point within the linear output range. The output must not return to zero - instead it MUST go into saturation. Perhaps you could try another realistic opamp model?
My intuition, looking closely at the circuit in the TRAN plot, is that the positive feedback, being slightly lagging phase , will pull the signal stream towards zero. And it does that.
DC feedback with a "lagging phase"? Instead, my intuition says: Immediate saturation.
Lutz,
On your earlier comment that the simulator does not cause anomality:
This may be true in analog design, it is for sure not true in digital design. The simulators do have bugs, and they sometimes cause the impossibility to simulate. You hit the bugs when the coding style is advanced. Had this several times, both with Cadence and Synopsys tools.
Best Regards,
Henri.
Hi Henry, thank you for the correction. Yes - my comment was related to analog designs only.
Lutz,
The OpAmp model is for LM741.
The Signal Input is selected as Noise, with time period 0.01mS.
"""DC feedback with a "lagging phase"?
Instead, my intuition says: Immediate saturation."""
As you stated, the Rgain provides DC feedback,
and ALSO AC feedback.
I suspect that the DC positive feedback will cause saturation First !
trying to drive the OPA into uncontrolled saturation.
So, I agree with your intuitive analysis.
I changed my Tran Noise signal to be very simple.
Re-ran both Time and Transient Spice simulations,
with similar results.
I think my understanding of the simulator approach
is increasing, and that is a good thing.
I need to check the manual for ngSpice, as used by PartSim.com
which provides this internet Browser controlled Spice Simulator.
This is very interesting, but must wait until I return.
The circuit does oscillate (TRAN analysis) with good THD values - however, an ac alaysis of the loop gain did NOT meet Barkhausen`s criterion.
I am a bit surprised that my sentence (quoted above) has not yet caused any reaction (in particular from the "oscillator group"). Some of you know perhaps that I am interested - in particular - in all questions related to harmonic oscillators and the associated Barkhausen condition.
I have stated that I have found a circuit which oscillates (sinusoidal) without meeting the required loop gain condition? Did nobody stumble over this statement?
Perhaps something wrong in my simulation or in my interpretation of the results? Do we need another (extended) oscillation condition ?
No - everything OK. Here comes my explanation (in case you are interested):
* The oscillator circuit under investigation was an integrator-loop consisting of a Miller (inverting) integrator and a non-inverting NIC (Deboo) integrator. For a safe start of oscillation (complex pole pair in the RHP) a small inbalance was introduced.
* As a result from this imbalance, the LOOP GAIN has one real pole in the RHP. That means: The loop gain is an unstable function (like the opamp example with pos. DC feedback) - and the simulated loop gain was a theoretical one only. (as explained in former contributions). Hence, it could not confirm the Barkhausen condition. (But - I am still convinced that we must not declare the simulation results as "false" - they are correct under the used idealized conditions).
* The above explanation applies to the MAIN LOOP (between both integrators), which normally is used for this purpose. But - do we have an alternative?
YES - we have!
* Opening the local feedback path to the pos. input of the NIC gives us another possibility for simulation of an alternative (local) loop - and this works and, finally, confirms Barkhausen.
* Admittedly, from this exercise, I have learned a lot.
If we find a wrong operation from a simulator, it simply means that there is some error with the method we adopted. In the early days, I got many undesired outputs from AC sweep analysis with Op-amps (741). But there is no error if I used a controlled source instead of op-amp. The reason is that, I ignored the internal capacitance of op-amp and the bandwidth limitation caused by it. Therefore, for me, it is the user and his approach makes the result of a simulation good or bad. Simulators are programs that processes what they get.
Lutz,
Here I refer to Eric's Question about Classifying Oscillators.
Your question probably belonged in "this" thread.
Well, I ran Spice again, varying the V(positiveFB) slightly.
Attached are the results , PFB-rg-3N_.pdf.
These new Tran plots show
(1) Bode: a notch at 700 Hz
(2) TRAN: a tendency to gradually increase oscillation
which can be seen in the three time duration plots of 2ms, 4ms, 8ms.
The three JPG are what I would call a normal set
... the BandPass circuit that I expected.
I could begin to list some limitations
of the PositiveFeedBack BandPass circuit.
I do appreciate your comments.
Yes sometimes it fails when it does not take into consideration the process operating conditions.
.
Fellow Followers:
.
First, Glen, to your comments. The transient analysis shows
chaos (in the mathematical sense). This may be real (some
circuits are designed to be chaotic) but in simulation studies
it's often due to having set the convergence coefficients with
values that are inappropriate for the particular circuit you are
looking at. Can you provide us with the values you used?
.
Second, I am wondering how you modeled the amplifiers.
For some (completely inexplicable reasons) op amps are
often modeled as ideal gain elements (the function VCVS
having very high gain and no bandwidth limitations). This
could be why you are seeing these transient responses.
.
Actually, the best way is to create your own op amp and
model it as an ideal integrator, VOUT(t ) = VIN (t)/T. Here
T corresponds to the unity-gain frequency that you want
the amplifier to exhibit. Thus, if the unity-gain frequency
should be 10MHz, or 31.4 mega-radians per second, T
would be 31.85 ns. This amplifier can be constructed as
a gm (VCCS) followed by a capacitor of gm/31,84 ns all
followed by a unity-gain buffer (VCVS). This will result
in a "DC gain of infinity", but you can modify this model
by adding an ideal resistor across the capacitor, having
a value of R = A0/gm. And if you need to add a bit more
realism to the model, stick an output resistor on the O/P
of the VCVS follower. Of course, you can add a lot more
realism, but this is a pretty fair start. It's better to regard
an op amp as an integrator unit than as a simple broad-
band gain element.
.
The Lone Arranger
Barrie,
Thank you for your clearly worded comment.
Your point is made, and well taken ;
ie, I think I understand your point, and in fact do agree.
From our history , I recall your recommendation
to use a Transient (Time domain) analysis
in addition to my common use of the Bode plot
( Frequency scan ) analysis.
I have been making increased use of the Time Domain analysis,
and thinking about the inter-relation between
the two methods each time.
To wit, each should support the other,
and taken together they should help explain each other.
It should be noted that the problem with the "PFB-rg" circuit (.pdf)
which is an irregular Positive Feedback design,
was done by taking the MFB tuned circuit
and placing it on the (+) Non-Inverting OPA Input
... really just a shot in the dark
... for the fun of seeing what might happen.
It looks like that Spice is not calculating what I 'thought' I was saying.
I think this is what Lutz is hinting at,
that I was thinking not so clearly
about the problem and the Spice calculations.
In my opinion, what happened is that Spice said ( in the Bode plot )
that the PFB circuit functioned just like a regular MFB BandPass Filter
should function ... surprise !
Then checking the Transient time domain analysis,
it appears to show a gradually increasing oscillation
Lutz has carefully pointed out I should have expected
that the DC bias will push the V(out) to a limit ( Vcc or Vee ).
And, as you cogently point out, there is a method by which
an more appropriate OPA can be skillfully modeled.
Since my project included the requirement of a common ( 741 ) OPA,
I have not explored the use of other models,
( and it is probably beyond my current skills to re-model the OPA ).
I am surely investigating my own thinking about the way Spice
goes about doing its iterative Linear Analysis on the OPA circuit.
To your point,
I did follow your suggested mods in concept,
and understand that your modified OPA would show
neither run-away gain nor run-away frequency response.
...
Your new OPA would more closely model the conceptual function
that I need to present to Spice for calculation.
...
There must be , at least, some historical reason that
the IDEAL and Linear Model is used.
Perhaps for tutorial / teaching reasons
the texts start with an easier model
to guide our understanding at first.
...
I suppose that most of us stay in touch with that level.
And I have met a very few who move on
into the Real World of Non-Linear Realities
and thrive in that environment.
just an old apprentice who feels alone sometimes,
until a strong friendly hand comes along to give some real guidance.
Glen
PS. The values used are listed in the schematic, attached.
This is hi-res, and are easy to ID by their schematic position,
so zoom it up. PFB-rg-v1-S-3-161213-1930 (0).png
This is intended to be a Positive-Feedback BandPass Filter.
This circuit should not oscillate if filtering in the audio range.
Glen - as already mentioned in the other thread:
In your circuit, the inverting bandpass has a gain of app. Amax=2. My simulations show that the whole feedback arrangement oscillates as soon as the additional feedback factor (both opamps in the feedback loop) is k=0.5. In this case, Barkhausens oscillation condition is fulfilled. Any ac analysis cannot show the real behaviour.
By the way: This oscillator topology has many advantages - if compared with many other principles (WIEN,...):
It is possible to tune the oscillation frequency with ONE single element only without disturbing the oscillation condition. More than that, this tuning element is grounded and can be replaced by a FET used as a resistance. Another advantage: A high-quality signal (small THD) is available at the bandpass output due to the filter effect of this stage.
(Of course, for oscillator applications, the unity-gain follower is not necessary).
Lutz,
Thank you for describing the "advantages"
as I had not gotten that far ahead in thinking.
I was still puzzled by the circuit itself,
and re-evaluating my thinking about Spice.
(1) Yes, I agree that the single resistor tuning can be very handy,
and the FET would allow remote/digital control.
(2) For low frequency ( audio ) I expect that the delay
incurred by the OPA feedback stages
might not increase the jitter much
... high quality ( low THD ) audio, yes.
... but, at R.F., this OPA circuit might be intolerable. .
Positive feedback control is never instantaneous.
In RF oscillators, the f(0) is always slightly out of step with the positive feedback, but the delay is in nano-seconds. We see this effect in our
R.F. Spectragrams as we measure bandwidth of oscillators
varying over time.
Lutz,
when you say your simulation ckt oscillates "as soon as "
I would say that it is "always" oscillating,
from a very low level all the way up to some max level of oscillation.
When I varied the Time from 0-2mS up towards 10mS
I observe oscillations all the way ... from nanoV up to many V ,
and then rising exponentially. Just an observation.
Lutz,
From your comments
" the whole feedback arrangement oscillates as soon as the additional feedback factor (both opamps in the feedback loop) is k=0.5"
I checked this against my Schematic values and Tran plots,
and they match closely to your observations.
When my feedback gain is 0.48 ( which is 3000/6250 ),
my Spice simulation gives these plots :
At 1.7 mS the V(out) is -10 mV aprox.
At 4.0 mS the V(out) is 400 mV aprox.
At 6.0 mS the V(out) is aprox. Vcc-Vee aprox. 12 V.
At 8.0 mS the V(out) is 825 V aprox.
When I look at the Inverting BandPass MFB stage,
I see a gain of 1 for a Q=2.
These figures are consistent with my "AFX" project measurements.
I allow for V(out) variations of 10% stage to stage,
adjusting slightly, and a final adjustment on my last stage.
I design for a project standard signal level of 1 V peak
which makes visual O'scope comparative observations much easier.
Refering to PFB-rg-v1-S-3-161215-15334-3N.png,
Can we agree that this circuit will oscillate ?
Can we agree that the Frequency Bode plot is Linear ,
and slicing Time for each iterative calculation run,
and not applicable to this oscillating circuit ?
Perhaps the circuit that Oscillates,
PFB-rg-v1-S-3-161215-15334-3N.png,
can best be used as an Audio Sine Oscillator,
with the advantages that you listed.
I am very much impressed that you submitted my little circuit
to your own Spice analysis. Thank you.
"Can we agree that this circuit will oscillate ?"
I think, we must say: It is able to oscillate as soon as the fedback factor allows the fulfilling of the oscillation condition (unity loop gain). Of course, the signal at the filter`s input must be zero in this case.
"Can we agree that the Frequency Bode plot.....(is) not applicable to this oscillating circuit ?"
I suppose you are speaking about the Bode plot of the filter circuit. If the circuit oscillates (because the oscillation condition is fulfilled) the BODE plot does not show the correct filter response because the circuit is unstable.
Dear all of you,
concerning:
-------------------------------------------
SPICE simulations
Question: Are the results right or wrong?
If they are wrong - who is to blame? The simulator or the user?
-------------------------------------------
Both the user and the simulator are to blame.
The user is responsible for the model.
The simulator is responsible for the solution of the equations.
A lot happen behind the users back when the user apply graphical input to the simulator.
The user is responsible for a correct netlist.
The oldfashion netlist input to me is to be preferred for the graphics input.
The default accuracy is RELTOL=1e-3 !!!
I have examples of non chaotic circuit for which PSpice give chaotic
results with RELTOL=1e-3. With RELTOL=1e-6 results are correct.
The user should always mistrust the results of the simulator because
he nows about the circuit and he has expectations to the result.
Lutz and Glen, please provide *.cir netlists of examples with wrong results.
Lutz and Glen, please provide *.cir netlists of examples with wrong results.
Erik, sorry - I have no "wrong results". In case of unexpected results, in all cases it was the user who has made errors and the simulator has done his job correctly. I have no experience with chaos. Therefore, I cannot comment on these problems.
Erik,
For the schematic in question "PFB-rg-v1-S-3-161215-15334-3N"
the netlist is attached.
Erik and Lutz have two different, and correct, perspectives
in this puzzle.
I favor Erik's, namely that , in this peculiar example,
the User and the Spice have two different fuctions
and these two functions are not aligned ( not the same ).
In my humble opinion ( IMHO ) ,
the solution is not so simple ( as Lutz suggests it is ) .
For me, this makes our little investigation all the more Interesting !
I must take responsibility
for defining the problem ( circuit ) ,
for selecting the proper analytic tool,
for analyzing the results.
It is I who must take responsibility for living in a Real World
of which Spice knows nothing.
On the "Up Side" :
This looks like a useful Sine Oscillator, with single resistor control,
subject to temperature drift of the resistor,
subject to frequency limitations of MFB feedback network delay.
I suspect that the frequency limits ( subject to THD error tolerance )
will be influenced by the Q of the MFB stage.
Higher "Q" = lower f() because of more phase delay
as it passes through the MFB filter circuit.
I have measured this characteristic, roughly.
...
In terms of a "true" sine oscillator ( in the audio spectrum ) :
I have not measured the exact differences between
a Diode Controlled Wein Oscillator
vs.
this MFB Filter controlled oscillator.
But, I suspect that the MFB Filter control
will have more control over the harmonic content
and thus the "sine" quaility and ultimately the THD measures.
This is an interesting experiment,
showing some advantages and dis-advantages.
Glen
Quote Glen: "Lutz has written more clearly about this circuit's frequency ability : "The voltage which is fed back to the input would have zero phase shift (positive feedback) for infinite frequencies only ..."
Glen - there must be a severe misunderstandig. I cannot remember that this was my comment to the oscilator circuit based on the MFB filter. Of course, we have positive feedback (with loop gain fulfilling Barkhausen) exactly at the bandpass center frequency.
Regarding: ..".differences between a Diode Controlled Wein Oscillator vs. this MFB Filter controlled oscillator."
I am sure that the quality of the oscillation signal (low THD) is much better for the MFB bandpass oscillator because of two reasons:
1.) The filter action of the MFB bandpass can be made much more selective if compared with the WIEN circuit (quality factor 0.5 only!).
2.) The filtered oscillation signal is available at the low-resistive output of the second opamp (inverter). This is not the case for the WIEN oscillator.
Lutz,
Thank you. I removed the incorrect quote
I said enough concerning
the relation of increasing circuit oscillating frequency
vs. requirements of decreasing phase delay
... and it can receive critique as it is.
Now, I have a question about
how to Control the Amplitude of Oscillations
so that it maintains a Sine shape waveform.
With positive feedback, it should rise in amplitude uncontrollably.
Perhaps this not a "sine wave' oscillator , in good practice,
due to saturation distortion.
About the comparison, I appreciate your clear elaboration.
This discussion about Spice and the User
and the possible failure of this combination
shows several points that must be considered carefully
during the design process. .
Glen
Glen - I suppose, you are speaking still about the MFB-bandpass osillator with an inverter in the feedback loop, correct?
I have listed the pros of this circuit already.
For my opinion and according to my experience , it is one of the most versatile and cleanest oscillator topology. Yes - if the loop gain is >1 the amplitudes are rising continously - until the are hard-limited (clipped) due to power rail limits.
Therefore, it is best to make the inverters gain slightly larger than necessary (loop gain>1) and to use two antiparallel diodes across the feedback resistor (soft limiting). The active bandpass will attenuate the resulting harmonics and deliver a sinusoidal voltage with a very good THD.
Lutz,
Very clear.
I have done experiments with "hard vs soft" Limiters.
Interesting hint, that I did not think about.
I agree that the filters can control much harmonic,
at the loss of high frequency response in the OPA.
In my experiments, a Q=2 is may be insufficient,
however, Q=20 may work.
This Positive-FeedBack method seems the only way to go
to design a simple circuit in audio range,
with single-resistor f() control.
This sort of circuit was Eric's idea, I think.
The comments and suggestions are very helpful.
Glen
.
Glen at al:
,
You've arrived at the point I tried to make earlier.
It's very evident that the subtleties of this aspect
of resonant oscillator development are so often
overlooked.
.
The designer's role (in ensuring that oscillator
amplitude control is a matter which needs full
consideration from the outset of any journey
into the design realm) is an essential part of
every resonant oscillator project.
.
Introducing nonlinear feedback path using a pair
of back-to-back didoes (as suggested earlier in
this thread) is a last-minute, desperate solution:
the amplitude will decrease at high temperature,
and more significantly, it's bound to increase the
odd-order harmonics of what one surely wishes
to be a perfect output.
.
A serious, deliberate approach to this aspect of
harmonic oscillator design is this "second half"
of the challenge - something you need to think
a lot about as you set out to design the circuit.
It should never be a "tack-on" measure.
.
An early question is: "What do I wish to make
the amplitude?". From this comes immediately
the question "What voltage is going to be used
as the reference?". (It could be a fraction of the
oscillator's supply voltage; or it may be a voltage
that the user can introduce, so as to permit agile
control of the oscillator's output amplitude; or it
may be provided by a band-gap reference. In all
cases, the wide-band voltage noise of the chosen
reference cannot be allowed to noisily modulate
the sine-wave output).
.
So far, all we've done is provide the answer to
the question of what is to be the voltage target
at which the oscillator amplitude stabilizes. The
less-obvious part of the challenge is to actually
provide the means to control the amplitude.
This will always be some type of nonlinear
operation - but never on a cycle-by cycle
basis; this always introduces harmonics.
.
I will leave off here because the link is acting
so slowly that it doesn't even keep up with my
typing. But think about this: What nonlinear
function are we looking for? and why is it
important that the chosen means of control
must be by a "feather's touch"?
.I'll switch to writing in MS Word, which is so
much faster than this sluggish medium right
now... must be because everyone is under
ten metres of snow, and confined to home.
.
The Lone Arranger
.
Barrie - undoubtly, the "tack-on" principle of using diodes for amplitude limitations is not the "best" method. Of course, a separate control loop with a large time constant (and a stable refrence) is preferrable - from the quality point of view!
On the other hand - I think, it is good and typical engineering practice to search not the "best" design but to find instead a trade-off between quality and complexity (following the rule: "As good as necessary" instead of "as good as possible"). Hence, for some applications a simple diode stabilization may be acceptable - in particular, when a bandpass-filtered version of the limited signal is available (as in the discussed example circuit).
More than that, instead of placing the diodes directly across the feedback resistor, we have some other techniques (combining the diodes with series/parallel resistors) which can keep the non-linearity as small as possible but - at the same time - as large as necessary for a safe start of oscillations (again a compromise task for the engineer).
Barrie,
As usual, you have pointed to the complete solution.
That is certainly the 'best practice'.
The current thread is about Simulators,
and this is a little side question that I brought up.
My little solutions are very standard
and have passed through the Simulator OK,
and a suitable one has been used in my project for several years.
My little 'side' project has a not so critical requirement,
and my first thought was
an audio peak limiter which employs a FET as a variable resistance
to attenuate the input signal via a shunt-limit
according to a control voltage,
to also include resistance in series
so as to control/lengthen the linear region of turn on
( makes it 'softer' ).
Something along the lines of "Limiter_AGE_OADC.png" attached,
"a-OAD-DDDG-3.jpg is an initial workup, similar to one I use in my project.
This approach will require a dedicated OPA with a long averaging time-constant, and I had hoped to be able to keep it simple
... but time will tell.
At first, I was encouraged by samples of smooth diode control,
but I am aware that the Null Point
receives vigorous Negative-Feedback control
which may contain minute oscillations at 100X fundamental.
I have Tran plots which show this.
Admittedly, my approach is not a rigorous one,
just an "add on",
and is just 'off the top of my bald head'.
I have aimed at possibly 'managing' the problem,
not truly 'solving' it.
A real solution would be an interesting development
from an academic aspect, not from my practical concerns.
I came across an interesting paper ( abstract attached here )
( "Structural-Neuroplasticity-and-Morse-Code" )
which indicates that constant practice with morse-code
will engergize more of the gray cells
and maintain a higher degree of mental sharpness over the years.
I have read several papers on this subject over the years,
and I have a personal application for this psychological technology.
I look forward to seeing what the real engineers come up with,
and what your guidance will be.
Glen
PS: I added a new limiter schematic and Transient plot
a-OAD-TGT-S-2-161219-1349.png
a-OAD-TGT-T-2-161219-1349.png
which is closer to the idea I had.
The PositiveFeedback Oscillating ( three stages ) circuit
must be re-arranged so that this Limiter precedes the Filter.
Barrie,
When you mentioned the "feather's touch"
were you refering to controlling the Oscillator's amplitude
by controlling the gain, such that
(1) the initial build up would be >>.5
( enough to exponentially energize the oscillations )
and
(2) then clamping it back down to =.5
( just enough to maintain oscillations ) ?
Glen
.
Glen:
,
Yes. Imagine a kid swinging on your custom-built,
very fancy and well thought-out structure. That is
your oscillator system. To get it to start oscillating
with a large number of kilograms on board you'll
initially push hard for maybe a few cycles. Then,
after the momentum charge is delivered you are
needed to make up for the losses by touching
the swing (or its mass-on-board) ever so lightly.
.
The swing is analogous to an L-C resonator or
its equivalent (a high-Q two-pole active system).
The loss-per-swing cycle is 1/Q. Depending on
how quickly you want this oscillator to get going
you apply more or less energy to the load. Once
oscillations are strong you only need to apply a
feather's touch to make up for the 1/Q losses.
Your job is to keep the conjugate-pole system
right on the imaginary axis.
.
This analogy is not perfect, but it illustrates the
idea well enough. During start-up, you have to
push the poles into the right-half of the s-plane.
To sustain the oscillations you need to supply
just the loss-per-cycle - very lightly! Any more
than is necessary will distort the beautiful sine
wave,,
.
The Lone Arranger
Barrie,
You have a rare ability to communicate to students
... students of many levels and backgrounds.
.......
I added a new limiter Schematic and Transient plot
a-OAD-TGT-S-2-161219-2022.png
a-OAD-TGT-T-2-161219-2022.jpg
which runs closer to the idea I had.
Initial startup must show high gain
and thereafter show low apparent gain
by decreasing the Signal input.
It is a logrithmic shunt limiter with varying control.
This method is really a 'tacked on" "patch" !
and does NOT indicate an understanding of the oscillator.
Here, the Input varies by 12x and output varies by 2x .
... further adjustments are required,
It is required to rearrange the 3 stages
into a 4 stage circuit.
The Positive-Feedback Oscillating circuit
must be re-arranged so that this Limiter precedes the Filter.
The idea of a single resistor sine oscillator has applications.
However, since this diversion of mine DOES NOT demonstrate
Simulation Failure, perhaps we should cease discussing it.
I can tinker with it on my own time,
which will come around again in January.
Lutz,
I have learned that the Frequency Scan analysis
and the Transiient Time analysis
do examine different aspects of the same circuit.
IF their results do not appear to agree with each other
THEN It is not a Spice failure, but an investigator failure.
...
We must present the appropriate question
to the appropriate analysis
in order to arrive at a true result.
the apprentice, Glen
'
Glen:
.
It is clear you are having fun with your oscillator;
and that's how it should be, Here are a couple of
things you should try.
.
First, reduced the shock that starts things going
in the only analysis mode that matters -- that is,
the transient analysis. The zero-amplitude mode
(jovially called the "AC analysis") is often so very
misleading as to be all-but useless; although it
is nonetheless something we all do at the start
of an examination of a circuit, to quickly confirm
that our circuit is wired up right and it's basically
seaworthy.
.
The usual way of starting an oscillator is to insert
a short (say, 1ns) pulse in series with a capacitor.
Note that almost any disturbance of any duration
will get your oscillator airborne. (In practice, it will
be the circuit's inherent noise which serves to get
an oscillator ticking. It's not good practice to allow
the severity of a sudden supply application serve
this purpose. A supply may be supremely stable
and essentially noise-free, as when using a battery
-- although any electro-chemical cell is a bit noisy)
.
Question: What's the noise spectral density of a
single carbon-zinc cell? What is the fundamental
source of this noise?)
.
With this feather's tickle, your oscillator will begin
its long exponential journey toward the target you
have set for it, by the amplitude-control system.
This can be viewed by plotting the absolute value
of the logarithm of the output. I have some nice
examples of this, and they may have been sent
in an earlier post; but I will hunt it down and send
it again in the next post. (This lap-top secretes
some 200,000 files.... and the Windows search
engine is hopeless...)
.
The length of time taken to reach the final value
depends on the effective Q of the circuit. Clearly
an extremely high-Q resonant element -- like a
crystal -- will take a relatively long time, while a
more lossy resonator -- like a microwave LC
tank with an effective Q of about 5 -- will start
up within a few cycles.
.
Question: What is the simple equation relating
the effective time constant of this start-up (an
exponential, therefore defined in the simplest
case by a single time-constant) to the effective
Q of the circuit?
.
Now that you've persuaded your oscillator to
start and its output to reach its final amplitude,
I suggest you invoke the FFT function (which
ought to be embedded in any good simulator)
to actually measure the harmonic signature of
the circuit.
.
Don't forget to include -- at the very least -- a
single pole in the gain function of your op amps.
If you'd like, I can send a net diagram of such.
.
The Lone Arranger
Barrie,
Thank you for your comment.
I am having fun exploring a new thought.
Yes, Spice uses "idealized" models.
ngSpice, via PartSim.com does not provide an FFT function.
Also does not pass Spice information in a compatible format.
However, it does run 24 stages of OPA filters
in my Linux browser on this 2001 PC.
I have Tran plots for all of my projects (>100)
showing the phase delay for each stage in the multi-stage ckts.
On the one I use in my radio system,
the last stage has a phase delay of > 15 mS,
which does not affect the CW signal,
although the narrowness of the passband does produce
a very sine shaped waveform
( thus my notes on the Audio stage
about introducing distortion to make it more 'crisp' to the ear ).
I have attached PFB-rg-v1-S-3-161213-1930.png
which is the Positive FeedBack Osc under discussion.
I have attached PFB-rg-v1-T-3-161213-1930.jpg
which is the Tran plot showing the Signal "Noise" injected
which starts the Oscillator.
I should be using a pulse as you suggested.
You called this a chaotic signal.
I have attached MFB_Single-Q20-1-S-161217-2005-variable.png
which is typical of a single circuit to measure
some of the signals and their delays, in isolation .
It is Always a Wonder to me that so many stages in my project
have so many altered, combined, differentiated,
phase delayed signals,
and I am only interested in a selected few,
and they work in isolation into my ear with a message.
----------------------------------------
About the Positive FeedBack Osc and Diode Limiter method :
although the fully working PFB Oscillitor is interesting, useful,
I was not hoping to startup a new project to explore a circuit,
I think that all this diversion belongs in a New Question Thread.
--------------------------------------------
A preliminary comment about stage Q and Time-to-max is
that in a Single Stage MFB with a Q=20,
the circuit will rise to max in 15.5 mS.
Greater Q requires greater Tme to Max Signal Level Vout.
To further pursue your query,
That is 20/0.0155 ratio.
A 15.5 mS pulse interval is directly related to 65 Hz.
I should note that the Diode-Limiter will function
at the transient speed of the OpAmp itself,
and should work "right out of the black box"
when inserted at the relevant point in the PFB Osc ckt.
I agree with your comments on the relevant point
in the PFB Osc ckt where Control needs to be applied.
as follows:
In an PFB Osc running 700Hz , the Diode-Shunt needs
(1) to be basically inactive at startup, to allow oscillation to begin,
(2) to be active between T=4mS to T=8mS ( see attached JPG),
( at the point that Spice shows the signal at .7 of Vcc. )
( This is also the point where the signal is clearly going exponential ) ,
(3) and completely in control every 1.43 mS mark thereafter (700Hz).
(4) my project uses a standard signal level of 1 V peak
(a) which is >> circuit noise level,
(b) provides a good visual comparisons via the O'scope.
The initial observation of the oscillation at 8mS , shows 700Hz,
and a Vout of 200V ( Spice math ).
So, control should be active prior to 8mS.
Clearly the Oscillator has an exponential signal by 4 mS, (400mV)
and requires Limiting when it is reaching the 1V level.
Still, I suspect this overall design will only work in the audio range,
due to overall circuit delay times.
There is more room for development.
I think that all this diversion belongs in a New Question Thread.
I do wish that I could respond in the manner of Eric, Lutz, Josef
... but that is not my forte.
I must be away until January.
Always hopeful ,
Glen
Fellows,
I just could not leave without pushing the design a little further.
This has a single small pulse,
then oscillates, reaching a peak in 20 mS,
then is limited to 3 V,
and (with greater resolution) shows a good sine form.
And, I do agree with Barrie and Lutz , et al, great advice
... that the problem with Simulators is in the Eye of the Beholder.
.
Glen:
.
Well, without going too deeply into the devious
matter of "what simulation does NOT tell you":
observational errors come in many shapes and
colours. The root of errors start with the device
models, which are mathematical expressions
that try to express how a real device operates.
If these are too simple, many errors will occur.
.
I have to leave my work-desk here but will try
to pick this up later...
,
The Lone Arranger
Quote Barrie G.: "Question: What is the simple equation relating the effective time constant of this start-up (an exponential, therefore defined in the simplest case by a single time-constant) to the effective Q of the circuit?"
Barrie - for my opinion, this question is hard to answer because
* it is not only the Q of the (bandpass) circuit which determines the time constant. Another important parameter is the amount of excess gain (loop gain> 1) at start-up. ;
* we have other oscillator topologies (based on neg-R, lowpass, allpass neworks) where such a "Q" is hard to define?
Fellows,
I am happy that Josef introduced this 'odd' Positive-FeedBack circuit
that will oscillate or null and will filter.
It depends on the dimensions ( values V(in), R, C , etc. )
This introduced me, again ,
to the idea that all circuits do not apply to all conditions.
When the Dimensions ( V , R , C , gain ) change,
then the circuit may not perform as expected.
Attached are several pages my latest tinkering with varied dimensions.
f(0) is 700Hz.
(1) indicate that the ckt will BandPass Filter when V(in) = 1V.
(2) indicate that the ckt will oscillate when V(in) > 1V.
(3) indicate that the ckt will null when V(in) < 1V
They indicate that the PositiveFeedBack Filter will fail
if the V(in) = 0.5V or rises to 1.5V.
The criteria I use for successful Filtering is
(1) Tran analysis shows no oscillating above f(700)
and Tran does show ckt response near f(700).
(2) Freq analysis shows band-pass peak at f(700) .
The circuit has good usefulness IF V(in) = 1 V,
given the ( R, C ) dimensions in the schematic.
The level of PositiveFeedBack must match the V(in).
It is a "Balance Required" circuit.
You are welcome to make comments,
and I will try them.
This was the Most interesting thought I had this morning.
Now, I must return to to a new idea I have in my project.
I am just an apprentice learning in the Master's workshop.
.
Friends of the Electron:
'
In a different thread, I'd mentioned a
PPT file that addresses the question
of how one should understand, and
professionally use, simulation.
.
For some reason that file failed to be
transmitted. I'm trying again today. If
it is too large a file, I'll send a version
that lacks Section 3 which is long. If
so, I'll remove it for now and send it
separately.
.
The Lone Arranger
Friends of the Electron:
You might be interested in this Competition,
organised by the Solid-State Circuits Society
of the IEEE:
https://sscs.ieee.org/education/2017-2018-circuit-analysis-design-contest
The Lone Arranger