Discrete input signal and continuous transfer function
44 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nerma Caluk
el 14 de Oct. de 2022
Comentada: Nerma Caluk
el 18 de Oct. de 2022
I have a discrete input signal, something like an earthquake ground motion, measured every few milliseconds, with a specified units. That input signal has been converted to frequency-domain through FFT.
I also have a trasnfer function which I need to run the discrete input signal through while in frequency domain (I assume), which is very complex. I have succeffully modeled and plotted it with the tf function in MATLAB.
Is there a way to multiply the discrete input signal with the transfer function? I have tried the function lsim function, but it said that a continous system is required. Should I covert the transfer function to a discrete function and the multiply it?
Thank You so much for the help
2 comentarios
Sam Chak
el 15 de Oct. de 2022
@Nerma Caluk, do you mean that you want to inject the Amplitude Spectrum (in Freq domain) of discrete-time input signal S into a continuous-time transfer function?
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
stem(S(1:50))
title("Discrete-time input signal, S(n)")
xlabel("n")
ylabel("S(n)")
Y = fft(S);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
plot(f,P1)
title("Single-Sided Amplitude Spectrum of S(t)")
xlabel("f (Hz)")
ylabel("|P1(f)|")
Respuesta aceptada
Star Strider
el 15 de Oct. de 2022
It would likely be best to convert the continuous-time transfer function to a discrete-time transfer function (ideally using the Tustin transformation, using the sampling frequency of the earthquake ground motion signal as the sampling frequency of the discrete filter) and then use that to filter the signal. If you have the Signal Processing Toolbox, this should be relatively straightforward. Realise the discrete transfer function as a second-order-section realisation (rather than a transfer function realisation) for the best results.
9 comentarios
Más respuestas (1)
Paul
el 15 de Oct. de 2022
Is the transfer function contiuous time, e.g. a model of an analog device or physical structure excited by the earthquake? If so, lsim seems like it could be the way to go for this problem, taking advantage of the foh method if linear interpolation between sampled measurements is a good model of earthquake ground motion (assuming that the dynamics represented by the tf are slow relative to the measurement sample period). If not, more information on what the tf represents would be helpful.
For example using lsim ...
Generate some data at sample period of 1 ms
t = 0:.001:2;
equake = sin(2*pi/3*t);
Continous time transfer function
H = tf(100,[1 2*.7*10 100]);
The output
y = lsim(H,equake,t,'foh'); % works fine
plot(t,equake,t,y)
Ver también
Categorías
Más información sobre Vibration Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!