フィルターのクリア

Control tool box and precision issue?

1 回表示 (過去 30 日間)
Frederic Cleva
Frederic Cleva 2019 年 5 月 2 日
コメント済み: Frederic Cleva 2019 年 5 月 3 日
Dear matlab users,
I face an issue while applying transfer function to some digitized signals. It results in a filtered signal with 1e305 amplitiude...
the sampling of my signals is 20 kHz. I use the c2d function with option 'leastsquare' to get teh Z transform of the considered transfer function, I use either the zpk or ft function to draw my transfer function.
Beside this the step function diverges too, so it seems the issue is within H (either the way I define it using "tf" or "zpk")
I thought once that it could come from the "lack" of precision of the coef given by matlab and I have realized that only the symbolic toolbox can provide unlimited precision
I don't know whether there are some obvious guideline to simulate such a system or whether I face a more fundemaental problem.
(I can be more specific on H if this can help for understanding the issue)
Many thanks for your feedback
Frederic
  3 件のコメント
Raj
Raj 2019 年 5 月 3 日
You mentioned sampling rate of signal as 20KHz in your question but the code shows sampling time dt as "Sampling = 1e-6;" i.e. sampling rate of 1000KHz. Can you check again?
Frederic Cleva
Frederic Cleva 2019 年 5 月 3 日
yes, your are right, my mistake.
I was wondering whether the sampling rate could be part of the problem. It seems not, in both cases it ends up with a diverging response whatever the sampling frequency; the only change is the "speed" of the divergence.

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

採用された回答

Raj
Raj 2019 年 5 月 3 日
編集済み: Raj 2019 年 5 月 3 日
So I corrected that sampling rate to 20KHz as mentioned in your question. You are right, "the only change is the "speed" of the divergence. "
Now instead of using the 'filter' command, I tried using 'lsim' command and got the following response:
%Signal_filtered.data = filter(z0,n0,Signal.data);
Signal_filtered.data = lsim(TF.TF_z,Signal.data,Signal.time);
As you can see the response is not diverging and the high amplitude of the output is clearly in line with the magnitude response (gain) of the transfer function which can be seen in the Bode plot. Now i am not sure whether precision of coefficients is the issue here or something else.
  1 件のコメント
Frederic Cleva
Frederic Cleva 2019 年 5 月 3 日
Many thanks, this makes perfectly the job!!
(still, I would be curious to get why the filter does not work that fine)

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

その他の回答 (1 件)

Frederic Cleva
Frederic Cleva 2019 年 5 月 3 日
Hi,
sure. Please find the Bode and step response of the filter (OLTF), and the response of this filter to a sine at 100 Hz ovr differetn time scale. We see the response is quiclkly diverging although the step reponse means the filter is step and the Bode shows that the filtr behaves as expected.
Attached is the OLTF filter ad the short script to get the plots.
Many thanks for your investigation
Frederic
190503_example1_H.png
190503_example1.png

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by