What causes this 360 phase shift at ~20khz? - Page 2 - diyAudio
Go Back   Home > Forums > Amplifiers > Solid State

Solid State Talk all about solid state amplification.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 17th September 2012, 04:10 PM   #11
kevinkr is offline kevinkr  United States
diyAudio Moderator
 
kevinkr's Avatar
 
Join Date: Sep 2004
Location: Boston, Massachusetts
Blog Entries: 6
There is no inherent reason in this circuit design or the model itself for this abrupt phase shift, it is an artifact of the simulation (software) itself.

I don't know what simulation software you are using but it is likely there is a configuration issue or math error.

Is Vee referenced to (spice) signal ground?
__________________
"Extraordinary claims require extraordinary evidence." - Carl Sagan
  Reply With Quote
Old 17th September 2012, 04:58 PM   #12
diyAudio Member
 
Join Date: Feb 2012
Quote:
Originally Posted by kevinkr View Post
There is no inherent reason in this circuit design or the model itself for this abrupt phase shift, it is an artifact of the simulation (software) itself.

I don't know what simulation software you are using but it is likely there is a configuration issue or math error.

Is Vee referenced to (spice) signal ground?
I'm simulator i'm using is ngspice and yes vee is referenced to ground.
  Reply With Quote
Old 17th September 2012, 05:06 PM   #13
kevinkr is offline kevinkr  United States
diyAudio Moderator
 
kevinkr's Avatar
 
Join Date: Sep 2004
Location: Boston, Massachusetts
Blog Entries: 6
If you're using a PC running windows or linux (wine) try downloading and installing LTSpice IV which is free and very good. This should give you the expected result. I'm not familiar with ngspice so I can't advise as to what settings might be causing this result. What is the generator source you are using in the simulation? (sine source?)
__________________
"Extraordinary claims require extraordinary evidence." - Carl Sagan
  Reply With Quote
Old 17th September 2012, 05:13 PM   #14
diyAudio Member
 
Join Date: Feb 2012
Quote:
Originally Posted by kevinkr View Post
If you're using a PC running windows or linux (wine) try downloading and installing LTSpice IV which is free and very good. This should give you the expected result. I'm not familiar with ngspice so I can't advise as to what settings might be causing this result. What is the generator source you are using in the simulation? (sine source?)
I'm running linux with linux compiled ngspice:

Ngspice circuit simulator - NEWS

In general this simulator is very good and I suspect it's something with either the model or some spice settings. Source is just a voltage source DC 0 AC 1. No time domain sinusoidal component.
  Reply With Quote
Old 17th September 2012, 05:23 PM   #15
DF96 is offline DF96  England
diyAudio Member
 
Join Date: May 2007
When software outputs an angle it almost certainly comes from an arctan calculation, or something similar. Assuming you are dealing with normal angles, where 360 degrees = 0 degrees, then +180 and -180 are exactly the same thing. There is no sudden phase shift, just a smooth transition between 179 and 181 (=-179) or vice versa.

So this is not an artifact of the display or the calculation; it is simply a reflection of reality. That is how angles work! Some software can hide this reality from the user, by pretending that an angle greater than 360 is possible - but then the hiding is an artifact.
  Reply With Quote
Old 17th September 2012, 07:26 PM   #16
diyAudio Member
 
Join Date: Feb 2012
Quote:
Originally Posted by DF96 View Post
When software outputs an angle it almost certainly comes from an arctan calculation, or something similar. Assuming you are dealing with normal angles, where 360 degrees = 0 degrees, then +180 and -180 are exactly the same thing. There is no sudden phase shift, just a smooth transition between 179 and 181 (=-179) or vice versa.

So this is not an artifact of the display or the calculation; it is simply a reflection of reality. That is how angles work! Some software can hide this reality from the user, by pretending that an angle greater than 360 is possible - but then the hiding is an artifact.
In in the arctan function, there is some input in the arctan calculation that causes the output of arcan to go from -179.99 to 180.01 or something similar? Wouldn't that apply that there is a 3rd pole somewhere near 20khz? If so, why doesnt this show up in the gain plot? It's perfectly flat all the way out to 10MHz or 100MHz.
  Reply With Quote
Old 17th September 2012, 08:03 PM   #17
diyAudio Member
 
Join Date: Sep 2011
You won't have a full 360 degrees phase shift timewise. The line is totally vertical, there's no 'instantanious' phase change. The grapher just changes around the sign and continues using the positive view on the phase.
__________________
Negative Feedback: The Need for Speed
  Reply With Quote
Old 17th September 2012, 08:50 PM   #18
DF96 is offline DF96  England
diyAudio Member
 
Join Date: May 2007
To get from -179.9 to +179.9 is a phase shift of 0.2 degrees. A rolloff many decades away in frequency can easily do this.

To get an arctan to switch output like that you need the input to change by about 0.0035.
  Reply With Quote
Old 17th September 2012, 09:14 PM   #19
diyAudio Member
 
Join Date: Jul 2005
Location: Podkarpacie, Poland
In AC analysis Spice opearates internaly with complex numbers (a+jb, where j^2=-1, see Complex number - Wikipedia, the free encyclopedia if You are not familiar with that). When You display magnitude or phase, then is computed from that complex numbers. Phase is computed using arctan function: phase=arctan(b/a) which always gives You value between -180deg and 180deg.

And also this is AC analysis, so is in frequency domain. There is no time delay, because there is no time. So there is no difference if phase is 365 deg or just 5deg. If You wanna see delay, use transient analysis. If there is really >360 phase shift (at some high frequency), You can see it(although it may be not so easy).
-------edit-------
In some commercial software phase is computed in way that it may exceed -180 - 180 boundaries - I don't know how it is done, but there is probably some simple trick. Mathematically there is no difference, just looks better on graphs.
__________________
Wojtek

Last edited by wojtek5001; 17th September 2012 at 09:18 PM.
  Reply With Quote
Old 17th September 2012, 09:19 PM   #20
Enzo is offline Enzo  United States
diyAudio Member
 
Join Date: Sep 2004
Location: Lansing, Michigan
When your clock on the wall moves from 11:59 to 12:01, there is an instantaneous 24-hour change. The time line instantly switches from the positive end of one day to the exact opposite end of the next day. This is the same idea.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X-over Phase shift question kiwilistener Multi-Way 2 29th May 2012 10:49 AM
Phase Shift PWM Andrew Eckhardt Class D 6 14th November 2010 07:56 AM
Why am I getting a positive phase shift sigpl Solid State 22 29th December 2009 04:31 PM
Zero phase-shift gareth Solid State 11 9th May 2008 04:45 PM
audibility of full 360 degrees phase shift mazurek Multi-Way 3 14th January 2006 10:09 PM


New To Site? Need Help?

All times are GMT. The time now is 01:47 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2