Set up of collective and throttle channels

Hi @ZvikaF,

Yes, I think Arducopter does that, but it might need some additional external sensors.

Thank you, very good advice !!

Thank you also for your interest in my project!! I am very glad to interact with passionate people here. :grinning:

Regards, Vlad

Hi Bill @bnsgeyer,

My helicopter flew with success this Sunday afternoon in Versoix Model Club (Geneva - Switzerland)! :smiley:

Certainly there is still a lot of work, especially the tuning, but I think an important step has been achieved. The helicopter was controllable, but a number of things were not OK:

  • The machine was very heavy so I needed to apply the maximum collective pitch to hover OGE (~10.4°)

  • The longitudinal CG was too much on the rear (the fuel tank is mounted at rear)

  • There were some mid-frequency roll/pitch coupled oscillations. I wonder if the rotor shaft might be slightly bent or rather the front structure supporting the INS is insufficiently rigid

After the 2 armings, I decided to remove the rear battery to lighten the machine and bring the CG forward (the 1 Ah LiPo buffer battery is enough for the test). The machine had a more healthier behavior, although I still felt-it quite heavy.

Corrective actions:

  • Stiffen the front by gluing the “L” profile and remove the intermediary black box (Adafrut box)
  • Remove the shaft and check the eccentricity on the bench drill with a comparator
  • Suppress the rear battery (I will measure the current to be sure that the front battery provides enough endurance)
  • Adjust the tracking (was a little bit out of track)

I didn’t had time to analyze yet the data, but I just took a look at the level of vibrations which I think is pretty decent. Below is a link on the logs:

https://1drv.ms/u/s!AgF38cSpviIRgadRXMSkkaICtnR4eQ?e=F7N1K5

Thank you again for your help! :grinning:

Regards, Vlad

PS: If you travel near Geneva - Switzerland, don’t hesitate to contact me (my mail is on github) to make a flight together with the Robin DR400 to the Mont Blanc or with the Cabri G2 over the Lake of Geneva and Gruyères! My friends from Aéroclub of Bellegarde Vouvray (LFHN - France), Heli Lausanne (LSGL - Switzerland) or Swiss Helicopter (LSGT - Gruyères) would also be very glad to know you!

Vlad,
Glad to here that you had a successful flight.

This is not good. You’ll need to either remove weight or increase rotor speed. I’ve flown a sport heli at heavier weights. You will have to be very careful coming out of forward flight. I had cases where experienced settling with power. The helicopter just starts descending as I was coming into a hover and in most cases would have to apply near full collective to keep from hitting the ground. I learned that I needed to bring in the collective early and slowly come to a hover when decelerating from forward flight. Ultimately I went to a 4 bladed rotor system to increase the rotor lifting capacity.

For tuning you’ll want to make your LOG_BITMASK 131071. This will give a high sample rate on all of the signals you want to look at for tuning. Plus it shows the contributions of the PID controllers too. Most of all it will allow you to see the vibrations from the rotor. It is important to get the vibrations in the control signals as low as possible.

I would hold off on this until you do a flight with the LOG_BITMASK I suggested. I’m not sure what you term as mid frequency oscillations. If they are less than 10 hz then it is most likely the lightly damped rotor. If it is higher than that then it could be the shaft or rotor balance. What is the rotor speed that you are flying.

no problem and thanks for the invitation! I will do that if I am ever in Switzerland.

So near and so far :slight_smile: I go frequently a bit to the north around Zurich :slight_smile:

Hi Bill @bnsgeyer,

I hope you are well? I don’t had yet the time to fly again, but in the meantime, I can provide some interesting info.

I removed (including the rear battery) some 295 grams! I also found a Thunder Tiger note reporting: “For advanced fliers, a good hovering RPM is around 1550, and a constant 1800 RPM in idle-up for 3-D aerobatics.” Maybe that for an already epoxy-reinforced blade root section, a 1850 RPM is OK?

Sorry, the term of “mid frequency” was inaccurate. What I observed was in fact that the helicopter fuselage was shaking around pitch but above all on roll axis, at about 3 Hz. The oscillation seemed to be coupled between X and Y.

I just made a quick analysis of the signals, but I will do it again with the LOG_BITMASK set to 131071 and with an improved IMU attachment (in progress).

