For my robotics course I have to implement the nonlinear continuous system function for a mobile robot that is equipped with a GPS receiver and an IMU consisting of an accelerometer and a gyroscope. For the prediction step with an EKF, I need to implement the kinematic model $\dot x = f(x,u)$ with given state vector $x = \begin{pmatrix}x\\y\\z\\v_x\\v_y\\v_z\\q_1\\q_2\\q_3\\q_4\end{pmatrix}$, input vector $u = \begin{pmatrix}a_x\\a_y\\a_z\\w_x\\w_y\\w_z\end{pmatrix}$, time $t$ and gravity $g$.

Afterwards, I need to calculate the matrix $A=\frac{\partial f}{\partial x} $ and $B=\frac{\partial f}{\partial u} $ where $A \in \mathbb{R}^{10x10}$ and $B \in \mathbb{R}^{10x6}$. These are used to calculate the system matrices $F$ and $H$ of the time discrete system (this is already given as Matlab code).

Unfortunately I didn't attend any control theory courses yet and it is my first semester in robotics, so I am pretty lost with this task. Maybe someone could give me a hint on how I have to approach this problem.

  • 1
    $\begingroup$ You should have the differential equations of your system somewhere. Those are the input and the state vector. With those information only, you cannot go anywhere. Can you post all the equations, you have? $\endgroup$
    – Wilhelm
    Dec 12, 2022 at 17:21
  • $\begingroup$ Welcome to Robotics, exzoran. How are you expecting to implement a continuous function for a system that's using discrete feedback? A GPS and IMU device will each provide samples on some update interval. It's also not clear what you're actually asking about here. You say you have to implement the [...] function and then you say you need to calculate the matrix A [...] and B. Are you doing system identification? I (and I'm sure others) would love to help, but realistically the best person you're going to find for help on this is your TA, lab supervisor, professor, etc. $\endgroup$
    – Chuck
    Dec 12, 2022 at 20:19
  • $\begingroup$ @Dave I am only given the equations i already posted. u ist the input vector coming from the IMU and x is the state vector. On top of that I am only given the output vector of the GPS-reciever, but i thought this one wasn´t necessary for the task $\endgroup$
    – exzoran
    Dec 13, 2022 at 13:43
  • $\begingroup$ @Chuck sorry if I wasn´t clear enough. The task is to implement the nonlinear time-continuous system diefferential equation $\dot x = f(x,u)$ of the kinematic model with the given parameters to linearize it. Afterwards I am asked to to implement the matrices $A$ and $B$ which are then used to calculate the system matrices $F$ and $H$ of the time-discrete system (those are already given). I hope this gives you more information $\endgroup$
    – exzoran
    Dec 13, 2022 at 14:04
  • $\begingroup$ @exzoran Dear exzoran, we would like to help you, but there are two possibilities: 1) part of the task in incomplete, because you need the $f(x,u)$ somehow... otherwise you cannot calculate $\matrix{A}$. Maybe the task referes to a previous task done months/weeks ago? 2) the task requests something different than calculating the matrix $\matrix{A}$ I don't see any other possibilities $\endgroup$
    – Wilhelm
    Dec 14, 2022 at 13:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.