Skip to content

Instantly share code, notes, and snippets.

@ericfont
Created December 11, 2025 23:11
Show Gist options
  • Select an option

  • Save ericfont/86d55909d121bbe087f6b11d9b569a93 to your computer and use it in GitHub Desktop.

Select an option

Save ericfont/86d55909d121bbe087f6b11d9b569a93 to your computer and use it in GitHub Desktop.
delta + DSM
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericfont
Copy link
Author

sim

image image image

@ericfont
Copy link
Author

image

@ericfont
Copy link
Author

retry exactly 200kHz oscillation peak

image

(obviously need longer simulation time to get more accuracy for above)

image image

@ericfont
Copy link
Author

raw PWM output without integration:

image

@ericfont
Copy link
Author

ericfont commented Dec 12, 2025

if apply sinc filter with nulls every multiple of 275kHz, and then resample at twice that, then the 275kHz components will be very very small when folded into baseband audio.

Alternatively could try to null the peaks at 200kHz and 370kHz.

Or could have nulls at 100kHz, 200kHz, 300kHz, 400kHz, etc. Need to investigate and see what noise distribution looks like.

@ericfont
Copy link
Author

if apply a simple-moving average with the null point being 275kHz:

image

@ericfont
Copy link
Author

ericfont commented Dec 12, 2025

if instead null multiples of 200kHz:

sinc1:
image

sinc2:
image

sinc3:
image

sinc4:
image

sinc5:
image

@ericfont
Copy link
Author

Possibly the lowpass enveloped matched an integrator in low freqs, then wouldn't need to apply integrator again. Maybe a lower null would match it better.

Could send raw pulse widths or could downsample before transmitting.

To do a DAC from 40kHz first could zero expand to 200kHz, and then could simulate the circuit digitally, which would generate a PWM that could then in analog domain be integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment