From what i can see;
[link|https://support.irobot.co.uk/s/article/2466|Error 15] is “communication error”, and is said to be fixed by pressing the “Clean” button again or doing a restart.
[link|http://www.robotreviews.com/chat/viewtopic.php?t=22235|Error 31] appear to be “internal communication error”, this one looks unsolved tbh, or at least not publicated officially.
There is this [link|https://www.reddit.com/r/roomba/comments/gs5d40/roomba_s9_error_31_issue/|thread on reddit] tho, that states;
''“UPDATE: I have run the Roomba S9 since removing the main vacuum head, blowing out the hair and dust: The result is that I have had very few error 31’s since. Today is the second day without an error 31.''
''Remove the head, blow out hair and dust, put back the head and all will be well.”''