Overview
Comment: | Added R and P arguments for LQ ppp |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
13958eaa9b1296ba6b4208f3f2d71abf |
User & Date: | gawthrop@users.sourceforge.net on 2002-12-11 12:38:25 |
Other Links: | branch diff | manifest | tags |
Context
2002-12-11
| ||
12:41:01 | Solves ARE for PPP check-in: 09c187373a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:38:25 | Added R and P arguments for LQ ppp check-in: 13958eaa9b user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:36:12 | Added R and P arguments so that ppp_quad_lin can be used here check-in: cf62983f7f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/lib/control/PPP/ppp_lin.m from [342b9867d7] to [db890617e0].
| 1 2 3 4 5 6 7 8 9 | - - + + |
|
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + - + + + + + + + + + + + | ## Check some dimensions [n_x,n_u,n_y] = abcddim(A,B,C,D); if (n_x==-1) return endif |
︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | + + - + - + + + | endif [n_t,m_t] = size(tau); if n_t != 1 error("tau must be a row vector"); endif dt = tau(2) - tau(1); # Sample interval [n_Q,m_Q] = size(Q); if ((m_Q != 1)&&(m_Q != m_t)) || (n_Q != n_y) error("Q must be a column vector with one row per system output"); endif if (m_Q == 1) # Convert to vector Q(i) Q = Q*ones(1,m_t); # Extend to cover full range of tau endif ##Set up initial states u_0 = ones(m_U,1); w_0 = ones(m_W,1); ## Find y_U - derivative of y* wrt U. i_U = 0; x_0 = zeros(n_x,1); # This is for x=0 y_u = []; # Initialise x_u_t = []; # Initialise Us = []; # Initialise for i=1:n_U # Do for each input function U*_i dU = zeros(n_U,1); dU(++i_U) = 1; # Create dU/dU_i |
︙ | |||
136 137 138 139 140 141 142 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + + + + + + + + + + + + + + + + + + + | ## Add up cost derivatives for each output but weighted by Q. ## Scaled by time interval ## y_u,y_x and Ws should really be 3D matrices, but instead are stored ## with one row for each time and one vector (size n_y) column for ## each element of U ## Scale Q |
︙ |