From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ADC signal average

Solved!
Go to solution

Can anyone help me to find the average of a signal. I have used simulate signal function for sine wave with 100Khz freq, sampling freq. 500Khz and 1250 samples. I have passed this signal to a 16 bit adc and found the digital waveform. Now, i want to average this signal for 1250 samples. Can anybody tell me how to do this?

0 Kudos
Message 1 of 7
(2,707 Views)

Hi sanju,

 

to simulate a sine wave and to take the mean of the simulated values I would do this:

check.png

Don't know why an ADC and digital waveforms should be involved...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,700 Views)

Hi GerdW,

Thanks for replying. Actually, my problem is not solved by the vi which you have attached. I will explain you the actual scenario.

 

I have simulated four signals namely Left, right, fore and after which will be received from four different antennas. Now, i have to do switching between left and right antenna and similarly between fore and after antenna, ie, switch 1 and switch 2 and again i have to use switch 3 for selcting signals from switch 1 and switch 2.

 

For switching i have to give a control signal which is a digital pulse, the pulse width being 2.5msec and 1250 samples. Now, for switch 1, switch 2 and switch 3, the pulses will remain high and low accordingly as shown in the graph.

 

The concept is that the signals received from these four antennas will have different amplitudes and will get switched accordingly to the control signal for the switches. Now the output of switch three will pass through an ADC which will sample the data. Then, i have to find the average of the sampled data and measure the amplitude of the signal and give it to an indicator, which will have four directions, ie left, fore, right and after. So the indicator should point accordinly which signal was selected after giving it to ADC.

 

Now, the problem is that i have done switching of the signals but don't know how to find the average of the signal after passing it through ADC and then how the indicator will show that signal came from which direction.

 

Thus, i require help reagarding this scenario.

 

I'm attaching my code and also image of  my actual block diagram.  

 

I'm using labview 2010.

 

 

Thanks and Regards,

Sanjay

Research Scientist,

SAMEER, Mumbai

Download All
0 Kudos
Message 3 of 7
(2,679 Views)

So is this conversion to digital so that you can simulate an A/D that you are designing? Any real DAQ device you get is going to convert the digital to a floating point number or raw binary value. You might as well skip the conversion to digital or just take it and use the Convert Digital to Analog function. Any real A/D is effectively simulated by your use of the Simulate Signal function.

0 Kudos
Message 4 of 7
(2,670 Views)

Hi Dennis,

I know that any real A/D can be simulated by use of simulate signal function. But, the problem is that I want to average the A/D output to get the original amplitude back. How can I find the average of A/D output? 

 

Regards,

Sanjay

0 Kudos
Message 5 of 7
(2,647 Views)
Solution
Accepted by topic author sanjuworld

Hi sanju,

 

did you notice message #2?

 

You have to define the "D" in "ADC"! Usually you will get a "value" with certain number of bits from the ADC (8/12/16 bits per value). The SimulateSignal will also give you values - and those values are averaged in my example...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,645 Views)

Hi GerdW,

I know the "D" in my ADC, but i want to find the average so that i can get back the amplitude of the signal after using ADC.

I'm not able to get how exactly we can get back the amplitude by averaging the digital signal.

 

Regards,

Sanjay

0 Kudos
Message 7 of 7
(2,624 Views)