S
server
Guest
On Sat, 20 Aug 2022 12:34:28 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:
Sure, you picked a lowpass filter to smooth out those giant slow
steps. Some of those steps are half a microsecond.
Try it with a filter that will work at 15 MHz.
<langwadt@fonz.dk> wrote:
lørdag den 20. august 2022 kl. 05.33.55 UTC+2 skrev jla...@highlandsniptechnology.com:
On Fri, 19 Aug 2022 14:41:47 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:
fredag den 19. august 2022 kl. 20.34.09 UTC+2 skrev John Larkin:
On Fri, 19 Aug 2022 12:14:25 -0400, Phil Hobbs
pcdhSpamM...@electrooptical.net> wrote:
On 8/18/22 5:11 PM, John Larkin wrote:
On Thu, 18 Aug 2022 12:41:33 -0400, Phil Hobbs
pcdhSpamM...@electrooptical.net> wrote:
On 8/17/22 9:58 AM, jla...@highlandsniptechnology.com wrote:
On Wed, 17 Aug 2022 06:44:18 -0000 (UTC), Jasen Betts
use...@revmaps.no-ip.org> wrote:
On 2022-08-16, whit3rd <whi...@gmail.com> wrote:
A smaller sine/cos table might be used with
sine(a+b) = sine(a) cos(b) + cos(a)sine(b)
as in, with small deviations \'b\' from major steps in the table, two multiplies and
an add give you 2^20 different accurate sines from a 2^10 size sine table.
Since cos(b) will always be near unity ( 1 plus order of 2^-20 when b is under 2^-10),
you can make that one multiply and an add. Perhaps that\'s what the \'phase
accumulator\' is for, estimating the \'b\'?
AKA \"CORDIC\"
In an FPGA, one could have the basic sine table and an interpolation
slope table and maybe just add. Do the math at compile time, not run
time.
At some point, dac resolution becomes the limit, not sine table
resolution.
Apologies if somebody has pointed this out upthread--I didn\'t follow it all.
If you have enough bits in the phase accumulator, and apply the right
amount of numerical gain ahead of the DAC, you can always get a
well-behaved trapezoidal waveform with a nice smooth fine-grained
staircase near the zero crossing, which will filter well. (Saturating
arithmetic is required, obviously.)
You just need to make sure that the duration of the linear part is at
least twice the filter\'s settling time (to the required accuracy), so
that the ringing from the corner of the trapezoid has all settled out by
the time you get to the zero crossing. If you increase the numerical
gain like 1/f, this works down to as low a frequency as you like.
Right. The trapezoid corner happens at an XO edge, which makes output
jitter, so the filter has to forget that corner but average as many
samples as it can along the linear slope. The trapezoid is not
bandlimited so violates the concept of the Sampling Theorem.
This argues for making the comparator trip at near the top of the
trapezoid, not the mid-voltage zero crossing equivalent.
One might make the trapezoid edge steeper at low synthesized
frequencies and maybe incorporate more LSBish phase accumulator bits.
Somehow. Seamlessly.
You just multiply by 1/f, using saturating arithmetic. That keeps the
slope at the zero crossing the same at all frequencies, allows the same
amount of time for the filter to settle, produces nearly the same
settling artifacts, and so forth and so on. At high frequencies you
do it the normal way.
At low frequencies, we need to use more of the bits of the phase
accumulator, and equivalently more entries in the sine lookup table,
in order to keep pumping out DAC codes at a rate the filter can
smooth.
Multiplying a sine lookup integer by 1/f just makes the amplitide
jumps bigger.
multiply before truncating
I think that makes jitter worse. It violates Nyquist reconstruction
principles by adding sharp XO-clocked corners.
Putting gain in front of a zero-crossing comparator does nothing. It\'s
still a zero-crossing comparator.
here\'s a simple example
17bit accumulator, turned into 16bit 0-pi angle
angle15_8 is upper 8bit of angle, used to index sine table to generate out1
anglex16clamp_11_4, is angle x16 clamped used as index sine table to generate out2
https://imgur.com/gTpi1IA
zoomed in on the zero crossing:
https://imgur.com/vX27f0m
Sure, you picked a lowpass filter to smooth out those giant slow
steps. Some of those steps are half a microsecond.
Try it with a filter that will work at 15 MHz.