Intelligent carriage automatic recognition