我正在尝试解决关于两个轴的动量的机械问题。我以前从来没有上过一个机械师,所以我不知道如何处理这个问题。
给定: 等式:
• J1*dw1/dt + Td(w12)+Ts(phi12) = T1;
• J2*dw2/dt - Td(w12) -Ts(phi12) = T2;
where w1 = dphi1/dt,
w2 = dphi2/dt,
phi12 = phi1 - phi2
w12 = w1 - w2
Td(w12) = c12 * w12
Ts(phi12) = ks * phi12
c12 and ks are some coefficients
• dphi12/dt = w12
• dw12/dt = T1/J1 - T2/J2 - Td(w12)/Jeq - Ts(phi12)/Jeq
ccr = 2*Jeq*wn
wn = sqrt(ks/Jeq)
Jeq = (J1*J2)/(J1+J2)
T1(t) = T0*1(t), T0 = 1 T2(t) = 0
J1+J2 = 10 wn = 100 rad/s c12 = 0 Ts(phi12) = ks*phi12
`
目标是绘制函数Tsmax/T0 = f(J1/(J1+J2))
任何指导都将不胜感激。
我尝试在simulink中解决方程式,这是我到目前为止所做的事情
我在matlab中的代码
T0 = 1;
T2 = 0;
J1 = 5;
J2 = 10-J1;
wn=100;
Jeq=J1.*J2/(J1+J2);
ckr = 2.*Jeq*wn;
ks = (wn^2)*Jeq;
c12=0;
J1s = 1;
length(J1)
a2 = 0 :J1;
for c=1:J1
J1s = a2(c);
sim('model');
a = J1s/(J1s+J2);
plot(Ts,a)
hold all
end
grid on
它实际上没有做任何接近预期的事情。 根据我的信息,曲线应该类似于f(x)= -1x + b。
答案 0 :(得分:0)
我认为问题在于,在每次迭代中,您都不会重新计算J2
和Jeq
。现在,您的模型已使用J1
,J2
和Jz
参数化,因此这些是您需要在每次迭代时更新的值。类似的东西:
a2 = 0:J1; % do you really want 0 inertia?
Tsmax = zeros(size(a2));
for ii=1:length(a2)
J1 = a2(ii); % Using J1 as model is parameterised with J1;
J2 = 10 - J1; % New value of J2
Jz = J1*J2/(J1+J2); % New value of Jz
sim('model'); % ks and c12 do not change with each iteration
Tsmax(ii) = max(Ts); % get max value of Ts
end
% Plot Tsmax as a function of Jeq
Jeq = (a2.*(10-a2))/10;
plot(Jeq,Tsmax)
grid on