10-25-2017 01:20 AM
I am working on a circuit in multisim where i have to multiply two signals... one is a constant voltage and the other is a square wave form generated from a function generator. I am getting convergence error on simulation. If i choose sine or triangular waveform the circuit works fine but on choosing square wave form it shows error. I can not figure out what is wrong with square wave form.
Solved! Go to Solution.
10-25-2017 08:22 AM
The simulator uses numerical methods to find the voltages and currents in the circuit. The method used has an error estimate built into it. When the error is "too large", the simulator tries to find the answer at finer and finer time points.
For signals that have very sharp edges, the numerical methods get confused, because at the edge of a signal (like the rise of a square wave), the solutions before and after the edge are completely different. As the time points get finer, this behavior does not go away, it is a real effect due to a "square wave".
So, how can you help the simulator find an answer? The solution is to do away with sharp edges... for example, use a function that actually is continuous in time rather than discontinuous like a square wave.
These are things you can try:
1. slow the rise time of the square wave in your simulation
2. find some function that looks a lot like a square wave but is continuous
One solution is to replace the square wave voltage source by a square wave current source ( example: 100A current source) . Put a low value resistor in parallel with the current source.(example: 0.01 ohms) Put a small capacitor in parallel with this.(example: 1ufd). This creates a signal that is continuous, as opposed to a square wave voltage. The simulator will then converge.
10-26-2017 12:48 AM
Thanks a lot for the help.
I think now i have understood the problem with square wave.
Actually i am working on a research problem, where i have a circuit(let us call it circuit_A) whose output is continuous voltage. This circuit_A is working fine. Next, i have to multiply the output from this circuit_A to the output from a timer(i have made a one shot timer using 555 IC in monostable mode), so that i can get the output for a certain time only(i can control this time by changing the values of R and C in the monostable circuit). This is what i want to do. Both the cicuits i.e. circuit_A and the timer are working fine if i simulate them separately in separate multisim files. But the simulation error occurs when i combine both these circuits.
Even the circuit is working fine if i multiply the output from timer to a constant voltage. In that case the output is correct. But, when i replace the constant voltage with circuit_A, simulation error occurs. And when i simulate circuit_A without the timer, it works fine..so there are no issues with circuit_A.
I cant figure out whats wrong with my circuit. I am stuck in this problem from past two weeks.
10-26-2017 09:00 AM
Hi Kiri18:
In your particular case, it is hard to know what is wrong: you may have done everything correctly, but the simulator is failing, Or, you may have made some mistake when you combined the two circuits. The SPICE simulator (which is what the Multisim simulator is built on) was a lot better than other simulators at solving general circuit problems, But, it is not perfect (and its problem with signals and systems with discontinuities is one example of a problem that it has).
National Instruments does not really provide much support (at least for educational accounts) for their circuit projects. If circuit simulation is important to you, you should use LTSpice, as it has an active and effective user community that will actually help you solve your problem. (check out the Yahoo group).
With Multisim, you are pretty much on your own.
Think about your problem and consider using some other method of simulating the physical circuit --for example, instead of multiplying, perhaps use a switch to sample your signal.
In general, try to avoid any device or signal that is not differentiable. This is the real solution to convergence problems.
Good Luck.
10-30-2017 08:25 AM
Thankyou cliff1001 for your reply!!!
There is some problem with the 555 timer in my circuit. If i use a timer consisting of transistors and other elements(resistors, capacitors etc.), then my circuit simulates without any error. But in my project i can not use such timer (transistor timer). So, i thought of using one-shot timer IC (SN74121N), which is available in the multisim component database. As i am from non-electronics background, i am not getting as how to connect this IC, so that i can get an output pulse of required time. I could not find much on google also. Even the data sheets are a bit confusing for me because of my non-electronics background.
10-31-2017 01:14 AM
Well here is my problem....I have attached two circuits rossler1 and rossler2 with this post. Rosler1 circuit works fine and the oscilloscope output is also shown in the screen shot. However, if i add a timer(555 monostable) to this breadboard (although i have not connected both the circuits), convergence error occurs. And this timer works fine separately.
In reality, we can design two different circuits on same breadboard without connecting them and it does not causes any problem. That should also be the case in multisim. But here it is causing problem.
Is it problematic to design two different circuits on same breadboard or am i wrong somewhere??
10-31-2017 10:07 AM
Hello Kiri18:
First of all, if you really want someone to look at your stuff, don't post a picture of your simulation, post the real Multisim files, so someone can try the simulation themselves. The pictures that you posted are too blurry to contain much information.
Second: Life is hard. The simulator works by creating a matrix representation of the circuit, then inverting that matrix to solve for the currents and voltages in the circuit. Matrix inversion is tricky. So... by adding a separate, disconnected circuit to your working circuit, you have increased the size of the matrix considerably. Perhaps instead of inverting a 50x50 matrix, the simulator now has to invert a 90x90 matrix. Perhaps one of the pivots in the new circuit turns out to be very small. Perhaps the numerical instabilities of the new matrix are too much.
Anyway, these kinds of problems made it difficult to even write a circuit simulator in the 1950's and 1960's.... they just did not work very well. In the 1970's the UC Berkley graduate students did better. People continue trying to make spice simulators work better. The national instruments people bought a company that based their simulator on XSpice, which is based on Spice3, which is based on the original Spice.
But.. I doubt that national instruments has any engineers working for them who have really gotten into the code of Xspice. LabVIEW and data acquisition hardware is their product, and is where they make their money.
As I mentioned before, if you need a supported spice (and don't want to pay money), you should use LTSpice, because there is an engineer who works for Linear Technology that knows how it works and cares about it, as well as a bunch of smart amateurs who participate in the Yahoo newsgroup.
I would guess, (but it's just a guess), that the model for the 555 timer that is supplied with the Multisim program is poorly written, with sharp nonlinearities in its equations. It works alone, but in a more complicated circuit, it causes convergence problems. However, there are many other possible problems with your circuit. (poor modeling of op amp power supply saturation, for example). Many of these problems have been worked out of LTSpice, but I doubt that the same attention has been paid to Multisim.
11-06-2017 05:45 AM
Hi everyone,
I am using multisim for the first time and am working on a simple preamp+ highpass filter... initially the circuit was working fine on some particular frequencies but was giving convergence problem on others. Following a few discussion I changed the simulation setting and everything went wrong... perhaps if anyone of you have the kind timeto look into my file and help me out...
regards
Rabya
11-06-2017 09:42 AM
rabya:
It is good practice to start a new thread when discussing a new problem.
I do not see a model of the ina126 when I look at your files.
However, I assume you must have one if it works for you "sometimes".. I don't know multisim well enough to understand why your model does not show up in your files.
Your circuit has a few problems that will make it not work in reality, as well as in simulation.
Consider your power source. You have labeled it + and - 9v. However, it is not.
1. use two batteries. One is connected to ground, and makes +9v. The other is connected to ground and makes -9V. One battery that is not connected to ground will not create a constant voltage with respect to ground, which is what you want for "power supplies" .
2. Your connections to the power supplies on the operational amplifier are backward. (+ is connected to -)
3. Inputs to the instrumentation amplifier have to have a big resistor connected to them and to ground. These resistors are there to allow the bias currents to flow in/out the pins of the instrumentation amplifier. Use something like 10meg.
if you fix these circuit design problems, your simulation will work. Why does the simulator "not converge" on the original circuit? It is because models (like those written for the op amp and instrumentation amp) are usually not written to be able to handle really odd connections: they only make sense when the parts are connected correctly. It would be possible to write models that work for every weird connection, (probably), but people making the models do not bother to do that.
best regards,
cliff
11-06-2017 10:09 AM
Thank you cliff let me incorporate the suggested settings and then i will update