Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GGBAL: change SCLFAC to 2 from 10 for lossless scaling and more bits #1089

Open
mccullerlp opened this issue Jan 4, 2025 · 0 comments
Open

Comments

@mccullerlp
Copy link

I've been running some control systems deflating subspace methods and using ggbal for balancing. I've noticed that ggbal differs from gebal in that it scales by factors of 10 rather than factors of 2. This seems undesirable, first because 10 is not natural to the representation, and so balancing incurs some precision lost due to that scaling factor (non-reversable). This is one of the reasons gebal uses a factor of 2. The second reason is that 10 is excessively large. The extra two bits can help in solving some otherwise ill-conditioned problems. I'm not aware of any downside.

The change to line 200 in dggbal.f

      DOUBLE PRECISION   THREE, SCLFAC
      PARAMETER          ( THREE = 3.0D+0, SCLFAC = 2.0D+0 )

is already supported by the code. I've tested the change and this value does outperform the current value of 10, at least for my controls applications.

NOTE: I'm using the scipy wrappers, which don't currently package ggbal anyway. I've found that you can get "close" to the performance of ggbal by using the wrapped gebal on the following matrix
Age = [[0, |A|+|B|]
[1, 0]
where 1 is the identity.

The bottom and top halves of the scaling of this matrix are the right and (reciprocal) left scalings. From my experiments, even this outperforms ggbal with SCLFAC=10 since gebal uses SCLFAC=2. While this method works reasonably, it doesn't implement grading and is inefficient to double the matrix dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant