Throttle Curve not Flat FW 4.1 RC4

@bnsgeyer I have been playing with the throtle curves and noted that if I set the H_RSC_THRCRV_0=0 and the remaining settings like H_RSC_THRCRV_25=60, H_RSC_THRCRV_50=60 and so on to make the curve flat:
image

, the rotor is doing the following:

It goes up and down when I go with the throtle up and down.
But if I set the H_RSC_THRCRV_0=60 then it becomes flat:
image

Flat 60,60,60,60,60

Almost Flat: 0,60,60,60,60

2 Likes

@Pedro_Claro the math behind the throttle curve function is a 5 point spline curve fit. So there will be some non linearity for a throttle curve that has the first point at zero and the rest at 60. Not sure what you are looking for.

What is the purpose of the first point at zero?

@Pedro_Claro I was just looking at this post again. Are you implying that the throttle curve in a previous version was not like this when the first point was set to zero? Please let me know if that is the case. I checked the spline math function and it hasn’t changed since I first wrote it 3 years ago.

Hello @bnsgeyer , I just figure out this issue while playing around with the Governor feature. I started mounting a new Helicopter with the FW4.1 so I never tryed a previous version. My idea to set the 1st =0 was to drop the head rotation when the throtle goes to zero (negative pitch), to avoid in a stress situation, the heli to hit the floor with power. This way I could engage the governor but at same time when pulling down the throttle stick slowly reduce the head speed. But seems this is not working properly and I cannot engage the governor in a good way, it gets out and in, its noticiable (we can ear it). In the mean time as an interim solution I decided to stay with the RC passthrough, so I rev up with the knob from the remote control (ch8), and @2400rpms pushing the pitch to the maximum 12degrees the rotor speed only drops 200rpms, is not perfect but its OK. Also I can adjust (revup/compensate) during the flight the battery sag.This Heli uses by standard a 6s battery, but I would like to reuse my 4s with more capacity, to switch batteries I need always to change the throtle curve to match the headspeed to 2400rpms, with the knob I can do it easily but manually. Ardupilot should have a parameter where we could input the desired headspeed without depending on a throttle curve, to use diferent battery types (3s,4s,6s) and the Governor would take care to keep that speed always without droping when pushing the pitch up. The throttle curve should be an abstract way to represent the rotor torque and not binding the engine rpms. When the throttle curve repesents engine rpms I cannot switch battery cell type. Thank you for your support!

So typically the first point of the throttle curve is set to achieve a rotor speed slightly lower than the governor engage RPM. So if your collective at min is -2 deg, then the throttle curve at 0% collective should be a number that achieves just under 2300 RPM. The second point in the throttle curve should raise the RPM slight above 2300 RPM to cause the governor to engage. The rest of the throttle curve can be set for roughly 2400 RPM but the governor will modify the output to keep the speed at 2400 RPM. So you need to conduct flight testing to ensure the throttle curve alone stays at roughly 2400 RPM for throttle curve points for 25%, 50%, 75% and 100% collective. You can’t just set a flat throttle curve. It doesn’t work that way.

So I think Chris does have a way that you can do this. Look at the H_RSC_GOV_TCGAIN. This allows you to scale the throttle curve. So you can adjust that so that it matches curve for the desired RPM and then change the H_RSC_GOV_SETPNT for that desired RPM. You’ll want to set your throttle curve for the highest rotor speed you would like to govern. Then you can reduce the TCGAIN and SETPNT to find the right setting for other rotor speeds.

If you want to work on that and code it up, I’d be happy to consider at it as a potential new governor :slight_smile:

My understanding is that you designed a closed loop Governor. But this governor is following the open loop throtlle curve as a percentage. My intention is not to change into different rpm setpoints, problem is: If I switch the battery with different voltage, it blews, the Governor disengages as the rpms are far to high from the setpoint rpms. Am I wrong with this fact? Maybe I am doing something wrong, please help me.

