A system for performing image guided respiratory gated radiotherapy, comprising: a magnetic resonance imaging system for acquiring images of a tissue in a subject; a surrogate respiratory apparatus for generating a surrogate respiratory signal of the subject contemporaneously with acquiring the images of the tissue, wherein the surrogate respiratory apparatus includes a bellows; a radiotherapy treatment system configured to deliver radiotherapy treatment to the subject; a computer system configured to: i) control the magnetic resonance imaging system to acquire image slices of the tissue in the subject; ii) measure a position of the tissue in the image slices; iii) determine motion of the tissue using the image slices; iv) correlate the motion of the tissue and the surrogate respiratory signal using a respiratory motion model that includes an amplitude of the surrogate respiratory signal and a time derivative of the surrogate respiratory signal; v) gate the radiotherapy treatment delivered to the subject using the motion model; vi) determine an agreement between the gating based upon the motion model and a direct image gating and adjust gating upon determining a disagreement between the motion model gating and the direct image gating; vii) train the motion model using the image slices of the tissue prior to correlating motion of the tissue and the surrogate respiratory signal; and vii) update the motion model by adding a recently-acquired image to the model and removing an earliest acquired image from the model. a magnetic resonance imaging system for acquiring images of a tissue in a subject; a surrogate respiratory apparatus for generating a surrogate respiratory signal of the subject contemporaneously with acquiring the images of the tissue, wherein the surrogate respiratory apparatus includes a bellows; a radiotherapy treatment system configured to deliver radiotherapy treatment to the subject; a computer system configured to: i) control the magnetic resonance imaging system to acquire image slices of the tissue in the subject; ii) measure a position of the tissue in the image slices; iii) determine motion of the tissue using the image slices; iv) correlate the motion of the tissue and the surrogate respiratory signal using a respiratory motion model that includes an amplitude of the surrogate respiratory signal and a time derivative of the surrogate respiratory signal; v) gate the radiotherapy treatment delivered to the subject using the motion model; vi) determine an agreement between the gating based upon the motion model and a direct image gating and adjust gating upon determining a disagreement between the motion model gating and the direct image gating; vii) train the motion model using the image slices of the tissue prior to correlating motion of the tissue and the surrogate respiratory signal; and vii) update the motion model by adding a recently-acquired image to the model and removing an earliest acquired image from the model. i) control the magnetic resonance imaging system to acquire image slices of the tissue in the subject; ii) measure a position of the tissue in the image slices; iii) determine motion of the tissue using the image slices; iv) correlate the motion of the tissue and the surrogate respiratory signal using a respiratory motion model that includes an amplitude of the surrogate respiratory signal and a time derivative of the surrogate respiratory signal; v) gate the radiotherapy treatment delivered to the subject using the motion model; vi) determine an agreement between the gating based upon the motion model and a direct image gating and adjust gating upon determining a disagreement between the motion model gating and the direct image gating; vii) train the motion model using the image slices of the tissue prior to correlating motion of the tissue and the surrogate respiratory signal; and vii) update the motion model by adding a recently-acquired image to the model and removing an earliest acquired image from the model.