Error: Unrecognized function or variable 'getMatchedFilter'.
4 次查看(过去 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!