Problem Implementing a sine wave with increasing frequency
이전 댓글 표시
Hi,
I would implement a sine wave with frequency that increases from 0 to 50 and stay constant afterwards. The model i used is on the top left and frequency input on bottom left. However, the output results( firgure right) i obtained contains a frequency higher than 50Hz but I don't know why. What went wrong?

matlab function code
function y = sin(f,t,ps)
%generates a sine wave of frequency f and phase shift of ps (in radians)
y = sin(2*pi*f*t+ps);
Here's my model
댓글 수: 3
Azzi Abdelmalek
2015년 8월 19일
Your figures are not clear.
Purushottama Rao
2015년 8월 19일
can you attach the model?
Alberto llosa
2022년 12월 1일
편집: Alberto llosa
2022년 12월 1일
I´m having the same issue and will not able to solution this up to now. I have intended a number of solutions as working with the implemented sine wave simulink block and also using an S shape curve for varying the frequency without abrupt changes and the behavior is the same. I believe it is a problem on the code used to generate the sin wave. At this moment this problem is challinging us since I´m not being able to attend customer needs on the simulation we are working with.
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2015년 8월 19일
If the maximum frequency is
f=50,
set the max step size (in model configuration parameters) to
0.1/f
카테고리
도움말 센터 및 File Exchange에서 Signal Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
