Overview
Comment:Allow state weighting
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: bcfda43650f16f919e73df9756426ce2dd4ec0b51a719087665cb2b7e3fa3661
User & Date: gawthrop@users.sourceforge.net on 2005-04-20 13:50:40
Other Links: branch diff | manifest | tags
Context
2005-04-26
13:06:08
Tidied check-in: a70054eb83 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2005-04-20
13:50:40
Allow state weighting check-in: bcfda43650 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2005-04-11
10:25:28
Additional argument to allow arbitary U*_0 check-in: c207dffa28 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/control/PPP/ppp_are.m from [36a7ac48d8] to [61fa06621b].

9
10
11
12
13
14
15





16

17
18

19
20








21
22
23
24
25
26
27
9
10
11
12
13
14
15
16
17
18
19
20

21
22
23
24


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39







+
+
+
+
+
-
+


+
-
-
+
+
+
+
+
+
+
+







    return
  endif
  
  if nargin<7
    A_type = "feedback";
  endif
  
  [n_x,n_u,n_y] = abcddim(A,B,C,D); # Dimensions
  n_q = is_square(Q);		# Size of Q
  if n_q==0
    error("Q must be square");
  endif

  
  ## Steady-state Linear Quadratic solution
  ## using Algebraic Riccati equation (ARE)
  if n_q==n_y			# Output weight
  Q_x =  C'*Q*C;			# Weighting on x
  [k, P, poles] = lqr (A, B, Q_x, R); # Algebraic Riccati solution
    Q_x =  C'*Q*C;		# Weighting on x
  elseif n_q==n_x		# State weight
    Q_x = Q;
  else
    error(sprintf("Q (%ix%i) must be %ix%i or %ix%i",n_q,n_q,n_y,n_y,n_x,n_x));
  endif
  Q_x
  [k, P, poles] = lqr (A, B, Q_x, R) # Algebraic Riccati solution

  ## Basis functions
  if strcmp(A_type,"companion")
    A_u = compan(poly(poles));
  elseif strcmp(A_type,"feedback")
    A_u = A-B*k;
  else


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