Desired input signal generation based on input and measured output and expected output with data comparision

2 visualizzazioni (ultimi 30 giorni)
Dear matlab expert,
I have one small query regarding as in title mentioned ''Desired input generation". I am trying it since long with excel however it is manuel data analysis and taking so much time. It would be great if anyone can help me with matlab to do that.
Problem: I have a input signal vector (red) and measured output data vector (blue). i have expected output data vector (green) which i want to have by changing input signal parameters.
Currently, as shown in figure, red is input (projected), green is desired output and blue is measured output.With excel i am changing input parameters (such as with gauss sinus mathamtical formula) in that manner so that i can have desired output. Attached are my all data vectors.
My methodology is like: i am comparing acceleration (blue and green) with red (i have projected red here).
Input red curve i am trying to match to the max acceleration peak (measured data) point as shown in figure too.
  • first trial i select the same points of first half acceleration which match to the input red curve. and got good result with measurement
It works well but i want to make it automatic. I would be very thankful to you to support me.
Furthermore, i used in excel following mathematical equation:
Input voltage sinus: U(t)=∑i(Ai*exp(-(t-ti)^2/D^2)) i=1,2,3 [V] vs t [s] [m/s2] red curve
I have sampling rate for input: 8000 Hz.
and for measured output: 10000 Hz
thank you
  1 Commento
Mohammed Cha
Mohammed Cha il 19 Mar 2021
Dear Matlab experts,
I would like to have your comments on my question. May be some hints will be also useful. Also, will be helfpful to know either Matlab can do this or not.
Thank you very much in advance

Accedi per commentare.

Risposta accettata

Mathieu NOE
Mathieu NOE il 19 Mar 2021
hello
so this my suggestion / code for you
i first didn't understood evrything, so first thing was to try time align the 3 data vectors ((see figure 1)
then I tried to do a fit in amplitude and time to regenerate th red curve (see figure 3)
NB : I changed your files extension from csv to txt and converted the comma decimal sperator to the dot so there is o more confusion with csv comma separated columns (otherwise your measured data are two columns of integers when imported in matlab)
everything is in the attachement including the function to find peaks
all the best
  4 Commenti
Mathieu NOE
Mathieu NOE il 6 Apr 2021
hello
the code so far already matches the first 3 peaks between the red and blue lines (time alignment + amplitude match)
so what do you want to match more ?
Mohammed Cha
Mohammed Cha il 11 Apr 2021
Dear Sir,
Thank you very much for your reply. In my analyisis it is important to have a input (three peak max and min), similar to blue lines. However, currently i have limitation to have just positive values for input. Hence, i have placed it via two Y-axis as shown in figure. Is is possible to have flexible modification for the input parameters to increase and decrease max and min amplitude of the first three peak corresponding blue lines?. It will help me to experiment and get best acaustic.

Accedi per commentare.

Più risposte (1)

Amanda Botelho Amaral
Amanda Botelho Amaral il 14 Dic 2021
I have a similar problem. did you get the expected result?
https://www.mathworks.com/matlabcentral/answers/1610700-comparing-curves-to-an-original-signal

Categorie

Scopri di più su Signal Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by