Matlab和力学(主要是物理学)

编程入门 行业动态 更新时间:2024-10-23 10:26:31
本文介绍了Matlab和力学(主要是物理学)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试解决有关两个轴的动量的力学问题.我以前从未上过机械课,所以我不知道该如何解决这个问题.

I am trying to solve a mechanics problem regarding momentum of two shafts. I have never had a class an mechanics before, so i don't know how to approach this problem.

给出: 方程:

• 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)) 任何指导将不胜感激.

The goal is to plot the function Tsmax/T0 = f(J1/(J1+J2)) Any guidance would be appreciated.

我尝试在simulink中求解方程,这是我到目前为止所做的

I tried solving the equation in simulink, here's what I did so far

我在matlab中的代码

My code in 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.

which really does nothing close to what is expected. To my information the curve should be something like f(x) = -1x+b.

推荐答案

我认为问题在于,在每次迭代中,您都没有重新计算J2和Jeq.现在,您的模型已使用J1,J2和Jz参数化,因此这些是您每次迭代都需要更新的值.像这样:

I think the problem is that in each of your iterations, you are not re-calculating J2 and Jeq. Now, your model is parameterised with J1, J2 and Jz so these are the values you need to update with each iteration. Something like:

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

更多推荐

Matlab和力学(主要是物理学)

本文发布于:2023-06-04 19:09:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/503355.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:物理学   力学   主要是   Matlab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!