MATLAB을 활용한 레이다 펄스 신호 생성 및 처리

기본 펄스 신호 생성

1. 직사각형 펄스 생성

직사각형 펄스는 가장 단순한 형태의 레이다 신호로, 주로 기준 신호로 사용된다. 아래 코드는 기본적인 파라미터를 설정하고 시간 영역에서의 파형을 시각화한다.


% 시스템 파라미터 정의
samplingFreq = 1e9;              % 샘플링 주파수 (Hz)
pulseWidth = 1e-6;               % 펄스 지속 시간 (초)
carrierFreq = 10e9;              % 반송파 주파수 (Hz)
timeVector = -pulseWidth : 1/samplingFreq : pulseWidth;  % 중심 기준 시간 축

% 기저대역 직사각형 펄스 생성
basebandPulse = rectpuls(timeVector, pulseWidth);

% 진현파 변조 수행
modSignal = basebandPulse .* cos(2*pi*carrierFreq*timeVector);

% 결과 시각화
figure;
subplot(2,1,1);
plot(timeVector, basebandPulse);
title('기저대역 직사각형 펄스');
xlabel('시간 (s)'); ylabel('진폭');

subplot(2,1,2);
plot(timeVector, modSignal);
title('변조된 펄스 신호');
xlabel('시간 (s)'); ylabel('진폭');

2. 가우시안 펄스 생성

가우시안 펄스는 부드러운 에지 특성을 가지며, 스펙트럼 확산이 적어 간섭 최소화에 유리하다. gauspuls 함수를 이용해 특정 중심 주파수를 갖는 펄스를 생성할 수 있다.


centerFreq = 10e9;
pulseDuration = 1e-6;
sampleRate = 100e6;
tAxis = -pulseDuration/2 : 1/sampleRate : pulseDuration/2;

% 가우시안 모양 펄스 생성 (상대 대역폭 조정)
[~, gaussPulse] = gauspuls(tAxis, centerFreq, 0.5);  % 50% 상대 대역폭

figure;
plot(tAxis, real(gaussPulse));
title('가우시안 펄스 시간 영역 파형');
xlabel('시간 (s)'); ylabel('진폭');

고급 변조 펄스 생성

1. 선형 주파수 도핑 신호 (LFM)

선형 주파수 도핑(LFM, Linear Frequency Modulation)은 시간에 따라 주파수가 선형적으로 변화하는 신호로, 고해상도 거리 측정에 효과적이다.


chirpRate = 1e12;                    % 주파수 도핑률 (Hz/s)
pulseDuration = 1e-6;
sampleRate = 5e9;
tChirp = 0:1/sampleRate:pulseDuration;

% 복소 지수 기반 LFM 생성
lfmSignal = exp(1j * pi * chirpRate * tChirp.^2);

% 실수 신호로 변환 (AM 변조 포함)
fc = 10e9;
transmittedSignal = real(lfmSignal .* exp(1j*2*pi*fc*tChirp));

figure;
subplot(2,1,1);
plot(tChirp, angle(lfmSignal));
title('LFM 신호 위상 응답');
xlabel('시간 (s)'); ylabel('위상 (rad)');

subplot(2,1,2);
plot(tChirp, transmittedSignal);
title('LFM 변조 신호 시간 파형');
xlabel('시간 (s)'); ylabel('진폭');

2. 위상 부호화 펄스 (Barker 코드 적용)

Barker 코드는 낮은 사이드로브 특성을 가지며, 매칭 필터 후 신호 검출 성능을 향상시킨다. 각 서브펄스에 +1/-1 값을 할당하여 위상 변조를 구현한다.


barkerSequence = [1 1 1 -1 -1 1 -1];  % 7비트 Barker 코드
numBits = length(barkerSequence);
chipWidth = 1e-7;                      % 칩 당 지속 시간
sampleRate = 1e9;
samplesPerChip = round(sampleRate * chipWidth);

% 전체 시간 벡터 구성
totalTime = (0:numBits*samplesPerChip-1)/sampleRate;
codedSignal = [];

for k = 1:numBits
    chipSignal = ones(1, samplesPerChip) * barkerSequence(k);
    codedSignal = [codedSignal chipSignal];
end

figure;
plot(totalTime, codedSignal);
title('Barker 코드 기반 위상 부호화 신호');
xlabel('시간 (s)'); ylabel('진폭');
xlim([0 numBits*chipWidth]);

신호 품질 개선 및 잡음 제어

1. 거리 해상도 최적화

거리 해상도는 신호 대역폭에 의해 결정되며, 다음 식으로 계산된다: \( \Delta R = \frac{c}{2B} \). 따라서 넓은 대역폭을 갖는 펄스 설계가 필요하다.


