LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove DC shift in AC Signal

I want remove DC level of my AC signal and want to bring it back such that, it starts from zero.

 

It will be great if anyone can suugest this simple VI for me. I am new to LabVIEW.

-------------------------------------------------------------------------------------------------------------------------------
Thanks & Regards,
Kunal Raithatha.
CTD - CLAD (I wish I can take off that A, and maybe use it later to replace D 🙂

Easy Tip :- "To copy an image to a VI icon, drag the image file and place it on the icon
located in the upper right corner of the front panel or block diagram" ...If you know any
more reply back.
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 14
(6,810 Views)

Hi virtualworld,

 

how do the data looks like? Is it an array of numbers? If it is so, then I would suggest a "For Loop" in which you delete the DC portion of each array element.

 

 

Kind regards, Roman

0 Kudos
Message 2 of 14
(6,802 Views)

What exactly are you having problems with? Do you know what the DC level is? Do you need to know how to measure it? have you taken a look at the measurement functions that exist in LabVIEW? Do you need to know how to remove it from a signal? What kind of signal do you have? Do  you have dynamic data? Is it a waveform datatype. So many questions, so little information...

0 Kudos
Message 3 of 14
(6,799 Views)

 


@RomanD wrote:

Hi virtualworld,

 

how do the data looks like? Is it an array of numbers? If it is so, then I would suggest a "For Loop" in which you delete the DC portion of each array element.

 

 

Kind regards, Roman


Or, you could just do this:

 

 

 

I vote for the easy way. How about you? Smiley Wink

0 Kudos
Message 4 of 14
(6,796 Views)

Thank you smercurio_fc! I am still thinking in C...

0 Kudos
Message 5 of 14
(6,791 Views)

Well I am sorryhere is some more useful information...

 

Its Temperature output in my control design and simulation loop, which looks like this (Results of Matlab/Simulink). You see how DC level is removed and cycle starts from zero.

 

Thanks in advance.

 

Kunal

-------------------------------------------------------------------------------------------------------------------------------
Thanks & Regards,
Kunal Raithatha.
CTD - CLAD (I wish I can take off that A, and maybe use it later to replace D 🙂

Easy Tip :- "To copy an image to a VI icon, drag the image file and place it on the icon
located in the upper right corner of the front panel or block diagram" ...If you know any
more reply back.
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 14
(6,776 Views)

One of the hardest things about coming to LabVIEW from some other language is learning about ALL THE CRAP YOU DON'T HAVE TO DO ANYMORE.

 

En-Masse Operations

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 14
(6,771 Views)

If you know independently what the DC level is, then it's one thing to subtract a constant value from a signal array and be done with it.

 

If you are trying to DETERMINE the DC level from the signal itself, then you have some things to watch out for.

 

A simple average won't get the right answer, unless the signal is symmetric about 0.

 

And an average won't be computed correctly unless you have an integral number of cycles in your sample block (the data that you average).

 

If you have 1.5 cycles in your block, then the average of that block is skewed, because you have more data on one side of the true average than you do on the other.

 

That effect is reduced by a longer block with more cycles, but it's still there.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 14
(6,763 Views)

Seems to me that you have to determin the minimum value and substract that.

For arrays and waveforms there is a ready vi to get the min /max of the values.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 9 of 14
(6,727 Views)

I believe the following code will do what you wish to do. First calculate the DC component of the waveform, then subtract it from the waveform itself then calculate the AC component. As you can see you cannot subtract the DC component of the total RMS value and get the correct answer.

Buddy Haun
Certified Trainer, Former Alliance Member, LabVIEW Champion
Download All
0 Kudos
Message 10 of 14
(6,715 Views)