Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 13030_mugin_vtol #12706

Closed
wants to merge 4 commits into from
Closed

Create 13030_mugin_vtol #12706

wants to merge 4 commits into from

Conversation

BanthaRage
Copy link

@BanthaRage BanthaRage commented Aug 14, 2019

This is modified code from Fun Cub Quad code to use with a Mugin VTOL craft.

This is modified code from Fun Cub Quad code to use with a Mugin VTOL craft.
@cmic0
Copy link
Contributor

cmic0 commented Aug 15, 2019

@BanthaRage is this a WIP ? The default parameters values are identical to the Fun cub VTOL

FYI @sfuhrer @RomanBapst

Changed the amount of Mains in the code.  This is modified code to the Fun Cub Quad for a Mugin VTOL.  The parameters are the same but this opens up more Mains for additional control of the aircraft.  Also it references the new mixers that I have created.
@BanthaRage
Copy link
Author

The parameters are the same as the Fun Cub Quad but this code opens up more Mains for the Mugin VTOL. Also I reference the new mixers needed to make this work.

Changed the names of Main 5-7 and Aux 6.
@sfuhrer sfuhrer added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Aug 16, 2019
@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 16, 2019

@BanthaRage for which Mugin VTOL (size) is that new airframe config (plus the corresponding mixers in #12706 and #12707) for? And have already flown with it? It so, could you maybe share a log file such that we can see if your set parameters are good or if they need some further tuning?

@BanthaRage
Copy link
Author

@sfuhrer I will update the code with the proper documentation of the correct vehicle name. We are trying to apply this to a Mugin-4 4720mm. It has a VTOL system with a 2-stroke gas powered engine (hence why we need additional servos to control the gas engine). We are flying it today using the Fun Cub Quad configuration so I may be able to get you the log from today. We did a hover test yesterday and everything was looking good.

Added the full designation for the aircraft.
@BanthaRage
Copy link
Author

@sfuhrer here are the logs from our recent test flights.

https://drive.google.com/drive/folders/1WVb6QDg97H1rBPxdmU8tukfpqtS2YWSi?usp=sharing

@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 20, 2019

@BanthaRage thanks for sharing the flight log. The logs you shared with me only cover hover flights, is that correct? Also, I noticed that your hover motors were saturating during almost all of the flight..how was the flight performance? It doesn't look too good from the logs. Could it be that the vehicle is a bit too heavy for the hover motors/props you're using?

I'll also ping @RomanBapst. We're happy to help you to improve your setup/tuning, so reach out if you have any questions. I would prefer to have some better tuning and nicer flights before we merge this config.

@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 20, 2019

@BanthaRage other question: what do the servo1-3 you specify in the config file correspond to? I guess for the engine it's just the throttle and chocke, right? Do you have the fixed-wing gas engine actually running with px4 or were you till now more focused on the hovering?

@BanthaRage
Copy link
Author

BanthaRage commented Aug 26, 2019

@sfuhrer

@TachyonZZ is the lead on this project. He would be able to answer all of your questions.

@TachyonZZ
Copy link

@sfuhrer Thanks for looking at this. Those logs are hover tests with the craft tethered, however the motor saturation is an issue I believe is unrelated to the tethers. We are using T-Motor MN805-S KV-120s with 28" props in those logs. The craft's total weight was about 30kg. Another test with our second Mugin 4 used the same motors with 30" props and no tethers. Two logs from that: https://drive.google.com/open?id=1-ibLHcKg8YUtyLWVGlOB4agcx5PCr0K-

The motors are maxing out here as well, which is surprising as I don't believe that was commanded and the intent was just to get it a few feet off the ground. There was definitely still some stick left to go before max. It was not particularly stable.

I am concerned the ESCs are not properly calibrating. They are T Motor Flame 80A HV V2.0s and there is no clear guidance on calibrating them with a Pixhawk or PX4. We tried calibrating each one separately using the QGC interface (connecting one at a time to the servo rail) but I'm not sure we are getting a good calibration. The manufacture said the pwm range for the ESC is 1000-2000 us, which is set in the params.

We are using the Herelink GCS, which is turning out to be not great for this configuration. The sticks are spring loaded in all axis and that cannot be changed. Ultimately these craft are meant to be mostly autonomous so the Herelink may eventually work, but I'm considering going to a more conventional Taranis setup to get the craft properly tuned then switching back to the Herelink.

On paper this motor and ESC combo should be more than enough to lift the craft. That said, something isn't right and the hover doesn't seem stable enough on either craft to move on to transition and forward flight.

To answer your question about the servo outputs... We put the control surfaces (2 ailerons, rudder, elevator) on the mains and gas throttle, choke and gas motor kill switch on the auxs.

Any insight you can provide would be much appreciated. We are new to PX4 and these Mugins have been quite challenging to configure properly. Thanks for your help.

@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 28, 2019

@TachyonZZ
I've taken a look at the new flight logs you provided. Here a couple of things that I see:

  • The magnetometer readings are disturbed a lot by the current for the hovering motors. Here's the plot:
    image
    The magnetic norm should be about factor 3 smaller. Do you have the compass (I guess you're using one that's together with the GPS) closer than 10cm to some power cables? Then put more distance in between.
  • Motors 1 and 2 (front right, rear left) seem to be saturated very often, so there seems to be some yaw control authority problem.
    image
    Can you check if all your motors are slightly tilted towards the outside (i.e. rotated some degrees around positive x axis for motors 1 and 4, negative for 2.3). And also that they're turning in this direction:
    image
  • You need much more than half throttle to lift off. Your motors/props seem to be decent for this size of vehicle, should only need about half throttle to life up. So there for me clearly is some hardware problem. Are you sure that your battery provides enough power? And could you maybe try some flights with a lighter setup, e.g. with a removed fixed-wing motor?
  • ESC calibration shouldn't be a big thing, the one from QGC should work for all of them at the same time. What it does is giving 2000us, then you have to plug in the battery, and when you done that it goes to 1000us. AfsIk this is the same procedure for all ESC. You could do the same with a normal RC receiver/transmitter: Connect the ESC to the throttle port on the receiver, go to full throttle, connect the battery, go to min throttle, done.
  • Yes, a taranis for some initial testing is probably the way to go. We do the same.

@TachyonZZ
Copy link

@sfuhrer
Thanks for your analysis of the logs. I've got another one here and a video that corresponds to it. We moved the flight computer forward about 22cm and implemented some other magnetic interference mitigation and got the mag interference down considerably.

The battery is a 12s 12,000mAh that claims to be capable of 100c discharging, so it ought to support max performance of our motor/prop combination.

We also remounted all of the motors and put a combination of silicon and foam tape under them to help with vibration.

We removed the wings for this test which amounts to about 4kg of mass total.

The craft tried to pitch over forward upon reaching about half throttle as can be seen in the video. The logs indicate it sensed an aft pitching moment that it was responding to. In the 3d view of the online log viewer the behavior matches the video nearly identically.

Couple of theories... We did not apply any offset correction in the firmware when we relocated the FC. Previously It was sitting atop the forward end of the fuel tank, right on the CG, for this test it was moved forward 22cm and also down 13cm to the floor of the craft. I did not think this could cause such a miscalculation of rotation but perhaps I was wrong. In my experience with smaller quads FC/CG co location is wise, but being off by 10% or so just increases the FCs workload but it should figure it out. Am I thinking about this incorrectly with a very large craft?

Another theory is that the IMUs are physically damaged by running the gas motor during testing with the craft clamped down. The vibration in during these static tests is tremendous, and I believe our damping for the FC is woefully inadequate. Obviously the gas motor was not running during this test however that flight controller had endured about a half hour of violent vibration during gas motor run up tuning. We've got several spare Cube Blacks to test this.

If you wouldn't mind taking a look at this log and the video, (as well as the 3d video created by the log) we'd really appreciate it.

Thanks again

https://drive.google.com/open?id=1mVZpz0eI8lVU-fcZZEVmAyQ-wBOpz43S

@sfuhrer
Copy link
Contributor

sfuhrer commented Sep 3, 2019

@TachyonZZ
Sorry for your crash, hope there was not too much damage.

About your two theories: The position of the FC shouldn't be too much of a problem, plus you can change the parameters EKF2_IMU_POS_[X,Y,Z] to account for it. And to test if the FC is damaged I guess replacing wouldn't be a bad thing.

What I've seen:

  • the gyro noise is tremendous. As you have very big and slow spinning props, I would reduce the cutoff frequency for the filter --> set MC_DTERM_CUTOFF and IMU_GYRO_CUTOFF to 20 Hz each
  • the tuning of the rate loops is maybe too loose, make it more aggressive
  • increase the time constants of the attitude loop to make it less aggressive and thus to account for the mugins size compared to the Funcub or a default multicopter. So MC_PITCH_P, MC_ROLL_P, MC_YAW_P

Also consider to improve the mounting of the FC to add some vibration damping. I'm not an expert on this though. How is it mounted now? Maybe a picture would help.

Maybe it's best if you start with the parameter settings from the next biggest VTOL config there is on PX4, which is the Babyshark (12kg MTOW). https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/airframes/13014_vtol_babyshark

Keep me posted of your progress!

@stale
Copy link

stale bot commented Dec 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants