Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Resonance Simulation error . Beginner Finding!!!!

Thanks Gentlemen for your answers and replies , ok , Lacy i will illustrate for you my mathematical equations.
but let us simply state some basic background about resonance ok .

We All agree in electronics , That Xc of a capacitor always lags the current by 90 or -90 Degree with the current , While XL is proceeding the current by +90 Degree because in this series circuit the current is the reference for us because voltages differ  across components while current is always the same from +ve to -ve sides or vice versa . So XL And XC are 180 Degree out of phase so they cancel each other even the Voltage across them cancel each other .
At Series Resonance , XL = XC  at that time the f is called Resonant FRequency or Fo .

Fo = 1 / 2 pi Sqroot(LC) ----------------------------------------------> (1).

Total impedance in any AC circuit like above =>

Z = Sqroot ( (R * R) + ((XC * XC) - (XL * XL)) )  -----------------------------------------------> (2)

whereas XL = XC then

Z = R
Total impedance is mainly of the resistor is the as small as possible equals that of the total string resistance.

Then Total line current is at maximum value or

Imax = Vrms / Z = Vrms / R ------------------------------------------------> (3)

Each voltage drops can be calculated normally 

Vr = Imax * R
Vc = Imax * XC
VL = Imax * XL

VC-L = VC + VL = - ( VC ) + VL  = Zero Volts across the string between capacitor and the coil .

R has the total applied voltage, VC and VL also have their own high voltages at the maximum but both of them cancel each other because they are 180 degrees out of phase thus they cancel .

Q = imax XL  / Imax R -----> then Q = XL / R  ====>

Q = (2 pi F L  / R ) -----------------------> ( 4 )

2 pi F = 1 / sqroot ( L * C ) --------> from resonant frequency equation .

and by subsitutions in ( 4 )  we get the following


Q = L / R * sqroot( L * C)  --------------------------------> then we reach the maximum voltage magnification of the resonant circuit by increasing the inductance of the coil and decreasing its internal series Resistance or ESR .



do your math Calculations upon these equations and you will find that the end products totally differ from multisim shows ...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!




Message Edited by snouto override on 10-16-2007 03:35 PM

0 Kudos
Message 11 of 23
(4,422 Views)
Hello,
I think your calculations are correct and I think Multisim is also correct. I don't know a lot about how Spice is implemented, but I believe its purpose is to model real world circuits. As such, the components it models are also real world components meaning there are going to be real world tolerances on component values, etc. The calculations you and I make are based upon "perfect models" and we are going to get different answers than Multisim, just as we would if we built the real world circuit. In some circuits the differences are more apparent. As a test, I built the circuit in Multisim changing the values approximately 1%. The results are surprising (see attached circuit). Also, both the calculated results and Multisims results satisfy the formula given in my earlier post.
 
My calculated results (results rounded off); XL=1501 ohms, XC=1500 ohms, Z=10 ohms, i=30 amps, VC=45.030 kV, VL=45.03kV
                                                                    
 
 
 

Message Edited by digitalguy on 10-16-2007 05:58 PM

Download All
Message 12 of 23
(4,395 Views)
Hello,

Users pointing out the Multisim's results are wrong, are correct! In steady state, the current peak should be about V1/R1 = 43mA since the cap and inductor impedances cancel out!

The short explanation of Multisim's result is that there are several, complex algorithms working hard to produce a result in the time domain. One of these is the numerical integration of the differential equations introduced by caps and inductors. The numerical integration process running on digital computers only approximates the true result and it is not unheard of when it fails.

The circuit, with its very high Q factor (due to little damping), is a good example of something that can push the numerical integration algorithms over the limit, causing the overall simulation to be wrong.

I have tried the circuit in other SPICE based simulators and they produce incorrect results as well. My suggestion is to increase damping by increasing R1 or, if you simple want to study Resonance, run AC analysis which solves the circuit in the phasor domain where it does not require numerical integration.

Thanks,


Max
National Instruments
0 Kudos
Message 13 of 23
(4,396 Views)

Hi Max,

None of us even considered the internal mechanism at work when Multisim does its calculation in this manner. If what you say is what is correct (and I do think  it is more than just that as my next question will emphasize). Then shouldn't that be something that should be looked into for a possible fix?

