I want to solve the Algebraic Riccati Equation via MATLAB or Octave.
The first thing I do is to create the Hamiltonian matrix of A, B, Q and R.
> H = [A -(B.*inv(R).*B'); -Q -A']
Then I do the Schur decomposition of H.
> [U, S] = schur(H)
Then I will find U21 and U11 because U is a square matrix.
> [m,n] = size(U)
> U11 = U(1:(m/2), 1:(n/2))
> U21 = U((m/2+1):m, 1:(n/2))
Then I find the solution to Algebraic Riccati Equation.
> X = U21*inv(U11)
The problem is this method does not give the same solution values for matrix X, when using MATLAB's function X= care(A, B, Q, R).
Why? Have I done this method wrong ?
Source: http://dspace.mit.edu/bitstream/handle/1721.1/1301/R-0859-05666488.pdf
Here is the answer. It will give the same results as MATLAB's command care(A, B, Q, R). But MATLAB's command dare(A, B, Q, R) will not give the same results if we follow the PDF source in the question.