convert a sawtooth signal to linear signal in Simulink

5 ビュー (過去 30 日間)
teun hinkamp
teun hinkamp 2022 年 4 月 19 日
回答済み: Pratyush Swain 2024 年 2 月 2 日
Working on a crankshaft position model. In practice, the engine will have a certain amount of teeth passing a sensor. this will be tested with a 0 and 1 block signal. Counting the teeth gives a accurate position of the engine. The problem is that this is a stepped sawtooth signal. Using a transfer function helps to convert the sawtooth signal to a linear signal. The downside is that the upper values are no longer measured as well as the return to zero. With two counters it is possible to pause the signal and allow for a steady return to 0 while the other counter is counting and vice versa. The whole setup is becoming quite complex and I was wondering if there is a more direct way of fitering the signal? See attached picture to see the problem with the added transfer function.
  4 件のコメント
teun hinkamp
teun hinkamp 2022 年 4 月 19 日
This stepped signal only shows the position in steps of 5 degrees. For more accuracy, I want to convert the stepped signal to a linear signal, like the lower one. The only problem is that the final values are no longer reached. This can be solved by using a doulbe counter set-up which leads to the following picture below. It seems to work fine, but it also leads to a complex Simulink model. I was wondering if there is another option of converting a sawtooth signal to a linear one. If not, thanks for the help.
Mathieu NOE
Mathieu NOE 2022 年 4 月 19 日
I would make another suggestion - why not use the velocity estimation between two successive steps to make like an interpolation (at higher sampling rate vs actual steps rate)

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

回答 (1 件)

Pratyush Swain
Pratyush Swain 2024 年 2 月 2 日
Hi teun,
i understand you want to convert your sawtooth signal into a linear signal.In process of filtering the signal, you used a transfer function but the upper values were no longer measured. One workaround for this is to use look up table to convert the sawtooth signal into a linear signal without loss of values.
Please refer to the following implementation where I have attempted to reproduce the sawtooth signal through "repeating sequence" block and "quantizer" block in simulink, further I used the "1-D look up table" block to filter the signal.
This is the saw tooth signal generated through "repeating signal" and "quantizer" blocks:
This is the output of the filtered signal after look up table:
For more information on "1D look up table" block, please refer to https://www.mathworks.com/help/simulink/slref/1dlookuptable.html
I have also attached the simulink model for reference.
Hope this helps.

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by