Implementing equality constraints using Structured Parameterization

5 views (last 30 days)
I have a system such that
sys_init = idss(A_init, B_init, C_init, D, K, x0, Ts);
My A matrix is NxN in dimension. These demensions are set by a variable called Order, which is any odd integer above zero
I am trying to constrain pairs of two's of my diagonal values of my A matrix (besides the first point A(1,1)) to equal eachother such that A(2,2) = A(3,3), A(4,4) = A(5,5). A(4,4) does not have to equal A(2,2), its is just the pair that I want. I am also trying to set a constraint such that A(2,1) = -A(1,2). Currently, I am trying to set these constraints by using these lines
for i = 2:2:order
sys_init.Structure.A.Value(i+1, i+1) = sys_init.Structure.A.Value(i, i);
sys_init.Structure.A.Free(i, i+1) = true;
sys_init.Structure.A.Value(i+1, i) = -sys_init.Structure.A.Value(i, i+1);
end
Here is an example of what a correct form of order nine would look like
Once I finish denifing my systems, I estimate a state space model to match an input and output with the line
sys = ssest(u', y', sys_init);
However, when I run this code, the equality constraints I detail above do not set. Here is an example output.
How can I define my equality constraints so that they are implemented correctly? Thank you.

Answers (1)

Aabha
Aabha on 25 Feb 2025
Hi @Jason,
The issue might be in the “for” loop of the code. In the current code, only the diagonal elements with odd indices are being frozen. Adding few more constraints in the loop should solve the problem. I tried the following code, with random values for initial matrices, and it is working for me.
for i = 2:2:order-1
sys_init.Structure.A.Value(i+1, i+1) = sys_init.Structure.A.Value(i, i);
sys_init.Structure.A.Free(i, i) = false;
sys_init.Structure.A.Free(i+1, i+1) = false;
sys_init.Structure.A.Value(i+1, i) = -sys_init.Structure.A.Value(i, i+1);
sys_init.Structure.A.Free(i+1, i) = false;
sys_init.Structure.A.Free(i, i+1) = false;
end
After executing the command
sys = ssest(u', y', sys_init);
the matrix values are constrained as expected.
I hope this is helpful to you.
  1 Comment
Jason
Jason on 25 Feb 2025
Edited: Jason on 25 Feb 2025
Thank you for your help!
Im afraid I left my original question a bit vague, and I would like these parameters to be free to be estimated, and that the same relationship between matrix elements to be true. I believe that if I use the ssest command with 'form' set to 'modal', the A matrix relationship is solved. The main concern I have with this approach is using the ssest command with a 'form' as well as initial system constraints, as it looks like that may not be possible. I want to do this as I desire a certain form of my B matrix as shown below (order by 1 column matrix). I have this defined correctly with system initialization commands, and am currently working on defining this while using a form with the ssest command.
Thank you for reading my question and answering! I appreciate you taking the time to do so!

Sign in to comment.

Categories

Find more on Linear Model Identification in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!