convert a sawtooth signal to linear signal in Simulink

5 visualizaciones (últimos 30 días)
teun hinkamp
teun hinkamp el 19 de Abr. de 2022
Respondida: Pratyush Swain el 2 de Feb. de 2024
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 comentarios
teun hinkamp
teun hinkamp el 19 de Abr. de 2022
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 el 19 de Abr. de 2022
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)

Iniciar sesión para comentar.

Respuestas (1)

Pratyush Swain
Pratyush Swain el 2 de Feb. de 2024
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.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by