フィルターのクリア

How can I measure percentage of pulse signal

2 ビュー (過去 30 日間)
Dogukan Arat
Dogukan Arat 2018 年 7 月 24 日
コメント済み: Ryan Takatsuka 2018 年 7 月 25 日
I am working on a project. I need get pwm signal on raspberry pi then find the open interval which means percentage of the signal. I design a system but it does not work properly.
I can reach the correct value without delay but when I decrease the percentage it keeps max value.

採用された回答

Ryan Takatsuka
Ryan Takatsuka 2018 年 7 月 24 日
You are probably better off filtering the PWM signal to find the interval percentage. See the attached example.
  2 件のコメント
Dogukan Arat
Dogukan Arat 2018 年 7 月 25 日
It works thank you but my period will be 20ms. When I change the period of the pwm, it does not work. How can adjust the filter for this period?
Ryan Takatsuka
Ryan Takatsuka 2018 年 7 月 25 日
If you have the Signal Processing Toolbox, you can use the filterDesigner app to design a lowpass IIR filter. Otherwise, there are some online tools such as this one: Online Filter Designer
I've attached an example of a filter using a 0.020 s period with an arbitrary sampling rate.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by