Author SHA1 Message Date
KG-access 2353d11df0 Deleting annotation 2025-07-29 23:14:05 +09:00
KG-access 187bd43b08 Preallocation for waveform size 2025-07-29 22:25:43 +09:00
+7 -16
View File
@@ -113,7 +113,7 @@ tgt_pos = [tgt_rng.*cosd(tgt_azi).*cosd(tgt_elv) tgt_rng.*sind(tgt_azi).*cosd(tg
%tgt_pos = [150 0 0].'; %tgt_pos = [150 0 0].';
tgt_vel = [5 0 0].'; tgt_vel = [5 0 0].';
tgt_acc = [0 0 0].'; tgt_acc = [0 0 0].';
tgt_rcs = [20]; tgt_rcs = [10];
tgt_class = 'TCR'; tgt_class = 'TCR';
tgt = gen_tgt(tgt_pos, tgt_vel, tgt_acc, tgt_rcs, 'TCR'); tgt = gen_tgt(tgt_pos, tgt_vel, tgt_acc, tgt_rcs, 'TCR');
tgt.num = size(tgt.rcs, 1); tgt.num = size(tgt.rcs, 1);
@@ -147,26 +147,18 @@ timing_struct.T_jumpback = 0.5e-6;
timing_struct.T_reset = 1e-6; timing_struct.T_reset = 1e-6;
timing_struct.T_acq = 51.2e-6; timing_struct.T_acq = 51.2e-6;
tx_phase_initial = 0; tx_phase_initial = 0;
timing_struct.T_idle = 9.5e-6; %[1e-6 9.5e-6 18e-6]; timing_struct.T_idle = 1e-6; %[1e-6 9.5e-6 18e-6];
% timing_struct.T_dwell = 0e-6;
% timing_struct.T_settle = 0e-6;
% timing_struct.T_jumpback = 0e-6;
% timing_struct.T_reset = 0e-6;
% timing_struct.T_acq = 51.2e-6;
% tx_phase_initial = 0;
% timing_struct.T_idle = 0e-6; %[1e-6 9.5e-6 18e-6];
timing_struct.PRI = timing_struct.T_dwell + timing_struct.T_settle + timing_struct.T_jumpback + timing_struct.T_reset + timing_struct.T_acq + timing_struct.T_idle; timing_struct.PRI = timing_struct.T_dwell + timing_struct.T_settle + timing_struct.T_jumpback + timing_struct.T_reset + timing_struct.T_acq + timing_struct.T_idle;
%[56.7e-6 65.2e-6 73.7e-6]; %[56.7e-6 65.2e-6 73.7e-6];
% [24.08.22] Lowpass filter 2 oversampling . % [24.08.22] Lowpass filter 2 oversampling .
for m = 1 : NumChirps temp_Ref_wave = zeros(2*NumSamples, NumChirps);
%Tx_wave = gen_fastramp_fmcw2(timing_struct, 2*fs, fc-TxBw/2, TxBw, m, NumChirps, 0, tx_phase_initial, opt_waveform); for m = 1 : NumChirps
Tx_wave = gen_fastramp_fmcw(timing_struct, 2*fs, fc-TxBw/2, TxBw, NumChirps, 0, tx_phase_initial, opt_waveform); Tx_wave = gen_fastramp_fmcw(timing_struct, 2*fs, fc-TxBw/2, TxBw, NumChirps, 0, tx_phase_initial, opt_waveform);
Ref_wave(:,m) = Tx_wave.waveform; temp_Ref_wave(:,m) = Tx_wave.waveform;
end end
Ref_wave = repmat(Ref_wave, 1, 1, Nr); Ref_wave = repmat(temp_Ref_wave, 1, 1, Nr);
% 02. DDMA % 02. DDMA
DDMA_freq = [0 1/4 2/4] * 1/Tx_wave.T_chirp; DDMA_freq = [0 1/4 2/4] * 1/Tx_wave.T_chirp;
@@ -243,8 +235,7 @@ for tgtidx = 1 : tgt.num
powVar_dB(txidx, rxidx) = powVar_dB(txidx, rxidx) + rx_ant_gain_db + pow2db(lambda_c^2/(4*pi)); powVar_dB(txidx, rxidx) = powVar_dB(txidx, rxidx) + rx_ant_gain_db + pow2db(lambda_c^2/(4*pi));
target_prop_time = target_prop_time_dod + target_prop_time_doa; target_prop_time = target_prop_time_dod + target_prop_time_doa;
% [24.08.22] Lowpass filter 2 oversampling . % [24.08.22] Lowpass filter 2 oversampling .
%delayed_wave = gen_fastramp_fmcw2(timing_struct, 2*fs, fc-TxBw/2, TxBw, m, NumChirps, target_prop_time, tx_phase_initial, opt_waveform);
delayed_wave = gen_fastramp_fmcw(timing_struct, 2*fs, fc-TxBw/2, TxBw, NumChirps, target_prop_time, tx_phase_initial, opt_waveform); delayed_wave = gen_fastramp_fmcw(timing_struct, 2*fs, fc-TxBw/2, TxBw, NumChirps, target_prop_time, tx_phase_initial, opt_waveform);
delayed_Tx_sig(:,m,rxidx) = delayed_Tx_sig(:,m,rxidx) + sqrt(db2pow(powVar_dB(txidx, rxidx))) * (delayed_wave.waveform).' .* exp(-1i * 2 * pi * DDMA_freq(txidx) * ((m-1) * delayed_wave.T_chirp)); delayed_Tx_sig(:,m,rxidx) = delayed_Tx_sig(:,m,rxidx) + sqrt(db2pow(powVar_dB(txidx, rxidx))) * (delayed_wave.waveform).' .* exp(-1i * 2 * pi * DDMA_freq(txidx) * ((m-1) * delayed_wave.T_chirp));
end end