News:

;) This forum is the property of Proton software developers

Main Menu

Vehicle length measurement

Started by shantanu@india, Aug 18, 2022, 01:00 PM

Previous topic - Next topic

shantanu@india

The slow moving trucks are entering through the factory gate.I'm doing a project to measure the maximum height and maximum width by placing ultrasonic sensors verically(top of the gate) and horizontally(left and right gate posts). The width of the gate is 14 meters, the height of the vertical ultrasonic sensors above ground is 8.5 meters and the speed of the truck is approximately 5km/hr.
I'm also using ANPR cameras to read the vehicle license plate.
Can anyone think of any method to measure the length of the vehicle with reasonable accuracy?
Regards
Shantanu

trastikata

Ultrasonic sensors are placed at a fixed distance, more than the maximum expected truck length. Measure simultaneously the distance to the front and to the back of the truck and subtract it from the sensor spacing.

JonW

Could use a doppler sensor above the vehicle to calculate its average speed and maybe a light based sensor to detect the exact entry and exit time.  Low cost doppler modules have a wide beamwidth so detecting the exact point of entry would be difficult.  I think the ones in the roads work by magnetic induction and rely on the speed being fairly constant over the time interval. 

shantanu@india

@JONW Thanks for the idea. Doppler?? I'll have to brush up my knowledge. Detection of speed accurately can be a key.
@trastikata Your idea is really good... hadn't thought of it before. Problem is placement of the sensors so that they don't come in the path of the entering truck.
Maybe placing them at an elevated position and calculating the length trigonometrically from subtended angles??
Regards
Shantanu

keytapper

#4
There could be two sensors on the the vehicle path and one sensor above the entry.
The two sensors on the path will measure the time that occur the vehicle to leave the area, so that will be the known speed and the sensor on top will check the start and the end of the vehicle.

So the resulting data would be the height average of the vehicle, the speed to cover the fixed area. As the speed will be known then the difference from the start to the end of the vehicle, taken from the top, would be easy to estimate.

The vehicle width, may be taken from two sensors placed at the entrance pillars. If they are displaced of a certain amount of space they would serve for calculating the vehicle speed as well, with lower accuracy. Just to count the period of time between the first sensor uncovered to the following. The direction is determined from which will be covered first.
Ignorance comes with a cost

JonW

There are a number doppler modules on the web, some are quadrature with 2 IF outputs so you can calculate speed and direction, single IF output is can only do speed and obviously detection.  The output is effectively audio and you will have to amplify it and process the waveform.  There are some newer devices on the market by Infineon that have lots of features embedded in the IC and some have DSP capability.

keytapper

For the prototype there are the simple microwave sensor, Banggood and IndiaMart may have. The output is just an ON-OFF state.

But I don't deny that for a industrial application there are more suitable devices. I thought that one may start to get a figure how to implement a result, before having to finalize a specific component.

Ignorance comes with a cost

trastikata

Quote from: shantanu@india on Aug 18, 2022, 05:54 PMProblem is placement of the sensors so that they don't come in the path of the entering truck.
Maybe placing them at an elevated position and calculating the length trigonometrically from subtended angles??

I don't know what is the measurement angle of the sensors, but it might be an issue too. Another idea came to mind that can save space:

Placing only one ultrasonic sensor at a certain distance from the gate. The sensor has to be at the "correct" angle and on the side so it can see the truck from the front when it entirely passed the gate and at the same time not being on the truck's path.

There can be an optical sensor at the gate that gives signal when the truck finished crossing the gate, at that moment the ultrasonic sensors measures the distance to the front of the truck. On the same principle as mentioned earlier, given the fixed distance between the gate and the senor, and the known angle of the sensor view, the length can be calculated. 

 

joesaliba

