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 Comments

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.
If i use the subbusetblock or the PID predefine block i obtain the same error.. but in PID subblock we cannot configure the intial value of the derivative part.
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.
Hello,
the block is a integrator inside Subsystem PID Tetha (so it's not the logic of altitude control that create issue).
Unfortunately i don't see the menu of the PID that you show us above.. there is just the init condition of the Integrator and Filter in PID block (see below)
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.

Sign in to comment.

Answers (0)

Products

Release

R2024b

Asked:

on 18 Feb 2025

Commented:

on 18 Feb 2025

Community Treasure Hunt

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

Start Hunting!