simset command handling with simulink
이전 댓글 표시
Am working with Particle Swarm Optimization(PSO) to find values for PID Controller for a ball plate control system . I used a code
current_fitness(i,1) = tracklsq(current_position(:,i)); where tracklsq is a function and within that function I have commands as
simopt=simset('solver','ode5','SrcWorkspace','Current','DstWorkspace','Current');
[tout,xout,yout] = sim('optsim1_copy',[0 100],simopt);
,So the problem arises is that I could use the whole code to get the value of the PID, Now to find one more PID's values within the same model my code is not working and while debugging I found "yout" as an empty matrix in workspace . With the error saying dimension mismatch in current_fitness(i,1) = tracklsq(current_position(:,i)); but I have checked everything and the dimensions are all correct,, what can yo suggest me to do and please help me out regarding proper use of this sim and simset commands.. please... am working on a conference paper.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 PID Controller Tuning에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!