why I am getting error while tuning using control system tuner

조회 수: 3 (최근 30일)
While I am trying to select signals for quick loop tuning, I am getting on this error repeatedly. I don't fully understand how can t can be negative during simulatiion and error raised by the above image. Can anyone please explain
  댓글 수: 2
Siddharth Jawahar
Siddharth Jawahar 2020년 8월 20일
Can you put in reproduction steps and the files used Shravista?
Best,
Sid
Shravista Kashyap
Shravista Kashyap 2020년 8월 20일
After opening the control system tuner app, I have selected the gain blocks to tune and then I have selected the the actuator signals to motor as input, then after compiling I start getting this error. The simulink diagram can be seen at below links
The actual input the control block shown in the diagram( see the above link) is from a matlab function block called minJerkTraj. The code is as shown below. Also I have used the blocks Matlab System blocks and simscape models imported using robotics toolbox.
function [Acc,X,Vel] = minJerkTraj(boundary_cond,t)
% boundary_ cond is nX6 array of pos and euler angles
% boundary_cond = [x,y,z,alpha,beta,gamma]
% t is time inputs provided by simulink clock block
% it calculates the minimum jerk trajectory for given boundar conditions without any
% restrictions on velocity at waypoints except for maintaining the continuity at waypoints
% Acc = Accelaration 6X1 vector (Acc = [angular_accelaration; accelaration])
% X = trajectory points(6X1 (X = [euler angles;pos])
% Vel = Velocity 6X1 vector 6X1 (Vel = [omega;velocity])
D = @(t) [1, t, t^2, t^3, t^4, t^5
0, 1, 2*t, 3*t^2, 4*t^3, 5*t^4
0, 0, 2, 6*t, 12*t^2, 20*t^3
0, 0, 0, 6, 24*t, 60*t^2];
T = timeVariation(boundary_cond); % fuction that calculates the time vector nX1
eulAng_b = boundary_cond(:,4:6);
quat_b = quaternion(eulAng_b,'euler','ZYZ','frame');
logi = zeros(length(T),1); % logical index stating for in which ranges of time it comes the waypoints come in i.e.[T(i),T(i+1)]
for i = 1:length(T)
logi(i) = t<=T(i);
end
if sum(logi) == length(T)
j1 = 1;
else
j1 = length(T)-sum(logi);
end
[quat,omega,alpha] = rottraj(quat_b(j1),quat_b(j1+1),T(j1:j1+1),t);
eulerAng = euler(quat,'ZYZ','frame');
boundary_cond = boundary_cond(:,1:3);
% this function generates the coefficients required to calculate the fifth degree polynomial in time
C = trajGen(boundary_cond,T);
% no of time range possibel i.e. if size of T is 4 then [T1,T2],[T2,T3],[T3,T4]
m1 = size(boundary_cond,1)-1;
% calculates the index to fetch the coefficients from the matrix C
cIndex = 1:m1;
ci = cIndex(m1-sum(t<=T(2:end))+1);
temp = D(t)*C(6*ci-5:6*ci,:);
X = [eulerAng(:);temp(1,:)'];
Vel = [omega(:);temp(2,:)'];
Acc = [alpha(:);temp(3,:)'];
end

댓글을 달려면 로그인하십시오.

채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2020년 10월 7일
We won't be able to provide a better answer without access to your model and a function. Can you please contact tech support?
  댓글 수: 2
Shravista Kashyap
Shravista Kashyap 2020년 10월 7일
Can I share my models and functions I have used to built it here. I have little confusion since, I used urdf files which require them to be in specific directory. So, how to share it with you people. In case I cannot share it here, how to contact tech support
Arkadiy Turevskiy
Arkadiy Turevskiy 2020년 10월 7일
https://www.mathworks.com/support/contact_us.html

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by