simset command handling with simulink
6 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on PID Controller Tuning in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!