High frequency linear accelerator: a perturbative study of the transmission matrix of a two-port device chain