- Generate a Kasami sequence using the "comm.KasamiSequence" function, as you have already done in the code you provided.
- Create a vector to store the modulated LFM signal and generate an LFM signal using "phased.LinearFMWaveform" function.
- For each bit in the Kasami sequence, if the bit is 1, add a random phase shift to the LFM signal's phase. If the bit is 0, do not apply a phase shift.
- Store the modulated LFM signal in the vector created in step 2. Repeat steps 5-6 for each bit in the Kasami sequence until the end of the sequence. Plot the modulated LFM signal to visualize the phase modulation.
BPSK modulation in LFM signal using Kasami Code
8 views (last 30 days)
Show older comments
Hello,
Could you help me to modulate the phase of a LFM signal using Kasami sequence?
clear all;
close all;
waveform = phased.LinearFMWaveform('PulseWidth',100e-6,...
'SweepBandwidth',200e3,'PRF',4e3);
plot(waveform);
kasamiseq = comm.KasamiSequence('Polynomial',[6 1 0], ...
'InitialConditions',[0 0 0 0 0 0 0 1],'SamplesPerFrame',512);
I used this code to generate LFM signal and Kasami sequence.
I am trying to bulid a PC-FMCW Radar by using phase coded LFM signal like in the figure attached.
0 Comments
Answers (1)
Naren
on 22 May 2023
Hello Hussein,
I understand you are trying to modulate the phase of LFM signal using Kasami sequence for PC-FMCW radar.
To modulate the phase of a LFM signal using kasami sequence, you can use the following steps:
Here is a sample code for better understanding,
% Generate a Kasami sequence
waveform = phased.LinearFMWaveform('PulseWidth',100e-6,...
'SweepBandwidth',200e3,'PRF',4e3);
kasamiSeq = comm.KasamiSequence('Polynomial',[6 1 0], 'InitialConditions',[0 0 0 0 0 0 0 1],'SamplesPerFrame',512);
% Create a vector to store the modulated signal
modLFM = zeros(length(waveform()),1);
% Generate an LFM signal
LFM = waveform();
% Set the phase of the LFM signal to 0
LFM_phase = zeros(length(LFM),1);
% Iterate over each bit in the Kasami sequence
for i = 1:length(kasamiSeq)
% If the bit is 1, add a random phase shift to the LFM signal's phase
if kasamiSeq.InitialConditions(i) == 0
phase_shift = rand*2*pi; % Generate a random phase shift between 0 and 2*pi
LFM_phase = LFM_phase + phase_shift; % Add the phase shift to the LFM signal's phase
end
% Combine the new phase with the original LFM signal's magnitude
modLFM = modLFM + LFM.*exp(1j*LFM_phase);
end
For further information, kindly refer the following documentation:
0 Comments
See Also
Categories
Find more on Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!