필터 지우기
필터 지우기

setting initial conditions for laplace transformation

조회 수: 5 (최근 30일)
Jon
Jon 2024년 3월 30일
답변: Torsten 2024년 3월 31일
How do I set all the initial consitions for the following code to =0
clc
clear
%-------------------------------------------------SYSTEM_PARAMETERS----------------------------------------------------------------------------------------------------------------------------------------------------------
Ic=1356; %kg-m^2
Mb=730; %kg
Mf=59; %kg
Mr=45; %kg
Kf=23000; %N/m
Ksf=18750; %N/m
Kr=16182; %N/m
Ksr=12574; %N/m
Bsf=100; %N*s/m
Bsr=100; %N*s/m
L1=1.45; %m
L2=1.39; %m
L3=0.67; %m
syms Xf(t) Xr(t) Xb(t) theta(t)
Xf_1=diff(Xf,t);
Xf_2=diff(Xf,t,2);
Xr_1=diff(Xr,t);
Xr_2=diff(Xr,t,2);
Xb_1=diff(Xb,t);
Xb_2=diff(Xb,t,2);
theta_1=diff(theta,t);
theta_2=diff(theta,t,2);
eqn1=Mf*Xf_2+Bsf*(Xf_1-(Xb_1-(L1*theta_1)))+Ksf*(Xf-(Xb-(L1*theta)))-Kf*Xf
L_eqn1=laplace(eqn1)
eqn2=Mr*Xr_2+Bsr*(Xr_1-(Xb_1-(L2*theta_1)))+Ksr*(Xr-(Xb-(L2*theta)))-Kr*Xr
L_eqn2=laplace(eqn2)
eqn3=Mb*Xb_2-Bsf*(Xf_1-(Xb_1-(L1*theta_1)))-Ksf*(Xf-(Xb-(L1*theta)))-Bsr*(Xr_1-(Xb_1-(L2*theta_1)))-Ksr*(Xr-(Xb-(L2*theta)))==10*exp(-5*t)
L_eqn3=laplace(eqn3)
eqn4=Ic*theta_2+Bsf*(Xf_1-(Xb_1-(L1*theta_1)))*L1+Ksf*(Xf-(Xb-(L1*theta)))*L1-Bsr*(Xr_1-(Xb_1-(L2*theta_1)))*L2-Ksr*(Xr-(Xb-(L2*theta)))*L2==(10*exp(-5*t))*L3
L_eqn4=laplace(eqn4)

채택된 답변

Torsten
Torsten 2024년 3월 31일
L_eqn1 = subs(L_eqn1,[Xb(0) Xr(0) Xf(0) theta(0) Xb_1(0) Xr_1(0) Xf_1(0) theta_1(0)],[0 0 0 0 0 0 0 0])
Same for the other equations.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by