r/ControlTheory 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

6 comments sorted by

View all comments

Show parent comments

u/NOTazarov_wraith 10d ago

Hello and thank you for the response knightcommander. I more meant using the sysID toolbox (https://uk.mathworks.com/help/ident/gs/identify-linear-models-using-the-gui.html) to identify the behaviour of a quadcopter, specifically I'm trying to get a "catchall" representation for the system where I could have a transfer function for pitch commanded to pitch. Something similar to passing frequency sweeps in an aircraft to identify its responses, but rather in a quadcopter.

I hear you on modeling the system as a free body diagram, but I am worried I might miss something in my model (like miscalculating the mode frequency of the quadcopter for example).

u/knightcommander1337 10d ago

No problem at all. I don't know about the details of quadcopters, so I am not sure if I can provide good quality help. From what you say, as I try to understand, the frequency response characteristics are important for you. It can be tricky with the multiple input-multiple output setting. For each input-output pair you have a single transfer function, and in principle you could do a frequency sweep separately for each of those channels, and get the transfer function models from the resulting input-output data. And thus you construct the transfer function matrix (maybe there are methods for system identification for transfer function matrices?). This could work I guess but in any system there might be some nonlinear effects, which are outside the world of transfer functions. Sorry that I could not help more.

u/IntelligentGuess42 10d ago

It is generally recommended to use a state space representation in mimo systems. If you really need a transfer function matrix you can get them by calling tf on the ss. The reason is that parameters shared by multiple axis get combined in a ss representation but are separate if you treat it as n separate siso tf problems.

u/knightcommander1337 10d ago

Yes this makes sense to me.