Error: Unrecognized function or variable 'getMatchedFilter'.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
tinkyminky93
el 16 de En. de 2022
Comentada: Walter Roberson
el 17 de En. de 2022
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 comentarios
Christopher McCausland
el 16 de En. de 2022
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
Respuesta aceptada
Walter Roberson
el 16 de En. de 2022
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 comentarios
Walter Roberson
el 17 de En. de 2022
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Pulsed Waveforms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!