Home > Community > Forums > RF Design > A tran simulation problem of RLC resonated network.

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 A tran simulation problem of RLC resonated network. 

Last post Fri, Jul 13 2012 6:20 PM by xxgenerall. 7 replies.
Started by xxgenerall 10 Jul 2012 06:07 AM. Topic has 7 replies and 3600 views
Page 1 of 1 (8 items)
Sort Posts:
  • Tue, Jul 10 2012 6:07 AM

    • xxgenerall
    • Top 200 Contributor
    • Joined on Wed, Feb 8 2012
    • Nanjing, Jiangsu
    • Posts 37
    • Points 455
    A tran simulation problem of RLC resonated network. Reply
    Hi everyone,

    A RLC resonant network is as Figure 1, seen at my post below.

    L=1uH, C=1uF, R=100kOhms.

    Source generates a sine wave signal. The source signal's frequency is 159.155kHz and its amplitude is 10V.

    1. Theoretical analysis.

     The resonant frequency of LC network is about 159.155kHz. Under this frequency, the LC network's AC impedance is very large, and reaches about 1.5 MOhms. So if the circuit becomes steady, Vout is about 0V, whereas Vin-Vout is almost equal to Vin.

    2. Tran simulation result.

    A tran simulation is implemented with Cadence Spectre. The "stop time" is set to be 1s, so that the circuit can get steady. The tran simulation result is as Figure 2, seen at my post below.

    It is seen that, Vout is almost equal to Vin.

    By the way, sp and ac simulations are also carried out, which all indicate the LC network has a very large impedance at 159.155kHz.

    The tran simulation result is so different from the theoretial analysis, and is not consistent with sp and ac simulation results. Why?

    -----------------------------------------

    Hi Mr. Beckett, Thanks for your help.
    Filed under:
    • Post Points: 20
  • Tue, Jul 10 2012 7:40 AM

    Re: A tran simulation problem of RLC resonated network. Reply

    The pictures just show some Chinese writing (I assume it'sChinese) and "pp.sohu.com". It is possible to add pictures as attachments (one per post) on the Options tab when posting a reply.

    So without more detail, it's hard to know what the problem is.

    Andrew.

    • Post Points: 5
  • Wed, Jul 11 2012 5:27 AM

    • xxgenerall
    • Top 200 Contributor
    • Joined on Wed, Feb 8 2012
    • Nanjing, Jiangsu
    • Posts 37
    • Points 455
    Re: A tran simulation problem of RLC resonated network. Reply

    Figure 1 is as below.


    • Post Points: 5
  • Wed, Jul 11 2012 5:32 AM

    • xxgenerall
    • Top 200 Contributor
    • Joined on Wed, Feb 8 2012
    • Nanjing, Jiangsu
    • Posts 37
    • Points 455
    Re: A tran simulation problem of RLC resonated network. Reply

     Figure 2 is as below.


    • Post Points: 20
  • Thu, Jul 12 2012 4:52 AM

    Re: A tran simulation problem of RLC resonated network. Reply

     Because the Q is so high, the lack of timesteps in a default simulation means that it will not be able to properly see the effect of the resonance.

    By forcing more timesteps, you can see the amplitude decreasing (but it's rather slow, because this will clearly have a long time constant).

    I simulated this netlist:

    //
    V0 (Vin 0) vsource type=sine ampl=10 freq=159.154943K mag=10
    L1 (Vin Vout) inductor l=1u
    C1 (Vin Vout) capacitor c=1u
    R0 (Vout 0) resistor r=100K

    //ac ac start=159.154K stop=159.156K step=.001
    ac ac start=155K stop=160K step=.001

    tran tran stop=1 method=traponly maxstep=1/(2000*159K)

    That number of timesteps is probably excessive - and I didn't wait for the simulation to end. If you look at the AC response, you can see that there's a very high Q on the resonsance. Looking at the beginning of the simulation (78million timepoints so far) shows the attached curve (obviously you can see the envelope).

    In real life there would be some non-idealities in there...

    Andrew.


    • Post Points: 20
  • Fri, Jul 13 2012 1:05 AM

    • xxgenerall
    • Top 200 Contributor
    • Joined on Wed, Feb 8 2012
    • Nanjing, Jiangsu
    • Posts 37
    • Points 455
    Re: A tran simulation problem of RLC resonated network. Reply

    Hi Mr Beckett,

    Thanks for your help.

    After reading your advise, I carried out 2 simulations again.

    The first simulation is carried out with  maxstep=1/(100*159K), as the original simulation setting. And, the second simulation is set up with  maxstep=1/(2000*159K), following Mr Beckett's advice.

    The figure of simulation results is as below.

    It can be seen that, the simulation result is correct when maxstep=1/(2000*159K), and is wrong when maxstep=1/(100*159K).

    The symbols are all turn on in the simulation result figure. It is indicated that, there are enough points among each Vout period, regardless of the maxstep value. So, I can't understand why simulation results are so different under the condition of different maxstep values.

     

    Mr Beckett, could you help me please? Thank you very much.


    • Post Points: 20
  • Fri, Jul 13 2012 2:37 AM

    Re: A tran simulation problem of RLC resonated network. Reply

    It's quite hard to explain this without a long lecture on how circuit simulation works (as I usually give when teaching details about using Spectre efficiently and effectively), but essentially what happens is that at each timestep the simulator is solving the non-linear differential circuit equations numerically (using Newton-Raphson iterative methods). This solves the equations to a certain level of accuracy (controlled with various parameters, primarily reltol/vabstol/iabstol). So the result at any one point has some error.

    Once it has a result for a timestep, the simulator will decide where it thinks it should take the next timestep. Assuming that it's decided a particular place (more later), it will construct a predictor curve based on previous timesteps - this is generally an adaptive quadratic equation - it depends a bit on the integration method, and whether there are breakpoints (discontinuities in slope, for example, such as you get with a pulse source), but in general it's a quadratic. It then solves the next timestep using the same iterative approaches starting from this predictor, and then compares the converged result against the predictor. if the difference is too high, it will reject the timestep and take a shorter one - this remaining error is called the "local truncation error".

    The simulator uses the trend of the local truncation error to preemptively adjust the timesteps - it will relax the timesteps if the error is reducing, and tighten them if the error is increasing - the goal is to take as few timesteps as possible, but still follow the waveform accurately.

    So at each timestep there are a few sources of error. With a driven circuit, these errors do not normally accumulate, as the driving signals correct for any errors made. With a fully autonomous circuit, the errors tend to persist - resulting in (effectively) numerical phase noise (in an oscillator). 

    In this case the circuit is driven, but has a resonance too - and the driving signal is dominating the response - and because of the high Q, the errors that are being made don't get corrected for. It probably would also get better if the tolerances were tightened, but by forcing a shorter timestep it has meant that the local truncation error is reduced and so it is better able to follow the very small changes from iteration to iteration which result in the amplitude of Vout decreasing. 

    You say that "there are enough points among each Vout period" - I don't know why you think that. Just because it looks smooth doesn't mean that a very small numerical error over a long time constant doesn't lead to inaccurate behaviour in such an ideal circuit with such high Q. Very high Q circuits, and in fact ideal circuits, are not that easy to simulate in time domain circuit simulators (not just spectre, but any simulator) because they really aren't optimized for that task. They are intended to simulate real world circuits in a reasonable time (but even then, oscillators can be tricky).

    Does that help?

    Andrew.

    • Post Points: 20
  • Fri, Jul 13 2012 6:20 PM

    • xxgenerall
    • Top 200 Contributor
    • Joined on Wed, Feb 8 2012
    • Nanjing, Jiangsu
    • Posts 37
    • Points 455
    Re: A tran simulation problem of RLC resonated network. Reply

    Hi Mr Beckett,

    Thanks for your great help. I appreciate it.

    Best wishes for you.

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by xxgenerall at 10 Jul 2012 06:07 AM. Topic has 7 replies.