Filter löschen
Filter löschen

finding shift numbers to minimize the rms of four signals

3 Ansichten (letzte 30 Tage)
cem
cem am 10 Apr. 2023
Bearbeitet: Matt J am 10 Apr. 2023
Hi everyone,
I have four signals (1x10) which are right below;
A=[1 1 1 1 0 0 0 0 1 1];
B=[1 2 3 3 3 3 2 1 1 1];
C=[1 2 1 2 1 2 1 2 1 2];
D=[1 2 3 2 1 0 1 2 3 2];
and I want that:
  • result = (minimize[rms[A,B,C,D]). size of result should be 1x15. We can add zeros to A, B, C, D to reach 1x15 size.
  • To reach the best "result", all signals can be shifted and zeros can be added in x axes. I would like to determine the shifting parameter for each signal.
For example if I have the best result;
A must be shifted 3 digits by adding 3 zeros. and it will be new_A=[0 0 0 1 1 1 1 0 0 0 0 1 1 0 0], B will be new_B=[1 2 3 3 3 3 2 1 1 1 0 0 0 0 0]; C will be new_C=[0 0 0 0 0 1 2 1 2 1 2 1 2 1 2]; and new_D = [0 0 0 0 0 1 2 3 2 1 0 1 2 3 2 ].
So according to the upper result, I would like to determine four parameters that are A_t_shifted: 3, B_t_shifted= 0, C_t_shifted= 5, D_t_shifted= 5.
How can I determine these parameters to minize the result with a matlab code? (Maybe "corr" or "conv" can be helpful.)
kings regards
Cem
  1 Kommentar
Matt J
Matt J am 10 Apr. 2023
Bearbeitet: Matt J am 10 Apr. 2023
It's not clear why you think this combination of zeros minimizes rms. The rms should not depend on the location of additional zeros in the signals.
rms([1 2 3 0 0 0 ])
ans = 1.5275
rms([0 1 2 3 0 0])
ans = 1.5275
rms([0 0 1 2 3 0 ])
ans = 1.5275

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by