DSPRelated.com
Forums

DSP Algorithm for LVDT Synchronous AM Demodulation

Started by Gordon August 24, 2006
Hello,

I am wondering if anyone can provide some insight into how one may go
about doing the following:

To obtain magnitude and phase of a sinusoidal output of an LVDT transducer
that can be implemented on a TI C2000 series of DSPs. The magnitude of the
sinusoid varies linearly with the distance of the plunger from the center
and the phase changes depending on which side of the LVDT's center the
plunger is on. Obviously the phase of the output is being compared to the
phase of the "carrier". Therefore it is either in phase or 180-degrees out
of phase with the carrier.

My DSP has the signals following available to it that could be used by the
algorithm:

1. Sinusoidal Carrier (coming from an independent power source) which
feeds the LVDT (Carrier Frequency = 1kHz)
2. Sinusoidal LVDT's output (AM Modulated carrier)
3. Square wave (in phase with the carrier) coming from an LM139 comparator
whose input is the carrier in 1.
4. Square wave (180-deg out of phase with the carrier) coming from an
LM139 comparator input is the carrier in 1.


I have looked at many books and tried a couple of relevant TI App Notes
and IEEE publications and still haven't found anything I can use. If
anyone can provide some generalized comments (not necessarily code) about
how one would go about interfacing with this LVDT, it would be greatly
appreciated.

Gord




Gordon wrote:

> To obtain magnitude and phase of a sinusoidal output of an LVDT transducer > that can be implemented on a TI C2000 series of DSPs. The magnitude of the > sinusoid varies linearly with the distance of the plunger from the center > and the phase changes depending on which side of the LVDT's center the > plunger is on. Obviously the phase of the output is being compared to the > phase of the "carrier". Therefore it is either in phase or 180-degrees out > of phase with the carrier. > > My DSP has the signals following available to it that could be used by the > algorithm: > > 1. Sinusoidal Carrier (coming from an independent power source) which > feeds the LVDT (Carrier Frequency = 1kHz) > 2. Sinusoidal LVDT's output (AM Modulated carrier) > 3. Square wave (in phase with the carrier) coming from an LM139 comparator > whose input is the carrier in 1. > 4. Square wave (180-deg out of phase with the carrier) coming from an > LM139 comparator input is the carrier in 1. >
Gordon, All you have to do is multiply your LVDT signal by the LVDT carrier and accumulate the result over several periods of the carrier. You can use the sine waves as well as the square waves as the reference, it does not really matter. For what you are doing, the square wave is preferable because you don't have to do multiplication. For 1kHz LVDT, there is no need for DSP. Any small microcontroller like AVR or PIC will do that. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:

> > > Gordon wrote: > >> To obtain magnitude and phase of a sinusoidal output of an LVDT >> transducer >> that can be implemented on a TI C2000 series of DSPs. The magnitude of >> the >> sinusoid varies linearly with the distance of the plunger from the center >> and the phase changes depending on which side of the LVDT's center the >> plunger is on. Obviously the phase of the output is being compared to the >> phase of the "carrier". Therefore it is either in phase or 180-degrees >> out >> of phase with the carrier. >> >> My DSP has the signals following available to it that could be used by >> the >> algorithm: >> >> 1. Sinusoidal Carrier (coming from an independent power source) which >> feeds the LVDT (Carrier Frequency = 1kHz) >> 2. Sinusoidal LVDT's output (AM Modulated carrier) >> 3. Square wave (in phase with the carrier) coming from an LM139 >> comparator >> whose input is the carrier in 1. >> 4. Square wave (180-deg out of phase with the carrier) coming from an >> LM139 comparator input is the carrier in 1. >> > > Gordon, > > All you have to do is multiply your LVDT signal by the LVDT carrier and > accumulate the result over several periods of the carrier. You can use > the sine waves as well as the square waves as the reference, it does not > really matter. > > For what you are doing, the square wave is preferable because you don't > have to do multiplication. > > For 1kHz LVDT, there is no need for DSP. Any small microcontroller like > AVR or PIC will do that. > > Vladimir Vassilevsky >
Some LVDTs phase shift the carrier as it passes through, and phase shifting in the DSP will get you a lower offset on your answer. I doubt that this would be necessary at 1kHz, though. This is actually easier if you drive the carrier from the DSP -- then you have an internal reference and you don't have to try to synchronize to the outside world. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
"Gordon" <gtsunfire@hotmail.com> wrote in message
news:I4CdnafaI8iLOHDZnZ2dnUVZ_rednZ2d@giganews.com...
> Hello, > > I am wondering if anyone can provide some insight into how one may go > about doing the following: > > To obtain magnitude and phase of a sinusoidal output of an LVDT transducer > that can be implemented on a TI C2000 series of DSPs. The magnitude of the > sinusoid varies linearly with the distance of the plunger from the center > and the phase changes depending on which side of the LVDT's center the > plunger is on. Obviously the phase of the output is being compared to the > phase of the "carrier". Therefore it is either in phase or 180-degrees out > of phase with the carrier. > > My DSP has the signals following available to it that could be used by the > algorithm: > > 1. Sinusoidal Carrier (coming from an independent power source) which > feeds the LVDT (Carrier Frequency = 1kHz) > 2. Sinusoidal LVDT's output (AM Modulated carrier) > 3. Square wave (in phase with the carrier) coming from an LM139 comparator > whose input is the carrier in 1. > 4. Square wave (180-deg out of phase with the carrier) coming from an > LM139 comparator input is the carrier in 1. > > > I have looked at many books and tried a couple of relevant TI App Notes > and IEEE publications and still haven't found anything I can use. If > anyone can provide some generalized comments (not necessarily code) about > how one would go about interfacing with this LVDT, it would be greatly > appreciated. > > Gord > > >
What do you need a DSP for? An analogue multiplier and a few op-amps should do! M. -- Posted via a free Usenet account from http://www.teranews.com
Major Misunderstanding wrote:

   ...

