Timing and other questions...

Up to HR-Profilers

Timing and other questions...

Posted by Julia Mullarney at April 14. 2010

Hi there,

 

We've been doing an experiment in which we compare data from video analysis (of sedge motion) to data from both an Aquadopp and a Vector.  As usual I've run into some timing issues which have raised some questions (and given me some headaches):

 

1.  Before I get onto the timing - I just wanted to check something about the vector with a fixed probe (not the cabled version) if it's mounted vertically upwards (i.e. with the probe head on the top and canister underneath) am I correct in thinking this is the probe in it's 'up orientation' with the vertical axis pointing upwards?  I thought I read something on the forum about z being positive towards the transducer but that seems counter-intuitive. 

 

2. For the vector is there an offset between time stamp and time the velocities were recorded?.  I have been using T=T_timestamp+(measload% /(2*100*sampling rate)) for the Aquadopp.  Is it the same for the Vector

?

 

 

 Ok, here we go.  In order to sync my data from the video recorder and instruments (we had a HR aquadopp and a Vector out) we took a video of the online data collection clock (for both instruments) and compared it to the time stamp on the video - thus theoretically allowing us to sync to an accuracy of the 1/frame rate of the video (29.97 frames per second).  Then when I started the actual data collection I didn't sync the clock to the computer (meaning the offset determined from the video frames should be the correct offset between the video data and instrument data).  However I've found a bunch of inconsistencies in my data.  So...

 

3.  When you 'start online data collection' does the instrument automatically resync to the computer clock?  Or is there some delay caused when you start this?

 

