|
|||
Okay, here we go again:H = (1/g - 1/z) / (g - 1/z)
= (1 - g/z) / (g² - g/z)OKAY. Now we restrict z to the unit circle and require H = -1.(1 - g∙exp(-iφ)) / (g² - g∙exp(-iφ)) = -1 1 - g∙exp(-iφ) = -g² + g∙exp(-iφ) g² + 1 = 2g∙exp(-iφ) exp(-iφ) = (g² + 1) / 2g -iφ = ln [(g² + 1) / 2g] φ = i ln [(g² + 1) / 2g]WHAT THE HELL? In order for φ to be real, the logarithm must evaluate to -i??? So(g² + 1) / 2g = exp(-i)?????????? What is wrong with me? Why can't I do this problem? |
|||
| ^ | Joined: 11 Jul 2004 Member: #32838 Location: Southern California, USA | ||
|
|||
MackTuesday wrote: Okay, here we go again: Okay, clearly I just don't know what I'm doing. Because the damn magnitude response for the above is 1/g, not 1. So I was right in the first place:H = (1 - g/z) / (g - 1/z)Again setting z = exp(-iφ) and H = -1:(1 - g∙exp(-iφ)) / (g - exp(-iφ)) = -1
Quote: H = (1/g - 1/z) / (g - 1/z)
= (1 - g/z) / (g² - g/z) 1 - g∙exp(-iφ) = -g + exp(-iφ) g + 1 = (g + 1)∙exp(-iφ) exp(-iφ) = 1 φ = 0This is true no matter what g is. If you're getting phase inversion anywhere other than zero frequency, there's probably something wrong with your implementation. There. I'm done. Finished. Finito. Complete. No more. Goodbye. |
|||
| ^ | Joined: 11 Jul 2004 Member: #32838 Location: Southern California, USA | ||
|
|||
All righty then ...
I think this is it : rTheta = rFreq * krPi * rInvSmplRate; rD = tan(rTheta); rG = (1.0 - rD) / (1.0 + rD); peace y'all pj |
|||
| ^ | Joined: 30 Nov 2003 Member: #10706 Location: Newport Beach CA USA | ||
|
|||
http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt says:
w0 = 2*pi*f0/Fs alpha = sin(w0)/(2*Q) b0 = 1 - alpha b1 = -2*cos(w0) b2 = 1 + alpha a0 = 1 + alpha a1 = -2*cos(w0) a2 = 1 - alpha ...as you see, with biquad allpass filters, you have an additional degree of freedom: Q, which determines how steep the slope of the phase response is, when it passes through -180 degrees |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Robin from www.rs-met.com wrote: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt says:
w0 = 2*pi*f0/Fs alpha = sin(w0)/(2*Q) b0 = 1 - alpha b1 = -2*cos(w0) b2 = 1 + alpha a0 = 1 + alpha a1 = -2*cos(w0) a2 = 1 - alpha ...as you see, with biquad allpass filters, you have an additional degree of freedom: Q, which determines how steep the slope of the phase response is, when it passes through -180 degrees This corroborates what I was saying. You might be able to get phase inversion away from w0 = 0 with a biquad allpass, but not with a single pole and zero. |
|||
| ^ | Joined: 11 Jul 2004 Member: #32838 Location: Southern California, USA | ||
|
|||
Guys!
A while back I wrote a simple VST effect called "PhaserTst" - I've already verified the formula I gave above using this test scaffold and it works as close to perfect as I need... Currently I use a mix of low-level white noise and nine octaves of sinewaves as input to the plugin - the plugin simply combines the "phased" signal and the dry signal and then I look at the output in a spectrum analyzer for frequency dips. It was this plugin that provided the original empirical data and subsequently verified the final formula. peace, pj |
|||
| ^ | Joined: 30 Nov 2003 Member: #10706 Location: Newport Beach CA USA |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group
