One can see that the current log signal sampling rate is ≈ 1/(41000010−6) = 25 Hz:

Because of this low sample rate, frequency signals >25/2 Hz are currently missing, therefore one can not observe yet the vibrations from the rotor.

One can observe on the periodogram the fundamental oscillation frequency of ≈ 3 Hz and the first harmonic of ≈ 6 Hz:

AccX and AccY should be between are between -3 and +3 m/s², but for AccY this is far from being the case:

Below is a similar graph with Mission Planner with the same AccX and AccY signals superimposed:

One can see here a zoom on these signals and clearly observe the ≈ 3 Hz oscillation in the time domain:

See you soon! :grinning: :helicopter:

Vlad

Well then it sounds like it could be a rotor mode. Where in the recommended range for flybar weight do you have yours set? I think a lighter flybar weight is for stunt flying and a heavier weight is for pattern flying (more stability). If your rotor speed is low then that could contribute to the oscillation.

With this heavier weight you need to get to higher RPM. So the blades you are using are wood with an epoxy reinforced root? I don’t know if they are good for 1800 RPM. I would think so. It might be worth investing in carbon fiber blades.

Nice analysis on the oscillation.

Hi Bill @bnsgeyer,

Sorry for my delayed reply. I wanted to have some interesting thinks before replying you.

This weekend I made a Hall Current Sensor board for the BeagleBone Blue. It’s made with a SparkFun Current Sensor Breakout - ACS723. On the BeagleBone Blue, the ADC input voltage must be clamped at max. 1.8 V. For this purpose, I used a voltage divider and two MPC6002 operational amplifiers, as recommended by Prof. Derek Molloy in his “Exploring BeagleBone” book.

The first operational amplifier (the one on the right) is configured as a voltage follower and is supplied with 5V from the BeagleBone Blue. The Blues’s ADC reference voltage – which is 1.8 V – is connected to the amplifier input. The amplifier output is also 1.8 V, but this time it provides a strong enough current to supply the second amplifier (the one on the left). This second amplifier is also a voltage follower. The output from the divider (blue potentiometer) goes directly to the input of this second amplifier. Because this amplifier is supplied with 1.8 V, the output never exceeds 1.8 V, which fully protects the ADC input of the Blue:

After realizing that, I made a temporary assembly:

Then, I made the following power setup in the GCS:

I finally armed the flight controller and actuated all the controls simultaneously during five minutes and measured the electric consumed charge. By linearly extrapolating, the autonomy with a 1 A⋅h battery would be of about one hour (with a good safety margin of about 20%). This is largely sufficient and allows me to safely remove the rear battery!

Thunder Tiger do not specify any flybar tuning method. In the assembly manual, it’s just indicated to screw the paddles on the bar until the bar becomes visible through a hole. However, I think it’s possible to screw/unscrew the paddles slightly, which might change the moment of inertia and therefore the stability.

I have quite a few very good quality wood blades in stock. I reinforced the root with epoxy, as recommended by Thunder Tiger. One of my friends, Laurent Gras told me that because wood absorbs humidity, the tracking on this kind of blades changes between the morning and evening! :grinning: Meanwhile, I think they should do the trick on this vintage helicopter; thus I changed the governor set point to run at 1850 RPM.

Now the plan is:

  • Building a much more rigid front support and remove unnecessary elements,
  • Make a flight test with parameters you recommended me and collecting data before share-it with you.

Unfortunately, I also have my job, which doesn’t let me as much time as I would have liked for this exciting hobby project!

See you soon!! :grinning: :helicopter: Vlad

Hi Bill @bnsgeyer,

I hope you are well? I took a little time to move forward because I was quite busy with my job and other stuff.

During this time, I did the following things:

  • Changed the log configuration (as requested by you)
  • Increased governor speed to 1850 RPM
  • Reviewed the whole flight controller attachment, by stiffening and removing unnecessary elements (the BeagleBone Blue is now mounted on dedicated and fairly efficient damping system)
  • Recompiled the 4.0.5 flight controller and adding my code customization
  • Migrated the configuration from version 4.0.4 to 4.0.5
  • Migrated properties from 4.0.4 to 4.0.5

