Emotions with HTM/reference frames

So I just started reading Hawkins’ book, and I must say how refreshing it is for someone doing the classic ‘AI’ based on old neuro theories to see how actually the brain works, and how brilliant Numenta’s work is.

I haven’t reached very far, but does Hawkins mention any said theory for emotions with respect to reference frames?

Logically, if we treat them as basic reward/punishment features then it doesn’t provide any sense as to how they have developed to be so complex than simple pain/pleasure. Emotions don’t provide much survivability for us as humans (except a little in the social aspect) and they don’t seem to be very intellectually linked. How are you supposed to link emotions to reference frames?

from the top-level view, emotions just provide a way for us to communicate. but is there some internal mechanism that makes sense for those emotions to be useful?
from what I feel, they are simply useless biases affecting our decisions.

Maybe hawkins might have touched upon it later, so I apologize for asking it here. but does anyone have any theories for that?

I think emotions are key to color memories as the are formed to contribute to future judgement.