Issue with implementation of Kalman Filter for state estimation

234 Views Asked by At

I stumbled upon an issue while trying to implement a load current observer for the UPS inverter system. The issue I am facing is with the matrices describing the observer dynamics presented in a paper I'm using for a course project. The problem is to estimate the load currents in a UPS system.

The equation of estimated states is given by, $$ \dot{x} = A_ox_o + B_ou_o\\ y = C_ox_o $$ where $x_o$ is the estimated state vector. The matrix $A_o$ and $B_o$ are given as,

$$ A_o = \begin{bmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ -k_1 & 0 & 0 & \omega \\ 0 & -k_1 & -\omega & 0 \end{bmatrix} $$

$$ B_o = C_o^T = \begin{bmatrix} 0 & 0\\ 0 & 0\\ 1 & 0\\ 0 & 1 \end{bmatrix} $$

The aim is to next find the matrix $P_o$ using the Filter Algebraic Riccati Equation given by,

$$ A_oP_o + P_oA_o^T - P_oC_o^TR_o^{-1}C_oP_o + Q_o = 0 $$

Then, $L$ can be found by,

$$ L = -P_oC_o^TR_o^{-1} $$

where, $Q_o$ and $R_o$ are 4x4 and 2x2 positive definite symmetric matrices

The existence of a unique positive definitene solution $P_o$ can then be guranteed by the theorem,

If $(A_o,\sqrt{Q_o})$ is reachable and $(C_o,A_o)$ is observable the error system using the gain L, with $P_o$ the unique positive definite solution to the Algebraic Filter Riccati Equation, is asymptotically stable

Now that the problem is all set up, when I run care.m on Matlab, by the command,

[Po, Poles , Lo, info] = icare(Ao,Co',Qo,Ro);

returns an error,

No solution found since the Hamiltonian spectrum, denoted by [L;-L], has eigenvalues on the imaginary axis

I made sure that I was giving correct values of $Q_o$ such that the statement of the theorem is satisfied and proceeded to run the icare command. Can anyone give any valuable inputs/suggestions on why this is happening and how I may possibly solve this issue?

Thank you.

1

There are 1 best solutions below

0
On

@KwinvanderVeen's suggestion solved my issue. If the Algebraic filter Riccati equation is given as shown in my original question, I will need to transpose my Ao matrix for fitting within the description of what Matlab uses.