Simulink: Sine wave generation. Configuration problem.

3 ビュー (過去 30 日間)
ANUBHAV SINHA
ANUBHAV SINHA 2011 年 2 月 6 日
コメント済み: yassine amine 2018 年 3 月 24 日
Hi, While using Simulink, I simply connect a 'sine wave generator' (picked from Simulink>>Sources) to the scope and set the frequency at 100*pi rad/s.
However, on running the simulation, I get a randomly increasing waveform and not a sinusoidal signal of above freq. However, if I set a frequcny such as 1 rad/s, a perfect sine wave is obtained.
I think I must choose a 'continuous' scale to run it and right now maybe a 'discrete scale' is chosen with large step size. May someone suggest a possible remedy?
Thanks.
  1 件のコメント
yassine amine
yassine amine 2018 年 3 月 24 日
exempel: tried with time=10s , Amplitude=200 , Frequency=100*pi , sample time=0.00001 it gives you a better result

サインインしてコメントする。

採用された回答

Guy Rouleau
Guy Rouleau 2011 年 2 月 6 日
By default, the Simulink solver chooses the time steps using:
dt = (t_stop-t_start)/50
With the default parameters, it gives 50 Hz, or a period of 0.02. this is why you do not see the 100rad/s sine way proprerly... Nyquist criteria and aliasing!
I made the following blog post exactly on this topic:
http://blogs.mathworks.com/seth/2009/07/14/refining-the-output-of-a-simulation/
  4 件のコメント
Giovanni
Giovanni 2014 年 6 月 2 日
Thank you!!! It helped a lot! :)))))
ARYA VIJAYAN
ARYA VIJAYAN 2015 年 4 月 23 日
Thank you...you helped me..!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by