I have a lot of motivation to do it and would like to do it, but unfortunatly I’m not a SW eng. However, my contribution is to challenge the status quo :slight_smile: providing new ideas and help you by testing the beta and development versions. So my idea would be: When it revs up and engages the desired rpm it should give the warning that everything is ok to take off. If the rpm sensor fails it should not return to throtle curve, it should keep the value it was set during engagement and warn that the rpm sensor failed. Throttle curve gain is not the problem the problem is the H_RSC_GOV_RANGE that blows when I use a battery of different voltage, it also blows at the flight end or beginning, when the battery is too charged or discharged, forcing it to go back to the throttle curve open loop, which in my case does not work. Perhaps the simplest (not the most elegant) way to solve it, would be to put a parameter to bind the throttle curve to a specific battery cell 3s, 4s, 6s and another parameter that would automatically detect the new battery voltage, and to use the new found battery voltage as new input to modify the output (%) of the pre defined open loop throttle curve .
Thank you for the support.

Right. So you would change the TCGAIN for the battery you are using. Set the throttle curve based on the battery that requires the highest values. Then you can use the TCGAIN to scale down the curve based on your battery you are using.

No worries, I was kidding. But I will always entertain folks testing the code and finding issues or having suggestions to improve it.

This is a good suggestion. I think a message notifying the user of the aircraft ready for flight whether that means the rotor achieves desired RPM or the timer expires. You have to understand that not every aircraft knows its rotor speed so that is why the timer is used to estimate that. But it would be good to notify of reached runup complete or rotor governor engaged. Write up an issue on this in github please.

Ok. I don’t agree with this. If you are on the ground then maybe this would be ok but if you are airborne when the sensor fails then what you are suggesting could result in a crash due to rotor droop, especially with internal combustion engine aircraft. I realize that the throttle curve in electrics are a little more flat.

I find it odd that you run different # of cell batteries in your heli. I think your use case is very specific for the code to accommodate. I am working on a change to the code that would allow you to use the collective and throttle curve functionality of your transmitter and still maintain the safety of the code and autonomous modes. It would be similar to RSC passthrough but not be a true pass through. it would only passthrough once motor interlock is enbled while you are in stabilize or acro modes. Other than that, it would use the built-in RSC modes.

1 Like

I have several bateries similar sizes but with diffent # cells. I use them all for the planes and the only issue is the heli that must be tuned for 1 type only. I use now the RCS passthorugh in the transmitter knob, but would be nice that your new RSC passthrough would be able to engage the internal governor. The way i see it would be: the Throttle channel RC3 option sends the motor interlock when throttle goes up, I can adjust the rotor speed before take off in the transmitter knob, ex:set it to 2400rpm, this should engage the internal Governor, that is following the predefined throtle curve. This would be just perfect :smiley: ! This way I can switch to any battery kind and have the control of rotor speed.

Will do !

Thank you and wish you a nice day!

Hi Bill,
I saw today your new commit → "Tradheli: Using TX throttle and pitch curves for manual modes. " What happens if I am in manual mode (stabilize or acro) and switch to any Auto mode if I have a 4 cell like in the case above? Hipotetically I would be running in manual @ 2400 rpms but if switching to any auto mode it would drop dramatically, if prior the throttle curve would be set for a 6cell, right?

@Pedro_Claro yes you are correct. If you have the RSC throttle curve set for another battery pack size then the rotor speed would change to what it would be for the RSC throttle curve and the current battery pack size.

I also have a new governor PR. The new one is more robust to handling various rotor speeds with one throttle curve. Not sure if it can do what your asking but it would certainly be better and you would not need to use RSC passthrough mode.

Is this the correct branch 7600c2a ? I would like to compile and test it, any concerns?

I can build you a version that is based on 4.1.1. What you linked is not the governor.

yes, I see that is not the correct commit. That would be helpfull becasue I am new with the GitHub dont know exactly how to build that branch. If you can build a version on 4.1.1 for the MatekH743 that would serve well. Thank you!

So you want me to build the new governor PR? It will be based on 4.1.1. Here is the PR

Yes please! Or if you can guide me how I can clone this branch into the Cygwin that could work I think…

