I uploaded more details and it is my first time to learn to convert manipulator equation to martice. (some are from wiki ,pages and some are from text book)
Thank you very much because I really want your help. After watching the video about the experiment of balancing control of a mobile inverted pendulum, I still confused with these questions.