In this sentence:
他曾经在北京学过两年汉语。
what's the role of 曾经? I understand that 过 already implies that the action happened in the past.
曾经 is more equivalent to "once" in English as in the sentence
Once we were the best friends.
It is used to:
express the fact the sentence is talking about happened in the past.
if the predicate verb is a durative verb*, express that fact can't be experienced(经=experience) by the speaker(doesn't last) any more.
, the speaker implies that the status is different now. In this case, it means "used to" as in the sentence "I used to be a kind man(implies now I am not)." For your example, the speaker implies that he is not studying Chinese in Bejing now.
*By "durative verb", I mean the action expreesed by that verb can last for a long time. For example, "study, like, look, be, work,feed, etc.". These verbs can be used in the progress tense in English(-ing form). Some other verbs can not, such as "hear of, see, kick, etc." You can't say " I am hearing of a terrible story", while you can say" I am listening to a terrible story".
Can someone tell me the right grammar term if I am wrong?
Just as 已经 means "already" and emphasizes the sense of the completed action particle 了, 曾经 means "once" and emphasizes the sense of 过. I disagree with Bob that 曾经 means already here; in general "once" or "ever" is a better translation. I would render your sentence as "I once studied two years of Chinese in Beijing."
It means 'already', to add emphasis to the sentence - 'he already studied Mandarin in Beijing for two years'