|
From: Richard M. <no...@gi...> - 2026-08-11 02:46:30
|
Branch: refs/heads/main Home: https://github.com/python-control/python-control Commit: f80d9904e7719352b82be050f511265e6f9a97fa https://github.com/python-control/python-control/commit/f80d9904e7719352b82be050f511265e6f9a97fa Author: Vincent Gao <gao...@gm...> Date: 2026-08-09 (Sun, 09 Aug 2026) Changed paths: M control/tests/discrete_test.py M control/xferfcn.py Log Message: ----------- Fix matched c2d NaN for a pole or zero at the origin TransferFunction.sample(Ts, method='matched') (and c2d) returned an all-NaN numerator for any system with a pole or zero at s = 0 - integrators, PI/PID controllers, differentiators and other type-1/2 systems. The DC-gain match divides the continuous DC gain (inf for an origin pole, 0 for an origin zero) by a zgain that carries the same vanishing 1 - z factor, so the gain is 0/0 or inf/inf. Match the gain from the non-origin factors only and restore the origin scaling analytically through the z - 1 ~ s*Ts limit, which recovers the textbook Ts/(z - 1) for 1/s, Ts**2/(z - 1)**2 for 1/s**2, and so on. Finite-DC systems are byte-for-byte unchanged. Completes the gain fix from #950/#951. Commit: 260eb0ff14e3b53ccb8f1809860be2d3ff9efe4c https://github.com/python-control/python-control/commit/260eb0ff14e3b53ccb8f1809860be2d3ff9efe4c Author: Richard Murray <mu...@cd...> Date: 2026-08-10 (Mon, 10 Aug 2026) Changed paths: M control/tests/discrete_test.py M control/xferfcn.py Log Message: ----------- Merge pull request #1241 from gaoflow/fix-matched-c2d-origin-pole-zero Fix matched c2d/sample returning NaN for a pole or zero at the origin Compare: https://github.com/python-control/python-control/compare/8808fe965882...260eb0ff14e3 To unsubscribe from these emails, change your notification settings at https://github.com/python-control/python-control/settings/notifications |