Clear Filters
Clear Filters

setting initial conditions for laplace transformation

10 views (last 30 days)
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)

Accepted Answer

Torsten
Torsten on 31 Mar 2024
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.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!