Last Saturday I went to the club and did three distinct hovers by registering data.

Very positive thing, once in the air, the machine no longer had these horrible 3 Hz oscillations. The vibrational behavior at 1850 RPM seems healthy (but some vibrations still persist when the machine is on ground). I increased the collective stick at about 90% of the stroke to maintain hover (without any noticeable RPM loss). Currently H_COL_MIN is -4 ° and H_COL_MAX +10.4 ° pitch. Therefore, I think that setting H_COL_MIN to -2 and H_COL_MAX at +12.4 ° pitch would be better.

I felt that the machine responded with some delay to my commands. Nevertheless, if well anticipated, the heli is controllable. However, the machine requires quite frequent corrections for a “stabilize” flight mode (of course, there was a bit of wind).

The bad surprise was a sudden loss of thrust at the end of the first flight. Fortunately, the machine was at only one meter above the ground and the vertical drop did not damage-it. I tried to cushion the fall with the collective, but I had the impression that the collective stick movement was not effective. After the fall, I tried to move all the controls, but only the tail rotor pitch was moving. Despite the fact that the motor interlock was OFF, I was unable to disarm the flight controller and switch OFF the engine. Fortunately, since the engine was idling, I was able to cut the fuel and therefore, the engine ended up by stopping.

I restarted the flight controller (without rebooting the Debian Linux), checked that the all controls are responsive again and continued two other hover flights with caution. A little fright nevertheless: a sudden yaw movement during the third flight (only one oscillation). Perhaps this is due to a momentary dysfunction of the gyro function of the flight contoller?

Anyway, I was happy to bring the machine home in good condition!! :slightly_smiling_face:

Do you have some time to take a look at the logs? I also included the configuration. Maybe you have some idea on the cause of this sudden loss of thrust, the yaw movement and maybe some suggestions for the future.

The files are downloadable from this OneDrive Link below: https://1drv.ms/u/s!AgF38cSpviIRgakfkw_cz_ei2OmoKw?e=wC0oeg

P.S.: After having taken a quick look to the logs, the second log is just an arming test done at ground, while the third log contains two consecutive flights.

Best regards, Vlad :helicopter: :wink:

Hi Vlad!

I looked at your first flight. It looks like you had a failsafe occur because your transmitter lost link with the aircraft. I’m not sure why it just shut down because it didn’t give any indication that it landed and it never disarmed like you said. So it makes sense that you didn’t have any control after it landed since it was in RTL flight mode. Which also explains why only the tail rotor worked because in RTL, the pilot can still control the yaw axis.

I think the vibration that you see on the ground may be due to your collective being too low on the bottom stop. -4 deg is pretty low. If you bring it up to -2 that would probably help some. You really should set up the harmonic notch filter. That would help clean up some of your control signals.

The other thing that would help a lot with control of the aircraft would be to add some I gain to pitch and roll. Make ATC_RAT_PIT_I and ATC_RAT_RLL_I equal to 0.1 and make ATC_RAT_PIT_ILMI and ATC_RAT_RLL_ILMI equal to 0.08. That will help the controller be able to hold the desired attitude instead of seeing a steady offset like we do now.

Hope that helps.
Regards,
Bill

Hello Bill @bnsgeyer,

I hope you’re doing well!!:slightly_smiling_face:

Since last autumn I put this project on standby mainly because of the cold weather. In the meantime, I did a turbine type rating on EC120B Colibri, made an approach training course for confined airspaces (required by France to land on the terrain of a friend), a bit of mountain flying near Gruyeres, and some nice robotics projects with my father, like a homemade EduMIP robot, etc.

Recently, I recompiled the flight controller to version 4.0.7 and reported the old parameters. Also, by following your recommendations, I tried to increase the logging rate beyond 25 Hz. Unfortunately, despite these changes, the logging frequency still remains at 25 Hz. This is probably because the logging implementation on Linux — and in particular on BeagleBone Blue — is performance limited.

However, I found in this tutorial the possibility to record an FFT of IMU signal sampled at a relatively high frequency (I presume at 400 Hz on the BeagleBone Blue). The FFT is processed by the flight controller and only data needed to draw the FFT graph are stored in ISBH and ISBD dataflash log messages.

