Model is attached for reproduction of the anomalous behavior...
Why discrete time integrator in HDL coder simulink library behaves completely differently with different input sampling time?
조회 수: 3 (최근 30일)
이전 댓글 표시
I use two constant blocks one with sampling freq of 2e-7(5 Mhz) and another with 4e-7 (2.5 Mhz) followed by two same discrete time integrators (Sample time:inherited). The first one outputs zero and the second one outputs a ramp (which is the correct result)... What am I missing here?
Why 2e-7 or 5 Mhz is not working with discrete time integrator???
댓글 수: 3
Omkar Sastry
2022년 3월 17일
편집: Omkar Sastry
2022년 3월 17일
Hi Adeel,
Could you please attach the other artifacts required to simulate the model (like definition for Controller.InternalSignals.DataType.PLL)? Thanks!
채택된 답변
Adeel Jamal
2022년 3월 18일
편집: Adeel Jamal
2022년 3월 18일
댓글 수: 1
Omkar Sastry
2022년 3월 21일
편집: Omkar Sastry
2022년 3월 21일
Hi Adeel, yes this is exactly what is happening. The 'floor' rounding mode coupled with the type used drags the value to 0 for the K*T*u(n) calculation in the first block.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 HDL Code Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!