Apathfollowingcontrollerisdevelopedforunderactuatedshipswithonlysurgeforceandyawmomentavailabletofollowapredefinedpath.Theproposedcontrollerisbasedonnonswitchanalyticmodelpredictivecontrol.Itisshownthattheoptimalcontrollawforanonlinearpathfollowingsystemwithill-definedrelativedegreeiscontinuousandnonsingular.Theproblemofill-definedrelativedegreeissolved.Thepath-followingabilityofthenonlinearsystemisguaranteed.Numericalsimulationsareprovidedtodemonstratetheeffectivenessoftheproposedcontrollaw.