Therefore, in order to collect data for the FFT graph, I set LOG_BITMASK to 32766 and INS_LOG_BAT_MASK = 1 and did some flight tests. Very interesting thing: by analyzing the data, one can see peaks at the frequency corresponding to the rotation rate of the rotor (at 31 Hz - 1860 RPM), and also at the second rotor harmonic (at 62 Hz):

It should be noted that, like suggested by you, the power spectral density analysis I did previously at 25 Hz was really inaccurate because the sample rates were too low.

Following this, I applied a harmonic notch filter by setting these parameters:

INS_HNTCH_ENABLE = 1
INS_HNTCH_REF = 0
INS_HNTCH_FREQ = 31
INS_HNTCH_BW = 10
INS_HNTCH_HMNCS = 3

Important thing, this time I set INS_LOG_BAT_OPT = 2, to let the flight controller process the FFT from the filtered data and not from the raw IMU data.

Note: I presume that the computation of VIBE messages (VibeX, VibeY and VibeZ) is done from filtered data, because I also have significant improvement on these.

The harmonic notch filter gave pretty good results! The helicopter’s behavior was this time a lot healthier. There are no more oscillations on roll and pitch:

So I was very satisfied, nevertheless, there is sill a phenomenon of hunting (rapid oscillations around the yaw axis).

To prevent this, I followed this excellent tuning guide where it’s recommended to gradually reduce ATC_ANG_YAW_P. So today I made three flights with different setups:

  1. ATC_ANG_YAW_P = 4.5 (landed, changed to 4.0 and took off without restarting the flight controller)
  2. ATC_ANG_YAW_P = 4.0 (restarting the flight controller before taking off)
  3. ATC_ANG_YAW_P = 3.5 (restarting the flight controller before taking off)

Unfortunately I have not seen any noticeable improvement between these flights. Here is the complete the parameters and the logs:

https://1drv.ms/u/s!AgF38cSpviIRgaxS69EMVSpD0Lpd0A?e=r2jXWG

Maybe you might have a look and kindly give me some tuning advice?

Best regards, Vlad :helicopter: :sunglasses:

P.S.:

  • In principle, there is no play in the linkage, binding of the linkage or any servo problem
  • A few days ago I also made some other flights where ATC_ANG_YAW_P was decreased by 0.1, from 4.5 to 3.5 (restarting the flight controller each time). Outside of short periods of troubles caused by a loose electrical contact on the servo signal, the behavior was quite similar. I have the logs of these flights, but these might be “polluted” by the problem of poor electrical contact.

@dorovl Vlad, Great to hear from you! Unfortunately I have been pretty busy and haven’t had a chance to look at your data. I will try to look at it over the weekend.

Yes, I agree that the harmonic notch filter does a great job cleaning up the control signals!

Hi Vlad,
I looked at your log. I’m sorry but I’m not sure what to recommend to improve the yaw tuning. There seems to be a lot of noise in the yaw rate signal. It looks like you didn’t have the Attitude_Fast item checked on the LOG_BITMASK parameter. This would help because it would provide data at 400 hz and could help isolate the cause of the vibration.

Sorry that I could be of more help.

V/R,
Bill

Hi Bill @bnsgeyer,

In order to solve the yow hunting problem, I have carefully inspected the rear rotor mechanism and discovered excessive backlash in the tail pitch control due to a plastic control link having excessive wear. In addition, by removing this part, I also discovered that one of the tail rotor grips had axial play. This was due to an unscrewed set screw on the tail pitch axis. Obviously, in the presence of oil and vibrations the blue Loctite was inefficient. Moreover, this mechanism which is known as fragile and prone to problems has been upgraded on the Raptor 30 v2, but unfortunately this machine is still a v1. Therefore, I changed the tail pitch control link, cleaned and degreased all the parts and sealed the tail rotor grips set screws with a much stronger green Loctite. I finally avoided any drop of oil. At the end, the mechanism was very accurate.

After setting the Attitude_Fast flag as recommended by you, I performed three armings with ATC_ANG_YAW_P set to 4.5, 4.0 and 3.5. I was very surprised: despite some small noise on the yaw, the helicopter was much stable! By gradually decreasing ATC_ANG_YAW_P, things seem to improve.

