Kiai happens in very specific places in katas, so they should have very specific meaning. But what?
Could they be part of attack on senses? Overwhelming vision, smell and touch by aggressive "face rubbing" is one technique of breaking of a hold and gaining distance in grabbling. When all you receive too much stimulus from all you senses at the same time you brain tends to shut down. Myybe Kiai is part of that attack?
On that note, I recently watched nice introductory video on Aikido, do you see the resemblance of Uge Nagashi Irimi to the movement around first kiai in Heian Shodan?
-Step towards grab/punch and deflect it to the side = age uke <Kiai>
- Execute elbow lock to the attacking hand = gedan barai/taisabaki
-Finish takedown and control = oi zuki