The occasion of this psalm is found in 1 Samuel 26. In verse 1 we should read, "and by Thy strength do me justice." Verse 6 speaks of "the Lord" ( Jehovah) when deliverance comes.
These three psalms form a group by themselves, telling as they do the godly judgment of the time,
First, in 52, the wicked head of the apostate Jews;
Second, in 53, the state of the nation, from which the God-fearing remnant are separated;
Third in 54, the look of faith to God, to Him alone.
His name (verse 1) is what He is; this is what is trusted, and this (verse 6) bring forth praise in the day of deliverance.