Error: Unrecognized function or variable 'getMatchedFilter'.
9 ビュー (過去 30 日間)
古いコメントを表示
I am facing with some problems when I try to apply matched filter to my waveform. What is the problem? The error is
Unrecognized function or variable 'getMatchedFilter'.
Error in Untitled10 (line 53)
'Coefficients',getMatchedFilter(waveform),...
Here is my code block.
close all
clc
clear
fs = 5e9; % sample freq
D = [0:100]'*2e-7; % pulse delay times
t = 0 : 1/fs : 7500/fs; % signal evaluation time
w = 1e-7; % width of each pulse
yp = pulstran(t,D+w/2,@rectpuls,w);
ylin = chirp(t,0,1e-9,50e6);
waveform = yp.*ylin
figure
subplot(3,1,1)
plot(t,yp);
subplot(3,1,2)
plot(t,ylin);
subplot(3,1,3)
plot(t,waveform)
antenna = phased.IsotropicAntennaElement('FrequencyRange',[5e9 15e9]);
transmitter = phased.Transmitter('Gain',20,'InUseOutputPort',true);
fc = 10e9;
target = phased.RadarTarget('Model','Nonfluctuating',...
'MeanRCS',5,'OperatingFrequency',fc);
txloc = [0;0;0];
tgtloc = [5000;5000;10];
transmitterplatform = phased.Platform('InitialPosition',txloc);
targetplatform = phased.Platform('InitialPosition',tgtloc);
[tgtrng,tgtang] = rangeangle(targetplatform.InitialPosition,...
transmitterplatform.InitialPosition);
c = physconst('LightSpeed');
maxrange = c/(2*2e-7);
SNR = npwgnthresh(1e-6,1,'noncoherent');
lambda = physconst('LightSpeed')/target.OperatingFrequency;
Ts = 290;
dbterms = db2pow(SNR - 2*transmitter.Gain);
Pt = (4*pi)^3*physconst('Boltzmann')*Ts/2e-7/target.MeanRCS/(lambda^2)*maxrange^4*dbterms;
transmitter.PeakPower = Pt
radiator = phased.Radiator('PropagationSpeed',c,...
'OperatingFrequency',fc,'Sensor',antenna);
channel = phased.FreeSpace('PropagationSpeed',c,...
'OperatingFrequency',fc,'TwoWayPropagation',false);
collector = phased.Collector('PropagationSpeed',c,...
'OperatingFrequency',fc,'Sensor',antenna);
receiver = phased.ReceiverPreamp('NoiseFigure',0,...
'EnableInputPort',true,'SeedSource','Property','Seed',2e3);
filter = phased.MatchedFilter(...
'Coefficients',getMatchedFilter(waveform),...
'GainOutputPort',true);
2 件のコメント
Christopher McCausland
2022 年 1 月 16 日
Hi Goktug,
The error message points to a problem with line;
yp = pulstran(t,D+w/2,@rectpuls,w);
I suspect that the input is unexpected, and the waveform does not add up correctly. Can you incluce an image of the rectangular waveform you are trying to produce?
Christopher
採用された回答
Walter Roberson
2022 年 1 月 16 日
The input to getMatchedFilter must be a phased-encoded waveform object, but instead you are just passing in double precision array.
waveform = phased.RectangularWaveform('PulseWidth',25e-6,...
'OutputFormat','Pulses','PRF',10e3,'NumPulses',1);
filter = phased.MatchedFilter(...
'Coefficients',getMatchedFilter(waveform),...
'GainOutputPort',true);
2 件のコメント
Walter Roberson
2022 年 1 月 17 日
Your pulse train has a finite series of rectangular pulses of known width and delay. It looks to me as if you can construct the specifications for the same kind of object by using phased.RectangularWaveform with 'NumPulses' set as appropriate to fill the needed time.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Pulsed Waveforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!