# Estimation of pitch, roll, yaw angles: synthesis of an observer or IMU?

Dear Robotics Specialists, I want to contact you for advice. I am developing a control system for complex parallel mechanisms like what I presented in this thread.

Formulas for calculating the passive joints angular velocities

I faced the problem of estimating the pitch, roll and yaw angles of a platform.

On the one hand, this problem can be solved by using IMU.

On the other hand, the use of mathematical tools, for example, the synthesis of an observer (a mathematical model of the mechanism in the state-space is known), is a rather attractive way.

But here another question arises: it is necessary to evaluate either the rotation angular velocities of the intermediate joints ($$\dot{\psi_i}$$ and $$\dot{\xi_i}$$), and then use them to solve the direct kinematics problem (which determines the multiplicity of solutions, rather than uniqueness), or, to evaluate these angular velocities and pitch, roll and yaw angles using an observer, taking them in the form of a single state vector. I’m not sure if this is possible. only motor shaft position and velocity is available for control and measurement ($$[\dot{\theta_1},\dot{\theta_2},\dot{\theta_3}]$$).

So:

1. IMU - automatically solves the problem and ensures the uniqueness of solutions, but it is expensive and causes the accumulation of errors, which is their disadvantage. Are there any alternatives to the IMU that have been spared this drawback?

2. An observer is a computational tool implemented in software. It allows you to evaluate some parameters. How to use it to evaluate such a large vector when only 1 measured and controlled joint is available and what type of observer is best used for this?? ($$[\dot{\theta_1},\dot{\theta_2},\dot{\theta_3}]$$).

Assuming this is a platform attached to a robot of some kind, you can:

1. Measure the platform pose directly, as with an inclinometer, IMU, laser, camera, etc.,
2. Measure the platform pose indirectly, by putting rotary encoders on the joints and using kinematics to determine the platform pose for a given set of joint positions, or
3. Estimate the platform pose with observers/filters.

For an IMU, the Madgwick filter can fix roll and pitch angles. You would need a magnetometer (called "9-axis IMU," typically) to fix yaw angle as well. No IMU is capable of fixing position. You could filter with a GPS to fix position.

How to use it to evaluate such a large vector when only 1 measured and controlled joint is available and what type of observer is best used for this?

You need to check for observability. You had stated

a mathematical model of the mechanism in the state-space is known

so you build the observability matrix:

$$O = \left[\begin{matrix} C \\ CA \\ CA^2 \\ \vdots \\ CA^{n-1}\end{matrix}\right]$$

where $$n$$ is the number of states of your system (number of rows/column of $$A$$) and then check that $$\textrm{rank}\left(O\right) = n$$.

If $$\textrm{rank}\left(O\right) < n$$ then the system is not observable and your states can't be estimated with the stated arrangement of feedback channel(s).

• Thank you, your answer was helpful. Firstly, I learned a little more about sensors and data filtering, and secondly, about the use of observers. On this point, I have a question: what type of observer is preferable? – dtn May 22 at 15:39
• And if the system is unobservable, can it be made observable? – dtn May 22 at 18:06
• @dtn - I don't think the observer type matters much; the particular type you choose is up to you. If the system is unobservable, it can be made observable by changing or adding to your feedbacks. – Chuck May 22 at 19:35
• Do you know the experience of using observers if the system parameters are variable? – dtn May 25 at 10:51
• @dtn - I think one of the requirements for a Luenburger observer is a "linear, time invariant" (LTI) system. Entries in your A matrix aren't supposed to be time-varying. I've gotten away with it in the cases where the parameters change at a rate much different than the system dynamics (much faster or much slower). – Chuck May 25 at 19:21