Transfer Function giving zero Output in Simulink (Solved: Due to exp^- block creating singularity)

33 visualizaciones (últimos 30 días)
Hi folks, I don't quite understand why I'm getting a zero output after my transfer function, regardless of the control effort from the PID block.
When the transfer function is simulated using a PID in other diagrams and files, it always produces a nonzero output (for a nonzero input). For some reason, in this structure, it is stuck at zero output regardless of what input I give it.
Can y'all help me debug/begin to think of where to troubleshoot? Thanks so much! This zero output is causing a singularity/problem in subsequent blocks.
(attached is the .slx model, it should be able to function on it's own / has no other associated files)
(Solved: the block, -0.21, associated with Beta-1, was a negative exponent, and when 0 or near 0 was being commanded, this results in u^-0.21 == 1/u^.21 == 1/ a very small number, approximately approaching 1/0 and causing this error.)

Respuesta aceptada

Sara Nadeau
Sara Nadeau el 26 de Abr. de 2023
The screenshot you included shows port value labels on the model to display the signal values. Have you tried running a simulation and looking at a plot of the data?
Port value labels show instantaneous values and also round the value to MATLAB's short numeric format by default. It's possible that the value isn't literally zero, just very close based on the transfer function values and the dynamics of the input signal.
You could try looking at the data over time for a simulation or changing the port value label settings to display the data using more significant digits or a different format. To change the format for the port value labels:
  1. In the Simulink Toolstrip, on the Debug tab, in the Tools section, in the Port values button group click the button arrow for Remove all port value labels. Then, select Options.
  2. In the dialog box, use the options in the Display Format section at the bottom to specify the display format based on whether the data is fixed-point or not.
These settings aren't saved with the model.
I hope this helps!
  2 comentarios
Jonathan Bessette
Jonathan Bessette el 27 de Abr. de 2023
Hi Sara, thanks for the reply!
Yes, I tried running a simulation, but unfortunately it stops due to a singularity/divide by zero error, which originates I think from this block.
I will try probing it/displaying with more sig figs and see if that helps me troubleshoot. Thanks!
Jon
Jonathan Bessette
Jonathan Bessette el 2 de Mayo de 2023
So, it looks as though the cause is due to Beta-1 the exponential math block commanding u^(-0.21)
I think for some reason, the 1/(u^.21) is creating a very large number near to (1/0).
I solved this by deleting blocks until it worked, and then began to keep some blocks and delete others until converging on this block as the issue, while reading the port values as sanity checks on output. Thanks!
Jon

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Schedule Model Components en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by