I have questions. The componenet models for the coils and capacitors are comsidered perfect with no internal resistances as modeled. Is this a correct statement? With that said and if the above statement is true, then this can contribute to a High Q circuit as well based mainly on the Q of the coil being defined as Q=XL/R where XL is Inductive Reactance and R is the internal or what I would refer to as DC Resistance of the coil In this case the Q of the coil would be XL/R or XL/0 which is considered infinity. Is this statement also true?IWith the Q of the coil being as such would that or would that not affect the results .especially since EL(Voltage across coil)=E (Source Voltage)*Q.(Q factor of coil)? I am wanting clear this up for may own satisfaction.

To digitalguy:

Thank you very much for your information. I think that is very good information when it comes to any design especially designs where tolerances may play a role in the eventual outcome. I beleive you when you say both are correct and I believe that they are both correct based upon my research.

I would also like to commend everyone that contributed to this disucssion. We may not have totally agreed at times and our methods my have been slightly different but I think we have come to the same conclusions and did it in a kind and professional manner. Thanks to everyone for keeping it respectful to everyone of all skill levels. 

Message Edited by lacy on 10-16-2007 07:06 PM

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 14 of 23
(4,389 Views)

Sorry, if this was read. I am in error and have thus canceled this post.

Message Edited by lacy on 10-16-2007 07:40 PM

Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 15 of 23
(4,386 Views)
Max, how do you arrive at 43mA max current peak with a 300V signal into a 10 ohm resistor when as you state that the only oppsition to current since XL-XC=0 is the 10 ohm resistor? I=E/Z would be I=300V/10ohm and that would equal 30A?
Kittmaster's Component Database
http://ni.kittmaster.com

Have a Nice Day
0 Kudos
Message 16 of 23
(4,375 Views)

Hi Max,

 

A couple of questions about your reply to the question at hand:

1) Does this problem with SPICE you speak of occur only at resonance with high Q circuits, because the circuit measurements seems to match hand calculations at non-resonance points?

2) Is it just a fluke that in the simulated circuit we are speaking of, the measured voltages work out perfectly (within reason) when plugged into the test equation

v

 = 

((vL - vC)² + vR²)½

where v=300v?
0 Kudos
Message 17 of 23
(4,366 Views)
All -
My mistake....Vin/R1 = 300Vrms/10ohms = 30Arms=43A peak....not 43mA peak!

Since the error in numerical integration is proportional to the internal time steps, if you decrease time step enough, you'll be able to see more accurate results. With TMAX at 1e-7 or less, you'll see better results.

Use a scope in interactive analysis or run transient analysis

Lacy- Yes inductors and capacitors are ideal.

You have to look at the Q of the system which for series RLC is equal to 1/R * SQRT(L/C), where R is not inductor DC resistance but R1 in the circuit

digitalguy-

1. the closer to the resonant frequency, the worse the results appear to get
2. no its not a fluke
Max
National Instruments
0 Kudos
Message 18 of 23
(4,356 Views)

Maxish, would I be correct in characterizing your answer like this: 


The root cause of the error was inherent to the methods used to digitize (or quantize) a calculus equation (the time domain).  In effect when there is little damping, this allows for rapid change of current and voltage in the reactive components. In other words, dv/dt and di/dt have a very steep slope at various times.  In this case, the math attempts to integrate the result by quantizing the area under this curve in small rectangular blocks as usual but the time step being too large for the now large slope causes unacceptable error to enter the calculation.

If this is the case, it is not a bug but a limitation of the method used to calculate the result.  If my description above is correct, there is nothing to fix in the code but there are probably ways to teach the program to recognize these instances and give better debugging information back to the user.  I've only really done simulation a handful of times but what i get back from the debugging window is often more cryptic than the spice models themselves.

0 Kudos
Message 19 of 23
(4,349 Views)
hakelsup,

yes during high dv/dt and di/dt, with smaller time steps accuracy is improved because of finer granularity in the integral approximation. It is also true that this is not a bug, but an inherent limitation of the numerical algorithm. SPICE gets insight about the accuracy of integration using the Local Truncation Error (LTE), which it uses to limit the time step if LTE gets out of bounds (this process is called Time Step control). LTE is a mature and accepted Time Step control methodology. There are other Time Step Control methods that have been researched and applied in simulators (interation count and dv/dt) but these are not as stable as LTE on the whole. As per your suggestion, it is perhaps worth researching whether dv/dt, for example, can also be applied but used only as a warning flag.

And regarding your comment about the debugging window: this is a well known issue for Multisim and it will definitely be addressed.

Thanks,
Max
National Instruments
0 Kudos
Message 20 of 23
(4,337 Views)