Trouble with using dde23 with an optimal control

Hello all, I've recently come across a very odd problem when using dde23. I have it set up to be used on a function that I am attempting an optimal controller on. The dde23 function appears to yield great results with the controller turned off, but then yields the exact same results with the controller turned on. It's like it's not taking the controller term into account. Any ideas?
The function call:
history=1;
xSol=dde23('controlPaperEx',delay,history,t);
xSolnew=deval(xSol,t);
With the m-file:
function Z=controlPaperEx(t,~,yLag) %the start for the dde23 call
% Since b and Q are vectors, only 1 value from each vector can be used at a
% time point to solve for x.
load Q
load A
load B
load R
%%From the Basin paper for the non-tracking problem
for i=1:length(t)
Z=(A+B*inv(R)*B'*Q(i))*yLag; %#ok<MINV>
end
Thanks so much!

답변 (0개)

카테고리

도움말 센터File Exchange에서 Robotics System Toolbox에 대해 자세히 알아보기

질문:

2012년 9월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by