Your question refers to the Perry Expedition, which was a military and diplomatic expedition to Japan. This expedition was carried away during the Bakumatsu era in Japan (which refers to the last years of the Tokugawa Era, from 1603 - 1868).
This expedition involved two ships from the US Navy that had the main task to open new trade agreements and establish contact with the government of Japan.
Before returning in 1854, Commodore Matthew Perry spent a whole year trying to negotiate a treaty with the Japanese government, and at the end of this period, he did return with a total of ten vessels and 1600 men. His fleet now included also more ships, among which was the USS Lexington, and USS Macedonian.
His main goal was to convince the Japanese to sign the treaty, and once he reached Japan with the new fleet in 1854, he then returned giving some time for the Japanese to think. In the end, the result was an agreement between both parts, and the treaty was signed.
Happy to help you!
Have an excellent 2019! :)