Here is a video that describes how to use the analytic tuning tool to tune your helicopter. This only covers tuning the pitch and roll axes. The yaw axis is tuned similar to the multirotor pitch and roll axes which is described in Leonard’s video.
This describes the basic tune. There are other techniques that involve using the PID notches that will provide a better tune. But just want to get folks started using the tool and asking questions.
I see the following statement in the System ID Mode wiki:
“This process is mostly independent of the vehicle PID tuning and can be performed in an un-tuned vehicle. But the tune must be stable enough to fly the vehicle safely. So the Tuning Process Instructions must be first followed step-by-step but the autotune step can be skipped.”
Do you recommend that we use analytic tuning with System ID Mode in lieu of Autotune or in addition to Autotune?
If we skip autotuning, I’m guessing we would use initial tuning parameters, but are there specific SID_ values or other parameter settings you would recommend for tuning our helicopters by this method?
Hi Mike,
The section of the wiki from which you took this quote comes from identifying a dynamics model. That is a little different from what you are doing for tuning but the comment regarding that the tune must be stable enough to fly the vehicle safely does apply in using the sysID mode in general.
Yes, you can use the analytic tune web tool with the system id mode data in lieu of autotune. But again you must be able to safely fly the aircraft with the current tune.
You could use the default tune or whatever your current tune is. Or you can start with the initial tune parameters that are recommended in the wiki. However, I would recommend that before starting to analytically tune with the web tool that you zero your Rate P and Rate D like I did in the video. It will make it easier to follow along with my video.
Regarding the SID values, for most RC sport helicopters you could use the following
SID_AXIS 1-Roll, 2 - Pitch, 3 - Yaw
SID_START_HZ 0.2
SID_STOP_HZ 20
SID_MAGNITUDE 5
SID_T_FADE_IN 5
SID_T_FADE_OUT 1
SID_T_REC 90
My only experience has been with Autotune flights which is described well in the wiki, so I’ve got a number of questions.
Can you give us some details on how we should conduct the System ID flights?
Under “System ID Data Collection” it states "The data collection is initiated by switching to the System ID mode. Each time the mode is changed to the System ID flight mode a new data collection is initiated.
Would we do one flight for each of the SID_AXIS, and switch to the System ID mode only once?
In the TUNE parameter, I only see Sys ID Magnitude, so there wouldn’t be a way to change axis by switch, correct?
I’m not sure how long the “chirp” is, but based on the FADE_IN and FADE_OUT times, it appears that this method would be much faster than Autotune, which would be great…especially with minimizing drift.
After conducting the flight, would we need to keep our FLTMODE in SystemID (25), land, and disarm in that mode, as in Autotune, to retain the data, or would that not matter?
I haven’t tried it on a heli yet (waiting for weather), but on a multi rotor it was under 2 minutes. Maybe 1.5.
Once the run is done you can switch to any mode you want. SysID doesn’t save any settings, it’s only recording data for processing later. You will get a GCS/Yaapu message that the sysid run is finished.
I’m also wondering if there are any other similarities to Autotune, such as if we can’t make collective or other inputs during the run to help with altitude or drifting, or if we need to be in ALTHOLD before switching into SysID.
I’m still learning the tool myself so I don’t have a lot of experience, but when I tried it it felt like it was flying in stabilized mode. I held in some slight pitch inputs (while testing roll) so it didn’t drift too far and that didn’t seem to have significant impact on the data. Obviously trying to keep the inputs to a minimum.
I first switched from loiter but the throttle change caught me off guard the first time, so when I tried again I went from stabilized just so there were no surprises.
Sure. What I normally do is set up my SID parameters as I have indicated in my previous post. You can start with which ever axis you desire.
Set the SID_AXIS parameter before arming the aircraft.
Arm aircraft, engage rotor, and take off
Since System ID is based on the Stabilize flight mode, I would recommend being in stabilize prior to switching to System ID.
Once in a steady hover in a clear space, set system ID mode.
The aircraft will make inputs on top of your stick inputs (this is totally different from autotune where it stops tuning if you make an input). So you need to continue to fly the aircraft while it is sweeping the desired axis. You can make the corrections you need to hold a steady hover on all of the axes not being swept. For the axis that is being swept, make very slow small inputs to correct for average drift. this means as the aircraft is drifting back and forth along the axis being swept, if the center point of the oscillation starts to move in one direction then make small inputs and you may have to hold that input to keep the aircraft from drifting in one direction.
after the system ID mode completes the chirp (use a stop watch or something to know when the 90 seconds is up), switch back to Stabilize or any mode you choose to land
if you have enough battery, you can change the SID_AXIS and do another flight.
Yes. You should land and disarm. Change the System ID mode SID_AXIS and then do another flight. There is no way to change the SID_AXIS parameter with a switch.
No. Do not land and disarm in System ID mode. You should NEVER perform landings and takeoffs in system ID mode.
Allister, yes I suppose you could do it in Lua. You need to make sure the chirp completes. I would switch out of system ID mode, change the SID_AXIS through the Lua and then switch back into system ID mode.
Set a 3-pos aux switch to script 1 (300).
Low is recovery roll, mid is recovery pitch, and high is recovery yaw.
The script does an initial check to make sure that SID_AXIS isn’t 0, assuming that if you’ve set this to something other than 0 you’ve probably made the other changes for this run.
If you move the switch while in SystemID mode you will get a warning message and the parameter will not change. Between SystemID runs you will need to switch to any other flight mode, change the position of the 3-pos switch, then re-enter SystemID to start the next run.
It’s pretty basic, and I’m still learning the in’s and out’s of Lua so I’d love any feedback. I’ve tested in the SITL and it seems to work.
I have not flown this script on a real machine yet. So be careful!!
For version 2, what would be more useful for you: One switch for axis, and a second switch for magnitude? Or still a single switch, but a separate magnitude set along with each axis?
You can set both the axis for each switch position, and the magnitude. On a single switch. Tested in SITL. The GCS message will identify the axis and the magnitude selected.
Can you guys help me understand if and when the magnitude would need to be adjusted to a different value from what @bnsgeyer recommended (SID_MAGNITUDE: 5)?
My limited experience with this:
If the oscillations during the test get too violent and you need to abort the run. I’m sure there’s a better mathematical answer but this is from the field.
When I tried the first time on a fully tuned quad with a very high Angle P (24?), the oscillations were so outrageous i wasn’t sure if the quad was going to flip or a motor was going to burn up. I had to turn the magnitude down to 3. It was still uncomfortable but I was able to get a data run. This was a good flying quad already so I didn’t expect this to be an issue.
I tried the same quad with default PIDs and default Angle P (4.5) and it was a non-event. The quad did the sweep and I could see & hear the oscillations, but it never got exciting.