03-20-2012 03:02 AM
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?
Solved! Go to Solution.
03-20-2012 03:26 AM
03-21-2012 06:46 AM
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
03-21-2012 09:36 AM
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.
03-26-2012 06:05 AM
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
03-26-2012 06:09 AM
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...
03-29-2012 05:35 AM
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