MATLAB: Convert NASTRAN Sound Pressure Level Data into Time domain Signal

MATLABnastrannastran to matlabsound

Hello, I want to convert the output which i get from NASTRAN for vibro-acoustic analysis (Nodal displacements in the complex format) into a time domain signal using MATLAB, my analysis ranges from 0Hz to 200Hz frequency band with a frequency resolution of 0.5 Hz, so a total of 400 sample points are there in the output from NASTRAN, can anyone guide me about how to convert this 400 points complex output from NASTRAN into time domain signal using MATLAB, also how to generate the sound for the obtained time signal, thanks in advance

Best Answer

I would reconstruct it with this sort of approach —
Fv1 = 0:0.5:200; % One-Sided Frequency Vector
Fv2 = [-fliplr(Fv1) Fv1]; % Two-Sided Frequency Vector
NASTRAN = zeros(numel(Fv1),2);
Frequencies = randi(numel(Fv1),5, 1);
NASTRAN(Frequencies,:) = 1./[Frequencies Frequencies];
NASTRAN = NASTRAN(:,1)+1j*NASTRAN(:,2); % Original Complex Vector
NASTRAN = [NASTRAN; flipud(conj(NASTRAN))].'; % Frequency Domain Complex Amplitude Vector
figure
plot(Fv2, abs(fftshift(NASTRAN)))
grid
xlabel('Frequency (Hz)')
ylabel('Absolute Amplitude')
title('Original Two-Sided Spectrum')
Fn = max(Fv2); % Nyquist Frequency
Fs = Fn*2; % Sampling Frequency
Ts = 1/Fs; % Sampling Interval (Time-Domain)
IFT_NASTRAN = ifft(NASTRAN); % Inverse Fourier Transform
t = linspace(0, 1, numel(IFT_NASTRAN))*Ts; % Time Vector
figure
plot(t, real(IFT_NASTRAN))
IM_mean = mean(imag(IFT_NASTRAN))
IM_mean = -1.7644e-22
xlabel('Time (sec)')
ylabel('Amplitude')
title('Recovered Time-Domain Signal')
Check = fft(real(IFT_NASTRAN));
figure
plot(Fv2, abs(fftshift(Check))*2)
grid
xlabel('Frequency (Hz)')
ylabel('Amplitude')
title('Recovered Frequency Spectrum')
It would help to have the actual NASTRAN vector.
EDIT — (25 Jun 2021 at 1:26)
Minor corrections.
.
Related Question