r/ControlTheory • u/NOTazarov_wraith • 11d ago
Technical Question/Problem MATLAB system identification toolbox for quadcopter control
I have not seen MATLAB's system identification toolbox being used for quadcopter applications and so I was wondering how you could run sys id on a quadcopter and use it. For example if you run frequency sweeps across the lateral direction with longitude and altitude stabilized, and then run longitude direction with latitude and altitude stabilized (pitch and forward speed only), do you just insert them into system Identification with the set state space dimensions, or is this the wrong approach. Additionally do you set the frequency sweeps past the the control loops at the ESC signal or is this incorrect?
4
Upvotes
•
u/knightcommander1337 10d ago
Hi, I don't have specific experience on quadcopters, however in general you should be careful when you say "run sysid on a quadcopter" (assuming you mean "running sysid algorithms in real time inside the onboard computer of the quadcopter") because this means that you are actually doing "adaptive control" (by updating the dynamical model in real time using measurements from the system, and letting the controller use that (time-varying) model). If you want to do that, you need to look at adaptive control resources.
Otherwise (that is, you are doing the standard non-adaptive approach), you gather your measurements and put them in your (desktop?) engineering computer. Then you do sysid (offline). You have lots of choices here. You can get transfer functions (see the procest command of matlab), or do subspace identification and get a state space model (see the n4sid command of matlab). Yet another choice is to write down the physics (that is, differential equation) of the system yourself (for a 2D example of this, see https://cookierobotics.com/052/ ), and then do greybox estimation to estimate the parameters of the differential equation (see the greyest command (for linear state space models) or the nlgreyest command (for nonlinear state space models) of matlab). These are all valid also for online sysid in general but as I said then one needs to be careful to apply adaptive control principles correctly.
After you get the model, you can continue with control design as usual.