A general analytic approach to the study of the electrodynamic properties of d.c. SQUIDs