对于下列三个微分方程,化为现代控制非线性微分方程形式,状态向量为phi,diff(phi,t),x,diff(x,t),theta,diff(theta,t)并写出matlab代码以及写出状态空间符号表达式对于写出的现代控制非线性微分方程形式对其雅可比进行线性化:I_M*diff(phi,t,2)==T_p+M*diff(((L+L_M)*sin(theta)-l*sin(phi)),t,2)*l*cos(phi)+M*diff((L+L_M)*cos(theta)+l*cos(phi)+M*g,t,2)*l*sin(phi);I_p*diff(theta,t,2)==(P*L+P-m_p*g-m_p*diff(L*cos(theta),t,2)*L_M)*sin(theta)-(N*L+N -m_p*diff(x+L*sin(theta),t,2)*L_M)*cos(theta)-T+T_p; ;diff(x,t,2)==(T-NR)/(I_w/R+m_wR)
时间: 2023-12-16 11:02:41 浏览: 63
化为现代控制非线性微分方程形式的结果如下:
phi_dot = diff(phi,t)
phi_ddot = (T_p+M*diff(((L+L_M)*sin(theta)-l*sin(phi)),t,2)*l*cos(phi)+M*diff((L+L_M)*cos(theta)+l*cos(phi)+M*g,t,2)*l*sin(phi))/I_M
theta_dot = diff(theta,t)
theta_ddot = ((P*L+P-m_p*g-m_p*diff(L*cos(theta),t,2)*L_M)*sin(theta)-(N*L+N-m_p*diff(x+L*sin(theta),t,2)*L_M)*cos(theta)-T+T_p)/I_p
x_dot = diff(x,t)
x_ddot = (T-NR)/(I_w/R+m_w*R)
其中,phi, theta, x 分别代表系统的三个状态量,T_p, T, M, L, L_M, l, g, m_p, P, N, I_M, I_p, I_w, NR, m_w, R 为常数参数。
matlab 代码如下:
syms phi(t) theta(t) x(t)
syms T_p T M L L_M l g m_p P N I_M I_p I_w NR m_w R
phi_dot = diff(phi,t)
phi_ddot = (T_p+M*diff(((L+L_M)*sin(theta)-l*sin(phi)),t,2)*l*cos(phi)+M*diff((L+L_M)*cos(theta)+l*cos(phi)+M*g,t,2)*l*sin(phi))/I_M
theta_dot = diff(theta,t)
theta_ddot = ((P*L+P-m_p*g-m_p*diff(L*cos(theta),t,2)*L_M)*sin(theta)-(N*L+N-m_p*diff(x+L*sin(theta),t,2)*L_M)*cos(theta)-T+T_p)/I_p
x_dot = diff(x,t)
x_ddot = (T-NR)/(I_w/R+m_w*R)
现代控制非线性微分方程形式的雅可比矩阵为:
syms phi theta x phi_dot theta_dot x_dot
J = jacobian([phi_dot, phi_ddot, theta_dot, theta_ddot, x_dot, x_ddot], [phi, phi_dot, theta, theta_dot, x, x_dot])
其中,J 代表雅可比矩阵。
阅读全文