Can a variable be both an input/control variable and a state variable in a Kalman filter?

104 Views Asked by At

I am working on implementing a Kalman filter for a home robotics project, and I am stuck on a conceptual problem - I am measuring angular velocity (with a gyroscope). I am also setting that angular velocity by controlling a stepper motor. In the Kalman filter, can something be both a state variable and an input variable, or are they mutually exclusive?

1

There are 1 best solutions below

0
On BEST ANSWER

So presumably, you have an input variable, which is what you command the motor to do, the output variable, which is what you measure the stepper motor is doing, and one of the state variables, which is what the stepper motor is actually doing.

If you believe the motor is doing exactly what you tell it to do, you don't need the measurement. If you believe the measurement is exact, you don't need to consider the command when measuring it. But if you are uncertain about either, then you want to use a Kalman filter.

What the Kalman filter does is to look at two pieces of data - the measurement, and the command. It makes it best guess as to what the motor is actually doing by combining these two pieces of data.

In short, the command velocity and the actual velocity are different variables.