> What do you need a DSP for? An analogue multiplier and a few op-amps should > do!
An analog multiplier is overkill. A synchronous detector (diode bridge; balanced modulator) is the usual way. Sure, that can be modeled as a multiplier, but it is a switch in reality. 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;

Jerry Avins wrote:

>> What do you need a DSP for? An analogue multiplier and a few op-amps >> should >> do! > > > An analog multiplier is overkill. A synchronous detector (diode bridge; > balanced modulator) is the usual way.
That's too old facioned, dear grandpa. If you insist, the gate like 4066 will do.
> Sure, that can be modeled as a > multiplier, but it is a switch in reality.
A microcontroller of $1 class will do all of the job without any additional circuitry... Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:
> > > Jerry Avins wrote: > >>> What do you need a DSP for? An analogue multiplier and a few op-amps >>> should >>> do! >> >> >> An analog multiplier is overkill. A synchronous detector (diode >> bridge; balanced modulator) is the usual way. > > That's too old facioned, dear grandpa. If you insist, the gate like 4066 > will do.
Only if you make the signal's inverse available. Of course, a CMOS inverter connected like an op-amp makes a fine inverter. Another from the same package, with output tied to input, establishes the DC offset level.
>> Sure, that can be modeled as a multiplier, but it is a switch in reality. > > A microcontroller of $1 class will do all of the job without any > additional circuitry...
Surely, you would use socketed buffers between the processor's pins and wires into the cruel world? Some spikes are nasty. Anyhow, I was commenting on method, not implementation. "(diode bridge; balanced modulator)" was by way of explanation, not a prescription. 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;
Major Misunderstanding wrote:

> "Gordon" <gtsunfire@hotmail.com> wrote in message > news:I4CdnafaI8iLOHDZnZ2dnUVZ_rednZ2d@giganews.com... > >>Hello, >> >>I am wondering if anyone can provide some insight into how one may go >>about doing the following: >> >>To obtain magnitude and phase of a sinusoidal output of an LVDT transducer >>that can be implemented on a TI C2000 series of DSPs. The magnitude of the >>sinusoid varies linearly with the distance of the plunger from the center >>and the phase changes depending on which side of the LVDT's center the >>plunger is on. Obviously the phase of the output is being compared to the >>phase of the "carrier". Therefore it is either in phase or 180-degrees out >>of phase with the carrier. >> >>My DSP has the signals following available to it that could be used by the >>algorithm: >> >>1. Sinusoidal Carrier (coming from an independent power source) which >>feeds the LVDT (Carrier Frequency = 1kHz) >>2. Sinusoidal LVDT's output (AM Modulated carrier) >>3. Square wave (in phase with the carrier) coming from an LM139 comparator >>whose input is the carrier in 1. >>4. Square wave (180-deg out of phase with the carrier) coming from an >>LM139 comparator input is the carrier in 1. >> >> >>I have looked at many books and tried a couple of relevant TI App Notes >>and IEEE publications and still haven't found anything I can use. If >>anyone can provide some generalized comments (not necessarily code) about >>how one would go about interfacing with this LVDT, it would be greatly >>appreciated. >> >>Gord >> >> >> > > > What do you need a DSP for? An analogue multiplier and a few op-amps should > do! >
But if you're going to use the signal in the microprocessor, no extra parts plus some extra code is much smaller. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Hi! I resume this old post becouse I want use the DSP that I have
(TMS320F28335) for doing the AM demodulation.

I have already provided the primary sinewave signal using the PWM.
Now I have to use the ADC for the secondary output. The input signal is a
sinewave centered in 1.65V (the ADC input goes from 0 to 3.3V) Amplitude
modulated and with a phase shift with the primary signal that I have
provided with the PWM.

How could I efficiently reveal the phase shift before doing the multiply?


On Feb 13, 11:38=A0am, "guerrez" <guerreski@n_o_s_p_a_m.gmail.com>
wrote:
> Hi! I resume this old post becouse I want use the DSP that I have > (TMS320F28335) for doing the AM demodulation. > > I have already provided the primary sinewave signal using the PWM. > Now I have to use the ADC for the secondary output. The input signal is a > sinewave centered in 1.65V (the ADC input goes from 0 to 3.3V) Amplitude > modulated and with a phase shift with the primary signal that I have > provided with the PWM. > > How could I efficiently reveal the phase shift before doing the multiply?
You can just do a dft at the excitation frequency, get the real and img components, and Amp =3D sqrt(r^2+i^2), the DFT will be immuned to phase shift. The seconary phase, arctan(i/r), compared to the phase of the input (assuming you have an ADC on the excitation) will give you the direction.