Reply by Jerry Avins August 26, 20082008-08-26
SammySmith wrote:
>> Consider the /difference/ between the original cosine and its quantized >> version; the error signal. Each difference will be a small saw tooth. >> The magnitude of each tooth will be greatest near the zero crossings of >> the cosine and zero at the cosine's peaks. The result is the same as >> suppressed-carrier double-sideband amplitude modulation of a sawtooth at > >> the quantizing rate by the original cosine. It's spectrum is calculable. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. > > The error signal is like a sawtooth with some bell shaped curves in > between. The bell shaped curve appears at the peak of the sinusoid. I have > seen analytical expressions for the amplitude of the quantized waveform > expressed as some Bessel functions, but I havent seen any analytical > expressions on the phase of the quantized waveform. > How can I know such an analytical expression for the phase? > > Sammy
What bell shape? One period of error is zero at its beginning and reaches the magnitude of the maximum difference at the other. The error grows nearly linearly within the interval if the number of sections per cycle of the cosine is large enough (32 segments are certainly enough). Assuming perfect straightness gives a result close enough to reality to provide a very good idea of the character. Second-order refinement -- assuming the segments are parabolic rather than straight -- gives excellent results with as few as 12 quantizing intervals per cycle and remains rather good with eight. Bessel functions are overkill. Jerry -- Engineering is the art of making what you want from things you can get.
Reply by SammySmith August 26, 20082008-08-26
> >Consider the /difference/ between the original cosine and its quantized >version; the error signal. Each difference will be a small saw tooth. >The magnitude of each tooth will be greatest near the zero crossings of >the cosine and zero at the cosine's peaks. The result is the same as >suppressed-carrier double-sideband amplitude modulation of a sawtooth at
>the quantizing rate by the original cosine. It's spectrum is calculable. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >�����������������������������������������������������������������������
The error signal is like a sawtooth with some bell shaped curves in between. The bell shaped curve appears at the peak of the sinusoid. I have seen analytical expressions for the amplitude of the quantized waveform expressed as some Bessel functions, but I havent seen any analytical expressions on the phase of the quantized waveform. How can I know such an analytical expression for the phase? Sammy
Reply by SammySmith August 26, 20082008-08-26
> >Consider the /difference/ between the original cosine and its quantized >version; the error signal. Each difference will be a small saw tooth. >The magnitude of each tooth will be greatest near the zero crossings of >the cosine and zero at the cosine's peaks. The result is the same as >suppressed-carrier double-sideband amplitude modulation of a sawtooth at
>the quantizing rate by the original cosine. It's spectrum is calculable. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >�����������������������������������������������������������������������
The error signal is like a sawtooth with some bell shaped curves in between. The bell shaped curve appears at the peak of the sinusoid. I have seen analytical expressions for the amplitude of the quantized waveform expressed as some Bessel functions, but I havent seen any analytical expressions on the phase of the quantized waveform. How can I know such an analytical expression for the phase? Sammy
Reply by Jerry Avins August 25, 20082008-08-25
Rune Allnor wrote:

   ...

> The only case when there exist an analytical expression for the > phase is in the idealized contitions where both the frequency > and phase of the sinusoidal are known, which is only of academic > interest.
Or in the testing lab when characterizing codec distortion. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Rune Allnor August 25, 20082008-08-25
On 24 Aug, 19:27, Jerry Avins <j...@ieee.org> wrote:
..
> Rune, > > Keep in mind that Sam is asking about quantization, not sampling, and > that he generates both the signal and the quantization instants.
It doesn't matter. Even if he generates a discrete-time sinusoidal, my arguments still hold if he introduces a random compunent oither to the frequency or phase. The only case when there exist an analytical expression for the phase is in the idealized contitions where both the frequency and phase of the sinusoidal are known, which is only of academic interest. Rune
Reply by glen herrmannsfeldt August 24, 20082008-08-24
Jerry Avins wrote:
(snip)

