How to do an unusual convolution...
이전 댓글 표시
So, I have three things which I need to convolve together.
1. - A list of times of occurrences and amplitude of a signal. Each item in the list can vary in time from 0 to 10^3. These values are produced by an external program.
2. - A function describing the precise form of the signal, which is best measured in units of 10^-6.
3. - The analytical result of passing a unit impulse into filtering electronics.
I require the entire waveform being produced by the electronics, 10,000 times, quickly, accurately and without using a great deal of memory to store the output.
Currently, I perform a time simulation of the electronics as it is the only way I have of maintaining the requisite time-accuracy, and handling the irregular distribution of the list of occurrences without taking excessive time and overloading the memory burden of the program. Any ideas?
댓글 수: 9
José-Luis
2013년 5월 24일
Matt J
2013년 5월 24일
What does it mean to convolve with a "list", your data in item 1? And why isn't the obvious solution of CONV function or fft-based convolution using FFT applicable to you?
Image Analyst
2013년 5월 24일
If the list items (time points) are not uniformly spaced, you will have to first call interp1() to get uniformly spaced times, then call conv().
Iain
2013년 5월 24일
Iain
2013년 5월 24일
Image Analyst
2013년 5월 24일
Some data or a screenshot would help.
Iain
2013년 5월 24일
The obvious solution of conv is too memory intensive. - In the worst case, I could have a vector extending from 0 to 1000, in steps of a ten-millionth. Thats 40GB, if I use "singles". Clearly this is beyond my system's capabilities.
That problem isn't related to CONV. You're going to need 40GB just to hold the input data and the result, no matter what you do. What happened to the 10^-6 sampling interval that you mentioned initially? How did it drop down to 10^-7?
Iain
2013년 5월 28일
채택된 답변
추가 답변 (1개)
Well, first of all I would bin your time/amplitude "list" data to the same sampling intervals as your other signal. If the signal is "continuous" when sampled at 1e-6, it's probably not going to be necessary to have time resolution of the "list" data any better than that.
L=length(signal);
timeAxis=(0:L-1)*1e-6;
[~,sub]=histc(time, timeAxis);
impulses=accumarray(sub,amplitude(:),[L,1]);
Now you would convolve "signal" with "impulses". One way is with FFTs
out= ifft(fft(impulses,2*L).*fft(signal,2*L),L,'symmetric');
카테고리
도움말 센터 및 File Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!