The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 7:29am
Pages: 1
Send Topic Print
Gibbs effects at RF simulation (Read 6465 times)
BangBang
New Member
*
Offline



Posts: 3

Gibbs effects at RF simulation
Jan 08th, 2013, 12:02am
 
First take a look at the simple case below:
*************************
.param FREQ    = 2Meg
.param T       = '1/FREQ'

 Vctrl1 ctrl1 0 pulse(0   1 0 0 0 'T/2'  T)
 Rctrl1 ctrl1 0 1k
 .hb    TONES = 'FREQ'  nharms = 50

 .option tranforhb=1 post     = 1        

 .probe hbtran     v(*)
 .probe hb     v(*)
.end
*********************************
With this case, Spectre RF will give ideal square waveform and HSPICE RF gives square waves with some High Frequency effect taking ( viewing the attached picture. )

Spectre says their result is correct since the source is a square waveform; while HSPICE mentions that HSPICE's one is correct since Gibbs effect will take effect at the case.

Which is one on earth correct? Why?

Thanks

BangBang
Back to top
 

rfwaveform.png
View Profile BangBang   IP Logged
rfidea
Senior Member
****
Offline



Posts: 159
Europe
Re: Gibbs effects at RF simulation
Reply #1 - Jan 8th, 2013, 1:50pm
 
The shooting method in SpectreRF is simulating the period as a transient response. Therefor you get a pure square wave since that is what you generating.

The harmonic balance simulator on the other hand only calculates a fixed number of harmonics, nothing more. The transient response is calculated via an ifft. For a square wave you then will see the Gibbs phenomena.
Back to top
 
 
View Profile   IP Logged
BangBang
New Member
*
Offline



Posts: 3

Re: Gibbs effects at RF simulation
Reply #2 - Jan 8th, 2013, 5:35pm
 
Please note that I have checked both HB results. For spectreRF, use Flexible Balance, For HSPICE RF, use HB analysis.  I don't use Shooting Newton.

I realize that continuous and discrete time fourier transforms are different in the explanation. For continuous one, it'said that f(t) ~ sin(t) + sin(3t)/3 + sin(5t)/5 + ... while for discrete one, read Eq 1 at http://en.wikipedia.org/wiki/Discrete_Fourier_transform .
Is it the reason to explain the difference between spectre and HSPICE RF? Which one is the correct one in fact?

Thanks

-BangBang
Back to top
 
 
View Profile BangBang   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Gibbs effects at RF simulation
Reply #3 - Jan 9th, 2013, 4:05am
 
When I go to http://ocw.mit.edu/ans7870/18/18.06/javademo/Gibbs/ and set the number of terms to 50, I get a result that looks pretty much like your HSPICE RF result. This is what I would expect as the time-domain representation of a square wave in a HB analysis with 50 harmonics.
Back to top
 
 
View Profile WWW   IP Logged
BangBang
New Member
*
Offline



Posts: 3

Re: Gibbs effects at RF simulation
Reply #4 - Jan 9th, 2013, 6:00pm
 
If HSPICE RF gives what is the expected, then two things comes out:
1. The result from SpectreRF HB may be not accpected to us. Or is square source adjusted by Cadence? Do we need trust Cadence's HB for square source?  Or need file CCR against SpectreRF HB for square source?
2. For square source, then we have to use Shooting. Since under HB, much error comes out due to FFT of square, so does it for small signal analysis (for example, for phase noise analysis, will it affect phase noise curve? ). Am I right?


Thanks

-BangBang
Back to top
 
 
View Profile BangBang   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Gibbs effects at RF simulation
Reply #5 - Jan 9th, 2013, 7:59pm
 
I suspect that you are simply plotting too many time points in HSPICE. 50 harmonics corresponds to 100 time point. If you plot 100 time points they will necessarily fall precisely on the square wave and no Gibbs phenomenon will be visible. Presumably this is what was done for the Spectre results. However if you plot more than 100 points they will be interpolated and then you will see the Gibbs phenomenon. Presumably, this is what was done for the HSPICE results.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Gibbs effects at RF simulation
Reply #6 - Jan 10th, 2013, 12:41am
 
That's indeed probably the best way of putting it: For arbitrary signals, HB only gives you accurate results for a limited number of time points that depends on the number of harmonics chosen.

If you are applying square waves to your circuit, shooting pss might really be the better alternative (see also http://www.cadence.com/community/blogs/rf/archive/2008/09/03/tip-of-the-week-whe...).
Back to top
 
 
View Profile WWW   IP Logged
rfidea
Senior Member
****
Offline



Posts: 159
Europe
Re: Gibbs effects at RF simulation
Reply #7 - Jan 10th, 2013, 12:51am
 
I think Ken is close to the answer when saying that when the calculated time points in the fft/ifft transformation in HB is exactly on the zero crossings of the Gibbs curve you will see the thrue square wave.

I was testing and you get a square when using odd numbers of harmincs and the Gibbs ringing curve when using even number of harmonics.
Back to top
 
« Last Edit: Jan 10th, 2013, 6:51am by rfidea »  
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.