Only One Engine Thrusting in SITL with Dual Engines

I am mentoring several students who created a FDM for a blended wing with two pusher motors. We have not been successful in getting both motors to provide thrust in SITL, and we want to simulate mixing of thrust vectoring and aerodynamic yaw in SITL. Is there a way to get this working? What do you rocommend?

Making sure that both simulated engines get correct setpoints.

If you want useful help you need to accurately describe relevant parts of your setup.

Thanks for the guidance. This aircraft operates fine with just one engine. When we change the configuration to dual engines, only one provides thrust. What parameter do we need to change in order for both engines to provide thrust?

Those necessary to drive the second motor and for your SITL software to know what signal to apply to the second motor, duh.

Now you are toying with me. When I connect the aircraft to Arduplane, I can either connect both motors to the same output or connect one to motor left and the other to motor right.

  • SERVOn_FUNCTION: Assigns the left and right motors to specific servo outputs (typically 73 for left, 74 for right).

  • KFF_RDDRMIX: Controls how much differential thrust is used to create yaw (or roll in hover). A starting value of around 0.1 is suggested for hover control.

  • RUDD_DT_GAIN: Determines the sensitivity of differential thrust to rudder input.

What other parameter do I need to change with SITL?

SITL some times has some quirks, but this isn’t one. I just tried a fresh plane setup in SITL and the only thing I did was change the default “throttle” output to “Throttle left” and added on servo 5 “throttle right”. I’ve launched the plane and both are working as expected.

I’m running a very recent beta of Mission Planner (I update it every week or so). And I’m using 4.5.7 in the sim.

What versions are you running? Would you mind posting the parameter file for us to look at?

I don’t think that nets you a twin engine model in Mission Planner’s pre-defined SITL. Rather, I would guess that the physics model is still single engine with ThrottleLeft as the simulated ESC signal. ThrottleRight is likely just a placebo, making you think you’re getting what you want.

If you want a true twin engine model, I think you have to build it from source. I do not have significant experience altering the models that way.

@tridge likely built the existing ones, and I think @Quadzilla has worked a bit with the physics simulation.

The physics model we have is with dual engines, and the SITL we are using is compiled from source. That said, we may have errored in integrating the physics model with SITL. When we integrate our physics model with X-plane, or Flight Gear, it operates as intended.

You’re deeper in the code than I am so I won’t argue one way or the other. The only observation on this I have, and you can see it in the screen shot, is the left/right motor outputs are not the same, suggesting to me it’s trying some kind of yaw control. Honestly I was expecting them to be identical when I ran it. From a parameter perspective it looks like it’s working. Physics… I agree you’re probably right.

Thanks for the guidance. It sounds like you are using the default plane physics model, and it is working fine. We are using a custom flight dynamics model for a high performance blended wing body aircraft. Perhaps integrating that into the SITL is where we made a mistake. Would you mind if I emailed you the FDM to see if it works with your SITL? I am compiling a new version of SITL this morning as the one that I was using was a bit old.

I don’t think I can help with that. I’m not set up to manage custom FDMs. I run simulations for procedural and configuration testing. A fresh install of MP will give you exactly what I’m running.

I think the place to start is to ensure that the expected motor outputs that you defined in source match the ones you’re applying via parameters in Mission Planner. I might guess that you accidentally misinterpreted a 0-indexed output scheme when looking at the 1-indexed parameter set (i.e., source code tends to start numbering things at 0, and our parameters tend to start numbering at 1).

Beyond that, I’m not much help, but I tagged a couple of folks above who might know better.

@Allister, AP always calculates all of the possible throttle outputs, so ThrottleLeft and ThrottleRight exist as “objects” in the background even on a single engine craft. If the default RUDD_DT_GAIN parameter is greater than zero, you’ll see some mixing.

1 Like

To make sure I understand: this means SITL will tell you if the configuration is working, but because the physics is based on a single motor, it won’t change the flight model.

More or less correct.

The canned simulations in Mission Planner are great for validating auto missions, experimenting with RC channel mixing (assuming you’ve connected a transmitter as a “joystick”), testing Lua scripts, etc. But if you want to modify hardware that has to be physically connected, you need to modify the model in source.

2 Likes