Out of Memory error!
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
I am scanning from azimuth 1 to 45 by using 20by20 URA narrowband tx array block. The input port 'W' is being fed by a function block which is coded as follows :
function y = SIGNAL_STEER(signal)
coder.extrinsic('phased.URA', 'steervec', 'getElementPosition');
y=zeros(400,45);
az=45;
fc=36e9;
v=3e8;
lambda=v/fc;
ss=phased.URA('Size',[20 20],'ElementSpacing' , lambda/2);
elem_pos=(getElementPosition(ss)/lambda);
for le=1:1:az;
sv=steervec(elem_pos,le);
complex_arr=conj(sv);
% y=zeros(size(sv));
y=complex_arr;
end
end
My signal is of 50000by1 dimension, output 'y'is 400by1 and it must be a column vector. When this signal is reflected back from the target and fed into Rx narrowband array block having same configuration as of Narrowband tx array block I get output dimension of 50000by400 which I believe is correct as my URA is 20by20. I believe that my dimensions are correct but I am getting out of memory error! How to resolve it
채택된 답변
Honglei Chen
2016년 10월 13일
0 개 추천
I'm a bit confused by your code snippet. For example, your input, signal, is never used in the function, so I'm not sure what you intended to do with this code. This being said, you don't have to use extrinsic for phased.URA as it supports codegen. I would just do
function y = SIGNAL_STEER
az=45;
fc=36e9;
v=3e8;
lambda=v/fc;
persistent ss stv;
if isempty(ss)
ss=phased.URA('Size',[20 20],'ElementSpacing' , lambda/2);
end
if isempty(stv)
stv = phased.SteeringVector('SensorArray',ss,'PropagationSpeed',v);
end
y = conj(step(stv,fc,1:1:az));
end
BTW I still cannot reproduce the out of memory issue.
HTH
댓글 수: 14
Hassam Mahmood
2016년 10월 14일
Thank you for writing an efficient code. I figured that out of memory error is caused by 'phased beamformer' at the receiving side. The code works fine when I debugged it. With 20by20 URA configuration and having 50000by1 signal dimension it genereates out of memory error. Beamformer works fine with 6by6 URA but this isn't my requirement. Furthermore it takes ages to simulate my model even for 6by6 URA configuration. Any suggestions for making "phased beamformer" to work at 20by20 URA?
Honglei Chen
2016년 10월 14일
This would be difficult to comment without looking at the model. Do you mind sharing the model? Thanks.
Hassam Mahmood
2016년 10월 14일
This model is for 30by30 URA, kindly look into it.
Hassam Mahmood
2016년 10월 18일
Awaiting reply
Honglei Chen
2016년 10월 24일
편집: Honglei Chen
2016년 10월 24일
Looks like your setting hits the memory limit. If the array size is a hard requirement, things you can adjust are sampling rates, sweep times, and so on.
Alternatively, you can also consider using a fixed number of samples in the simulation by setting OutputFormat in the FMCW wave form to Samples. If I set NumSamples to 5000, then the model runs. However I need to add a buffer block in Signal Processing section after the pulse integrator to ensure that the range estimator is working on the entire sweep.


Hassam Mahmood
2016년 10월 25일
When I change coherent pulse integrator buffer size greater than 1 it does not give me any output? Why is it so
Honglei Chen
2016년 10월 27일
That's because now your end time is at 1e-3. If you integrate 2 pulses, you will have to wait one more pulse to get the result. If you change the end time to 2e-3, you'll be able to get a result.
This being said, if you are fixing the number of examples as I suggested, you should switch the order of buffer and pulse integrator in the model if you plan to really use the pulse integrator. Otherwise, you are integrating the wrong signals.
HTH
Hassam Mahmood
2016년 10월 28일
Thank you for your answer. I have another query related to this.
By changing my output to 5000 samples instead of 'sweep' , I am actually restricting my output. One sweep is clearly my FMCW sweeptime which is 1ms. Changing its format to NumSamples 5000 how does it work? I mean does it divide total number of samples in one sweep and buffer it later on?
Honglei Chen
2016년 10월 28일
Yes, that's how it works. That's why you need to insert buffer so in the end you still process the entire pulse. This just allow you to simulate large number of samples by streaming the data.
Hassam Mahmood
2016년 10월 28일
So based on your explanation of streaming the data and then buffering it into entire one pulse, the sweeptime of FMCW block will not remain the same till buffer block. Does this affect my calculations which were based on 1ms sweeptime THROUGHOUT the model and for every block? e.g maximum range , range resolution and scanning time of URA?
Honglei Chen
2016년 10월 28일
No, think about this way. You should really be able to do all the computation even with one sample a time? In real systems, the samples are buffered until you get the entire pulse and then processing continues from that point. However, doing one sample a time for simulation is not efficient, therefore we are trying to strike a balance between the processing time and memory requirement. Does that clarify the issue?
Hassam Mahmood
2016년 10월 29일
I guess I need more clarification.
Q1) For 1ms sweeptime, output samples is 500000, for output samples 5000, sweeptime is going to change?
Q2) If it changes then howcome before the buffer block my sweeptime is going to be 1ms? It will affect my calculations?
Q3) This approach is applicable in real systems? How?
Honglei Chen
2016년 10월 31일
A1) No, it simply means that in each simulation step you are simulating 5000 samples, you need 100 steps to simulate one sweep.
A2) Like I said, it simply tries to simulate each sweep in multiple simulation steps.
A3) In real life, samples always come one after another. We need to buffer it so we can process the entire sweep at once.
HTH
Hassam Mahmood
2016년 11월 1일
Yes, thank you for making my concepts more clear. As you saw my model and code, it is scanning from 0 to 45 azimuth having 5 degrees beamwidth with URA of 30by30.
When I change target position to greater than 50 azimuth , I still get signal strength and ultimately range. It shouldn't be like this. Why is it so
추가 답변 (1개)
Pritesh Shah
2016년 10월 10일
0 개 추천
Try the stuff from this link
카테고리
도움말 센터 및 File Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
