Help with System ID mode

Hi,

I have been carefully reading the documentation for sysID mode operation with arducopter and this post is just for further understanding as i have limited knowledge in control theory.

I am flying with the following hardware setup: X500 V2 frame, with an FC Pixhawk 6X.
To test the mode i have set the following params:

  • SID_AXES = 10
  • SID_F_START = 0.05
  • SID_F_STOP = 15
  • SID_MAG = 0.7
  • SID_T_FADE_IN = 5
  • SID_T_FADE_OUT = 15
  • SID_T_REC = 130
    I have also set all integrator gain to 0 and the feedforward to zero. Setting these values to zeros meaning the controller is only depending only on P and D which that the target of the commanded value takes much more time to be reached (response is slower). I want to ask, would it be safe to set D as well to zero so that the reaction of the injected chirp to mixer is not damped/affected at all?

The other question is that when i set the parameters above and activated the sysID mode from Altitude Hold mode, I was expecting to see the drone rolling right and left (some sort of oscillation motion) but this did not occur. In fact the drone simply drifted away to the right side non stop. I managed to let it stop by switching back to alt hold.
Can anyone guide me about what do i need to change in the params such that I achieve this oscillation motion (like pitching/rolling forward and backward up until the frequency range is finished)?

Here is the flight log that i did where i did not achieve what i was expecting.

Thank you for your help

SID_MAG = 0.7 is very large for pitch/roll input directly into the mixer. The copter was trying to use 70% of the roll authority to roll to the side while PID was trying to compensate. I would start with much smaller values like 0.15 from the documentation.

what about the back and forward motion I am trying to achieve is this related to the sid mag value ?

Read the documentation and think what offsetting the input by 70% of its range does to the mixer.

how does the PID is compensating and I had the integrators with the feedforward off?

@DroneSys what is the purpose of gathering system ID mode data? Do you plan to develop a dynamics model of your aircraft or do you want to use it to tune your aircraft using the analytic tune tool?

I want to excite the frame to derive a model using the sysID data

You don’t need to use the SID_AXIS 10, 11, and 12 to do that. I use SID_AXIS 1, 2, and 3 for this. When using the other axis values (10, 11, and 12), the controller is fighting the inputs which can result in poor coherence for the relationship of input to output.

For multirotors, they are fairly uncoupled in their response, so using the values of 1, 2, and 3 does a good job. For helicopters, it becomes very difficult and requires no PID values in off axes so you can stay away from correlated responses between axes which causes problems when developing the model.

My recommendations for parameter values

  • SID_AXES = 1, 2, or 3
  • SID_F_START = 0.05 ->this is pretty low. You might be able to get away with 0.1 to capture the low frequency dynamics.
  • SID_F_STOP = 15
  • SID_MAG = 5
  • SID_T_FADE_IN = 5
  • SID_T_FADE_OUT = 1
  • SID_T_REC = 130
2 Likes

Thank you so much for your answer. I will give it a test some day next week and keep you posted if you’re interested.

Should I also consider removing the effect of control integrators and the feedforward? Also reducing P and D might be good. What do you think?

Hi again,

I am facing a weird reaction when I use the sysID mode with any SID_AXIS option. Basically i tested all axis for mixer and all axis for command input, and the drone reaction is climbing so fast vertically and I don’t know why. I checked the data and basically the frequency is not even reached to 0.3 because I am stopping it early since the drone is reacting weird.
Do you have an explanation why the drone is immediately climbing vertically once the mode is activated?

Thank you

What mode are you in prior to entering system id mode?

Do you lower the thottle to stop it from climbing? Do you realize that you have to control the aircraft while it is doing the sweep?

I fly first with Alt-hold and then activate sysID. I tested Mixer Roll and Roll input and both have the same reaction (drone climbing vertically)

I do lower the throttle and try to get the drone back, but i thought that any commands from me will interrupt the frequency injection. Am i right?

No that is not right. System ID mode requires the pilot to fly the aircraft while the inputs are being made by the autopilot. In all axes except the axis being swept, the pilot will make inputs to keep the aircraft stationary. For the axis being swept, the pilot will try to not make any inputs so as to not disturb the autopilot’s inputs. As the autopilot make the low frequency inputs at the start of the sweep, the aircraft will drift quite a bit but you need to let it drift. It should drift back and forth over one spot. If the aircraft continues to move away from you as the sweep progresses, use small slow inputs to slowly stop the drift while still allowing the autopilot to do the sweep.

You should not enter system ID from althold. You should enter system id from stabilize as that is the underlying mode of the system ID mode.

okay thanks alot, i guess my main mistake is entering the mode from Alt-hold. Ill test it next week. Thank you again!

1 Like