The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Aug 18th, 2019, 11:37pm
Pages: 1
Send Topic Print
Negative power for flicker_noise() (Read 927 times)
cheap_salary
Senior Member
****
Offline



Posts: 162

Negative power for flicker_noise()
Dec 25th, 2018, 6:26am
 
See Junction diode by Marek Mierzwinski.
http://www.designers-guide.org/VerilogAMS/semiconductors/diode/diode.va

Negative power is used for flicker_noise() in this code like following.
Code:
if (Id > 0)
   AbsId = pow(Id, af);
else
   AbsId = -pow(-Id, af);

I(anode, internal) <+ flicker_noise(kf * AbsId, 1.0, "flicker"); 



What does this negative power mean ?

I think negative power is nonsense.

BTW, ahdllint of Cadence Spectre does not give any warning fir this negative power.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1971
Massachusetts, USA
Re: Negative power for flicker_noise()
Reply #1 - Jan 2nd, 2019, 1:03pm
 
I suspect simulators probably take the absolute value of the first argument to flicker_noise (as well as white_noise).
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2211
Silicon Valley
Re: Negative power for flicker_noise()
Reply #2 - Jan 2nd, 2019, 4:03pm
 
I am not really sure what you mean by negative power.

Perhaps your question regards this code:
Code:
if (Id > 0)
   AbsId = pow(Id, af);
else
   AbsId = -pow(-Id, af); 



This is basically a hack to handle negative currents. The pow() function requires its first argument to be non-negative, but you don't want to simply pass the first argument through an abs() function, because that changes the behavior of the model in a non-physical way.

To understand this, consider the case where af=1. In this case, the pow() function becomes a no-op, and the above collapses down to:
Code:
AbsId = Id 


If you were to add an abs() function to protect the pow() function, and then set af=1, the equivalent would be
Code:
AbsId = abs(Id) 


This is clearly a different behavior. To see that, consider the case were Id is a sinusoid. In the first case you are modulating the noise with a pure tone, in the second you are modulating it with a rectified sinewave, which has a high harmonic content but no component at the fundamental frequency.

If you are not comfortable with this model, just assume af=1 and simplify it down to:
Code:
I(anode, internal) <+ kf*flicker_noise(Id, 1, "flicker"); 



-Ken
Back to top
 
 
View Profile WWW   IP Logged
cheap_salary
Senior Member
****
Offline



Posts: 162

Re: Negative power for flicker_noise()
Reply #3 - Jan 2nd, 2019, 10:30pm
 
I mean -pow()
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2211
Silicon Valley
Re: Negative power for flicker_noise()
Reply #4 - Jan 2nd, 2019, 11:11pm
 
Did my response answer your question? If not, perhaps you can explain why the
minus sign in from of the pow() function bothers you?

-Ken
Back to top
 
 
View Profile WWW   IP Logged
cheap_salary
Senior Member
****
Offline



Posts: 162

Re: Negative power for flicker_noise()
Reply #5 - Jan 3rd, 2019, 8:37am
 
Ken Kundert wrote on Jan 2nd, 2019, 11:11pm:
Did my response answer your question?
No.

Ken Kundert wrote on Jan 2nd, 2019, 11:11pm:
If not, perhaps you can explain why the
minus sign in from of the pow() function bothers you?
Yes.
AbsId<0 for Id<0.
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2211
Silicon Valley
Re: Negative power for flicker_noise()
Reply #6 - Jan 3rd, 2019, 3:51pm
 
AbsID is a poor choice of names for that variable.
Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1971
Massachusetts, USA
Re: Negative power for flicker_noise()
Reply #7 - Jan 8th, 2019, 8:40am
 
Indeed, AbsId is misleading.

As I mentioned in my first response, I expect simulators probably take the absolute value of the argument to flicker_noise -- for standard spice small-signal noise analysis.

For PNoise (or HBNoise), Ken's point comes into play:
Quote:
This is clearly a different behavior. To see that, consider the case were Id is a sinusoid. In the first case you are modulating the noise with a pure tone, in the second you are modulating it with a rectified sinewave, which has a high harmonic content but no component at the fundamental frequency.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
cheap_salary
Senior Member
****
Offline



Posts: 162

Re: Negative power for flicker_noise()
Reply #8 - Jan 11th, 2019, 5:11am
 
Quote:
white_noise( PSD [ , "name"])
PSD is the power spectral density of the source where PSD is specified in units of A2/Hz or V2/Hz.

flicker_noise( power, exp [ , "name"])
power is the power of the source at 1 Hz.

[Conclusion]
Argument of Small-Signal Noise Sources in Verilog-A is power.

However negative power reflects polarity of Noise Source.

This is true for white_noise().
Quote:
I(anode, internal) <+ white_noise(2 * `P_Q * Id, "thermal");
Here PSD is not always positive.

flicker_noise(-pow()) is equivalent to -flicker_noise(pow()).

Quote:
if (Id > 0)
  AbsId = pow(Id, af);
else
  AbsId = -pow(-Id, af);
I(anode, internal) <+ flicker_noise(kf * AbsId, 1.0, "flicker");
is equivalent to
Quote:
if (Id > 0)
  I(anode, internal) <+ flicker_noise(kf * pow(abs(Id), af), 1.0, "flicker");
else
  I(anode, internal) <+ -flicker_noise(kf * pow(abs(Id), af), 1.0, "flicker");
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2019 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.