During the last arming (with ATC_ANG_YAW_P 3.5) I was quite happy with the helicopter controllability. :grinning: I decided to land and take off again, just to burn the remaining fuel. However, during the last flight, I had a bad surprise: while hovering at about 1.5 meters above ground, the helicopter started to descend a bit. I reacted by increasing the collective pitch stick and once the hover height reached again, the helicopter still continued to climb. :astonished:

I lowered the collective pitch, but without having any effect. I lowered the collective fully down this time, but despite this, the machine continued to climb! I thought about the risk of the machine going very high and then falling in a place where it could endanger people…

Therefore, I warned my friends to go away and disabled the motor interlock at approximately 10 meter height. The engine was put on idle immediately and the machine fell. When the machine approached the ground, I enabled back the interlock and gradually increased the collective pitch to maximum to cushion the fall. It seems that my cushioning technique was partially effective, as the rotor was not damaged: only the landing skids and the bottom of the frame were broken.

I think, the essential is that there are no physical injuries! Obviously, despite this mishap, we made some progress! :slightly_smiling_face: I tried to analyse the last arming (which has two consecutive flights). Below is my analysis:

According to my observations, around 16:18:42.023, the PWM value of channel 3 of RCIN temporarily fell below the FS_THR_VALUE (set here to 975 us):

The reason of this “glitch” is unknown at the moment, but it might be:

  • A temporary radio failure due to a poor battery contact
  • A temporary radio failure due to a software problem
  • A radio transmission jam
  • A receiver failure
  • A poor contact on the wire transporting the PWM signal from the receiver to the IBUS converter
  • A PWM to IBUS converter module failure
  • A flight controller’s processor overload
  • etc.

As a consequence, shortly before 16:18:42.223, the flight controller detected a throttle failsafe condition and immediately entered in RTL flight mode, according to the setup shown below:

Because the RTL is configured to return 15 meters above the take-off position, it would explain why, despite lowering the collective stick (channel 3 of RCIN in red) the signal sent to the collective pitch servo command (channel 3 of RCOUT in green) did not drop. One can also see the abrupt drop in throttle on RCOUT.C5 when I disabled the motor interlock:

I think that the following curative measure should be taken:

  • Check again and secure the electrical contact on the wire transporting the PWM signal from the receiver to the IBUS converter

  • As the throttle failsafe condition is likely to happen again and because the helicopter can’t fly yet autonomously, I think that the throttle failsafe function should be temporarily disabled.

At the moment, there is no flight mode setup other than “stabilize”: if the RTL flight mode is accidentally entered, there is no way to exit from this mode using the radio rotary button.

In the event you might have some time, please find on the following link the parameters and log file of the three armings: https://1drv.ms/u/s!AgF38cSpviIRgaxnPwDQl8XQrAZUWw?e=vaVzuA

V/R,
Vlad

Hi Vlad,

I know this is a reply to an old post, but I had a similar experience. In my case, I just started to tune an 800 when the receiver had a single packet loss, which caused a fail-safe situation. It obviously caught me completely off-guard as the helicopter ascended rapidly to the “desired” RTL position. Without understanding what was going on at that moment, I also engaged motor interlock and disengaged just before it hit the ground. I was fortunate enough to save the heli. The receiver clitch occurred again after which I stopped using the receiver. It was at that stage the new firmware on the FRSky R-XSR. Needles to say I stopped using Frsky receivers.

After the two incidents, I have trained myself to quickly change modes if anything unexpected happens to the craft while operating it.

Regards,
Stef

Val, I have enjoyed your communications with Bill. He has helped me with an unusual helicopter using the MiniPix controller with Mission Planner. After a lot of tuning, it flies perfectly. I am writing to you with a need and request. Your expertise, as shown in the texts, tells me you could solve a problem when converting the Thunder Tiger Innovators, of many years ago, to flybarless operation. I have done it, and they fly, but I had to make in-line servo amplifiers for each of the 4 servos. The main board of the Innovator has digital servo amps, we, I co not know where or how to use them. Where is the signal lead point? Where is the on-board BEC? Can you help. If you can, I’ll send you a complete Innovator with transmitter and some extras to work with. I can send pictures to your email. Ed Sweeney in Florida, USA aerocarv@aol.com