On March 31, 1854, the Convention of Kanagawa was used by Commodore Matthew Perry of the U.S. Navy to force the opening of the Japanese ports of Shimoda and Hakodate to American trade. Though he refused to deal with petty Japanese officials and demanded to speak with the Japanese Head of State, Perry did not realize that he had only spoken with representatives of the Tokugawa Shogun and not the Emperor. For the Emperor to interact in any way with foreign barbarians was, of course, out of the question. After the Treaty of Kanagawa was concluded, similar treaties were negotiated by the Russians and the British.
See History of Japan