Showing posts with label phase. Show all posts
Showing posts with label phase. Show all posts

Tuesday, January 2, 2024

AC-coupling and filter feedback

I plan to have a feedback path in all my filters to be able to overdrive them. This is achieved by returning the output to the input (in phase) via a VCA. 

Now, both on the Juno and JP6 filters, this introduced a strange effect: Whenever I turned the cutoff down (in LP mode), or reduced the amplitude of the input, the output started ping-ponging between very high and very low. The filtered signal was still in there, but an offset with changing polarity was added:

Ping-ponging with a period of 6ms is introduced when feedback is increased

For the Juno filter, the feedback amp was very similar to the output VCA, and included the same 1uF AC-coupling cap. 

First, I thought this effect was due to the input to the feedback not being properly centered, so I introduced a trimpot as well. This had some effect, but only because it reduced the feeedback. I then tried removing the AC coupling cap in the feedback amp, and suddely the ping-ponging stopped.

I still have a large offset in the signal prior to the output amp, but this is mostly taken care of by the AC-coupling cap before the amp:

Top: Output before the output VCA AC-coupling cap when turning the feedback pot rapidly up and down. Bottom: The output. The spikes are caused by the AC-coupling cap doing its job. It takes around 400ms to properly settle.

It's a working concept but not entirely satisfying. I don't know what else to do at the moment, and when things don't change too rapidly this works ok.

To reduce the time the signal takes to settle, I can replace the 1uF cap with a 470nF one, that halves the settling time:

470nF cap gives 200ms settling time

Now, these examples are from setting a low cutoff frequency. We see the same with a low amplitude input, but then an additional effect appears:

A +/- 1.2V signal when the feedback is introduced. At high feedback the output suddely drops.

 

Not sure what causes this, and it is only at close to max feedback, but suddenly the output drops and changes shape. It looks like some kind of phase reversal (but maybe not the kind the TL07x is notorious for) as the feedback suddely attenuates the signal, but not sure what is going on. Here's a closeup:


Edit: My current theory is:

The max feedback in the current circuit is "unity" (or perhaps slightly more?), e.g. we feed a signal with the same amplitude as the input back from the output. This means that for every iteration, the signal will increase in strength, not going towards a stable point? Presumably, this can have some strange effects.

I'm also simulating the feeback at extreme values - I've changed the feedback CV range to 0-8V and use a 47k resistor in place of the 100k input for the feedback, this produces some very strange results in the simulation that I need to look closer into.

Edit 2: Look at this!

I managed to simulate an overdrive amount sweep - and it looks exactly like the output I see in the real circuit!

I set the overdrive CV to be equal to the number of seconds since simulation started (e.g. overdrive CV is 1V at 1s etc), so we can see that the output breaks down around 3.5V. 


As some of the op amps in my simulation does not have power rails, the ranges may be a bit different. Also, the signal is +/-2.5V, not +/-1.2V.

Oh, and how do one do voltage sweeps combined with transient analysis in LTSpice?

You replace the voltage source with a Behavioral Voltage source (BV), which has a formula of V=[...]. To get the current time use 'time', time is in seconds so V=time will do what happens here. Then run a normal Transient and make sure that the stop time is sufficiently large to capture what you want to see.

Edit 3:

I'm searching modwiggler to explain what I see. Here is a start:
 

Positive feedback causes oscillations:
https://modwiggler.com/forum/viewtopic.php?t=274218&hilit=filter+feedback+issue


Friday, August 18, 2023

Output phase, SVF Cell 1 and 2

Cell 1



LP, BP and HP are in phase with the filter input (which is NOT the cell input, but IS the summing point for feedback).

Notch, however, is reverse before and after the notch point. This means it will not work with feedback. I address this further down in this post.

Allpass is in phase before and after the cutoff frequency, and 180 degrees off at the cutoff frequency. I am not sure if this is wrong and has to be corrected, I need to check the expected behaviour, though I believe that adding AP and dry should give a notch, which is what would happen here as the 180 degrees off at cutoff would cancel out the dry signal.

Cell 2

Cell 2, all outputs are in phase with input


The outputs of Cell 2 (as seen by the mux) is in phase with its input (Holds true for LP, BP and HP, and of course for the Cell 1 direct as this is the same as the input to Cell 2).

The op amp after the mux inverts the signal so the output phase of the filter is inverted. 



This affects both the output itself and the filter feedback. The output phase is selectable so that's taken care of there. The feedback on the other hand, is inverted back in the feedback VCA (positive input + inverting op amp).

Feedback VCA inverts signal

Alternative notch

Combining dry (inverted) and BP (unity gain) can give me notch without having to add another op amp (as described here: http://atosynth.blogspot.com/2019/01/jupiter-6-all-pass-filter.html)


Simulating this shows a big difference in the offness of the notch - green is LP + HP, red is dry + BP.


From the simulation, LP + HP results in a -1.2dB down to -36dB notch. Dry + BP results in -19.5dB.




Measured in my circuit I see approx +/-150mV for LP+HP, though it looks a bit noisy. Dry + BP is +/-375mV.





Also, gain when no notch is a little low:


The output is +/-5V. To boost it to +/-5.5V which is the range of the other waveforms, we can use 56k + 3.9k in op amp feedback, making the gain 1.07

Here is the alternative notch circuit: