How to duplicate a sinwave signal with different variable phase for linear analysis in simulik
2 次查看(过去 30 天)
显示 更早的评论
Hello, I have a model with a input source showed in the fig1. The program have the following callback in InitFcn. The sinwave source have a phase of 0 and a frequency of the variable freqRAD1

v=10;
a=1.8;
b=1;
lambda1=5;
lambda2=0.3
Amplitude1=0.05
freqRAD1=2*pi*v/lambda1;
phase1=(a+b)*2*pi/lambda1;
i want to know if there is any way to change the constant block "freqRAD1" in order to get the frequency from the sinewave. The main reason is when I do the linear analysis the delay from "variable transport delay" doesn't change with the sine-stream used to generate the bode diagram (because i don't know how extract the frequency from the input sine wave1 and used that instead of the constant block) I tried use PLL but no luck
0 个评论
采纳的回答
Paras Kapoor
2016-10-4
编辑:Paras Kapoor
2016-10-4
Try using integeration block.
Give sin as input to that block. Now, integeration of sin(2*pi*f*t) with respect to 't' will give -cos(2*pi*f*t)/2*pi*f
From the magnitude of the sine signal divide the magnitude of integeration block output signal will give you the required frequency.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!