LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to shift Signal to be centered on Zero ?

Hi Ravens Fan,

 

OK, now I guess I understood your solution. But still I have to add a comment on it:

imagine an alternating signal, lets say a slow one with 1Hz, and a disturbing offset error. The measurement cycle is, lets say, 100 ms. I guess you would have to click "Rezero" a couple times until you hit the center value of the alternating signal. With faster rates you will end up with random values in the shift register. It will work fine if the signal gets somehow temporary set to it's center value during the Rezero-Action.

 

Anyhow, an interesting approach (I really mean interesting, please don't get me wrong)!

 

Regards,

Thomas

Message 11 of 17
(2,118 Views)
What I did won't work for AC signals, unless (just like you said) you happen to hit the button at the instant the signal gets to the center value.  When I read the original post, nothing was mentioned about AC signals so they didn't cross my mind.
Message 12 of 17
(2,115 Views)

Hi Ravens Fan,

 

maybe it's the "AC" in ACiDuser's name :-).

No: I had at least somehow changing signals in my mind and I just used that alternating signal to describe my point view.

 

I guess ACiDuser initialized some kind of brainstorming here and I realy enjoyed it so far.

 

I would suggest that ACiDuser posts it's problem in a more detailed way, if he still encounters it.

 

Greetings to all,

Thomas

 

 

Message 13 of 17
(2,100 Views)

 

I can scale and offset demodulated waveform to the original message signal using this message signal as a reference. This is archived in my VI. But I'm looking for a method how to shift Demodulated signal, if I don't know Message Signal's parameters (I mean I don't know it's original amplitude) and also should shift to zero. The is one more problem still unsolved. As you can see on "Demod. Waveform & Message Signal" Graph those two signals have small shift on X axis (by timing). How can I align them correctly? Because of this incorrect alignment - the calculated deviation between them is rather big.

 

I attach my project file: "Scale and Offset.vi" 

 

and also a required library "FM Library.llb" 

 

Download All
0 Kudos
Message 14 of 17
(2,075 Views)

Hi ACiDuser,

 

I have a hint for your second problem concerning the deviation:

 

Converting your original signal into an FM-signal, means to code each single value information over time. In other words: the conversion to FM implies a time delay between original and converted signal. You have to take this delay into account when you compare your original signal to the demodulated one.

 

For your example VI: the time delay is the time it takes to gather the first frequency information in your FM-signal. If you cut away that time snipped of the original waveform (in your case the first 8-9 samples) before comparing, you will have a better deviation result.

 

Regards,

Thomas

Message 15 of 17
(2,017 Views)

 

ThHagel, sorry I don't understand how happen delay which you described.

 

 

 

I understand why those 8-9 samples are cut in acquired signal. For example in Zero-Crossing method (in this case) VI calculates frequency according to zero crossings. The first 8-9 samples are lost because signal started not from zero and before 1-st zero crossing there were no zero-crossings, so some samples are lost. I already did remove some samples about 5-6 from original signal - and I observed that deviation between two signals became smaller. But I adjusted this sample count (removed) myself, I would like such algorithm which automatically remove necessary amount of samples - to get more precise results. But this will work only if I know this original message signal. If I don't know it I need to get a dependency (it relates to time, frequency and deviation, complex math) 

 

I'm not a pro in signal processing - so I don't know - does this little time shift significantly affect on quality? It affects calculated error - yes, not sure if on signal quality. 

 

 Every radio has it's transition time to get data. When we switch analog radio to different station we hear a "hisss" sound  or nothing - for a moment.

 

 

I guess, that I should pay attention to this shift only for calculating error and measuring Demodulation algorithm performance. Correct me if I'm wrong.

 

0 Kudos
Message 16 of 17
(2,012 Views)

Hi ACiDuser,

 

concerning your first problem with the original signals parameter:

 

To decode the FM-information, I guess you have to know at least your FM-signals frequency range and the corresponding payload signal range limits. FM-signals do not transport that information, so you have no chance to gain the original signal without them. Only if you have that information you can convert each measured frequency value into correctly scaled payload signal values (you wont have an offset problem either).

 

Regards,

Thomas

 

Message 17 of 17
(2,000 Views)