Author Topic: What are possible ways I can track the orientation of an object?  (Read 6964 times)

0 Members and 1 Guest are viewing this topic.

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #25 on: November 19, 2017, 08:35:56 pm »
Does anyone see any flaws with this?
If your car is not very heavy and stable, you will get a whole lot resistance variation just due to poor contact and dirt on the track/wipers.

Inductive solution will be way more reliable, and not all that hard to implement.
Alex
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #26 on: November 19, 2017, 09:37:21 pm »
Does anyone see any flaws with this?
Inductive solution will be way more reliable, and not all that hard to implement.

Can you elaborate a little bit on "inductive solution" so I can dig more into it?

thanks
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #27 on: November 19, 2017, 09:41:08 pm »
Can you elaborate a little bit on "inductive solution" so I can dig more into it?
Rough idea - place coils along the track and a magnet in the car. As car passes by the magnets, it will induce current in the coils, which you can detect.

This is a brute-force approach with many independent coils, it can be simplified a lot for specific use cases, but again, you have not provided enough information to go into any details.
Alex
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5231
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #28 on: November 20, 2017, 04:38:39 am »
If you are measuring the resistance of brass HO train rails it will be very challenging, with concern about wipers and many other things.

If you put a 1k resistor between each segment of HO track it is easy to identify the track segment, but distance resolution is poor.

Between lies a whole range of options with different performance and difficulty.   You could for example take a 10K wire wound resistor and unwind it.  If the length met your needs you would have an easy to read, noise resistant solution.

Note that the ohmmeter does not have to be in the car.  The car can be a shorting bar, with the ohmmeter at one or the other end.

Also note that this simple approach assumes that you are not also using the rails for power.
 
Similar arguments apply to inductive, capacitive and optical sensing methods.  For example you could divide the region between the wheels on your track into white and black zones with the percentage of one color equal to the percentage of your total distance.  For a straight track this would result in a white and black right triangles with apexes at the opposite ends of the track.  Then your car could sense the percentage with a row of phototransistors (lots of details in that last phrase).  The number of phototransistors along with the sophistication of your signal processing would determine the distance resolution and accuracy. 

There will always be trades between precision and cost/complexity.  Always modified by the tools, materials and knowledge available to you.


 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #29 on: November 23, 2017, 12:03:05 am »

 
Similar arguments apply to inductive, capacitive and optical sensing methods.

Thanks, I get your optical sensing idea, with the black and white pattern along the track. I am really curious about the inductive method you mentioned. For the inductive approach, do I just replace inductors in series along the track and try to measure the inductance? And same for the capacitive method (a series of capacitors)?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #30 on: November 23, 2017, 03:07:19 am »
Since you don't seem to need a great deal of precision, it would be easier to just place a number of individual coils along the track. If number of sensors ends up being too big for individual processing, then you can double up coils after a certain period. So your track would look like ABCDABCDABCDABCD. You won't be able to differentiate individual ABCD pattern, so you need to keep track of the position, and when D wraps around to A, increment the segment number. This will not work if car can be placed anywhere on the track.

And since you can track when magnet leaves one coil and enters the other, you can get really good accuracy with a handful of coils. That's basically how industrial systems like this work.
Alex
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #31 on: December 04, 2017, 03:02:44 am »
Since you don't seem to need a great deal of precision, it would be easier to just place a number of individual coils along the track. If number of sensors ends up being too big for individual processing, then you can double up coils after a certain period. So your track would look like ABCDABCDABCDABCD. You won't be able to differentiate individual ABCD pattern, so you need to keep track of the position, and when D wraps around to A, increment the segment number. This will not work if car can be placed anywhere on the track.

And since you can track when magnet leaves one coil and enters the other, you can get really good accuracy with a handful of coils. That's basically how industrial systems like this work.

Let me make sure I understand you correctly, is this what you mean by "coils along the track"?



There are two coils shown above but the idea might be what you are saying. Right?

And by ABCD, you mean there are 4 different types of coils wrapping along each other?

thanks
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #32 on: December 04, 2017, 03:05:13 am »
No, horizontal coils under the track surface. Like the ones you see on the real roads in the US - https://en.wikipedia.org/wiki/Induction_loop#Vehicle_detection

