Bode Plot axes changes with sampling time?

8 ビュー (過去 30 日間)
John
John 2014 年 4 月 19 日
コメント済み: Arkadiy Turevskiy 2014 年 4 月 28 日
Why does the Bode Plot 'bode()' frequency axis change in magnitude if the sampling time 'dt' is changed in magnitude? If dt is changed from 1e-3, to 1e-4, the axis labels go from 10^1 --> 10^4, to 10^2 --> 10^5. But sampling time shouldn't change the axis magnitude, just the accuracy.
dt = 1e-4;
t = (0 : dt : 50)';
uc = chirp(t, 0.1, t(end), 100);
yc = circshift(uc, 100); %phase shift the output
data = iddata(yc, uc, dt);
TF= etfe( data );
bode(TF);
  1 件のコメント
John
John 2014 年 4 月 25 日
Nobody else sees this when running the code above? It seems a basic thing to not work...

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

回答 (4 件)

Arkadiy Turevskiy
Arkadiy Turevskiy 2014 年 4 月 21 日
編集済み: Arkadiy Turevskiy 2014 年 4 月 21 日
Take a look at the examples section here .
The FFT frequency is basically an inverse of sampling time, so when you make dt 10 times smaller, frequency goes 10 time higher, as shown in the example referenced above.

John
John 2014 年 4 月 21 日
Right, but efte automatically sets the axes, and it also has the sampling time as an input via 'iddata'. It should already compensate for that, since there is not other provision for entering the time vector.
  2 件のコメント
Arkadiy Turevskiy
Arkadiy Turevskiy 2014 年 4 月 21 日
If you take a look at a signal processing book like Discrete-Time Signal Processing by Oppenheim and Schafer, and look at frequency-domain representation of sampling, you will see that all the frequency plots are defined with sampling frequency, 1/T Hz , or 2pi/T rad/sec.
The bode plot will show the right content at the right frequencies, but the range will always extend to (1/t)/2 - half of the sampling frequency. This is the right behavior. If you have t=1e-4, you can still capture frequency content happening at just below half of sampling frequency, 5 Khz. With sampling time 1e-3, you can only capture frequency content up to 500 Hz.
Think about it this way: if your transfer function is a very narrow passband at 100 Hz, no matter what dt is (1e-3 or 1e-4), you will see your passband at 100Hz, but the range will extend to either 500Hz or 5,000 Hz.
John
John 2014 年 4 月 22 日
But that's just it, the passband is not fixed, and its value varies with dt -- of course, it shouldn't change just because of dt.
Hence the confusion of what 'etfe' is doing.
In other words, as i change 'dt', the plot shown on the screen is exactly the same and remains in place (i.e. it is not squeezed or stretched), and the axis magnitude just changes under it.
For example, the passband could be 100 in one case, and 1000 in another case as dt changes by a factor 10.
That shouldn't happen...

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


John
John 2014 年 4 月 24 日
bump? Still a mystery...

John
John 2014 年 4 月 28 日
Anyone from Mathworks? Is this a bug?
  1 件のコメント
Arkadiy Turevskiy
Arkadiy Turevskiy 2014 年 4 月 28 日
I already tried to explain the best I could that it is not a bug.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by