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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!