Artifact 374eed77eba11b543bc674f9a8d5618b92b861ac225cfd275db470f7c5cf9b0c:


function [P,A_u,A_w,k] = ppp_are (A,B,C,D,Q,R)

  ## usage:  [P,A_u,A_w] = ppp_are (A,B,C,D,Q,R)
  ##
  ## 


  ## Steady-state Linear Quadratic solution
  ## using Algebraic Riccati equation (ARE)
  Q_x =  C'*Q*C;			# Weighting on x
  [k, P, poles] = lqr (A, B, Q_x, R); # Algebraic Riccati solution

  ## Basis functions
  A_u = compan(poly(poles));

  ## Avoid spurious imag parts due to rounding
  A_u = real(A_u);		

  ## Setpoint basis functions
  A_w = 0;

endfunction


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]