The place_acker function works for SISO systems only and returns 1D array instead of 2D array. 1D->2D array can be corrected in: https://github.com/python-control/python-control/blob/424297659bb279d196dae9006cfb185a1f4f472b/control/statefbk.py#L254 The original line K = K[-1, :] # Extract the last row should be changed for K = K[-1:, :] # Extract the last row MIMO system specification throws errors. Here is an example: ``` import numpy as np import control as ct nx = 3 nu = 1 ny = 1 sys = ct.rss(states=nx, inputs=nu, outputs=ny) poles = - np.arange(1, nx+1, 1) Kp = ct.place(sys.A, sys.B, poles) Ka = ct.acker(sys.A, sys.B, poles) print(Kp.shape, Ka.shape) nx = 3 nu = 2 ny = 2 sys = ct.rss(states=nx, inputs=nu, outputs=ny) poles = - np.arange(1, nx+1, 1) Kp = ct.place(sys.A, sys.B, poles) Ka = ct.acker(sys.A, sys.B, poles) ```
Activity
fix return shape for place_acker (python-control#1190)
murrayrm commentedon Jan 19, 2026
Good catch. Fixed in #1195.
Merge pull request #1195 from murrayrm/fix_place_acker-19Jan2026