Amplitude of the convoluted signal?
조회 수: 7 (최근 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!