And as far as series connection goes - look at how linear motors are designed. I can't find a good diagram, but here is a picture of one https://sharepoint.umich.edu/lsa/physics/demolab/Main%20Photo%20Library/_w/Linear%20Motor%20Close%20up%20on%20Sled_5K40.68-2_JPG.jpg There are only 3 actual coils, they are just distributed over the length of the track. By sequentially passing current though them, you make the "rotor" move in a linear fashion. You need the opposite of that - detect induced current.
« Last Edit: December 04, 2017, 03:11:27 am by ataradov »
Alex
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #33 on: December 04, 2017, 03:11:02 am »
Thanks for all the help so far. I've learned a lot.

I'm going to learn a bit more about IMU and accelerometers and gyroscopes, but does everyone at least agree that tracking the distance along a track (using the various approaches given so far) is a lot easier and cheaper than tracking the orientation relative to a plane (like what my original post mentioned)?

It seems using IMU, things can quickly get complicated if the original reference plane moves or shift. And even if the reference plane is fixed, there is a lot of complicated math involved and it's prone to noise of all kinds.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #34 on: December 04, 2017, 03:15:12 am »
I'm going to learn a bit more about IMU and accelerometers and gyroscopes, but does everyone at least agree that tracking the distance along a track (using the various approaches given so far) is a lot easier and cheaper than tracking the orientation relative to a plane (like what my original post mentioned)?
In general - yes. Details depend on your specific details - sizes of everything, speed of the moving objects, etc.

But generally IMUs is the last resort method for something like this.

You may even get away with simple light sensors along the track - just detect when they go dark when an object goes over them. But that depends on lighting in the room.

You can use infra-red light barriers. This is less dependent on external light, but will probably have problems in a direct sun light.
Alex
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #35 on: December 04, 2017, 05:12:07 am »
No, horizontal coils under the track surface. Like the ones you see on the real roads in the US - https://en.wikipedia.org/wiki/Induction_loop#Vehicle_detection

And as far as series connection goes - look at how linear motors are designed. I can't find a good diagram, but here is a picture of one https://sharepoint.umich.edu/lsa/physics/demolab/Main%20Photo%20Library/_w/Linear%20Motor%20Close%20up%20on%20Sled_5K40.68-2_JPG.jpg There are only 3 actual coils, they are just distributed over the length of the track. By sequentially passing current though them, you make the "rotor" move in a linear fashion. You need the opposite of that - detect induced current.

Thanks, I never knew about the induction loop vehicle detection. It seems to be based on Faraday's Law, but how can it detect vehicle if real vehicles are not magnetic?

In your "coil along the track" method, where you have coils ABCDABCD..., all the As are the same coil right?(electrically connected, but the windings are at different locations). You mentioned I would need to "keep track of the position, and when D wraps around to A, increment the segment number".  So I can track when D wraps around A when a change in current in D follows a change in current in A? I think I understand your approach now. But I want to make sure. Thanks

 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #36 on: December 04, 2017, 05:17:21 am »
real vehicles are not magnetic?
What do you mean by not magnetic? Real vehicles are made of a lot of steel. You don't need an actual magnet. The loop is an open-core inductor, when metal object (a car) gets into the field, the field induces eddy currents in the metal, which create their own magnetic field, that counteracts the one from the coil. And that can be detected on the receiving end.

In your "coil along the track" method, where you have coils ABCDABCD..., all the As are the same coil right?(electrically connected, but the windings are at different locations).
Exactly.

You mentioned I would need to "keep track of the position, and when D wraps around to A, increment the segment number".  So I can track when D wraps around A when a change in current in D follows a change in current in A? I think I understand your approach now. But I want to make sure. Thanks
Correct.
Alex
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #37 on: December 04, 2017, 09:47:52 pm »
So far, we discussed two methods:

1. Track the orientation of the car along the track, because there is a 1 to 1 relationship between orientation and distance from the origin.
2. Track the distance along the track, using the methods we discussed recently.

Another method is to track the Euclidean distance between the car to the origin. Are there any easy way to do this? For example, if we place a magnet at the origin, and if there is a way to detect magnetic field (which decreases as distance from the source increases), we can obtain the Euclidean distance. This might not be practical, but it's a theoretically example.

