DSP between 0.1 Hz - 500 Hz

danielmtzz

New member
Hello!

I'm new here and don't have a lot of background with microcontrollers. Detailed explanations would be greatly appreciated :)
I have an application where I need to read sensor data that's primarily composed of discrete tones between 0.1 Hz - 500 Hz. I then need to do the following after reading it:

1) Apply a band pass filter to isolate a particular tone in the signal.
2) delay the filtered signal by an adjustable amount (between 10 - 1000 msec).
3) output the digitally processed signal via a dac channel for further analog processing.

My question is: What's the most suitable hardware to use here? I'm thinking of a Teensy 4.0 with the audio adapter board (just to use it as a simple dac), but I don't know if that's a good idea given my bandwidth. Stability over time is important. I don't want the amplitude and delay of the output to drift/change over time by a significant amount (which is why I'm not a fan of using the PWM outputs). I would like to use a DAC.
 
The simple and clever way that I have seen to generate a sinusoidal signal with a variable phase delay is as follows:
  • signal A --> band-pass X Hz --> signal B --> low-pass X Hz --> signal C
  • this results in B being in phase with A, and C being 90 deg out of phase
  • combine B and C to get desired signal
We do this with T4.1 using the on-board ADC and SPI DAC
 
One last question: Will the variable phase delay approach you describe also change the amplitude of the signal? If I'm adjusting corner frequencies in filters, I will unavoidably also affect the magnitude response of the desired signal? I'm trying to have a variable phase delay scheme that keeps the magnitude of the filtered signal unchanged during phase adjustment.
 
One last question: Will the variable phase delay approach you describe also change the amplitude of the signal? If I'm adjusting corner frequencies in filters, I will unavoidably also affect the magnitude response of the desired signal? I'm trying to have a variable phase delay scheme that keeps the magnitude of the filtered signal unchanged during phase adjustment.
You can control the amplitude, either keep it the same or make it whatever you want. Consider the identities below from the trusty Wikipedia page.

sin ⁡ ( α ± β ) = sin ⁡ α cos ⁡ β ± cos ⁡ α sin ⁡ β
cos ⁡ ( α ± β ) = cos ⁡ α cos ⁡ β ∓ sin ⁡ α sin ⁡ β

The output of the band-pass is sin(A) and the output of the low-pass is cos(A). To shift sin(A) by phase angle B, you just multiple the output of the band-pass by cos(B) and the output of the low-pass by sin(B), take their sum, and write that value to the DAC.

Note that I could have it backwards on which of your signals is sin(A) versus cos(A), but there's only 2 ways, so you can just try it.
 
Back
Top