Duhamel's Integral with conv
Afficher commentaires plus anciens
Hi,
Following on from this question ( https://au.mathworks.com/matlabcentral/answers/392931-duhamel-s-integral-in-matlab?s_tid=srchtitle )
I am also having some problems solving duhammels integral using the conv funciton. I am comparing the results with a simulink spring damper system to try and get correlation.
I am trying to solve the equation attached from "structual dynamics, theory and applications" by Tedesco et al.
I have tried to start very simple with a constant force.
f_ext = 100000; %N
%% System details
m = 400; %kg
k = 100000; %n/m
nf = sqrt(k/m); % = 15.8114 rad/s
I am using a time of 5 seconds with dt = 0.001;
t = [0:dt:5]
i tried using:
h = sin(nf*t);
f_duhammel = ones(length(t),1)*f_ext; %this is just creating a force vector that is constant for time
convolution = conv(f_duhammel,h,"same");
duhammel = 1/(m*omega)*convolution;
figure()
plot(duhammel)
however the plot doesn't look like my simple simulink model.
later in my text book they show for a constant force
x = (f_ext/k)*(1-cos(omega*t));
This matched the dispalcement from my simulink model, so I know my issue is with the convel fucntion in matlab rather than something I am doing incorrectly in simulink.
If anyone has done this before in matlab, are they able to assist me?
4 commentaires
Torsten
le 26 Fév 2022
So F will always be given as a vector of data points or do you have an explicit formula ?
Torsten
le 26 Fév 2022
@James Browne answer moved to a comment:
Yes, I was going to always do it as a vector. That way I can have whatever input for F (or for acceleration) I wanted and could look at the response of the system.
Torsten
le 26 Fév 2022
Then why do you use conv ?
Use trapz instead.
James Browne
le 27 Fév 2022
Réponses (0)
Catégories
En savoir plus sur Chassis Systems dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!