I don't think I can use devices like Infrared proximity sensor since optical solutions usually require a direct line of sight, and there might be obstacles in my application.

Are there any practical ways to detect Euclidean distance between 2 objects even if there are obstacles in between? The distance is on the order of no more than 50cm or so.

Thanks
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: What are possible ways I can track the orientation of an object?
« Reply #38 on: December 04, 2017, 10:14:55 pm »
So far, we discussed two methods:

1. Track the orientation of the car along the track, because there is a 1 to 1 relationship between orientation and distance from the origin.
2. Track the distance along the track, using the methods we discussed recently.

Another method is to track the Euclidean distance between the car to the origin. Are there any easy way to do this? For example, if we place a magnet at the origin, and if there is a way to detect magnetic field (which decreases as distance from the source increases), we can obtain the Euclidean distance. This might not be practical, but it's a theoretically example.

I don't think I can use devices like Infrared proximity sensor since optical solutions usually require a direct line of sight, and there might be obstacles in my application.

Are there any practical ways to detect Euclidean distance between 2 objects even if there are obstacles in between? The distance is on the order of no more than 50cm or so.

Thanks

The practicality depends on many things, among them the distance to be measured itself. It would help a lot if you could actually tell people here what exactly are you attempting to do, including the dimensions, required accuracy/resolution and any design constraints (e.g. can't use anything radio because ...) you may have. Without that nobody can give you a sensible answer.

Tracking distance by measuring an intensity of a field (electric or magnetic) is not very accurate and doesn't work beyond a short (> 10-15cm) distance unless you want to go into rather complicated equipment. Also anything metal will affect it, orientation of the object will affect it, the measurement is not linear, etc.

Magnetic tracking is doable but then you would need to build something like a Razer Hydra (tracks two controllers through 3D space, both position & orientation using a magnetic field) or Flock of Birds/Fastrack type of tracking device (same, just on a larger scale). That is a highly nontrivial effort even for a lot more experienced person than you are and a gigantic overkill for the very constrained problem (determining a position of a moving object along a track) that you have.

« Last Edit: December 04, 2017, 10:17:37 pm by janoc »
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5231
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #39 on: December 04, 2017, 11:11:47 pm »
One way to measure Euclidean distance would be to have an RF pulser on your object, and a rotating radio direction finder antenna at the reference position.  Direction from the RDF antenna, distance from a time of flight measurement.  You might be able to do the same thing with ultrasound.

Both concepts doable.  Both complex and tricky to set up. 

As with the other general approaches explored on this thread there are many other ways to measure Euclidean distance, with different advantages and disadvantages.  Things like stereoscopic imaging.  None come to mind that are simple and direct.

Given your general approach to this problem I would recommend looking up the TRIZ invention methodology.  A fascinating approach to generating solutions to problems developed by a Russian patent examiner.  I have found the approach very useful, but others find it worthless so your mileage may vary.
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #40 on: December 08, 2017, 03:27:51 am »
Thanks for the help so far.

Is it true that IMUs, specifically the accelerometer and gyro suffers from drift, so it requires periodic calibration even if a Kalman filter is used?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #41 on: December 08, 2017, 03:32:23 am »
Is it true that IMUs, specifically the accelerometer and gyro suffers from drift, so it requires periodic calibration even if a Kalman filter is used?
Yes. That's why google maps asks you to rotate your phone around from time to time. That's the calibration procedure.

Kalman filter will not help with systematic errors.
Alex
 

Offline Awesome14

  • Regular Contributor
  • *
  • !
  • Posts: 192
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #42 on: December 08, 2017, 05:00:12 am »
I didn't read the entire thread, so forgive me if this has already been stated. To get orientation you add a third dimension to an accelerometer using a gyroscope.
Anything truly new begins as a thought.
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #43 on: December 08, 2017, 05:02:13 pm »
Is it true that IMUs, specifically the accelerometer and gyro suffers from drift, so it requires periodic calibration even if a Kalman filter is used?
Yes. That's why google maps asks you to rotate your phone around from time to time. That's the calibration procedure.

Kalman filter will not help with systematic errors.

What about when the measuring scale is on the order of 20 to 30 cm rather than the Earth. Do they still get wildly inaccurate after awhile if you don't calibrate? By "accurate" I mean angular accuracy.

I just ordered an Adafruit IMU to experiment and play around. I guess those are pretty low end so the drift might be high.

Thanks
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: What are possible ways I can track the orientation of an object?
« Reply #44 on: December 08, 2017, 05:09:14 pm »
What about when the measuring scale is on the order of 20 to 30 cm rather than the Earth.
Even worse. Accelerometers are very bad for determining coordinates. Accelerometers return acceleration, and position is a second integral of acceleration. You have double integration errors. That's where the significant part of the error comes from, not the accelerometer itself.

Do they still get wildly inaccurate after awhile if you don't calibrate? By "accurate" I mean angular accuracy.
Yes, they are. Even if you have absolutely accurate accelerometer that never drifts, your position will drift because of numerical errors due to double integration.

Accelerometers are the worst method for this task.
Alex
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: What are possible ways I can track the orientation of an object?
« Reply #45 on: December 08, 2017, 07:34:35 pm »
Is it true that IMUs, specifically the accelerometer and gyro suffers from drift, so it requires periodic calibration even if a Kalman filter is used?
Yes. That's why google maps asks you to rotate your phone around from time to time. That's the calibration procedure.

Kalman filter will not help with systematic errors.

That is a bit more complicated than that.

An accelerometer does not drift. It is noisy, yes, but does not perceptibly drift in the sense that the mean of the returned value for the same orientation changes over time (long term shifts due to temperature or gravity changes notwithstanding). A gyro is much less noisy but it does drift due to various factors, such as precession. That is why in order to have a stable orientation solution a gyro+accelerometer are insufficient and a magnetometer is commonly added. Then the tracking is done from the gyroscope and the drift is compensated out using the accelerometer and magnetometer which are slow and noisy but fixed against the absolute references - namely gravity and the magnetic north.

The spinning calibration procedure does not deal with the drift but serves to determine the maxima and minima for the accelerometer and magnetometer data so that they can be correctly normalized before being used in the orientation estimation. A more advanced system will actually fit an ellipsoid to the magnetometer data - that permits to compensate for errors due to the presence of metal or other magnetic fields. Ideal sensor in an empty space would return data points on the surface of a perfect sphere but the presence of metal deforms the magnetic field. In such case the data won't lie on a sphere anymore and each axis will have different normalization factors. This needs to be done both because of the manufacturing tolerances of the sensors but also to deal with local conditions - the magnetic field and gravitational fields vary a lot over the surface of the Earth.

And yes, Kalman filter (or any other mathematical solution) cannot fix the fundamental physics problem behind this. Stuff like Kalman is only used to get rid of the noise and to find a "good" ratio of the "fast but drifty" (gyro) and "slow but correct" (magnetometer + accelerometer) data for the given application. Kalman filter is nothing else but a linear interpolation between two sets of values with the interpolation coefficient being (gain) being determined in a special way.
« Last Edit: December 08, 2017, 07:42:45 pm by janoc »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: What are possible ways I can track the orientation of an object?
« Reply #46 on: December 08, 2017, 07:56:41 pm »
What about when the measuring scale is on the order of 20 to 30 cm rather than the Earth.
Even worse. Accelerometers are very bad for determining coordinates. Accelerometers return acceleration, and position is a second integral of acceleration. You have double integration errors. That's where the significant part of the error comes from, not the accelerometer itself.

Do they still get wildly inaccurate after awhile if you don't calibrate? By "accurate" I mean angular accuracy.
Yes, they are. Even if you have absolutely accurate accelerometer that never drifts, your position will drift because of numerical errors due to double integration.

Accelerometers are the worst method for this task.

That is not how an accelerometer is used for this. Attempting to determine a position from an accelerometer data is a futile effort unless working on millisecond time scales and having an external reference against which you can correct the rapidly accumulating error. **

An accelerometer is going to be used to determine the pitch and roll angles relative to gravity (the "down" vector). It won't drift and such solution is perfectly usable if you filter out the noise and the object is not accelerating or turning rapidly (the forces due to that will cause errors). On the other hand, an accelerometer won't give you the yaw (the rotation around the vertical axis). To get the yaw you need a magnetometer and use it as a magnetic compass (after compensating for pitch and roll which you get from the accelerometer).

Now if the object is moving, then you need a sensor that is immune to the forces due to turning and accelerations - and that is a gyro. Which will give you orientation no problem but it drifts. So the strategy is to use the data from the gyro most of the time but detect when the object is not accelerating/turning based on the sensor data and then take a fix from the accelerometer/magnetometer to zero out the gyro drift. And that's basically what an IMU does.

Or you mix the data proportionally based on how reliable they are - if accelerating fast, the accelerometer data quality is poor, so you use mostly gyro and only a little of the accelerometer/magnetometer. If not accelerating/turning, you give it higher confidence. This is, in essence, how a sensor fusion using something like a Kalman filter works.

(** That is very much how the HTC Vive/Valve Lighthouse laser-based virtual reality tracking system works - they use an accelerometer to estimate the distance traveled on very short timescales before the error gets out of hand - essentially dead-reckoning. Then whenever the laser beam from the base station hits the sensors on the tracked object they get an absolute position/orientation fix and use that to correct the estimated position. They use this strategy because it permits a very high update rate which is important for their application case. A typical accelerometer can do 1000+ readings/second whereas the laser is unable to scan that fast - it is mechanically swept about 100 times/second. But this is a rather atypical application.)
« Last Edit: December 08, 2017, 08:07:31 pm by janoc »
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #47 on: December 15, 2017, 07:56:38 pm »
One way to measure Euclidean distance would be to have an RF pulser on your object, and a rotating radio direction finder antenna at the reference position.  Direction from the RDF antenna, distance from a time of flight measurement.  You might be able to do the same thing with ultrasound.

Both concepts doable.  Both complex and tricky to set up. 


I'm intrigued by the RF approach. As I understand, radio signals can go through opaque objects but optical signals like IR cannot, right? The RF approach also seems simpler than the measuring the strength of a field, without the flaws that Janov has mentioned.

I'm thinking about just building something like that for fun. The max distance is 30 cm or so. Latency requirement is low, I only need a measurement once every 1 or 2 seconds. Accuracy requirement is lax as well, can be off by 1 or 2cm and it's no big deal.

So I guess I need to purchase a RF pulsar and an antenna. Any other information that can be helpful (like potential pitfalls or things to be aware of when using the RF approach)?

thanks
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: What are possible ways I can track the orientation of an object?
« Reply #48 on: December 15, 2017, 08:52:32 pm »
Anything radio on such small scale will require a very high frequency to get a meaningful resolution. Which also means that you will have almost no obstacle penetration capability.

However, building anything like this is a very advanced project requiring pretty deep knowledge in RF engineering and signal processing. If you are struggling with basic concepts like putting light barriers or inductive sensors along your track, I am not quite sure how you are envisioning building a complicated microwave system.

Keep it simple.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5231
  • Country: us
Re: What are possible ways I can track the orientation of an object?
« Reply #49 on: December 16, 2017, 05:21:52 am »
As I said earlier these RF concepts are difficult and complex to implement.

Math is your friend in evaluating concepts.  If you don't have the math get it.  It will be faster and cheaper than experiment.

Just some simple math to show both difficulty and the importance of defining your problem carefully in terms of precision required, environment etc. 

You say you only need 1-2 cm accuracy.  Radio and light travels at 3E10 cm/sec.  So to do time of flight measurement you need to measure pulse arrival with something better than 0.1 nanosecond accuracy.  This can be done, but not with a counter on an Arduino.

Going to ultrasound which has a speed of roughly 3E4 cm/sec changes this to somewhat smaller than 0.1 millisecond, much easier to do with simple equipment. 

You have been presented with a variety of approaches to this problem by several people on this thread.  There are several paths forward.

1.  You can provide a complete specification of what you are trying to do and hope that someone on this forum will do the work to provide a cookbook solution for you.

2.  You can buy a bunch of hardware to implement parts or all of one or more of the ideas presented and work out something by trial and error.

3.  You can spend the time and effort to understand and analyze one or more of the ideas and work out the details of how it would be implemented. 

4.  A combination of 2 and 3.  If three is done first this is actually the best approach, and represents what usually happens in most professional situations.  2 is necessary to uncover errors and omissions from the analysis phase.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf