Study and results of an onboard brake monitoring system for freight wagons