高斯脉冲发生器模块问题

问题描述 投票:0回答:1

我在Simulink中新我使用MATLAB解释功能块来创建一个高斯脉冲发生器。

这是函数:

 function y=mono_gauss(t)

   fs=20E9;                      %sample rate-10 times the highest frequency
   ts=1/fs;                      %sample period
   t1=.5E-9;                     %pulse width(0.5 nanoseconds)
   x=(t/t1).*(t/t1);             %x=(t^2/t1^2)(square of (t/t1);
   A=1; 
   y=(A*(t/t1)-ts).*exp(-x);     %first derivative of Gaussian pulsefunction

   end

问题是,该块的输出只产生一个脉冲,我的目标是产生脉冲序列就像一个脉冲发生器模块。任何解决方案?

matlab signal-processing simulink
1个回答
0
投票

你是最有可能的最好设计在MATLAB你的脉搏,然后使用Repeating Sequence在Simulink中使用它。

例如,在MATLAB

t = 0:0.01:1;
y = normpdf(t,0.5,0.05);
plot(t,y)

Gaussian pulse

然后内Simulink中,

Simulink Model

我也改变了模型求解的步长为0.01。

你需要玩弄各种这些参数来获得你想要的精确曲线。

© www.soinside.com 2019 - 2024. All rights reserved.