4.  When you are in online data collection mode - what time are you actually seeing?  Is it exactly the time that would be recorded inside the instrument?  Does it click over at the end of each second (I know for sure that it increments in seconds every 30 frames on the video which is good - so it's not drifting)?  (As an aside we also recorded the computer clock at the same time but it is useless - it changes seconds every 27 frames or so and then fixes itself by changing every 40th frame later on - good work microsoft:)

 

5.  After the experiment, I stopped the instrument.  Then we recorded more footage of online data collection and compared it to the video recorder clock and the offset was not the same as before the experiment....

 

As I'm looking at such short period wind waves -- even a small timing error makes a huge difference in my phase differences (between sedge and wave motion)...so it'd be good if I can resolve this (if it's even possible).

 

Thanks,

Julia

 

 

 

Re: Timing and other questions...

Posted by P.J. Rusello at April 15. 2010
>1.  Before I get onto the timing - I just wanted to check something about the vector with a fixed probe (not the cabled version) if it's mounted vertically >upwards (i.e. with the probe head on the top and canister underneath) am I correct in thinking this is the probe in it's 'up orientation' with the vertical axis >pointing upwards?  I thought I read something on the forum about z being positive towards the transducer but that seems counter-intuitive. 

Coordinate systems do get a little tricky with the Vector. The Vector is defined to be in the "Up" orientation when the probe head is on the bottom of the canister and the communications cable is on the top, or the reverse of what you mention. The Z axis is defined as positive towards the transducer for the instrument or XYZ coordinate system. Page 24 of the Vector manual has a diagram of the instrument coordinate system.

I unfortunately don't know enough about the internals of the sample clock and software to comment further on your remaining questions, but I'll try to get someone in here who can answer these questions for you.

If you just manually adjust the phase of each signal do you get reasonable results? You should be able to make a pretty good comparison between a single HR Profiler cell and the Vector measurements.

P.J.

Re: Timing and other questions...

Posted by Julia Mullarney at April 19. 2010

Thanks Peter.  That certainly helped to sort out some issues.  I look forward to finding out the answers to the other questions too!  

 Manually adjusting the phase won't help us with our comparisons with the video which is what we're really trying to sort out here.  (We also need to make some corrections based on the instrument locations/wave propagation between the two locations - I'm working on it:).

 

Cheers,

Julia

 

 

 

Re: Timing and other questions...

Posted by Sven Nylund at April 19. 2010

Hi Julia,

Sorry we have kept you waiting. Here is more information.

2. For the vector is there an offset between time stamp and time the velocities were recorded?.  I have been using T=T_timestamp+(measload% /(2*100*sampling rate)) for the Aquadopp.  Is it the same for the Vector ?

The Vector velocity timing is described in this thread.

3.  When you 'start online data collection' does the instrument automatically resync to the computer clock?  Or is there some delay caused when you start this?

No, you will have to set it through the menu selection On-line->Set clock  before starting online data collection. This will not be good enough for your application though since the instrument clock can only be set to the nearest second so you would in any case need to find the offset between the clocks. And even though the instrument clocks are accurate to a couple of ppm that will still cause some drift if you want to be very precise for longer sampling periods.

There is also some delay from the time you hit the start button until the data arrives. And even if you did find out what the delay is, both instruments will re-sync to their internal 1 Hz signal from the Real Time Clock so you will be left with that offset anyway.

4.  When you are in online data collection mode - what time are you actually seeing?  Is it exactly the time that would be recorded inside the instrument?  Does it click over at the end of each second (I know for sure that it increments in seconds every 30 frames on the video which is good - so it's not drifting)?  (As an aside we also recorded the computer clock at the same time but it is useless - it changes seconds every 27 frames or so and then fixes itself by changing every 40th frame later on - good work microsoft:)

I have to check on this as I am sure about the details here. The time shown on the screen in online data collection mode is not the same as the time stamp stored in the instrument that is based on the instrument clock. The resolution is only on a second level so I think it is just the computer clock.

As I'm looking at such short period wind waves -- even a small timing error makes a huge difference in my phase differences (between sedge and wave motion)...so it'd be good if I can resolve this (if it's even possible).

I have done some thinking on this, trying to come up with a solution that matches yours in creativity :) As it turns out, there is actually a possibility here that is surprisingly simple. There is a sync out signal on the Aquapro HR that was originally intended for controlling the DTR signal in radio modems in the standard Aquadopp; it goes high ahead of serial port activity. On the midlife hardware the delay is configurable, but in the standard setup this signal goes high exactly one sample interval ahead of the time data is output on the serial port. In other words, a perfect signal to trigger the Vector configured for start on sync. Note that if you use start online data collection it will be high when the measurement is started. But now it is better to use start deployment and have the instruments record data internally.

  1. Configure both instruments with the same sample interval and identical number of samples per burst
  2. Configure the Vector(s) for start on sync
  3. Start the Vector(s) deployment some seconds ahead of the Aquapro HR (sufficient margin to account for clock drift, for example 10 seconds)
  4. Connect the Aquapro HR output sync line to the input sync of the Vector(s)
  5. Start the Aquapro HR deployment at the desired time for both deployments.

Each burst from both instruments will now contain the same number of sample. The sample timing for the Aquapro HR is given by the formula you mentioned, T=T_timestamp+(measload% /(2*100*sampling rate)). The sample timing for the Vector is found from T=T_timestamp(HR)+1/(2*(sampling rate)). Note that you must line up the samples with the ones from the HR and use the time stamp from the HR which is the master in this setup.

If you want to verify you timing you can do this by moving both instruments down into water at the same time (during a burst). You then know that they shall measure the same both for velocity and pressure, without any offset in time.

Best regards,

Sven

Re: Timing and other questions...

Posted by Julia Mullarney at April 20. 2010

Hi Sven,

Thanks a lot for your answers.  Of course now I have more questions/clarifications! 

 

1. The Vector velocity timing is described in this threadI get a "resource not found.  Sorry, the requested resource does not exist." error when I click on this link (I tried both Firefox and Safari)...maybe it got moved? 

 

2.I have to check on this as I am sure about the details here. The time shown on the screen in online data collection mode is not the same as the time stamp stored in the instrument that is based on the instrument clock. The resolution is only on a second level so I think it is just the computer clock.

 

As it happened we also videoed the computer clock and it's not the same as the one displayed (of course the computer clock display feature in windows has issues as noted above).  I just ran a quick test in the lab here - I synced an Aquadopp to the computer time, then changed the computer time by some hours and started the online data collection and it displayed times near the one I synced to (not the changed computer time).  Second resolution is OK here as we can obtain 1/30th second accuracy from the video if we know on which frame the second changes (and when within each second it changes - presumably at the end).

 

I sort of understand your solution - I'd have to run through it to check I really do and we don't have a vector here!  However, my understanding is that this would sync the vector and aquadopp times perfectly, however the issue for us is to sync with the data that we obtained from our video of the flow...this was a problem as we had no way to sync the video recorder to the instruments (or even to the computer for that matter) - not to the 1/30th of a second accuracy we know from the video frame number.  Hence, trying to obtain the video/instrument offset directly from recording the instrument times on screen...

 

Hopefully, this clarifies our questions somewhat.  I know I'm confusing myself in trying to sort this out!

 

Regards,

Julia

 

 

Re: Timing and other questions...

Posted by P.J. Rusello at April 20. 2010

Try this link for the Vector timing. For some reason links on the forums sometimes work and sometimes don't.

http://www.nortek-as.com/en/knowledge-center/forum/velocimeters/30181049

 

I sort of understand your solution - I'd have to run through it to check I really do and we don't have a vector here!  However, my understanding is that this would sync the vector and aquadopp times perfectly, however the issue for us is to sync with the data that we obtained from our video of the flow...this was a problem as we had no way to sync the video recorder to the instruments (or even to the computer for that matter) - not to the 1/30th of a second accuracy we know from the video frame number.  Hence, trying to obtain the video/instrument offset directly from recording the instrument times on screen...

Synchronizing a large number of data streams can be difficult, especially when they are from different types of instruments. Does your video camera output a sync signal? It should if it can be hooked up to a TV for display. If so, you could potentially use this as a timing signal to be recorded alongside one of the timing signals from the Nortek instruments (preferably the HR since it's acting as the master instrument). This would be far better than trying to synchronize computer clocks which tend to drift a decent amount in fairly brief times.
 
P.J.

Re: Timing and other questions...

Posted by Julia Mullarney at April 20. 2010

Hi Peter,

That link worked - thanks.  I'm not sure if our camera does output a sync signal - we're just using the inbuilt clock from the camera which gives us times to 1/30s.  The problem here is we're trying to back out the answers from data already collected - there's no way we can go back to the field to repeat these experiments :) 

Julia

Re: Timing and other questions...

Posted by Julia Mullarney at April 21. 2010

Hi folks,

We've made some progress here - it seems like the online data collection clock is actually showing the time of the last sample taken (plus maybe some offset) at the end of the sampling period.  For example if you set the instrument clock to the computer clock (so they are synced to within a second) and then start the online data collection with a sampling interval of 10s, then the time displayed from the instrument reads 10 s less than the computer clock.  So it must finish the sampling and then output the result to the screen.  Now all I have to work out is if there is an offset between when it finishes the sample period and when it appears on screen (which should be zero or tiny I think) and if there is an offset, if it is constant? Also if there is any sort of delay introduced from the "start online data collection".

Cheers,

Julia

Re: Timing and other questions...

Posted by Sven Nylund at April 21. 2010

Hi Julia,

What you say above is correct for the Aquapro HR, the time stamp it outputs corresponds to the start of when the sample was taken but it is output at the end of the interval (with a small processing delay). The Aquapro HR software shows the time stamp as received from the instrument as you have found out yourself. With your setup there is a problem with the Vector data though since the online software for the Vector in fact displays the computer clock. Setting the instrument clock back some minutes does not change the displayed value in the software. There are delays that vary from the time you press start data collection until the instrument starts measuring data so the "clicking time" can not be used.

We understand that you need to do your best with that data already collected but there are quite a few uncertainties here with respect to how the PC that collected the data behaved. For example if there were other applications running, how fast it was etc. But since you need to come up with some estimate, I think the very best you can do is to use your video and establish the offset from the very first sample for both the Vector and the Aquapro HR. For the Vector you need to make sure that you use the first velocity sample so look for a change in the current values. For the Aquapro HR you can use the time stamp itself or any other value. This difference should give you the offset you are looking for. You can set the time stamp for the first HR sample according to the formula you mentioned above. If you used close to 100% measurement load, this value adjusted with the offset from the video analysis will be the time stamp of the first Vector sample. The Vector samples are then time stamped using the sample counter plus the configured sampling rate and then you should have your two time series correctly time stamped.

Cheers,

Sven

Powered by Ploneboard
Document Actions
Log in


Forgot your password?
New user?