DISTORTION OF SIGNAL IN DAQ


tania

Recommended Posts

i see a distortion in my signal when i send it wireless from labjack to my sytem using a D-link Router...i changed the resolution.....but in vain

i even reduced the sampling rate...but still it occurs at intervals....

is there any means to reduce this small unwanted distortion.. using DAQFactory...so should i look into my router specifications to solve this problem.... ???

Link to comment
Share on other sites

First: the wireless is not what is causing the distortion. At this point your signal is all digital and any noise on the line would cause you to get no signal, not noisy signal. Its like cell phones. Before digital, you'd get weird noises when the signal was bad. Now you just get drop out. Most likely the problem is in the signal itself, usually due to faulty wiring, bad grounds, or just plain noisy signal. The LabJack user's manual has some suggestions on quieting signals.

If you want to quiet your signal in DAQFactory, you can simply average the signal. In the channel table, check the box that says Avg? and in the # Avg column put the number of data points you want to average. Please use this with caution. Software noise reduction is good, but only if you fully understand the causes of your noise. My personal favorite example is the story of the ozone hole. Scientists had been measuring the ozone levels in the Antarctic for years before the hole was discovered. Unfortunately for those scientists, they had set up their computer to eliminate any data below 50 as noise and glitches since they didn't believe it would be possible to have a value below 50ppb. Alas, when another group published results showing the ozone hole, they were kicking themselves because they would have discovered it first if they hadn't over-massaged their data.

Link to comment
Share on other sites

It can happen that a signal gets distorted on the analog side when using wireless. I just had such a case at a client (not with a Labjack though). It can occur when the wireless transmitter is very close to the AD converter, in this case the one inside the Labjack, or to the cable leading up to it. If you connect directly via CAT-5, turn off the D-link router and the problem goes away or if you move the D-Link farther away and the distortion is reduced then you are having RF interference.

Technically what happens is this: RF is picked up by the cables to the AD-configured input and enters a chip. Some RF might directly hit the Labjack since it has a plastic enclosure which doesn't shield it. Inside the chip there are diode paths everywhere, for example the base-emitter junction of a transistor. Here a small portion of the intruding RF gets rectified and added/subtracted from your signal. It will look like pretty wild distortion though and come in bursts because wireless LAN transmits in packets. The same would probably happen if you walked up to the Labjack with you cell phone and turn it on while standing next to it. It would start sending bursts until it has found and linked to a cell tower. After that it would become a little more quiet depending on what service provider you have.

There are a lot of things that can be done about it but it depends on the situation and severity. Some of it looks like black magic to people who don't do RFI-ruggedizing for a living. As a start you could try this: Leave the wire going to the respective AD input an inch longer than needed. Take a regular nail of about 1/10" diameter or so, a toothpick, or whatever is there and wind the wire over its shaft four times, one turn next to the other. Remove the nail and connect the far end to the Labjack port again. Stretch the coil a little so the gaps are about as wide as the wire itself. Now you have a small inductor in line. If RF got onto your cable that should result in less distortion. Then you could connect a small ceramic capacitor of 100pF or 220pF between the input and GND. Leads as short as possible. Radio Shack sells little grab bags of such capacitors for a few Dollars. If all this changes things but doesn't fix it post again, then it'll become a bit more nasty but there is hope. Sometimes it becomes necessary to put devices such as the Labjack into shielded enclosures and filter every cable going in and out. There are some additional tricks to diagnose whether the Labjack picks up RF through its plastic enclosure but try the coil and capacitor first.

Regards, Joerg

http://www.analogconsultants.com/

Link to comment
Share on other sites

My guess is that the distortion described by tania was from timing error. For example, if you sample a sine wave in command/response mode every 10 ms, and plot that data at even intervals (assuming 10 ms), you could easily see distortion if something was preempting the software commands and the intervals were not actually 10 ms. The solution is stream mode which is reliably timed by hardware.

Link to comment
Share on other sites

Sorry, I guess I should have clarified that distortion can't occur in the wireless transmission. Joerg is correct that the wireless signal could technically add interference to the analog signal. The LabJack guys are correct as well that you could also be getting time related noise, though probably only occurring if your acquisition rate is quite short. If your Timing is 100 ms or higher, it is unlikely that you will get much time noise, since the Windows latency is quite short compared to the loop interval.

You can tell whether you have significant time noise by looking at the time stamp on the data. If, for example, your channel had a timing of 20 (milliseconds), and an offset of 0, you should see data every 20 ms starting at 0, so x.000, x.020, x.040 etc, where x is the seconds part of the current time. The query command is sent at the 20 ms interval, but the time stored in the data point is the time after the response is received from the LabJack. So, you will most likely see x.005, x.025, x.046, since there is a few millisecond latency between the query and the response. If the spacing is constant then you don't have much time noise, but if it is not, then you definitely have an issue. Really, if your Timing is < 20ms or so, your really should be using Stream mode as this is much more precise in time. Windows is just too busy doing other things to be a good real-time OS.

Link to comment
Share on other sites

Yup, and that would be shown by the time stamp as I mentioned. The biggest issue is that it can be rather varied, especially with wireless, and worse if you don't have an excellent connection. If you ever wondered why the max speed drops on a wireless connection as the signal strength drops, its because the packets have to get resent over and over until successfully delivered. Not only does this cause an overall slowness, but will cause intermittent, unpredictable latencies, the worse time noise of all...

Link to comment
Share on other sites

  • 3 weeks later...

thank you so much for the various replies and possiblities to approach the problem..i am using UE9 and the distortions i mean is,,, the missing of an ecg peak inbetween proper transmission ....i will attach the pic so that u can understd what i actually mean...

timming is 0.01 and 12 it resolution...

also i wanted to know..is while setting the timming as 0.01 i can see an alert stating the time lag...is DAQFactory unable to sample the signal at a short time of ms??

does it matter if we ignore that alert...?

Thnkx A tonne

Link to comment
Share on other sites

Yes, the timing lag means essentially that DAQFactory can't keep up with the specified timing interval. The limiting factor is the communications with the LabJack, which apparently is, on average, slightly longer than 10ms. We really recommend switching to stream mode at intervals shorter than 50ms. The fact that you are missing a peak almost certainly means that you are not sampling fast enough, at least if its a short peak. To see a peak, you really need to sample at at most 1/2 the width of the peak. So if the peak is about 5 ms wide, you need to sample at an interval 2.5ms or 400hz. Since you are going to have to switch to stream, I'd start by streaming as fast as you can (around 50-60khz on one channel) and then work your way slower until you still catch all your peaks without recording a bunch of extra data.

I recommend updating your DAQFactory Express by going to www.daqexpress.com. We have just released 5.75 which includes a new "Using DAQFactory with the LabJack" guide with samples that will explain (with a working example) how to do stream.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.