Precision agriculture is a set of methods based on spatial and timed information which aims at making agricultural operations specific to local crop needs. This study was conducted to contribute to precision spraying for trellised perennial crops such as grapevine with a new method called Automata Modelling for Precision Spraying (AMPS). AMPS is based on the timed automata formalism and the UppAal-CORA model-checking tool with cost optimisation. It takes 2D ground-based LiDAR data of the canopy as input and computes a command sequence for the sprayer that is optimized for a cost criterion. AMPS was tested on LiDAR data from a vine row and with a hypothetical sprayer model based on pneumatic technology and individual command for each spout. The chosen cost criterion was the amount of product sprayed on the row. It was demonstrated on the example that a significant proportion of phytosanitary product can be saved. It was also shown that it is necessary to take into account spout control dynamics, because the savings are inferior to the ideal case in which spout response would be instantaneous.