Ultrasonic waves were a form of sound with a frequency beyond the upper limit of a Human's perception. They were used therapeutically for rehabilitation purposes in mental institutions in the 23rd century.
In 2269, former Fleet Captain Garth of Izar made modifications to a rehabilitation chair at the asylum at Elba II, turning it into a torture device capable of inflicting great pain. He used the chair on both Governor Cory and Captain Kirk in an effort to gain information that would facilitate his plans to take over the USS Enterprise. His plot ultimately failed and the chair was restored to its original use. (TOS: "Whom Gods Destroy")