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

SectionIV.B "here F takes the controllable canonical form." "H to take the inverse canonical form" #30

Open
Gaming722 opened this issue Oct 25, 2023 · 7 comments

Comments

@Gaming722
Copy link

#################
## Design #10 ###
#################
F10 = torch.tensor([[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]])
H10 = torch.tensor([[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]])
############
## 2 x 2 ###
############
m = 2
n = 2
F = F10[0:m, 0:m]
H = torch.eye(2)
m1_0 = torch.tensor([[0.0], [0.0]])
# m1x_0_design = torch.tensor([[10.0], [-10.0]])
m2_0 = 0 * 0 * torch.eye(m)

Dear authors,
Thank you for your excellent work, I have some questions as follows:

  1. In your paper Section IV.B, it is mentioned that "here F takes the controllable canonical form." and "we set H to take the inverse canonical form". But in above codes, the F does not appear to be a controllable canonical form, and I also want to know what "inverse canonical form" means.
  2. In Section IV.B 2), "Neural Model Selection", you compared KalmanNet with Vanilla RNN and MB RNN, I couldn't find related codes, I want to know if Vanilla RNN and MB RNN have same setting C1 as KalmanNet, i.e., architecture1 with input features {F2, F4} and with training algorithm V3.

Looking forward to your reply,
Thank you.

@XiaoyongNI
Copy link
Collaborator

Dear Jiaming,

Thanks for your interest in our work!

Regarding your questions,

  1. I think it is a typo here, since our model does not consider control inputs. Sorry for the misunderstanding. By "inverse canonical form" we mean the first row and the sub-diagonal are all ones while the others are zeros.
  2. You can find the code here: Vanilla_rnn.py. Both Vanilla RNN and MB RNN use architecture1, but they do not use features in the form of differences like F1-4, they directly use previous posterior \hat{x}_{t-1} and current observation y_t. (this choice of feature is mainly because they are not learning a "compensation" like Kalman Gain anymore, they directly learn the output posterior \hat{x} instead). The training algorithm depends on the complexity of the dataset. For example, if we are training on a simple linear model with relatively short trajectory, we will use V1.

Best regards,
Xiaoyong

@Gaming722
Copy link
Author

Dear Xiaoyong,

Thanks for your patient and informative responses to my questions!

I have an additional question about whether the term 'inverse canonical form' is a concept in control theory. I couldn't find its definition. I understand that my question may seem basic, and I appreciate your patience and understanding.

Best regards,
Jiaming

@XiaoyongNI
Copy link
Collaborator

Dear Jiaming,

From my knowledge, this is not a formal term in control theory.

@Gaming722
Copy link
Author

Dear Xiaoyong,

Thanks for your patience in addressing my questions.

Best regard,
Jiaming

@jiangyy630
Copy link

Dear Jiaming,

Thanks for your interest in our work!

Regarding your questions,

  1. I think it is a typo here, since our model does not consider control inputs. Sorry for the misunderstanding. By "inverse canonical form" we mean the first row and the sub-diagonal are all ones while the others are zeros.
  2. You can find the code here: Vanilla_rnn.py. Both Vanilla RNN and MB RNN use architecture1, but they do not use features in the form of differences like F1-4, they directly use previous posterior \hat{x}_{t-1} and current observation y_t. (this choice of feature is mainly because they are not learning a "compensation" like Kalman Gain anymore, they directly learn the output posterior \hat{x} instead). The training algorithm depends on the complexity of the dataset. For example, if we are training on a simple linear model with relatively short trajectory, we will use V1

Best regards, Xiaoyong

So in the default branch 'main', is the canonical form F0 mentioned in the corresponding section the identity matrix?

@jiangyy630
Copy link

Dear author, I have a question that I don't understand.In the default branch 'main', is the canonical form F0 mentioned in the corresponding section the identity matrix?

@XiaoyongNI
Copy link
Collaborator

No, it is the canonical F0, see https://github.com/KalmanNet/KalmanNet_TSP/blob/main/Simulations/Linear_canonical/parameters.py#L28
The first row is all ones.

Best,
Xiaoyong

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

3 participants