How to make PI regulator for combustion engine idle

Hi,

I have a UAV helicopter with a weight of 200 kg and an internal combustion engine.
I am using the implemented governor in ardupilot.

The governor works great, but it won’t hold my idle RPM because sometimes it’s cold, sometimes the alternator recharges the battery. It’s difficult to set idle governor, for all conditions.

It would work as follows.
First, the engine would be started at a idle throttle position, and after about 10 seconds, the PI controller would be started, which would regulate the RPM to a idle RPM.

The working speeds would be switched to as standard, as is the case so far. The idle PI controller would kick back from a idle RPM.

I think this feature could be useful for all UAVs with a combustion engine.
I tried programming a LUA script, but I am unable to override the output to the servo governor.

Thank you

So am i right in assuming the existing governor function works well to maintain hover rpm snd during transition to forward flight etc as it is a closed feedback loop system but it is only applied above a certain rpm range and the idle speed is left as just an open loop unregulated throttle setting?

Is the gov function using head speed as the process variable or engine speed? If it was engine speed (like in traditional rc ic helicopters) then maybe the following.

May i suggest that instead of trying to create an additional pi controller for the idle speed, that instead you try to widen the rpm range of the existing gov code to allow it so also set and control the idle rpm with a setpoint.

It would just mean that once the engine was started the governor could be activated with an idle setpoint and then once you are ready you could raise the setpoint to normal operation rpm and fly.

Yeah, thank you. that’s a great idea, but it will mean changing the firmware.
Thus, adding a PI regulator is easier and more reliable.

Another thing that occurred to me would be to use H_RSC_IDLE as output from a custom PI regulator. But I’m not sure if there won’t be problems with the instability of the main loop or with the constant overwriting of the variable in memory. I’m not sure how to make an ideal solution this way

Petr,
If you are partner, bring it up with the devs supporting the partner program. They can help you find the best solution. I have worked quite bit with @ferrosan on the internal governor and what you’re asking would be a significant rework. There may be options for specialized firmware for your company or maybe using Lua. Things to explore with our devs

2 Likes

Bill, my partner program is in process. You are right that it will probably be the best solution.

2 Likes

Hi, are you targeting main rotor rpm or motor rpm with the current governor?
Something I did in the past (just for my gassers-custom fw) has been to change the behavior of H_RSC_IDLE from being a parameter to be a variable value (in a parametrized range- idle_min and idle_max).
Then use an aux channel (like rotary-pot) to adjust engine idle on the go when needed (like for starting and warming up).
Probably an I-term loop would do the job as idle control.
Do you have a servo-clutch or automatic clutch on the gearbox?

I’m curious how you address this now with standard firmware?

Currently, governor is doing an excellent job. We are using two stroke engine.

We target main rotor RPM.(1056 RPM)

Probably an I-term loop would do the job as idle control.

Yes, something like that should solve my problem.

I have freewheeling clutch. This clutch is already engaged during idle rpm.

I don’t anymore, sold the Vario Benzin few weeks ago Lol.
Anyway I just set the Idle so that with “cold” engine I get a stable -higher- revs. I have now an old radikal G20 where I can test this stuff.

1 Like

Great, thanks for the info. So if my understanding is correct the engine and rotor are always coupled together- apart from autorotation case- correct?

My RPM sensors just arrived yesterday so perhaps in the next few weeks I’ll be asking you more about that idle setup on the Vario Benzin.

1 Like

You are correct.
I can’t raise the idle speed because then the governor doesn’t work properly with low loads coll=0 at working RPM.
I assume, there is a minimum offset in the regulator that the regulator maintains between idle rpm throttle position and working rpm throttle position.

Hi @Peta
I finally had some time to focus on this. Today I tested outside and took a video of how it works to see if this meet what you are looking for.
In this implementation you can choose which rpm source to use for controlling idle (i.e. main rotor -as in your case- or motor rpm - as in my case), then you have the following parameters to setup the function:
image

This is a short video of the testing: on the simulator using main rotor rpm and real world on my gasser where I’m using motor rpm:

4 Likes

Hi @Ferrosan

I think that’s a perfect solution to my problem. How can we implement this feature?

I run this on a custom compiled version of AC4.4.2 . I’m now trying to implement the logic through a script. I’d prefer to give you a script so you don’t have to re-flash your FC.

Any luck with making the idle adjustment via a script? I did some test runs with the Vario Benzin today and I can see this idle level is going to be a struggle in my climate. Ideally, I’d like to adjust H_RSC_IDLE with a slider on my radio. Or even a 3-pos switch for low, mid, and high idle could work.

Hi @Allister , yes, it works. For having it on a slider (instead of automatic rpm targeting) I need a little mod to the script. Will do it tonight and then we can discuss/test.

2 Likes

Work wery well for my application. We are fine-tuning the details with @Ferrosan .
I used collective as “load” for the engine.

1 Like

Hi everyone.
Yesterday I tried the new luascript for idling motor control from Ferruccio. It works exactly as I need it to for our 2-stroke 2-cylinder engine. The idling PI controller is easy to tune and works in a relatively wide operating range. The response to the load is satisfactory. The transition between idle speed and working speed is very well handled. I hope it will serve other members of the community! Thank you @Ferrosan

2 Likes