0 Comments

I am trying to get the A,B,C,D matrices of the system at different points during a dynamic simulation to understand how they vary and see if my system stays controllable. 
To do this I am running the simulation, pausing and running the following command in the gomboc terminal:
query(linearise({xNames:[‘z’,’e’,’f’,’w’,’p’,’q’],yNames:[‘z’,’e’,’f’,’w’,’p’,’q’],uNames:[‘Front.TargetFlapStbd’,’Front.TargetFlapPort’,’Front.TargetFrontRake’,’Aft.TargetRudderRake’]}))
 
This gives me the following error:
Error: ‘Front.TargetFlapStbd’ is not a state
 
In the code TargetFlapStbd (and the other target flap angles) is governed by a controller run in a LQR01.js file which is called by Control01.bic and defined like this:
 
StbdWingFlap : BL.State({ Init: 0, Min: -10, Max: 10 }),
 
Then in FrontFoil01.bic I call the previous value:
TargetFlapPort   :”{^.Control.LQR.Angles.PortWingFlap}”,
 
This code works fine with the issue that TargetFlapPort doesn’t show up in the States tab in the gomboc interface. I have tried using R.merge to update the variable with the result that TargetFlapPort did become a State but wouldn’t be updated by the controller and remained constant during the simulation.
 
Is there a way to make TargetFlapPort be taken as a State while still being updated by the controller? Is there a better way to get the A,B,C,D matrices I am not seeing?

 

Jules Unselected an answer 21 hours ago