Home > Net >  With displacement of PCI high-speed acquisition card collection, computing the displacement speed
With displacement of PCI high-speed acquisition card collection, computing the displacement speed

Time:11-12

PC software using c # to do, by PCI displacement signal acquisition card collection, and then by calculating unit time of previous and current displacement calculation speed differential

Now calculation speed is always not stable, fluctuating very large

My displacement is the displacement of the oil cylinder stroke 0-150 - mm, maximum speed is 1.5 mm/(with a stopwatch estimate), but the opening of a given servo valve is fixed, the calculation of the opening of the random fluctuations, such as the speed of 10%, the speed of calculation from 5 to 35 mm/min, because is parabolic servo valve, so the speed and the opening is not a linear proportional relationship,


I later with the DataReady acquisition card directly trigger events, I set 200 k sampling frequency, data length, as long as 1000 per 1000 triggered a collection of events, the sampling time can be set according to the truth, and I finished it sampling are generally 20 ms, I calculate speed 1 s a value also is volatility



CodePudding user response:

It's normal

We simulate a little bit about the you see

0,0,0,0,1,1,1,1

We assume that your so-called timer just sample 4, then 2 times collection, just a 0, 1, the two extreme
If we use the moving window handle


He is 0 0,
0, 1
0,1,1
1,1,1
So you can see he is continuous

I'm just a simple way, actually this is a special chapter "digital signal processing window function"

CodePudding user response:

reference 1st floor wanghui0380 response:
normal

We simulate a little bit about the you see

0,0,0,0,1,1,1,1

We assume that your so-called timer just sample 4, then 2 times collection, just a 0, 1, the two extreme
If we use the moving window handle


He is 0 0,
0, 1
0,1,1
1,1,1
So you can see he is continuous

I'm just a simple way, actually this is a special chapter "digital signal processing window function"
not understand, I look at the data first

CodePudding user response:

You don't use the PC clock? Even if your acquisition card system itself have an unsigned integer time interval is also ok,

CodePudding user response:

To tell the truth, I personally think, should be directly calculated acceleration, subsection integral combined stroke, average speed appears does not conform to the description

I actually have some doubts about your problem, so have to determine first, what do you really want instantaneous speed or the average speed?

CodePudding user response:

If collect data itself has no error (error, packet loss, etc.), so is likely to be your algorithm has a problem,
Sampling frequency 200 k per second will generate 200000 data, data to calculate how much did you take? 1000 data are representative?

CodePudding user response:

reference 4 floor wanghui0380 response:
to be honest I personally think, should be directly calculated acceleration, subsection integral combined stroke, average speed appears does not conform to the description

I actually have some doubts about your problem, so have to determine first, what do you really want instantaneous speed or the average speed?
instantaneous velocity, acquisition of the instantaneous velocity, but I want to control the speed

CodePudding user response:

reference 5 floor datafansbj reply:
if collect data itself has no error (error, packet loss, etc.), so is probably your algorithm has a problem,
Sampling frequency 200 k per second will generate 200000 data, data to calculate how much did you take? 1000 data are representative?
20 w/a, but I can't take a data 1 s clock, time is too slow, so I set 2000, for each 2000 data acquisition card to trigger the DateReady event, I will retrieve the data in this event, is usually more than a dozen ms time, then I use a separate thread per 500 ms take a current position to calculate the speed, because the thread is not regular, so I use the system time lag for time base

CodePudding user response:

Data acquisition and processing have special theory to describe, you described the processing method is not very detailed processing mechanism (incomplete), the other Windows with poor real-time performance, in ms level error is bigger, can consider to use a Stopwatch to replace the system time calculation is poor, the precision is high,
  •  Tags:  
  • C#
  • Related