rangeResolution = 1.5;               % 목표 해상도 (m)
lightSpeed = 3e8;
bandwidth = lightSpeed / (2 * rangeResolution);

% 필요한 펄스 폭 산정
requiredPulseWidth = 1e-6;  % 일반적으로 짧은 펄스 사용
effectiveBandwidth = 1 / requiredPulseWidth;

if effectiveBandwidth >= bandwidth
    disp('해상도 요구사항 만족');
end

2. 도플러 내성 설계

이동 물체로부터의 반사는 도플러 주파수 이동을 유발한다. 이를 보상하기 위해 수신 신호 모델에 도플러 성분을 명시적으로 포함해야 한다.


dopplerShift = 1500;  % 예상 도플러 주파수 (Hz)
tAxis = 0:1/sampleRate:pulseDuration;
demodulatedLfm = lfmSignal .* exp(-1j*2*pi*dopplerShift*tAxis);

3. 잡음 억제 및 매칭 필터링

수신 신호는 잡음에 노출되기 쉬우므로, 매칭 필터를 통해 신호 대 잡음비(SNR)를 개선할 수 있다.


snrDb = 18;
signalPower = var(transmittedSignal);
noisePower = signalPower / (10^(snrDb/10));
noise = sqrt(noisePower/2)*(randn(size(transmittedSignal)) + 1j*randn(size(transmittedSignal)));
receivedNoisy = transmittedSignal + noise;

% 매칭 필터 커널 생성
matchFilterKernel = conj(flip(transmittedSignal));

% 합성곱을 통한 필터링 ('same' 옵션으로 길이 유지)
filteredOutput = conv(receivedNoisy, matchFilterKernel, 'same');

% 결과 비교
figure;
subplot(2,1,1); plot(abs(receivedNoisy)); title('잡음이 포함된 수신 신호');
subplot(2,1,2); plot(abs(filteredOutput)); title('매칭 필터 처리 후 출력');

전체 레이다 시뮬레이션 시스템 구현

여러 펄스를 반복 송신하고, 이동 목표의 지연 및 도플러 영향을 반영한 에코 신호를 생성하여 신호 처리 과정을 검증할 수 있다.


lightSpeed = 3e8;
carrierFreq = 10e9;
bandwidth = 20e6;
pulseWidth = 1e-6;
prf = 1000;           % 펄스 반복 주파수
numPulses = 50;
chirpSlope = bandwidth / pulseWidth;

% LFM 신호 생성
tLocal = 0:1/(5e9):pulseWidth;
txLfm = exp(1j*pi*chirpSlope*tLocal.^2);

% 펄스 열 생성
totalTimeLength = numPulses * pulseWidth;
fullSignal = zeros(1, round(totalTimeLength * 5e9));
pulseIndices = 1:length(txLfm);
for n = 0:numPulses-1
    startIndex = n * round(pulseWidth * 5e9) + 1;
    endIndex = startIndex + length(txLfm) - 1;
    fullSignal(startIndex:endIndex) = txLfm;
end

% 목표 파라미터
targetRange = 1500;
targetVelocity = 250;
delaySamples = round(2 * targetRange / lightSpeed * 5e9);
dopplerPhase = exp(1j*2*pi*(2*targetVelocity*carrierFreq/5e9)*(0:length(txLfm)-1));

% 에코 신호 생성
echoSignal = zeros(size(fullSignal));
for n = 0:numPulses-1
    idx = n * round(pulseWidth * 5e9) + delaySamples;
    if idx + length(txLfm) <= length(echoSignal)
        echoSignal(idx+1 : idx+length(txLfm)) = txLfm .* dopplerPhase * 0.001;  % 감쇠 포함
    end
end

% 매칭 필터 적용
matchedResponse = abs(conv(echoSignal, conj(fliplr(txLfm)), 'same'));

% 피크 탐지로 거리 추정
[peakVal, peakPos] = max(matchedResponse);
estimatedDelay = (peakPos - length(txLfm)/2) / 5e9;
calculatedRange = estimatedDelay * lightSpeed / 2;

disp(['추정 거리: ', num2str(calculatedRange), ' m']);

응용 및 확장 방향

  • SAR 이미징: 2차원 공간 스캔을 위한 LFM 시퀀스 결합
  • MIMO 레이다: 서로 직교인 다중 파형 동시 전송
  • 인지형 레이다: 환경 피드백 기반 실시간 파형 재구성

태그: radar signal processing MATLAB simulation LFM chirp Barker code matched filter

5월 30일 14:15에 게시됨