09-29-2009 05:15 PM
I'm trying to simulate the oscillator with 2 NOT gates (CD 4049) in the schematic attached but
1) the frequency is 12 MHz approx and isn't affected by C and R values
2) the waveform in the net A is incorrect
3) it oscillate also disconnecting C at the same frequency
Solved! Go to Solution.
10-02-2009 04:20 AM
Hi Ridis,
at this link :
http://forums.ni.com/ni/board/message?board.id=370&message.id=5213&requireLogin=False
you can find a post that discuss exactly your problem. In this post you can also find an example which works fine.
Hope this helps,
Clara
10-02-2009 10:03 AM
Hi Clara
thanks for suggestion but unfortunately the solution that worked in the link don't works anymore.
I know well this solution because I found it. If you check the thread of almost one year ago you can see my name.
But in my current version of Multisim (10.1.372) may be something is changed and I can't find any "initial condition" of the capacitor that allow the circuit to oscillate.
Strange that NI staff don't care about a basic problem like this.
Giorgio
10-02-2009 02:30 PM
Hello,
Although this circuit appears simple, its tricky to get it to simulate properly, requiring a fair understanding of mixed-mode simulation concepts. Let me try to summarize the problem and suggest a solution.
First, you're dealing with an unstable circuit; there's no steady state solution at time=0 and you need to specify proper initial conditions. If you don't specify initial condition values, Multisim assumes 0 volts for all nodes and end up generating the strange oscillation - exactly what are witnessing.
However, it turns out that specifying these intial conditions is not adequate because of the nature of the mixed-mode circuit at hand. To understand why, you must first understand that the inverters actually use digital models, not traditional analog SPICE models. These digital models communicate with the analog models, in this case - the cap and the resistor, through hybrid components called bridges, which you do not see on the schematic (you can see them by viewing the Netlist). Now, because you're simulating in the Ideal simulation Mode(see Tools->Digital Simulation Settings), ideal bridges, which act as ideal voltage sources on the outputs of the inverters, are driving the output directly. When you specify the initial condition values on nodes that are connected to the outputs of the inverters, these hidden bridges override these values. Generally, the fix would be to change to the Real simulation Mode, where there would be impedance in the inverter output as seen by the analog circuit. Unfortunately, this gives convergence errors.
In the attached circuit, I simply added small output resistors to remedy this problem. I also specified the appropriate initial condition values. Note that the oscillation is now primarily a function of the RC constant and not of the inverter delays, as desired.
For our next major release, there have been several improvements made around the mixed-mode simulation area of the product. These include significant improvements to the bridges in the Real simulation Mode and in-depth documentation explaning on mixed-mode simulation concepts.
Regards,
10-05-2009 05:08 PM
Thank you very much Max.
I found your explication and hint very useful. I made the same modifications in my circuit and after finding the right initial conditions it works. But I have several questions
1)your circuit seems having no initial conditions nevertheless it works. Perhaps Initial Conditions are not associated to capacitor ? Where can I see them ?
2) How you can find the right "initial conditions" ? I just try and see but it seems not the best way. Imagine a circuit quite complicated with several initial conditions, how we can manage it ? Too much different possibilities.
3) If I use Initial conditions not "zero" I never see the very first part of simulation. When I switch on the real circuit usually capacitors are discharged.
4) not all the "mixed mode" circuits has the same problems. Simulating a simple oscillator circuit with 40106 (Schmitt trigger NOT) give correct results without any problem. But 40106 too has a digital model.
Finally if I have to add small resistor to simulate I can't use the same circuit for simulation and for printed circuit board loosing one of the main feature of Multisim.
10-06-2009 05:39 PM
Ridis,
I have to apologize because what I said about the
voltage sources at the inverter outputs overriding the initial
condition values is untrue; its the otherway around - at time=0, the
initial conditions actually override the voltage source values. So you
can do away with the small resistors and just properly specify the
initial conditions.
Choosing the proper initial
conditions is a little tricky. The answer is to set 10V as the initial
conditions across the capacitor and you can do this in two ways:
setting 10V on one the capacitor nodes (the other node is assumed as
0V) or by setting the initial conditions on the actual capacitor. The
reason that you can't have 0V (and thus no charge on the capacitor) as
the initial conditions in the entire circuit is that this situation
causes the inverters to be in an unstable state, where the capacitor is
not given time to charge. For practice I suggest you actually
determine by hand the waveforms that you expect for different initial
conditions.
1)your circuit
seems having no initial conditions nevertheless it works. Perhaps
Initial Conditions are not associated to capacitor ? Where can I see
them ?
see above
2)
How you can find the right "initial conditions" ? I just try and see
but it seems not the best way. Imagine a circuit quite complicated with
several initial conditions, how we can manage it ? Too much different
possibilities.
see above
4)
not all the "mixed mode" circuits has the same problems. Simulating a
simple oscillator circuit with 40106 (Schmitt trigger NOT) give correct
results without any problem. But 40106 too has a digital model.
It could be that the 40106 acts differently because it has hysteresis on the input.
Finally
if I have to add small resistor to simulate I can't use the same
circuit for simulation and for printed circuit board loosing one of the
main feature of Multisim.
Remember, the inverters
use digital models and ideal bridges to interface to the analog
components; they are not highly representative of the actual part. The
extra resistor would actually make the circuit more representative of
the actual PCB because the actual inverters would certainly have output
resistances. You can use the Real simulation Mode for a more accurate
representation of the digital part behaviour.
I hope that helps