> Practical quantizing is done by a sampler, not by truncating a > continuous variable. Do you know the ticks of the quantizing clock > relative to the zero crossings of your signals? Is it constant? What are > your assumptions?
True, but requantizing, such as 24 bits down to 16 bits is somewhat similar. -- glen
Reply by Jerry Avins August 24, 20082008-08-24
Rune Allnor wrote:
> On 23 Aug, 21:32, "SammySmith" <eigenvect...@yahoo.com> wrote: > >> I assume that the number of samples per cycle donot change throughout the >> quantization process...at the moment I am just assuming ideal conditions. >> So the output after quantization is like a ZOH output. Can phase of the >> harmonics be predicted for such an output? > > No. > > Assume normalized sampling, T = 1, normalized quantization, dx = 1, > and a sinusoidal with amplitude A >> 1 so that the sine can be > approximated as a straight line in the vicinity of the zero > crossing. > > At t= -1 you see the sample value -1, at t= 0 you see the > sample 0, and at time t = 1 you see the sample value 1: > > (d,x) = {(-1,-1),(0,0),(1,1)} > > Where was the zero crossing? > > It turns out that the given samples can fit any sinusoidal > (or approximation to a sinusoidal) which is bounded by the > lines > > y1 = x-1 > y2 = x+1 > > on the interval t =[-1,1]. > > Basically, the zero crossing can be anywhere on the interval > t = [-1,1]. This uncertainty of the exact location of the > zero crossing is equivalent to a random phase in the > quantization noise.
Rune, Keep in mind that Sam is asking about quantization, not sampling, and that he generates both the signal and the quantization instants. I imagine that his model is a simplified case, and that he doesn't realize that it's too simplified to answer what he really wants to know. Nevertheless, the question has an answer as posed, with the caveat that the harmonics are best understood as those of the quantizer frequency. A simple model suffices to caprure the essence of what happens under Sam's ideal conditions. For definiteness, let the wave to be quantized be cos(2pi*f*t), and be quantized n times per cycle. (The quantizer runs at n*f*t.) Let the quantizing interval be small enough (n be large enough) so that the curvature of the cosine wave is negligible in that interval. Let one of the quantizing instants occur at t=0. Consider the /difference/ between the original cosine and its quantized version; the error signal. Each difference will be a small saw tooth. The magnitude of each tooth will be greatest near the zero crossings of the cosine and zero at the cosine's peaks. The result is the same as suppressed-carrier double-sideband amplitude modulation of a sawtooth at the quantizing rate by the original cosine. It's spectrum is calculable. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jerry Avins August 24, 20082008-08-24
SammySmith wrote:
>> SammySmith wrote: >>>> On 21 Aug, 03:12, "SammySmith" <eigenvect...@yahoo.com> wrote: >>>>> If I look at a spectrum of a uniformly quantized sinusoid, there are >>>>> harmonics at multiples of the input frequency. >>>>> Does someone know how can I predict the phase of those harmonics for >>> the >>>>> case of single as well as two tones inputs? >>>> You can't, as that would require knowledge about the >>>> exact time of the zero-crossing of the sinusoidal. >>>> >>>>> As quantization is not a linear process, therefore the phase of the >>>>> harmonics should not be just multiple of the fundamental's phase. > The >>>>> literature mostly talks about amplitude of the harmonics produced > due >>> to >>>>> quantization and not the phase... >>>> That's because finding the exact phase would require >>>> knowledge about the exact time of the zero-crossing >>>> of the sinusoidal. >>>> >>>> Rune >>> Thanks for replying, but if I have a determinitic singal such as >>> cos(w1)[singe tone] or cos(w1)+cos(w2) [2 tone], then I would know the > zero >>> crossings, then how can I know the phase of the harmonics produced > after >>> quantization. >> Practical quantizing is done by a sampler, not by truncating a >> continuous variable. Do you know the ticks of the quantizing clock >> relative to the zero crossings of your signals? Is it constant? What are > >> your assumptions? >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. > > I assume that the number of samples per cycle donot change throughout the > quantization process...at the moment I am just assuming ideal conditions. > So the output after quantization is like a ZOH output. Can phase of the > harmonics be predicted for such an output?
Only if the sampler is phase locked to the sampled waveform. This is forced in laboratory measurements of parameters that are difficult to get any other way and occurs naturally in digitally generated waveforms. With most signals, the number of samples per waveform cycle is rarely a rational number, let alone an integer. What is your application? In any case, the harmonics are of the sampling frequency. Of course, if the sample clock is phase locked to the sampled waveform, harmonics of the sample clock are also harmonics of the sampled waveform. Jerry -- Engineering is the art of making what you want from things you can get.
Reply by Rune Allnor August 23, 20082008-08-23
On 23 Aug, 21:32, "SammySmith" <eigenvect...@yahoo.com> wrote:

> I assume that the number of samples per cycle donot change throughout the > quantization process...at the moment I am just assuming ideal conditions. > So the output after quantization is like a ZOH output. Can phase of the > harmonics be predicted for such an output?
No. Assume normalized sampling, T = 1, normalized quantization, dx = 1, and a sinusoidal with amplitude A >> 1 so that the sine can be approximated as a straight line in the vicinity of the zero crossing. At t= -1 you see the sample value -1, at t= 0 you see the sample 0, and at time t = 1 you see the sample value 1: (d,x) = {(-1,-1),(0,0),(1,1)} Where was the zero crossing? It turns out that the given samples can fit any sinusoidal (or approximation to a sinusoidal) which is bounded by the lines y1 = x-1 y2 = x+1 on the interval t =[-1,1]. Basically, the zero crossing can be anywhere on the interval t = [-1,1]. This uncertainty of the exact location of the zero crossing is equivalent to a random phase in the quantization noise. Rune
Reply by SammySmith August 23, 20082008-08-23
>SammySmith wrote: >>> On 21 Aug, 03:12, "SammySmith" <eigenvect...@yahoo.com> wrote: >>>> If I look at a spectrum of a uniformly quantized sinusoid, there are >>>> harmonics at multiples of the input frequency. >>>> Does someone know how can I predict the phase of those harmonics for >> the >>>> case of single as well as two tones inputs? >>> You can't, as that would require knowledge about the >>> exact time of the zero-crossing of the sinusoidal. >>> >>>> As quantization is not a linear process, therefore the phase of the >>>> harmonics should not be just multiple of the fundamental's phase.
The
>>>> literature mostly talks about amplitude of the harmonics produced
due
>> to >>>> quantization and not the phase... >>> That's because finding the exact phase would require >>> knowledge about the exact time of the zero-crossing >>> of the sinusoidal. >>> >>> Rune >> >> Thanks for replying, but if I have a determinitic singal such as >> cos(w1)[singe tone] or cos(w1)+cos(w2) [2 tone], then I would know the
zero
>> crossings, then how can I know the phase of the harmonics produced
after
>> quantization. > >Practical quantizing is done by a sampler, not by truncating a >continuous variable. Do you know the ticks of the quantizing clock >relative to the zero crossings of your signals? Is it constant? What are
>your assumptions? > >Jerry >-- >Engineering is the art of making what you want from things you can get. >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;
I assume that the number of samples per cycle donot change throughout the quantization process...at the moment I am just assuming ideal conditions. So the output after quantization is like a ZOH output. Can phase of the harmonics be predicted for such an output? Sammy