toggling a boolean in DSP code: I need advice, please

DSP related issues, mathematics, processing and techniques
Post Reply
User avatar
tom_g
Posts: 2
Joined: Sat Dec 21, 2013 11:01 am

toggling a boolean in DSP code: I need advice, please

Post by tom_g »

Hi all,

Idea: using FS within an application in physical measurement technique

Configuration:
An exiter signal consisting of a sine wave, driving for instance a wheatstone bridge with this AC signal, having a PT100 temperature sensor in a leg of this bridge.
The bridge produces a signal response containing the temperature information in the response's amplitude. The response also carries noise, which is not correlated to the driving signal. In order to "dig out" the temperature information from noise, synchronous rectification of the input signal and low pass filtering is a methode to aquire the temperature information even deeply buried into noise.
Typically, real systems introduce some phase shift in relation to the exiter phase. This phase shift must be compensated for best sensitivity.

My problem:
Everything must run at sample precision.
I want to produce a 50% duty cycle logical synchronous signal, which is derived from the exiter sine signal equally generated in the DSP code component. This signal must be phase-shiftable relative to the exiter signal within a wide phase range. I have in mind to derive the phase shift by a variable level discriminator.

I have successfully implemented the detector for the positive and negative slope detector, but I am now remaining stuck into the problem on how to implement a "toggle bit" which is set by the positive slope and reset by the negative slope of the level discriminator in the code.

Any hints are welcome, thank you !

Best regards:

Thomas
Attachments
sample4.fsm
(106.66 KiB) Downloaded 1618 times
curiosity makes us progress !
Post Reply