Permanent residence refers to residence for at least 185 days every calendar year due to personal or professional ties, or personal ties characterised by close bonds between a person and the place where the person lives.
If you alternately live in two or more countries because your professional ties differ from your personal ties, your habitual place of residence (permanent residence) is the place to which you have personal ties. This applies provided that you return there on a regular basis.
If you are carrying out a time-limited task in another country, you do not need to return on a regular basis to the country where you have personal ties in order to be considered a permanent resident there.
Studies at a university or other educational establishment do not change your permanent residence.