SLICOT / SLICOT-Reference

SLICOT - A Fortran subroutines library for systems and control
BSD 3-Clause "New" or "Revised" License
47 stars 20 forks source link

Structured singular value of real scalar with real uncertainty #4

Closed roryyorke closed 2 years ago

roryyorke commented 2 years ago

AB13MD gives a BOUND of 0 if Z is 1x1 and the uncertainty is real, even if the value of Z is in fact real; this is due to

https://github.com/SLICOT/SLICOT-Reference/blob/8d2b5dd0e329f16f7ec9c89e6a949907834aaadc/src/AB13MD.f#L295-L301

The correct value of mu if the imaginary component is 0 is abs(Z) (e.g., Skogestad & Postlethwaite first edition, Eq. (8.75)).

I don't know how much of a pointless corner case this is (why bother computing structured singular values of 1x1 matrices?), but it seems fairly easy to fix by either checking for the imaginary component being exactly 0, or perhaps if the absolute value of the imaginary component is less than some tolerance times the absolute value of the real component.

VasileSima4 commented 2 years ago

The routine has been updated to return 0 in the case described above.
Thank you for pointing out this error!