Borrar filtros
Borrar filtros

Rainflow cycle counting in Simulink for Embedded Coder

5 visualizaciones (últimos 30 días)
Matthias Schmidt
Matthias Schmidt el 1 de Sept. de 2022
Respondida: Anurag el 25 de Oct. de 2023
Hi,
I am currently trying to implement a rainflow count in Simulink and the further usage on an development board (STM) by embedded coder. My input data is all of type int16, which contradicts the possibility of using an interpreted Matlab function (only double type). I also tried rainflow() as Matlab function in Simulink, but I receive a dimension mismatch error.
Anyone with an advise for rainflow cycle counting in Simulink?
Thanks
  1 comentario
Zahra
Zahra el 20 de Dic. de 2022
Hi, I have the same problem. Have you tried to solve it? Thanks

Iniciar sesión para comentar.

Respuestas (1)

Anurag
Anurag el 25 de Oct. de 2023
Hi Matthias,
I understand that you want to implement a rainflow count in Simulink and facing dimensionality inconsistencies. Please refer to the following to solve the issue you are facing:
  • Data Type Conversion: Convert your int16 data to double precision for calculations. You can use the "Data Type Conversion" block in Simulink for this purpose. Make sure to set the output data type to double.
  • Implement the rainflow counting algorithm in Simulink using standard blocks.
  • After counting cycles, you may need to convert the results back to int16 if that's the required data type.
Links for reference:
Hope this helped.
Regards,
Anurag

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by