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

add tolerance to tzeros #891

Closed
mzaffalon opened this issue Oct 19, 2023 · 4 comments
Closed

add tolerance to tzeros #891

mzaffalon opened this issue Oct 19, 2023 · 4 comments

Comments

@mzaffalon
Copy link
Contributor

mzaffalon commented Oct 19, 2023

The MIMO system has no transmission zeros but the individual SISOs do have zeros. 2 of the 3 Nyquist plots also show an encirclement of -1 despite there being no poles (so there must be positive zeros).

using ControlSystems
using LinearAlgebra: I, svd

A = [-1.47243   -3.92884    1.53573;
     3.92884  -12.6166    14.2942;
     1.53573  -14.2942   -16.7218]
B = [-1.08736    0.361156  -6.65462;
     1.233     -0.408808   7.54593;
     0.581335  -0.191548   3.55777]
C = [-6.75254  -7.65692  3.61004]
D = [0.0  0.0   0.0]

sys = ss(A,B,C,D)
tzeros(sys) # empty

sys1 = ss(A,B[:,1],C,D[1,1])
z1 = tzeros(sys1) # not empty
svd([z1[1]*I-A -B; C D]).S # last singular value is 1e-12 of the first

sys2 = ss(A,B[:,2],C,D[1,2])
z2 = tzeros(sys2)
svd([z2[1]*I-A -B; C D]).S

sys3 = ss(A,B[:,3],C,D[1,3])
z3 = tzeros(sys3)
svd([z3[1]*I-A -B; C D]).S
@baggepinnen
Copy link
Member

You need to increase the tolerance quite much for the balanced zero computation of MatrixPencils.jl to recognize the zero.

using RobustAndOptimalControl
julia> RobustAndOptimalControl.DescriptorSystems.gzero(dss(sys)), prescale=true, rtol=1e-4)
3-element Vector{Float64}:
 6530.538963127227
   Inf
   Inf

I tried this system in the python control toolbox as well and they also give no zeros for the MISO system sys.

2 of the 3 Nyquist plots also show an encirclement of -1 despite there being no poles (so there must be positive zeros).

what does this mean? The system has 3 poles?

@mzaffalon
Copy link
Contributor Author

MATLAB gives no zeros too.

Maybe my understanding of the transmission zeros is wrong but if there is a zero for the SISO system, should I get the same zero also for the MISO which has the same A and C matrices and the one column of the SISO's B matrix? After all, one is looking for the solution of the problem \lambda x = Ax+Bu, 0 = Cx + Du.

In the code above, one singular value is almost zero, so I would expect the matrix to have lower rank.

Sorry, the remark about the Nyquist plot is wrong.

@baggepinnen
Copy link
Member

if there is a zero for the SISO system, should I get the same zero also for the MISO which has the same A and C matrices and the one column of the SISO's B matrix?

No, adding either a new sensor, or a new actuator, can remove zeros from the dynamics. This translates to more rows in $C$ or more columns in $B$ can reduce the number of zeros in the system.

On an intuitive level, if there is some complex frequency that does not pass through the system from input to output, adding more ways of passing signals through the system can of course allow for those frequenies to pass through.

You can also determine from this expression rank([z[1]*I-A -B; C D]) that adding more columns in B may increase the rank. You can convince yourself about this by considering the trivial system ss(-1, 0, 1, 0) and comparing that to the same system with extended $B$ matrix $B = [0 \quad 1]$

@mzaffalon
Copy link
Contributor Author

mzaffalon commented Oct 20, 2023

Thank you for the explanation.

I had the wrong definition: it is not sufficient that one of the elements of the transfer function is zero for this particular frequency, but rather that this frequency is absorbed by the MIMO and it does not appear at any output see here for instance.

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

2 participants