The power funciton in math function block does not correctly work.

I choosed the signed power. If the power is even, the output always keeps positive. It works well if the power is not even. I wonder what happens when the power is even. Is it a bug?
The input u this example is a sine wave signal and v is 2, 3, 6, respectively. Please look the scope in the figure, when the power is even, it keeps positive. It is strange. I don't know if this exmaple works correctly on other machines.

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 9월 12일

1 개 추천

There seems to be a bug in the implementation of Signed Power functionality in the case of integer powers. You may consider filing a bug report: https://www.mathworks.com/support/bugreports/report_bug. Meanwhile, you can create your own block using power and sign blocks

추가 답변 (1개)

BOB MATHEW SYJI
BOB MATHEW SYJI 2020년 9월 12일

0 개 추천

When “signed power” is checked, it first calculates the power of absolute value of input and then multiplies it with sign of the input. You can find more on: https://www.mathworks.com/help/simulink/slref/mathfunction.html

댓글 수: 1

kj g
kj g 2020년 9월 12일
편집: kj g 2020년 9월 12일
Surely I know this, sign(u)*|u|^v. The input u this example is a sine wave signal and v is 2, 3, 6, respectively. Please look the scope in the figure, when the power is even, it keeps positive. It is strange. I don't know if this exmaple works correctly on other machines.

댓글을 달려면 로그인하십시오.

카테고리

제품

릴리스

R2020a

질문:

2020년 9월 12일

답변:

2020년 9월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by