Author |
Message |
cristian
Joined: Jul 15, 2004 Posts: 24 Location: Barcelona
G2 patch files: 1
|
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Aug 23, 2004 2:26 pm Post subject:
|
|
|
oh- If you integrated a bipolar oscillator that had a 50% duty cycle (sine, etc) you should get a zero output over time (might vary as the oscillator swings up & down). But if that osc. had a dc-offset, you'd get an output related to that offset (depeding on the rate of the signal, and your rate of integration, it could be a constant)...so it could also be used to detect how much DC-offset a signal has...much like a low pass filter would do (where a hi-pass would reject the dc-offset) (hence the reason it's an approximation...the lower you can make the LP cutoff, the "slower" your integration rate and the better the approximation...but it all depends on what you want!).
A true integration is instantaneous, meaning you're not calculating the area under a curve, since that involves a second dimension (time) to create a x*y=area situation. As x (time) approaches 0 (remember all those damn limits as x->0?), then the approximation is better...but you can get "close enough" if you choose the integration rate (sample rate & cutoff of a lowpass) appropriately for the function to be integrated.
So, a true integration isn't really possible, unless you're sample rate is infintely faster than your signal rate. |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Mon Aug 23, 2004 2:28 pm Post subject:
|
|
|
Ha ha... that's not what I expected, but it's cool anyway... (talking about the patch) |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Mon Aug 23, 2004 2:37 pm Post subject:
|
|
|
[quote="jSo, a true integration isn't really possible, unless you're sample rate is infintely faster than your signal rate.[/quote]
Well, it's good we have avoided the analog/digital debate. Those discussions we've had enough of, and they seem to never cease.
This does bring up, "what it truth?". |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Mon Aug 23, 2004 3:01 pm Post subject:
|
|
|
mosc wrote: | An impulse implies that the single goes up and then down. The Integrator would return to zero after N clock ticks. |
You're wrong Howard, not for the running average algorithm you described, but calculating a running average is not true integration.
Ok a little fresh up, just the basics :
http://www.sosmath.com/calculus/integ/integ01/integ01.html
The integral over time of the impulse is simply the area between it and the horizontal axis (presuming the bounds off the integral lay outside the impulse, and presuming the impulse is infinitesimally short).
This area will not change with time, the integral won't drop to zero again. The running average will, the low pass filter will (all FIR filters will) those are not true integrators they are leaky.
The integral of a constant positive value over time is a ramp up (until it hits the ceiling, hence the attenuation I mentioned in a previous post).
So for a pulse that is not short the integral starts at zero, during the impulse it rises and at the end of the impulse it will freeze.
Jan. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Mon Aug 23, 2004 4:47 pm Post subject:
|
|
|
Now for differentiation, it is defined as:
Hmm we can't divide, but luckily we don't have to as we can't truly differentiate anyway (as it's a continues operation that we can't perform, we can only perform the difference operation, a time discrete variation) delta-x will be a small constant so we just have to amplify.
So what does it say, well we have to calculate the difference between a value at x and a value at x + delta-x. Then we have to divide by delta-x, which is a constant value so we can multiply by it's reciprocal.
So my original circuit idea was not quite right.
Ok a patch & a picture to illustrate, I'm not able to connect a scope (as my NM's are boxed into the radio thingy) but on theoretical grounds I believe the output signals should be phase shifted by 90 degrees with respect to each other.
The integrator should phase shift into the other direction than the differentiator does. The original signal is always on the left channel, the red switch selects either the i or the d signal for the right channel. I think I got amplifications and attenuations set to reasonable values, but it all depends upon the frequency.
Jan.
The web site the picture comes from is http://web.mit.edu/wwmath/calculus/differentiation/definition.html
Description: |
An exaple for integration and differentiation |
|
Filesize: |
59.87 KB |
Viewed: |
28161 Time(s) |
|
Description: |
example for integration and differentiation |
|
Download |
Filename: |
dif-int.pch2 |
Filesize: |
1.3 KB |
Downloaded: |
2429 Time(s) |
|
|
Back to top
|
|
|
ManuMontevideo
Joined: May 07, 2004 Posts: 46 Location: Sevilla, Spain
G2 patch files: 1
|
Posted: Tue Aug 24, 2004 2:13 am Post subject:
|
|
|
wow, cristian vogel is here |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Tue Aug 24, 2004 2:49 am Post subject:
|
|
|
Wow! Yes, this is indeed educational! I've just now finally understood FIRs and IIRs by looking at these patches.
I just wonder how fast one could clock such a circuit on the G2. I'd guess 48kHz, by some logic toggling circuit. |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Tue Aug 24, 2004 11:17 am Post subject:
|
|
|
Well, Jan. If you were integrating over infinite time, then you would be right, but in synthesizers we integrate over finite time. So, maybe it is technically impossible to integrate over infinite time, but over finite time we can.
The most common place an integrator is used in an analog synthesizer is in the envelope generators. Integrators provide the ramps up and down. When we reduce the time constant of the integrator - the time over which we integrate - then we change the attack and decay times.
Integrators in analog synths are built with an operational amplifier and with a capacitor in the feedback loop. These are called integrators in electrical engineering parlance, I assure you, and they are in effect running averages over some finite time.
Sometimes in engineering, the pure math is bent a little in order to make wonderful things practical.
Description: |
From "IC Op-Amp Cookbook" by Walter G Jung, Howard Sams, 1974 |
|
Filesize: |
167.42 KB |
Viewed: |
28134 Time(s) |
|
Description: |
From "IC Op-Amp Cookbook" by Walter G Jung, Howard Sams, 1974 |
|
Filesize: |
116.24 KB |
Viewed: |
28132 Time(s) |
|
|
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Tue Aug 24, 2004 11:26 am Post subject:
|
|
|
In discrete time sampled systems, the best we can do for differentiation is to take the difference between this sample and the previous one. The limit is fixed at one sample. Delta Y over Delta X, is just that simple. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Tue Aug 24, 2004 1:17 pm Post subject:
|
|
|
mosc wrote: | Well, Jan. If you were integrating over infinite time, then you would be right, but in synthesizers we integrate over finite time. |
? ... integration of an impulse over any finite or infinite period time containing the duration of the impulse will yield the area under the impulse as the result of that integration.
To not be able to integrate over infinite time is not a problem, as long as it is assumed that the signal to integrate was zero before the integration started the results will be correct. If it was not zero during that time a constant can be added or subtracted to compensate, in practice though it is reasonable to consider the signals to have been zero before the machine was switched on.
That we are dealing here with a time disctrete system is not really important, there will only be a very small error in the integration as long as the signals are reasonably smooth over the period of the system clock, which to me seems to be safe to assume.
Now the funny thing is that, although you seem not to agree with me, you are presenting examples using perfect opamps (En=0, In=0), which will in fact yield perfect integrators and differentiators (when driven with a voltage source). So I don't quite see your point here.
Example, for the integrator :
The document states that :
delta-Eo = -Ein / RC
which implies that when
Ein = 0
it will be the case that
delta-Eo = 0
which means that Eo will not change.
And so, when an impulse is fed into this hypothetical circuit the output will make a DC jump and not return to zero.
I said hypothetical, as I'm well aware that the (En=0, In=0) criterium is an approximation and that the circuits in reality will be leaky.
My point was that its possible on the G2 to come up with something better than that. Please prove me to be wrong there.
There is a point in trying to do better, with good integrators it is possible to make state variable filters which is not so easy to do with low pass filters (I tried that on the NM 'Classic').
Considering differentiation on a time discrete system we seem to agree. That is, I see no light between your statement and mine (I only added the notion that delta-X is a constant, and I assume you will agree with that).
Jan. |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Tue Aug 24, 2004 2:09 pm Post subject:
|
|
|
Yes, delta-x = delta-time = 1 sample.
Well, if we are argueing and agreeing at the same time, then no sense in continuing this discussion...
Is there an easier way to get a signal conditioner than I have used. A control that when straight up give zero signal. When turned to the right it give increasingly stronger signal. When turned to the left it give increasingly stronger inverted signal. I used a multiplier and a bipolar constant. It would be nice to have a single module to do that. Even on the Moog Modular there are modules for that commonly used functions. Very usefull when controlling a filter frequency with an envelope for example. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Tue Aug 24, 2004 2:39 pm Post subject:
|
|
|
mosc wrote: | Well, if we are argueing and agreeing at the same time, then no sense in continuing this discussion... |
Ok.
Quote: |
Is there an easier way to get a signal conditioner than I have used. |
One module ... if you've got a spare morph I can see some trickery with a mix2-1b (the one with the inverter buttons) module to work, not really ideal.
Otherwise it would be a wish list item I think, maybe the LevAmp could be generalized a bit to allow for bipolar mode. I'd vote yes ...
Jan. |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Tue Aug 24, 2004 3:10 pm Post subject:
|
|
|
I think I'm starting to understand what your are saying. The area under the curve for an impule over an infinite amount of time will be constant because the area never changes, and the impulse is always there. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Tue Aug 24, 2004 3:23 pm Post subject:
|
|
|
Yes .... that's a property of the system ... an integrator does not forget ... it's an IIR filter .... and indeed, it can blow up ....
glad things can be said informal again, my brain hurts, we would need a math MOD to continue ...
Jan. |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Tue Aug 24, 2004 3:40 pm Post subject:
|
|
|
All you have to do to fix that infinity problem is scale the coefficents by 1/T. Now all we need is a divider... |
|
Back to top
|
|
|
pstnotpd
Joined: Apr 09, 2004 Posts: 34 Location: Netherlands
G2 patch files: 5
|
Posted: Wed Aug 25, 2004 11:11 am Post subject:
|
|
|
Well, I must admit it's rather academic, or 'des keizers baard' (dutch).
I remember way back we had an analog computer at school which did integration and differentiation using discrete components. I've always thought it would be fun to try and use such a device on an analog modular to experiment and was wondering if it could be done using the red monster. I'm trying to dig back in the books, but obviously get stuck in Laplace transformations and stuff which I haven't done in ages.
Anyway. my feeling was that if we'd have a true integrator or differentiator it would mean a pure sine is transformed to a cosine and my gut feeling says a LP or HP filter can't do that by itself as it by definition reduces gain at higher frequencies.
Also I remember somethink like a 1st order system (i.e. filter) would be a feedback loop over an integrator, which is not an integrator.
So the question would be how to eliminate the feedback component in a filter I suppose.
I probably will get back to this when I've had a few less Duvels...... |
|
Back to top
|
|
|
pstnotpd
Joined: Apr 09, 2004 Posts: 34 Location: Netherlands
G2 patch files: 5
|
Posted: Wed Aug 25, 2004 11:20 am Post subject:
|
|
|
Wow! I just noticed that we already got on page 2 for this one!
Ignore my last post (I think) I'll have to read through all this first |
|
Back to top
|
|
|
|