Error in the PID blocks (Integrator doesn't accept initial condition?!)
이전 댓글 표시
Hello,
I have this error when i run the simulation in Matlab about some block to design a PID.

But i created a variable in workspace with initial condition ci_int_Tetha=0

I don't understand why it happen this error?
I have also decrease the sample time at the sin waveform like input to 1*10-6, but nothing is still present.
Thanks
Best Regards
댓글 수: 5
Sam Chak
2025년 2월 18일
Could you show the block diagram of the altitude control system? The error seems to be caused by a non-finite value at the very beginning of the simulation, which may indicate that your chosen initial values are the root cause.
Enrico Alessandro
2025년 2월 18일
Sam Chak
2025년 2월 18일
I cannot determine which state of the two integrators in the Subsystem PID theta block is generating the error. You need to click on the message so that the problematic integrator becomes highlighted. However, I suspect the error is caused by incorrect modeling of the equations inside the Logic Altitude Control Function block.
By the way, it is possible to set the initial conditions for the PID controller block; however, I usually leave them in default mode, as they generally do not lead the system to instability or divergence.

Enrico Alessandro
2025년 2월 18일
Sam Chak
2025년 2월 18일
Good job, @Enrico Alessandro! We have identified that the integrator in the integral action produced the error. This allows us to trace the incoming signal back to the second input port of the Subsystem block, which represents the difference between the theta_d and theta_uav signals.
If theta_d is a constant desired setpoint, then, through logical reasoning, the theta_uav signal must be carrying the non-finite value, thus stopping the simulation. Therefore, I need you to investigate the source of the theta_uav signal.

답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Real-Time PID Autotuning에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



