Amplitude of the convoluted signal?
18 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
i'm modelling some measurement devices and I need the conv function of Matlab.
Hence, lets define A = conv(B, C); where B has 20 k points and C 5 k points. A will have 24999 points, but what happens to its amplitude? I've tried thousand of simulations but i cannot see any relation between the amplitudes. In other words, I always find that A amplitude has a coefficient factor but i don't know where it cames from.
I've already tried introducting the samplimg frequency of the signals, but nothing.
Thank you in advance.
0 件のコメント
回答 (3 件)
Pawel Jedrejko
2021 年 8 月 4 日
For anyone looking for an answer in future:
I had the same problem, then I found in the documentation that conv() is actually just multiplying and summing, not 'integrating'.
Multiplying the output times dx (discretization step size) does the job.
2 件のコメント
Image Analyst
2022 年 2 月 13 日
Yes, the x "units" of the result are the same as for the inputs, which should both have the same units. So if you just want "elements" as the units, it's that way already. However if you consider the units to be units of time, like the distance between two adjacent elements is 1 millisecond, then the output will be the sum of the values of the first signal times the second signal, summed up. Where the signals don't overlap, as the one slides past the other, the sum is zero there. If you want the output to be an "integration" like an area with units of (y units) * (x units) you'd have to multiply the result by the "delta x" distance, like 1 millisecond. It's like if you pretend the signal is a bar chart and to get the area of the bar you multiply by the y value of the bar (which has the units of the first signal) by the units of the width of the bar, which is either unitless (meaning just elements) or units of the x axis (liek one bar is 1 millisecond wide). The units of the second signal, the "kernel" are usually unitless since it's basically weighting factors that get multiplied by the first signal. This will get you the area of all the bars in real world units.
Mahesh Taparia
2020 年 3 月 16 日
Hi
The amplitude of the convoluted signal will be the sum of the product of elements of the two vectors with different range of those vector indices. For more information check the formula of the convolution in the documentation page
4 件のコメント
Mahesh Taparia
2020 年 3 月 19 日
There is a relation between z and x,y. The conv function works as per the convolution formula.The link to that formula I already shared in my previous reply.
Image Analyst
2021 年 8 月 5 日
If you don't want the convolved signal to be in a different range than the input signal, make sure that the kernel sums to 1. For example
windowSize = 5;
kernel = randi(99, 1, windowSize); % Whatever filter you want.
% Normalize to 1
kernel = kernel / sum(kernel(:));
outputSignal = conv(inputSignal, kernel, 'same');
Now the overall mean of the output will equal the overall mean of the input, so mean(outputSignal) will equal mean(inputSignal).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Measurements and Feature Extraction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!