Output with higher sampling rate in simulink

9 ビュー (過去 30 日間)
bhachku
bhachku 2011 年 8 月 6 日
Dear All,
I am facing some problems, while using simulink to sample the output at higher rate.
I am trying to simulate the simple simulink file, say a sine wave with frequency of 10 Hz. I am using the fixed-step ode4 solver with step size of say 0.1 seconds. I am strugulling to get the output (Input(sine wave)--> Scope (output)) at different (higher) rate i.e at 0.05 seconds.
I have used the most available options say resample, interp, upsample, zoh, rate transition etc with no sucess!
I can understand that all sample times in your simulink must be an integer multiple of the fixed-step size. But there must be some solution for this, which i dont know :(
Could any of you please help me to solve this issue?
Many thanks Bhachku

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 8 月 6 日
10Hz sine wave signal means the period is 0.1 second. I would say your step size shall be at least one tenth of it to be meaningful (there are 10 points to represent a complete period of a sine wave). So set the fixed step size to be no larger than 0.01. Ideally, I would recommend 0.005 or less.
  2 件のコメント
bhachku
bhachku 2011 年 8 月 6 日
Thank you for you reply.
Sorry it was 10 rad/sec i.e. around 1.6 Hz (0.625 sec).
But my main concern is to sample the output or any signal at higher sampling rate than the input. For example I want the sampling rate of the output signal to be faster than input signal. Suppose if I have the data at 0.625 sec and i want the data which is sampled at a rate twice than that of input sampling rate.
Thanks
Bhachku
Fangjun Jiang
Fangjun Jiang 2011 年 8 月 6 日
I am not sure what is your sampling problem. If you run your simulation at 0.001 seconds. Your output will have 1000 samples of data per second. If that output is a 1Hz sine wave signal, you have 1000 samples.

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

Community Treasure Hunt

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

Start Hunting!

Translated by