Slope generation for robotics application

Hi,
i need to generate a speed trajectory following acceleration deceleration and maximum speed constraints in order to reach a position target
I made a simulink which generate the trajectory with the following script
for start_time_x=[0.01:0.01*precision:1.5];
if position_x<pos_target_x;
sim('test3.slx');
%set_param('test','SimulationCommand','stop')
else
break
%set_param('test','SimulationCommand','stop')
end
end
start_time_x=start_time_x-(0.01*precision);
sim('test3.slx');
Start_time_x is the moment when i trig my deceleration
The issues i got , is , when i overshoot the position, i nedd to calculate the proper deceleration in order to reach the position accurately.
I made a second script which take the step time just before the initial slope, and decrease the slope until reach the position
start_time_x=start_time_x-0.01 sim('test3')
for decel_max_x=[-11.999:0.001:-9]
if max(position_x)<pos_target_x
sim('test3')
decel_max_x
else
break
end
end
Its works , but i still have an accuracy issue ( not so much) but its take too many time to have the final result.
Below the position and the speed trajectory
Have you got any idea about how to generate the deceleration starting from a previous point more effectively in order to reduce the simulation time?
I was thining about bijection method , by i dont know where to start...
Thx a lot for your answers

답변 (0개)

질문:

2018년 6월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by