Error when simulating an adaptive control system with an inverse reference model: Derivative is not finite.
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello, I am modeling an adaptive control system with an inverse reference model. When running the simulation, an error appears:
"An error occurred while running the simulation and the simulation was terminated
Caused by: Derivative of state '1' in block 'Laba_1_Simulation/Transfer Fcn' at time 1.4399611326326742 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)".
What could be the reason and what is the solution?
K1 = 2000;
K2 = 1;
Kk1 = 0.0012;
T1 = 0.2;
T2 = 0.005;
Tk1 = 0.0001;
T3 = 0.1;
Kt = 0.5;
댓글 수: 0
채택된 답변
Sam Chak
2023년 4월 24일
Hi @Anton
There is no obvious division-by-zero component. So, the system must be unstable, which causes the output to grow out of control. Although the Diagnostic Viewer indicates that singularity has occured at the highlighted block, the real culprit is the "Positive Feedback" at the Sum block. Change it to "Negative Feedback" as shown below, and the problem is now fixed.
댓글 수: 2
Sam Chak
2023년 4월 24일
The transient behavior is described by the transfer function. At the moment, your original input–output transfer function produces a relatively fast transient that settles in about 0.5 sec (as seen in the Scope).
If you want to have exactly the same transient behavior, then you will need to find out the transfer function from the original Simulink model.
추가 답변 (1개)
Daniel
2023년 4월 24일
The derivative to a transfer function is the input. So the error is indicating that the input to the highlighted block is not finite, perhaps as a result of something growing out of control.
When I replicate the system, I see that the system does indeed grow without bound. If you look at your Scope output, you'll see that the last value shown is around . When you have nonconverging behavior like that, you'll want to look at all your transfer functions and inputs. Make sure the model is correct. You might particularly want to check the signs of the coefficients in all the transfer functions, where each transfer function is using an s vs a 1, and the signs in your sum block.
댓글 수: 2
Daniel
2023년 4월 24일
That's going to depend a lot on the assigment. The assignment should point you in the right direction to obtain a transient, whether directly or by referencing previous classroom material. I'm personally happy to help with Simulink mechanics, but my expertise is in FPGA design and it's been a while since I dealt with analog electronics in school.
If you have any more Simulink questions (such as "I thought this Simulink block modeled this mathematical representation, but something is going wrong" or "why am I getting this error"), we'll be happy to help you. It might be easiest to post any such things as a new question, as I believe we've answered your original question about non-finite derivatives at this point.
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!