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

8 ビュー (過去 30 日間)
MARCO DAVIDE ALFREDO
MARCO DAVIDE ALFREDO 2025 年 4 月 30 日
回答済み: Supraja 2025 年 8 月 1 日
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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by