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!