Numerical integration of one DOF discrete gust wind model 1-minus-cosine shape. Time domain

조회 수: 7 (최근 30일)
Good morning,
i'm having some difficulties when i try to write a Matlab code for the Numerical integration of one DOF discrete gust wind model 1-minus-cosine shape, time domain.
I found something useful in the image below, i think i need a bit of help to handle the derivative inside the integral.
It's my first time here, i hope my question will respect all the rules and the netiquette of the community.
Thank you very much
Marco Ruggiero
  댓글 수: 2
Benjamin Thompson
Benjamin Thompson 2025년 5월 16일
What have you done so far? Please attach samples files to your question.
MARCO DAVIDE ALFREDO
MARCO DAVIDE ALFREDO 2025년 5월 28일
I tried to write the convolution with an approximation based on the trapezoidal rule. I had some problems and errors trying to solve the differential equation with ode 45, so i tried and something similar to Euler step-by step method. The code produces some values too distant from the expected ones. Thank you very much for your help.
I posted only the final part of the script.
% INIZIALIZZAZIONE
z_sol = zeros(N,1); dz_sol = zeros(N,1); z_ddot = zeros(N,1);
z_sol(1) = 0; dz_sol(1) = 0;
% INTEGRAZIONE CON EULERO (PASSO PASSO)
for i=2:N
s_hist = s_span(1:i-1);
z_ddot_hist = z_ddot(1:i-1);
if i==2
conv_Kw = 0;
else
integrand = Kw(s_span(i)-s_hist).*z_ddot_hist;
conv_Kw = trapz(s_hist, integrand);
if numel(conv_Kw) > 1
conv_Kw = conv_Kw(1);
end
end
Kg_val = Kg(s_span(i));
if numel(Kg_val) > 1
Kg_val = Kg_val(1);
end
acc = -(1/mu)*conv_Kw + (1/mu)*(mac/V)*Kg_val;
dz_sol(i) = dz_sol(i-1) + acc*delta_s;
z_sol(i) = z_sol(i-1) + dz_sol(i-1)*delta_s;
z_ddot(i) = acc;
end

댓글을 달려면 로그인하십시오.

답변 (1개)

Supraja
Supraja 2025년 8월 1일
Hello Marco,
Please refer to the MATLAB documentation for writing code for integrals and differentiation which is given here: Numerical Integration and Differentiation - MATLAB & Simulink
Thanks!

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by