之前分享过一篇文章,代码非常完善,给出了传输体制的全部内容。但很多卫星通信系统的上下行链路上调制编码方式有较大差异,因此实际系统仿真的复杂度还有一定的提升。本人工作期间涉及的第二个产品就是这样的情况。那该如何仿真呢?
% Plot the original IF signal
figure;
subplot(3, 1, 1);
plot(t(1:1000), IF_signal(1:1000));
title('Original IF Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Digital Down Conversion
% 1. Multiply by NCO (Numerically Controlled Oscillator) to% shift signal to baseband
NCO_sin = sin(2*pi*Fc*t); % NCO sine wave
NCO_cos = cos(2*pi*Fc*t); % NCO cosine wave
I_signal = IF_signal .* NCO_cos; % In-phase component (I)
Q_signal = IF_signal .* NCO_sin; % Quadrature component (Q)
% 2. Low-pass filter (FIR) to filter out the high-frequency components
lpFilt = designfilt('lowpassfir', 'PassbandFrequency', 15e3, ...
'StopbandFrequency', 20e3, 'PassbandRipple', 1, 'StopbandAttenuation', 60, 'SampleRate', Fs);
I_filtered = filter(lpFilt, I_signal); % Filtered in-phase component
Q_filtered = filter(lpFilt, Q_signal); % Filtered quadrature component
% 3. Decimation (downsample the signal to reduce the sampling rate)
decimation_factor = 10; % Decimation factor
I_decimated = downsample(I_filtered, decimation_factor);
Q_decimated = downsample(Q_filtered, decimation_factor);
Fs_decimated = Fs / decimation_factor;
% Plot the filtered and downsampled baseband I signal
subplot(3, 1, 2);
plot(t(1:1000), I_filtered(1:1000));
title('Filtered I Signal');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(3, 1, 3);
plot((0:length(I_decimated)-1)/Fs_decimated, I_decimated);
title('Decimated Baseband I Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Combine the I and Q components into a complex baseband signal
baseband_signal = I_decimated + 1i*Q_decimated;
% Spectrum analysis of the baseband signal
figure;
pwelch(baseband_signal,[],[],[],Fs_decimated);
title('Baseband Signal Spectrum');
%---------- end --------------
pwelch
函数对基带信号进行频谱分析。Fc
、f_signal
、Fs
等参数,以适应不同的中频信号和系统需求。PassbandFrequency
和 StopbandFrequency
来适应不同的信号带宽。产品研制成功后,不仅用于卫星终端(正式名称为卫星地球站),还用于短波电台等产品中!此次共享哪些代码和文档呢?
之前图中目录《1005电台》的内容和目录《HSP50214》及《HSP50215》中的内容存在较多重合之处,再加上名称敏感,故没有和大家共享!一篇文章一本书,先讲这么多,公布代码的下载链接,后续还会逐步分享更多的代码和文档!下载链接,只有一天有效!