To detect speed you can use, (I don't know the exact name but I am attaching a picture), a sort of cable with pressure switches inside. These are usually used in roads to count cars.


If these are set at for example 2m apart, we can calculate the speed they are traveling.

1. First wire press detection start a counter in seconds
2. Second wire press detection stop the counter

Then we calculate speed.

Say the wires where 2m apart, that is equivalent to 0.002Km and time was 5 seconds from first wire press to second wire press.

Speed = Distance / Time

Therefore: -

Speed Km/h = 3600 (seconds in an hour) x 0.002Km (which is the 2m apart) = 7.2
Speed Km/h = 7.2 / 5 seconds (Time it took between first and second press)
Speed = 1.44Km/h

First math could be a constant as seconds in hour, 3600 will never change, and even the pressure switch wire distance will be the same, 2m (0.002Km)

Therefore, if a truck took 2.5s: -

Speed = 7.2 / 2.5
Speed = 2.88Km/h

Regards

Joe

Traffic monitor.jpg   
 

shantanu@india

#9
Joseph, your idea is good and non -invasive. In India we use axle weighing pads which provide a digital readout when a wheel passes over it. But as an afterthought I am thinking whether velocity detection alone can really solve the problem ? It can be an useful parameter to be used in conjunction with optical occlusion type sensors which record the exact time of entry and exact time of exit as suggested by Trastikata. To apply S=V*T, both V & T should be known with some degree of confidence.
Thanks John & Keytapper. I'll study these Doppler devices. I need to run some mock trials before deciding on the actual devices.
Regards
Shantanu

John Drew

It seems to me that velocity alone could be misleading. Seeing most truck drivers in action they are likely to be accelerating as soon as they can, or changing gears. Let's assume they are nice steady drivers.
The issue of downward pointing Doppler sensors may provide different speed readings dependent on the shape of the vehicle and the load. Consider the doppler seeing the bonnet and then the top of the windscreen, the angles (and so the distance) will differ and compute as a different speed.
It would be less of an issue if every truck is a nice box shape.

I'd use the old light beam interruption method at the front and rear, front = start timer, rear = stop timer. Then two wide spaced pressure sensors on the road to compute speed of the front wheels and therefore the length of the truck.

Old technology but it would be reliable. You may need some way to compensate for the rear sensor stutter as trucks tend to have messy backs E.g sometimes a thin tray may be hard to see. Some kind of wide angle sensor?
John

joesaliba

John D,

Velocity is only there to calculate speed, not vehicle length.

Regarding accelerating, that is why the distance between the two is only 2m, because in 2m there would be no fast acceleration. By some tests, even a sleeping police after or before the two pressure switch will be good to stop the driver from accelerating.

Regards

Joe

Stephen Moss

Quote from: shantanu@india on Aug 18, 2022, 01:00 PMI'm also using ANPR cameras to read the vehicle license plate.
Can anyone think of any method to measure the length of the vehicle with reasonable accuracy?
I would think that the problem with measuring the length, particularly with a single fixed sensor is that speed through the sensor would have to be constant for every vehicle, and you would probably need to find a point where the distance to the sensor is fixed for the length of the vehicle, i.e. not hitting a gap between tractor and trailer on an articulated vehicle which it may mistake for the end of the vehicle.

Do you need to accurately identify the length or are the expected lengths significantly different between vehicles that only an approximate length to categorise as being small, medium or large is sufficient as that determines the required sophistication the system?

Are you using the system to build up a database of vehicle details or just for routing vehicles to a suitably sized loading/parking area on the fly as not being company vehicles their size and Licence Plate are both unknown and constantly variable?

As you are using a camera to identify the licence plate, could you use one to identify the vehicle make and model from its badges, which is then referenced to a database containing pre filled dimension data obtained from the manufactures and so just lookup the size rather then measure it?

shantanu@india

#13
Thanks Stephen for your pertinent queries.
Actually this is mega steel plant where huge goods-laden trucks enter 24X7. They need a system(automated) to push the vehicular dimentions, license plate info and still images to their database. They have their own IT team to write their API's and I would use their URL to push the data.
The height and width are of prime concern with respect to safety since an overloaded truck might crash into a railway crossing height barrier. You can very well imagine steel joists, plates, channels etc. sticking out of the truck and any length measurement has to be physically from tip to tip inclusive of any material sticking out.
I'm in dialogue with an IT company working in AI who say that they can use pixel counting method to calculate the length. Apart from the ANPR camera I have three more cameras for still image capture. I am no expert in openCV but I have a hunch that they might be able to pull it off.
I would have been happier with sensor technology.
Regards
Shantanu

Craig

Hi shantanu

Why not use Infra Red Beams there are many that are available which are commercially available for the Security and Gate automation industry. They are all made to work outdoors and you can cut the beam down to a very narrow beam by placing a tube over the TX Infra Red. You could also use a TOF sensor like the (Garmin Lidar-lite v3HP) to scan the vehicles approach and calculate its speed by measuring the reflection back. You can also use the Lidar to do a 3D Scan of the Vehicle. 

keytapper

I think that the photometry might be implemented. It should have to cover the area of 20 mt. The ultrasound sensor on the top would trigger to start of the height measure and picture acquisition. 
Then collecting few photographs and stitch them up to get the process for measuring the length. The collected data may be already used to patrol the gate.
I suppose that is less tailored for a little MCU.
Ignorance comes with a cost

shantanu@india

Thanks Craig and Keytapper.
Lidar is a good option.. need to explore.
Regards
Shantanu