I know that Kingdoms, Grand Duchies, Duchies, Principalities, Margraves, Free Cities, etc. are inextricably linked to the Holy Roman Empire in some kind of feudal pyramid. How are they related? Where did they derive their sovereignty from? How did the Peace of Westphalia in 1648 affect all this? Can you suggest a book I can study for further information?
Basically all the above were various names for the semi-independent states in the Holy Roman Empire (for example Luxembourg was and is a Grand-Duchy and Lichtenstein was and still is a Principality which has never formally left the HRE), there were initailly two titles ‘King of the Germans’ and ‘Holy Roman Emperor’, to become ‘Holy Roman Emperor’ you had to be elected ‘King of the Germans’ by the elector states and then approved by the Pope.
The peace of Westphalia was one of several steps that allowed the rulers of each of these states within the HRE to gain more power.