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

Reading an output variable #26

Open
mforets opened this issue May 19, 2018 · 6 comments
Open

Reading an output variable #26

mforets opened this issue May 19, 2018 · 6 comments

Comments

@mforets
Copy link
Member

mforets commented May 19, 2018

In a model such as ISS, y1 is defined as

<param name="y1" type="real" local="false" d1="1" d2="1" dynamics="any" controlled="false" />

Since it is not controlled, it is currently interpreted as an "input" variable which is not really the case.
Actually, it is defined in the invariant as a linear combination of state variables,

...
y1 == 0.000067947*x1 - 0.029964*x2 + 0.025941*x3 - 0.00012623*x4 + 6.5319e-6*x5 + 0.00013057*x6 - 0.06363*x7 - 0.00012503*x8 + 0.01654*x9 - 0.0012343*x10
...

hence it is really an "output". There is no flow equation for y1.

Since this invariants contains a combination of input variables and state variables, the current code breaks (does it belong to the X or to the U fields of the ConstrainedLinearControlContinuousSystem? i think none of them..):

invariant y1 = (((((((6.7947e-5x1 - 0.029964x2) + 0.025941x3) - 0.00012623x4) + 6.5319e-6x5 + 0.00013057x6) - 0.06363x7) - 0.00012503x8) + 0.01654x9) - 0.0012343x10 in location 1 contains a combination of state variables and input variables, and conversion to a system of type MathematicalSystems.ConstrainedLinearControlContinuousSystem is not possible

My proposal is to wait for systems with output to add this information properly to the underlying system type.

Otherwise, extra information can always be added in the ext field of the hybrid automaton.

@schillic
Copy link
Member

schillic commented May 19, 2018

I think in general it is hard to say if a constraint is on states or on inputs.
What to do with the constraint x < u (admittedly, I never saw this)?

How do you discriminate outputs from inputs?

@mforets
Copy link
Member Author

mforets commented May 22, 2018

i think we can say that: if the parameter appears in an invariant, but there is no flow equation for it, then this is an output.

What to do with the constraint x < u (admittedly, I never saw this)?

i think that one could be rewritten as a state constraint, if we know that u is inside some bounds.

@schillic
Copy link
Member

i think we can say that: if the parameter appears in an invariant, but there is no flow equation for it, then this is an output.

And what is the difference to an input? 😉

@nikos-kekatos
Copy link
Collaborator

good point! maybe add an extra check, i.e. the output should be a function of the states while the input is not.

@schillic
Copy link
Member

What about this: An input is as described above, and additionally it is used on the r.h.s. of a flow equation.

@nikos-kekatos
Copy link
Collaborator

It makes sense! Indeed, this is another way to differentiate inputs/outputs.

However, I think it might be better suited for linear systems. An input may not appear at all in the flow, e.g. we may have an input only in a reset.

On the other hand, the condition with output may be more suitable (as the outputs always appear on the invariant).

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