Overview
| Comment: | Fixed simulation in remote observer mode |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
b97106a19101dcc9dd8c086be81336cb |
| User & Date: | gawthrop@users.sourceforge.net on 2003-11-04 21:19:19.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2003-11-05
| ||
| 00:58:56 | Removed debugging stuff check-in: 8bffa25a49 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
|
2003-11-04
| ||
| 21:19:19 | Fixed simulation in remote observer mode check-in: b97106a191 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
|
2003-11-03
| ||
| 23:51:14 | Added p_o.method = "remote" ; observer in rtlab check-in: b0088c4e0a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/lib/control/PPP/ppp_lin_run.m
from [df48e84740]
to [3224c3dc4b].
| ︙ | ︙ | |||
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
i=0;
for j=1:p_c.Iterations
for k=1:I
tim=time; # Timing
i++;
if Simulate # Exact simulation
t_sim = [1:p_c.N]*dt; # Simulation time points
[yi,ui,xsi] = ppp_ystar(A,B,C,D,x,p_c.A_u,U,t_sim); # Simulate
x = xsi(:,p_c.N); # Current state (for next time)
ti = [(i-1)*p_c.N:i*p_c.N-1]*dt;
y_i = yi(1); # Current output
t_i = ti(1);
else # The real thing
if strcmp(p_o.method, "remote")
[t_i,y_i,X] = ppp_put_get_X(U); # Remote-state interface
u_i = X(3); # Integrated control is third state
else
[t_i,y_i,u_i] = ppp_put_get(U); # Generic interface to real-time
endif
| > > | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
i=0;
for j=1:p_c.Iterations
for k=1:I
tim=time; # Timing
i++;
if Simulate # Exact simulation
X = x; # Current state
t_sim = [1:p_c.N]*dt; # Simulation time points
[yi,ui,xsi] = ppp_ystar(A,B,C,D,x,p_c.A_u,U,t_sim); # Simulate
x = xsi(:,p_c.N); # Current state (for next time)
ti = [(i-1)*p_c.N:i*p_c.N-1]*dt;
y_i = yi(1); # Current output
t_i = ti(1);
##X = xsi(:,1);
else # The real thing
if strcmp(p_o.method, "remote")
[t_i,y_i,X] = ppp_put_get_X(U); # Remote-state interface
u_i = X(3); # Integrated control is third state
else
[t_i,y_i,u_i] = ppp_put_get(U); # Generic interface to real-time
endif
|
| ︙ | ︙ |