How to duplicate a sinwave signal with different variable phase for linear analysis in simulik
3 ビュー (過去 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156376/image.jpeg)
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 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!