setting initial conditions for laplace transformation
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
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)
댓글 수: 0
채택된 답변
  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
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

