Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    如何调用ccs库函数实现lfm信号的fft频谱分析

    综合交流
    ccs fft dsp
    1
    1
    96
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Rin1107
      Rin1107 last edited by

      如题,搜索到的基本都是使用matlab实现的。以下为matlab仿真代码。
      A=1; %发射信号的振幅
      Phi0=0; %发射信号的随机初相
      T=16e-3; %信号时宽
      B=30e3; %信号带宽
      F0=0; %中频频率,即载频频率
      [st1,st2,t,Fs,N]=LFM_signal(A,Phi0,T,B,F0);

      figure(1);
      subplot(3,1,1);
      plot(t,real(st1));
      xlabel('时间/us');
      ylabel('实部')
      title('线性调频信号的实部');
      grid on;
      axis tight;

      subplot(3,1,2);
      plot(t,imag(st1));
      xlabel('时间/us');
      ylabel('虚部')
      title('线性调频信号的虚部');
      grid on;
      axis tight;

      subplot(3,1,3);
      freq=linspace(-Fs/2,Fs/2,N);
      plot(freq*1e-3,fftshift(abs(fft(st1)))); %先对st做傅里叶变换得到频谱,然后取幅度值,再将其移动到频谱中心
      xlabel('频率/MHz');
      ylabel('幅度谱')
      title('线性调频信号的频谱');
      grid on;
      axis tight;

      1 Reply Last reply Reply Quote 0
      • First post
        Last post