05.15.08

DAQmxReadAnalogF64 Intermittent Warning of 1

Posted in Electronics, PhD An Acoustic Disdrometer, Programming, Qt at 8:12 pm by philwinder

I’ve had a very serious problem recently regarding the long term stability of the NI-4462.

Problem:
Everything works fine for about 20-inf secs but then all of a suddent the DAQmxReadAnalogF64 function returns a 1 rather than a 0.

Solution:
The errors were buffer overrun errors (annoying that the 4462 almost always returns 1 as an error. Not very informative!). This, I eventually figured out, seemed to be happening every time my cpu hit 100% load. Then the DAQ would stop acquiring, post an error of 1 and quit. To fix this I manually set the sampsPerChanToAcquire setting in the DAQmxCfgSampClkTiming function.
Just a bit of background, I am using continuous acquiring, so the sampsPerChan… variable set the hardware buffer size. I am also interrupting every 50000 samples. So setting this value to 200000 or above (i.e. 4x your interrupt generation) seems to get rid of all my intermittent problems!! Woo!

Hope this helps someone in the future…

05.07.08

Acoustic Reflection Testing

Posted in PhD An Acoustic Disdrometer at 10:18 am by philwinder

I’ve been working on decomposing the different parts of the signal received, trying to figure out what each bit is and how to get rid of it.
The main conclusions of which are that bottom->surface reflections are the most predominant in the signal.
The attached two graphs of experiments where I was comparing the signals in a bucket to the signals in the tank, and in the tank at different heights.

The first test shows that side reflections constitute a fair amount of the signal but after the primary reflections have passed the main residing component is the reflections from the surface.  (Although they can still be seen in the signal - just).  The bottom->surface reflections have slightly different path lengths due to the odd shape of the bottom of the bucket and that the hydrophone protrudes by a few cm’s.  These two paths constructively and destructively interfere to produce the remaining oscillatory signal.

The second experiment was to make sure that the remaining signal was produced by surface reflections and not by some resonance in the hydrophone itself.  It can be seen that the cycles following the initial spike occur at a different time depending on the depth.  The deeper the water, the longer it takes the reflection to return back to the hydrophone.  This can be roughly seen but is shrouded by the different path lengths of the other reflections (because the drop wasnt directly over the hydrophone).

This seems to indicate that if we were to dampen the bottom->surface reflections using a lining then a lot of this type of “noise” could be removed.

I also noted that the oil used for this experiment was left in the tank a few days.  It looked like the cooking oil had started to coagulate, and did not behave as intended. (the semi-solid pieces were not recombining quick enough to “heal” the patch where the drop had just landed.)

This also helps to answer another question: How thick does it need to be?
Well this roughly depends on how quick/much it is raining.  If there is a thin film (about 2mm) then when a drop hits the surface it forces the oil away from the impact site.  If another drop was to hit the same place then there would be no oil to stop the bubble noise.  If the film is 2cm deep then the drop doesn’t have enough energy to break through the oil into the water, so if another drop did land in its place, there would still be enough oil left to inhibit bubble noise.  So the only worse case scenario is when one drop hits and another drop at practically the same time hits exactly the same place in the same orientation.  If this happened then a collision between the new drop and the old drop could occur and probably create some strange results.

Having a thicker film also helps to stop the oil coagulating.  So basically, the thicker the better.  BUT we have to make sure that we dont make it too big because reflections will occur on the boundary of the water and the oil and the speed of sound will be different, affecting the TDOA’s.

 Oil in a Tank vs. Oil in a BucketSurface Reflections

05.06.08

Another Qt Error

Posted in Qt at 10:58 am by philwinder

If you ever get the error:

In file included from c:/Qt/4.3.4/include/QtCore/qcoreevent.h:1,
from c:/Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qcoreapplication.h:48,
from c:/Qt/4.3.4/include/QtCore/qcoreapplication.h:1,
from c:/Qt/4.3.4/include/QtCore/QCoreApplication:1,
from src\qpnwsettings.cpp:3:
c:/Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qcoreevent.h:52: error: `QtValidLicenseForCoreModule’ does not name a type
mingw32-make[1]: *** [build/qpnwsettings.o] Error 1
mingw32-make: *** [release] Error 2

This is due to a semicolon not being present at the end of a class definition in a header file when #ifdef and #endif statements are used. So for example:

#ifndef __FOO_H__
class foo
{

};
#endif

works fine (note the semicolon after the last bracket).

05.02.08

Phased Array Data

Posted in Projects, Electronics, PIC at 11:13 pm by philwinder

Got the first incarnation of the Phased array working now. Had a few hiccups along the way, but managed to get most of them sorted. Main problems included not having enough RAM to store a significant amount of data, so I fixed that using a simple compression technique (I say simple, took me ages to get it working!) and using a circular buffer.

The main problem is that the PIC30F’s can only acquire data sequentially, i.e. not simultaneously. This means that each acquire takes 1Tad to sample, therefore 4 sequential acquires takes 4Tad. This means that the actual sampling speed is Fad/4=50ksps max! Rubbish. So Ive ordered some PIC33f’s to try because they are simultaneous and work up to 1Msps!

Also need to desolder the power lead for the transmits because they should have their own separate power supply. Not the on board one.

Finally, some data!

4 Outputs!Accross TableRoof!

Errata: Slight cock up, in the second image the pulse labeled reverbaration is not reverbaration.  I think it was a reflection from something about 45 degrees out.  This poses an interesting question, how do I stop signals that are out of phase by exactly 1 cycle adding up to a large number? I will have to consult the literature to figure this one out!