MPC linearization error: "NaN's cannot be converted to logicals"
조회 수: 5 (최근 30일)
이전 댓글 표시
I have an XT28 model. I have tried to add a MPC controller (MPC toolbox) to one of the legs.
In the wheel2roadConnection block (green text) there is a sensing block.
During compilation, 1.0e-05 and -1.0e-05 (in pair) are sent from the sensing block to the wx, wy, vx and vy inputs of the forces block. I printed the value of these signals using a matlab function. These signals eventually reach the slipvel subsystem
The signals does NOT change even if there is a gain or square block. When it comes to the sqrt in the slipvel subsystem, a NaN error occurs due to trying to take the square root of a negative value.
I tried the MPC toolbox with another simple model. I added a sqrt block to the mv port of the MPC and got the same error (during compilation, the pair of -1e-05 and 1e-05 is sent out from the mv port of the MPC and I cant change these values).
Without the MPC toolbox the value of the signals gets changed correctly when it enters for example a square block or gain block.
I use the version: MATLAB R2019b
Do anyone know why I get this problem when I use the MPC toolbox?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Controller Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!