How to smoothen a signal using response time of a sensor ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Raja Vardhan Reddy Kothakapu
le 19 Août 2019
Réponse apportée : Andrey Kiselnikov
le 19 Août 2019
Hi everyone,
I predicted a signal using mathematical model and I want to compare it with a sensor signal. The problem is my predicted signal reaches the maximum value within fraction of milli seconds. So, I want to include the response time of the sensor in the mathematical model and correct the predicted signal. I tried first order low pass filter using lowpass command in Matlab, but I didn't find any difference. The frequency response(FFT) of my predicted signal shows that my signal always lies below -10dB. Is there any way to include the information about the rise time of the sensor and smoothen the signal?
Thanks!!!
tr = 1.2; %response time
t_s = 0.2; % sampling rate in seconds
f_pass = 0.35/(tr);
f_s = 1/t_s;
Ysim_pt = lowpass(Ysim,f_pass,f_s);
0 commentaires
Réponse acceptée
Andrey Kiselnikov
le 19 Août 2019
If you do not see any changes after filtering it means that all signal components pass through your filter. To visualize it and compare filter response and signal spectrum (use FFT for it) add this string in your script, may bee it can help you.
d = fdesign.lowpass('Fp,Fst,Ap,Ast',f_pass,f_stop,1,60);
Hd = design(d);
fvtool(Hd);
values "1, 60" are defaluts for "lowpass" command.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Signal Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!