Downsampling of RPM traces
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
0 投票
Hi,
I have RPM trace signal (respiratory data) sampled at 26 Hz. I want to downsample RPM trace signal to 5.2 Hz. Does anyone know how to downsample this trace signal to 5.2 Hz?
Thanks in advance.
採用された回答
Star Strider
2020 年 1 月 10 日
I assume that the signal is sampled regularly, and a fixed sampling interval.
A prototype call to it would be:
RPMrs = resample(RPM, 52, 260);
so the output will be sampled at 5.2/26 of the original rate.
Note that if it is not uniformly sampled, first follow the procedure in Resample a Nonuniformly Sampled Data Set, then do the rate resampling.
15 件のコメント
MAT-Magic
2020 年 1 月 11 日
Thank you very much for your kind and positive reply. It worked perfectly. Thanks once again.
Star Strider
2020 年 1 月 11 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
Rik
2020 年 1 月 12 日
@Asad, You should see a button close to this answer that says 'accept answer' or something similar. You should click that button instead of flagging this comment.
This person helped me to solve my problem
MAT-Magic
2020 年 1 月 16 日
Thanks for the kind information. I have done it
Star Strider
2020 年 1 月 16 日
@Asad Rasheed — Thank you!
@Rik — Thank you!
@Star Strider, After creating new time vector as you suggested me earlier, I checked sampling intervals between any two adjacent instants of three different RPM signals, which are 0.1928s, 0.1927s, 0.1929s, while my downsampling sampling interval is 0.1923s. The three sampling intervals coming same after the decimal, but different in every case for the last digit.
Question: Will it affect when I take the final RMSE of three RPM signals?
t_new = linspace(t_previous(1), t_previous(end), length(RPMrs));
I am waiting for you kind answer. Thanks
Star Strider
2020 年 1 月 21 日
As always, my pleasure.
Ideally, the time vectors should be the same. Differences could arise if the original data were not uniformly sampled (use the resample function with a different syntax to correct for that, see: Resample a Nonuniformly Sampled Data Set), or if the vectors were originally of different lengths.
The time vector should not affect the RMSE calculation, because as I recall, the time does not directly enter into that calculation. (It is the square root of the mean of the squared differences over the entire signal.) If you are subtracting one vector from another, those vectors of course have to have the same lengths and be sampled at the same time instants.
MAT-Magic
2020 年 1 月 21 日
Thanks. I will try to use the "Resample a Nonuniformly Sampled Data Set" as resamping of my nonuniform sampled data.
Star Strider
2020 年 1 月 21 日
As always, my pleasure!
MAT-Magic
2020 年 1 月 21 日
WOW, It worked. Thanks Sir
Finally I downsampled the signal from 26 Hz to 5.2 Hz with equally spaced uniform time interval.
Star Strider
2020 年 1 月 21 日
As always, my pleasure!
Nonuniformly-sampled signals require a two-step process.
@Star Srider, Thanks for the reply.
But here, my downsampling process is only one-step process by using this method "Resample a Nonuniformly Sampled Data Set" (as you suggested) which is given below in form of prototype like;
[RPMrs, tvrs] = resample(RPM, t, Fs, 3, 1);
where,
RPM = Given signal.
t = Time information of the given signal.
Fs = Downsampling frequency (5.2 Hz);
Question-1: Still I don't know how to decide the fourth and fifth arguments of above prototype in every case (especially in my case)?
Question-2: If above prototype will be the first step, then what will be second step of Nonuniformly-sampled signals?
Thanks for bearing my questions. Waiting for your kind reply. Bundle of thanks in advance.
Regards
Star Strider
2020 年 1 月 22 日
As always, my pleasure!
First, for best results, always return the new time vector (that I call ‘tvrs’ here):
[RPMrs, tvrs] = resample(RPM, t, Fs, 3, 1);
As noted in the documentation, this resamples ‘RPM’ to the new time vector, and also upsamples it by a factor of 3/1 (determined by the last two arguments in this call to resample). If you do not want to upsample or downsample it, omit the last two arguments:
[RPMrs, tvrs] = resample(RPM, t, Fs);
That should do what you want.
MAT-Magic
2020 年 1 月 22 日
Thank you so much Sir !!!
Star Strider
2020 年 1 月 22 日
As always, my pleasure!
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Multirate Signal Processing についてさらに検索
製品
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