That’s ok. I got it. it was pretty easy to bring it into 4.1.1 from the PR branch. I’m gonna do a quick check of it tonight in real flight and then I will make the firmware available to you.

1 Like

@Pedro_Claro Here is the firmware for 4.1.1 with the new governor. I have it announcing the governor engaged as a critical message in the GCS so don’t be surprised. I have to investigate what is the right message type so that the pilot is informed. Would you rather it come up in red on the HUD or just a message in the message tab of Mission Planner? Let me know what you think. Oh here are the descriptions from the code on each parameter since they will not be populated in your version

H_GOV_CLDWN
AutoThrottle Cooldown Time in seconds
Will provide a fast idle for engine cooldown by raising the Ground Idle speed setting by 50% for the number of seconds the timer is set for. A setting of zero disables the fast idle. This feature will only apply after the governor and autothrottle have been engaged (throttle switch on and rotor RPM at least 100% of normal speed). At any time during fast idle, disarming will shut the engine down.

H_GOV_COMP
Governor Torque Compensator in percent
Adjusts the autothrottle governor torque compensator that determines how fast the governor will adjust the base torque reference to compensate for changes in density altitude. If RPM is low or high by more than 2-5 RPM, increase this setting by 1% at a time until the governor speed matches your RPM setting. Setting the compensator too high can result in surging and throttle “hunting”. Do not make large adjustments at one time

H_GOV_DROOP
Governor Droop Compensator in percent
AutoThrottle governor droop response under load, normal settings of 0-50%. Higher value is quicker response to large speed changes due to load but may cause surging. Adjust this to be as aggressive as possible without getting surging or RPM over-run when the governor responds to large load changes on the rotor system

H_GOV_FF
Governor Feedforward in percent
Feedforward governor gain to throttle response during sudden loading/unloading of the rotor system. If RPM drops excessively during full collective climb with the droop response set correctly, increase the governor feedforward.

H_GOV_RPM
Rotor RPM Setting
Main rotor RPM that governor maintains when engaged

H_GOV_TORQUE
Governor Torque Limiter
Adjusts the engine’s percentage of torque rise on autothrottle during ramp-up to governor speed. The torque rise will determine how fast the rotor speed will ramp up when rotor speed reaches 50% of the rotor RPM setting. The sequence of events engaging the governor is as follows: Throttle ramp time will engage the clutch and start the main rotor turning. The collective should be at feather pitch and the throttle curve set to provide at least 50% of normal RPM at feather pitch. The autothrottle torque limiter will automatically activate and start accelerating the main rotor. If the autothrottle consistently fails to accelerate the main rotor during ramp-in due to engine tune or other factors, then increase the torque limiter setting. NOTE: throttle ramp time and throttle curve should be tuned using MODE Throttle Curve before using MODE AutoThrottle

H_GOV_TORQUE is only used for the spool up to engage the governor. I would recommend starting at a lower number for the H_GOV_TORQUE. Maybe 10%. If your throttle curve is set low and it doesn’t quite get the RPM up to engage the gov. then you may consider raising this.

@bnsgeyer ,
I loaded your new governor but I have some issues in trying to engage. I have to use the ESC telemetry as RPM source, and the rate the ESC is providing the eRPMs is not stable enough, its floating ~80rpms. I think its too much to make it work. In fact the source is not direclty the ESC but instead the Harmonic Notch (which is getting the rpms from the ESC) , dont know if some valuable data is lost. To have directly the RPM being sourced by ESC telemetry only with the DEV version. Could you be so kind and create the MatekH743 bdshot and from the Dev? Good would be to have the Dev and the Dev+BDshot to compare the difference :slight_smile:
Anyway, I read your parameter description and this seems to be a great improvement for the Governor.

Well, for those guys who use the GCS to monitor maybe the red message in the HUD is OK, as its an important message that you will be always looking for. I use the Yapuu Lua script and can see the messages regarding the Governor engaged, upper and lower, on my case that is enough.

Cheers!

Here are the binaries you requested. This is 4.2-dev so use at your own risk.

MatekH743

MatekH743-bdshot

My PR did pass all checks so that provides some reassurance