Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Wait, just realized I wrote that last part backwards. It should be: So in broad strokes, what you should see is a lowpass spectrum parameterized by P - for P very small, you approach a DC spectrum, and for P close to 1 you approach a spectrum that's flat. On Tue, Nov 3, 2015 at 10:26 AM, Ethan Duniwrote: > Do you mean the literal Fourier spectrum of some realization of this > process, or the power spectral density? I don't think you're going to get a > closed-form expression for the former (it has a random component). For the > latter what you need to do is work out an expression for the > autocorrelation function of the process. > > As far as the autocorrelation function goes you can get some hints by > thinking about what happens for different values of P. For P=1 you get an > IID uniform noise process, which will have autocorrelation equal to a > kronecker delta, and so psd equal to 1. For P=0 you get a constant signal. > If that's the zero signal, then the autocorrelation and psd are both zero. > If it's a non-zero signal (depends on your initial condition at n=-inf) > then the autocorrelation is a constant and the psd is a dirac delta. Those > are the extreme cases. For P in the middle, you have a piecewise-constant > signal where the length of each segment is given by a stopping time > criterion on the uniform process (and P). If you grind through the math, > you should end up with an autocorrelation that decays down to zero, with a > rate of decay related to P (the larger P, the longer the decay). The FFT of > that will have a similar shape, but with the rate of decay inversely > proportional to P (ala Heisenberg Uncertainty principle). > > So in broad strokes, what you should see is a lowpass spectrum > parameterized by P - for P very small, you approach a flat spectrum, and > for P close to 1 you approach a spectrum that's all DC. > > Deriving the exact expression for the autocorrelation/spectrum is left as > an exercise for the reader :] > > E > > On Tue, Nov 3, 2015 at 9:42 AM, Ross Bencina > wrote: > >> Hi Everyone, >> >> Suppose that I generate a time series x[n] as follows: >> >> >>> >> P is a constant value between 0 and 1 >> >> At each time step n (n is an integer): >> >> r[n] = uniform_random(0, 1) >> x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] >> >> Where "(a) ? b : c" is the C ternary operator that takes on the value b >> if a is true, and c otherwise. >> <<< >> >> What would be a good way to derive a closed-form expression for the >> spectrum of x? (Assuming that the series is infinite.) >> >> >> I'm guessing that the answer is an integral over the spectra of shifted >> step functions, but I don't know how to deal with the random magnitude of >> each step, or the random onsets. Please assume that I barely know how to >> take the Fourier transform of a step function. >> >> Maybe the spectrum of a train of randomly spaced, random amplitude pulses >> is easier to model (i.e. w[n] = x[n] - x[n-1]). Either way, any hints would >> be appreciated. >> >> Thanks in advance, >> >> Ross. >> ___ >> dupswapdrop: music-dsp mailing list >> music-dsp@music.columbia.edu >> https://lists.columbia.edu/mailman/listinfo/music-dsp >> > > ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Do you mean the literal Fourier spectrum of some realization of this process, or the power spectral density? I don't think you're going to get a closed-form expression for the former (it has a random component). For the latter what you need to do is work out an expression for the autocorrelation function of the process. As far as the autocorrelation function goes you can get some hints by thinking about what happens for different values of P. For P=1 you get an IID uniform noise process, which will have autocorrelation equal to a kronecker delta, and so psd equal to 1. For P=0 you get a constant signal. If that's the zero signal, then the autocorrelation and psd are both zero. If it's a non-zero signal (depends on your initial condition at n=-inf) then the autocorrelation is a constant and the psd is a dirac delta. Those are the extreme cases. For P in the middle, you have a piecewise-constant signal where the length of each segment is given by a stopping time criterion on the uniform process (and P). If you grind through the math, you should end up with an autocorrelation that decays down to zero, with a rate of decay related to P (the larger P, the longer the decay). The FFT of that will have a similar shape, but with the rate of decay inversely proportional to P (ala Heisenberg Uncertainty principle). So in broad strokes, what you should see is a lowpass spectrum parameterized by P - for P very small, you approach a flat spectrum, and for P close to 1 you approach a spectrum that's all DC. Deriving the exact expression for the autocorrelation/spectrum is left as an exercise for the reader :] E On Tue, Nov 3, 2015 at 9:42 AM, Ross Bencinawrote: > Hi Everyone, > > Suppose that I generate a time series x[n] as follows: > > >>> > P is a constant value between 0 and 1 > > At each time step n (n is an integer): > > r[n] = uniform_random(0, 1) > x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] > > Where "(a) ? b : c" is the C ternary operator that takes on the value b if > a is true, and c otherwise. > <<< > > What would be a good way to derive a closed-form expression for the > spectrum of x? (Assuming that the series is infinite.) > > > I'm guessing that the answer is an integral over the spectra of shifted > step functions, but I don't know how to deal with the random magnitude of > each step, or the random onsets. Please assume that I barely know how to > take the Fourier transform of a step function. > > Maybe the spectrum of a train of randomly spaced, random amplitude pulses > is easier to model (i.e. w[n] = x[n] - x[n-1]). Either way, any hints would > be appreciated. > > Thanks in advance, > > Ross. > ___ > dupswapdrop: music-dsp mailing list > music-dsp@music.columbia.edu > https://lists.columbia.edu/mailman/listinfo/music-dsp > ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
[music-dsp] how to derive spectrum of random sample-and-hold noise?
Hi Everyone, Suppose that I generate a time series x[n] as follows: >>> P is a constant value between 0 and 1 At each time step n (n is an integer): r[n] = uniform_random(0, 1) x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] Where "(a) ? b : c" is the C ternary operator that takes on the value b if a is true, and c otherwise. <<< What would be a good way to derive a closed-form expression for the spectrum of x? (Assuming that the series is infinite.) I'm guessing that the answer is an integral over the spectra of shifted step functions, but I don't know how to deal with the random magnitude of each step, or the random onsets. Please assume that I barely know how to take the Fourier transform of a step function. Maybe the spectrum of a train of randomly spaced, random amplitude pulses is easier to model (i.e. w[n] = x[n] - x[n-1]). Either way, any hints would be appreciated. Thanks in advance, Ross. ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
� i have to confess that this is hard and i don't have a concrete solution for you. �it seems to me that, by this description: � r[n] = uniform_random(0, 1) if (r[n] <= P) � �x[n] =�uniform_random(-1, 1); else �x[n] = x[n-1]; � from that, and from the assumption of ergodicity (where all time averages can be replaced with probabilistic averages), then it should be possible to derive an autocorrelation function from this. but i haven't done it. � rots o' ruk. � r b-j � Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ethan Duni"Date: Tue, November 3, 2015 1:29 pm To: "A discussion list for music-related DSP" -- > Wait, just realized I wrote that last part backwards. It should be: > > So in broad strokes, what you should see is a lowpass spectrum > parameterized by P - for P very small, you approach a DC spectrum, and for > P close to 1 you approach a spectrum that's flat. > > On Tue, Nov 3, 2015 at 10:26 AM, Ethan Duni wrote: > >> Do you mean the literal Fourier spectrum of some realization of this >> process, or the power spectral density? I don't think you're going to get a >> closed-form expression for the former (it has a random component). For the >> latter what you need to do is work out an expression for the >> autocorrelation function of the process. >> >> As far as the autocorrelation function goes you can get some hints by >> thinking about what happens for different values of P. For P=1 you get an >> IID uniform noise process, which will have autocorrelation equal to a >> kronecker delta, and so psd equal to 1. For P=0 you get a constant signal. >> If that's the zero signal, then the autocorrelation and psd are both zero. >> If it's a non-zero signal (depends on your initial condition at n=-inf) >> then the autocorrelation is a constant and the psd is a dirac delta. Those >> are the extreme cases. For P in the middle, you have a piecewise-constant >> signal where the length of each segment is given by a stopping time >> criterion on the uniform process (and P). If you grind through the math, >> you should end up with an autocorrelation that decays down to zero, with a >> rate of decay related to P (the larger P, the longer the decay). The FFT of >> that will have a similar shape, but with the rate of decay inversely >> proportional to P (ala Heisenberg Uncertainty principle). >> >> So in broad strokes, what you should see is a lowpass spectrum >> parameterized by P - for P very small, you approach a flat spectrum, and >> for P close to 1 you approach a spectrum that's all DC. >> >> Deriving the exact expression for the autocorrelation/spectrum is left as >> an exercise for the reader :] >> >> E >> >> On Tue, Nov 3, 2015 at 9:42 AM, Ross Bencina >> wrote: >> >>> Hi Everyone, >>> >>> Suppose that I generate a time series x[n] as follows: >>> >>> >>> >>> P is a constant value between 0 and 1 >>> >>> At each time step n (n is an integer): >>> >>> r[n] = uniform_random(0, 1) >>> x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] >>> >>> Where "(a) ? b : c" is the C ternary operator that takes on the value b >>> if a is true, and c otherwise. >>> <<< >>> >>> What would be a good way to derive a closed-form expression for the >>> spectrum of x? (Assuming that the series is infinite.) >>> >>> >>> I'm guessing that the answer is an integral over the spectra of shifted >>> step functions, but I don't know how to deal with the random magnitude of >>> each step, or the random onsets. Please assume that I barely know how to >>> take the Fourier transform of a step function. >>> >>> Maybe the spectrum of a train of randomly spaced, random amplitude pulses >>> is easier to model (i.e. w[n] = x[n] - x[n-1]). Either way, any hints would >>> be appreciated. >>> >>> Thanks in advance, >>> >>> Ross. >>> ___ >>> dupswapdrop: music-dsp mailing list >>> music-dsp@music.columbia.edu >>> https://lists.columbia.edu/mailman/listinfo/music-dsp >>> >> >> > ___ > dupswapdrop: music-dsp mailing list > music-dsp@music.columbia.edu > https://lists.columbia.edu/mailman/listinfo/music-dsp -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
On 4/11/2015 9:39 AM, robert bristow-johnson wrote: i have to confess that this is hard and i don't have a concrete solution for you. Knowing that this isn't well known helps. I have an idea (see below). It might be wrong. it seems to me that, by this description: r[n] = uniform_random(0, 1) if (r[n] <= P) x[n] = uniform_random(-1, 1); else x[n] = x[n-1]; from that, and from the assumption of ergodicity (where all time averages can be replaced with probabilistic averages), then it should be possible to derive an autocorrelation function from this. but i haven't done it. Using AMDF instead of autocorrelation: let n be an arbitrary time index let t be the AMDF lag time of interest AMDF[t] = fabs(x[n] - x[n-t]) there are two cases: case 1, (holding): x[n-t] == x[n] case 2, (not holding) x[n-t] == uniform_random(-1, 1) In case 1, AMDF[t] = 0 In case 2, AMDF[t] = 2/3 (i think?) To get the limit of AMDF[t], weight the values of the two cases by the probability of each case case. (Which seems like a textbook waiting-time problem, but will require me to return to my textbook). Then I just need to convert the AMDF to PSD somehow. Does that seem like a reasonable approach? Ross. ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
On 4/11/2015 5:26 AM, Ethan Duni wrote: Do you mean the literal Fourier spectrum of some realization of this process, or the power spectral density? I don't think you're going to get a closed-form expression for the former (it has a random component). I am interested in the long-term magnitude spectrum. I had assumed (wrongly?) that in the limit (over an infinite length series), that the fourier integral would converge. And modeling in that way would be (slightly) more familiar to me. However, If autocorrelation or psd is the better way to characterize the spectra of random signals then I should learn about that. For the latter what you need to do is work out an expression for the autocorrelation function of the process. > As far as the autocorrelation function goes you can get some hints by thinking about what happens for different values of P. For P=1 you get an IID uniform noise process, which will have autocorrelation equal to a kronecker delta, and so psd equal to 1. For P=0 you get a constant signal. If that's the zero signal, then the autocorrelation and psd are both zero. If it's a non-zero signal (depends on your initial condition at n=-inf) then the autocorrelation is a constant and the psd is a dirac delta.Those are the extreme cases. For P in the middle, you have a piecewise-constant signal where the length of each segment is given by a stopping time criterion on the uniform process (and P). If you grind through the math, you should end up with an autocorrelation that decays down to zero, with a rate of decay related to P (the larger P, the longer the decay). The FFT of that will have a similar shape, but with the rate of decay inversely proportional to P (ala Heisenberg Uncertainty principle). So in broad strokes, what you should see is a lowpass spectrum parameterized by P - for P very small, you approach a flat spectrum, and for P close to 1 you approach a spectrum that's all DC. Deriving the exact expression for the autocorrelation/spectrum is left as an exercise for the reader :] Ok, thanks. That gives me a place to start looking. Ross. E On Tue, Nov 3, 2015 at 9:42 AM, Ross Bencina> wrote: Hi Everyone, Suppose that I generate a time series x[n] as follows: >>> P is a constant value between 0 and 1 At each time step n (n is an integer): r[n] = uniform_random(0, 1) x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] Where "(a) ? b : c" is the C ternary operator that takes on the value b if a is true, and c otherwise. <<< What would be a good way to derive a closed-form expression for the spectrum of x? (Assuming that the series is infinite.) I'm guessing that the answer is an integral over the spectra of shifted step functions, but I don't know how to deal with the random magnitude of each step, or the random onsets. Please assume that I barely know how to take the Fourier transform of a step function. Maybe the spectrum of a train of randomly spaced, random amplitude pulses is easier to model (i.e. w[n] = x[n] - x[n-1]). Either way, any hints would be appreciated. Thanks in advance, Ross. ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina"Date: Tue, November 3, 2015 11:51 pm To: music-dsp@music.columbia.edu -- > On 4/11/2015 5:26 AM, Ethan Duni wrote: >> Do you mean the literal Fourier spectrum of some realization of this >> process, or the power spectral density? I don't think you're going to >> get a closed-form expression for the former (it has a random component). > > I am interested in the long-term magnitude spectrum. I had assumed > (wrongly?) that in the limit (over an infinite length series), that the > fourier integral would converge. And modeling in that way would be > (slightly) more familiar to me. However, If autocorrelation or psd is > the better way to characterize the spectra of random signals then I > should learn about that. � it is the correct way to characterize the spectra of random signals. �the spectra (PSD) is the Fourier Transform of autocorrelation and is scaled as magnitude-squared. � so if you're gonna look at the spectrum in dB, it's 10*log10() not 20*log10(). � but it ain't gonna be easy. �however, i *think* you gotta 'nuf information. �this is basically a Markov process. � setting aside a complex random signal, autocorrelation is first expressed as a time-average of the product of your random signal times itself with a given lag. �it's an even function, so the PSD will be real. � with the assumption of ergodicity, the time average can be replaced with a probabilistic average for the same quantity. �i think there is enough information in your description to calculate the probabilistic average of the product of your random signal times itself displaced by a given lag. � i have a sneaky suspicion that this Markov process is gonna be something like pink noise. �maybe with different slopes (of dB vs. log frequency) depending on parameter P. �probabilistically holding on to a previous sample will have an LPF effect. -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina"Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com music-dsp@music.columbia.edu -- > On 4/11/2015 9:39 AM, robert bristow-johnson wrote: >> i have to confess that this is hard and i don't have a concrete solution >> for you. > > Knowing that this isn't well known helps. I have an idea (see below). It > might be wrong. > > >> it seems to me that, by this description: >> >> r[n] = uniform_random(0, 1) >> >> if (r[n] <= P) >> >> x[n] = uniform_random(-1, 1); >> >> else >> >> x[n] = x[n-1]; >> >> from that, and from the assumption of ergodicity (where all time >> averages can be replaced with probabilistic averages), then it should be >> possible to derive an autocorrelation function from this. >> >> but i haven't done it. > > Using AMDF instead of autocorrelation: > > let n be an arbitrary time index > let t be the AMDF lag time of interest > > AMDF[t] = fabs(x[n] - x[n-t]) > > there are two cases: > > case 1, (holding): x[n-t] == x[n] > case 2, (not holding) x[n-t] == uniform_random(-1, 1) > > In case 1, AMDF[t] = 0 > In case 2, AMDF[t] = 2/3 (i think?) � so if it's ASDF, it might be 1/3 > > To get the limit of AMDF[t], weight the values of the two cases by the > probability of each case case. (Which seems like a textbook waiting-time > problem, but will require me to return to my textbook). > > Then I just need to convert the AMDF to PSD somehow. � it *is* possible to convert from ASDF to autocorrelation (and then to PSD). �square the difference instead of fabs(). > > Does that seem like a reasonable approach? > perhaps. -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina"Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com music-dsp@music.columbia.edu -- � with mods >�Using ASDF instead of autocorrelation: > > let n be an arbitrary time index > let t be the ASDF lag time of interest > > ASDF[t] = (x[n] - x[n-t])^2 > > there are two cases: > > case 1, (holding): x[n-t] == x[n] this has probability of P^|t| � > case 2, (not holding) x[n-t] == uniform_random(-1, 1) this has probability of 1 - P^|t| > > In case 1, ASDF[t] = 0 > In case 2, ASDF[t] = (1/3)^2 �(i think) � so maybe it's � ASDF[t] = 0 * P^|t| �+ �(1/3)^2 * (1 - P^|t|) � now the autocorrelation function (AF) is related to the ASDF as � AF[t] = �mean{ x[n] * x[n-t] } AF[t] = �mean{ (x[n])^2 } �- (1/2)*mean{ (x[n] - x[n-t])^2 } � AF[t] = �mean{ (x[n])^2 } �- (1/2)*ASDF[t] � AF[t] �= �(1/3) �- �(1/2) *�(1/3)^2 * (1 - P^|t|) � this doesn't quite look right to me. �somehow i was expecting �AF[t] to go to zero as t goes to infinity. � > To get the limit of ASDF[t], weight the values of the two cases by the > probability of each case case. (Which seems like a textbook waiting-time > problem, but will require me to return to my textbook). > > Then I just need to convert the ASDF to PSD somehow. � � ASDF[t] = 2*AF[0] - 2*AF[t] � or � � AF[t] �= �AF[0] �- (1/2)*ASDF[t] � � PSD = Fourier_Transform{ AF[t] } > Does that seem like a reasonable approach? � it's the approach i am struggling with. � somehow, i don't like the AF i get. -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina"Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com music-dsp@music.columbia.edu -- > On 4/11/2015 9:39 AM, robert bristow-johnson wrote: >> i have to confess that this is hard and i don't have a concrete solution >> for you. > > Knowing that this isn't well known helps. I have an idea (see below). It > might be wrong. > > >> it seems to me that, by this description: >> >> r[n] = uniform_random(0, 1) >> >> if (r[n] <= P) >> >> x[n] = uniform_random(-1, 1); >> >> else >> >> x[n] = x[n-1]; >> >> from that, and from the assumption of ergodicity (where all time >> averages can be replaced with probabilistic averages), then it should be >> possible to derive an autocorrelation function from this. >> >> but i haven't done it. > > Using AMDF instead of autocorrelation: > > let n be an arbitrary time index > let t be the AMDF lag time of interest > > AMDF[t] = fabs(x[n] - x[n-t]) > > there are two cases: > > case 1, (holding): x[n-t] == x[n] > case 2, (not holding) x[n-t] == uniform_random(-1, 1) > > In case 1, AMDF[t] = 0 > In case 2, AMDF[t] = 2/3 (i think?) � so if it's ASDF, it might be 1/3 > > To get the limit of AMDF[t], weight the values of the two cases by the > probability of each case case. (Which seems like a textbook waiting-time > problem, but will require me to return to my textbook). > > Then I just need to convert the AMDF to PSD somehow. � it *is* possible to convert from ASDF to autocorrelation (and then to PSD). �square the difference instead of fabs(). > > Does that seem like a reasonable approach? > perhaps. -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina"Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com music-dsp@music.columbia.edu -- � with mods >�Using ASDF instead of autocorrelation: > > let n be an arbitrary time index > let t be the ASDF lag time of interest > > ASDF[t] = (x[n] - x[n-t])^2 > > there are two cases: > > case 1, (holding): x[n-t] == x[n] this has probability of P^|t| � > case 2, (not holding) x[n-t] == uniform_random(-1, 1) this has probability of 1 - P^|t| > > In case 1, ASDF[t] = 0 > In case 2, ASDF[t] = (1/3)^2 �(i think) � so maybe it's � ASDF[t] = 0 * P^|t| �+ �(1/3)^2 * (1 - P^|t|) � now the autocorrelation function (AF) is related to the ASDF as � AF[t] = �mean{ x[n] * x[n-t] } AF[t] = �mean{ (x[n])^2 } �- (1/2)*mean{ (x[n] - x[n-t])^2 } � AF[t] = �mean{ (x[n])^2 } �- (1/2)*ASDF[t] � AF[t] �= �(1/3) �- �(1/2) *�(1/3)^2 * (1 - P^|t|) � this doesn't quite look right to me. �somehow i was expecting �AF[t] to go to zero as t goes to infinity. � > To get the limit of ASDF[t], weight the values of the two cases by the > probability of each case case. (Which seems like a textbook waiting-time > problem, but will require me to return to my textbook). > > Then I just need to convert the ASDF to PSD somehow. � � ASDF[t] = 2*AF[0] - 2*AF[t] � or � � AF[t] �= �AF[0] �- (1/2)*ASDF[t] � � PSD = Fourier_Transform{ AF[t] } > Does that seem like a reasonable approach? � it's the approach i am struggling with. � somehow, i don't like the AF i get. -- � r b-j � � � � � � � � � r...@audioimagination.com � "Imagination is more important than knowledge." ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?
How about this: For a lag of t, the probability that no new samples have been accepted is (1-P)^|t|. So the autocorrelation should be: AF(t) = E[x(n)x(n+t)] = (1-P)^|t| * E[x(n)^2] + (1 - (1-P)^|t|)*E[x(n)*x_new] The second term covers the case that a new sample has popped up, so x(n) and x(n+t) are uncorrelated. So, this term vanishes. The first term is (1/3)*(1-P)^|t|, so I reckon: AF(t) = (1/3)*(1-P)^|t| Does that make sense? -Ethan On Wed, Nov 4, 2015 at 8:21 AM, robert bristow-johnson < r...@audioimagination.com> wrote: > > > Original Message > Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold > noise? > From: "Ross Bencina"> Date: Wed, November 4, 2015 12:22 am > To: r...@audioimagination.com > music-dsp@music.columbia.edu > -- > > > > with mods > > > > Using ASDF instead of autocorrelation: > > > > let n be an arbitrary time index > > let t be the ASDF lag time of interest > > > > ASDF[t] = (x[n] - x[n-t])^2 > > > > there are two cases: > > > > case 1, (holding): x[n-t] == x[n] > > this has probability of P^|t| > > > > > > case 2, (not holding) x[n-t] == uniform_random(-1, 1) > > this has probability of 1 - P^|t| > > > > > > In case 1, ASDF[t] = 0 > > In case 2, ASDF[t] = (1/3)^2 (i think) > > > > so maybe it's > > > > ASDF[t] = 0 * P^|t| + (1/3)^2 * (1 - P^|t|) > > > > now the autocorrelation function (AF) is related to the ASDF as > > > > AF[t] = mean{ x[n] * x[n-t] } > > AF[t] = mean{ (x[n])^2 } - (1/2)*mean{ (x[n] - x[n-t])^2 } > > > AF[t] = mean{ (x[n])^2 } - (1/2)*ASDF[t] > > > > AF[t] = (1/3) - (1/2) * (1/3)^2 * (1 - P^|t|) > > > > this doesn't quite look right to me. somehow i was expecting AF[t] to go > to zero as t goes to infinity. > > > > > > To get the limit of ASDF[t], weight the values of the two cases by the > > probability of each case case. (Which seems like a textbook waiting-time > > problem, but will require me to return to my textbook). > > > > Then I just need to convert the ASDF to PSD somehow. > > > > ASDF[t] = 2*AF[0] - 2*AF[t] > > > > or > > > > AF[t] = AF[0] - (1/2)*ASDF[t] > > > > > > PSD = Fourier_Transform{ AF[t] } > > > > Does that seem like a reasonable approach? > > > it's the approach i am struggling with. somehow, i don't like the AF i > get. > > > > -- > > > > > r b-j r...@audioimagination.com > > > > > "Imagination is more important than knowledge." > > ___ > dupswapdrop: music-dsp mailing list > music-dsp@music.columbia.edu > https://lists.columbia.edu/mailman/listinfo/music-dsp > ___ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp