MultiWii as CP Helicopter FBL (or just stabilization)?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

Idid some tests on my crappy Belt CP.
It seems to work god.
I updated the branch with this mod.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

The Smoothing settings is placed in MultiWii. tab

/Patrik

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by Hamburger »

I did add Gyro Smoothing for my FlyingWing (wmp+bma020) with [10, 10, 3] and it seems to really help.
The Wing is smallish 50cm wingspan foamie pusher, so sensors see a lot of noise.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

I tested it on a airplane.
On a foamie it removed massive jitter on the servos.. 8-)

/Patrik
Last edited by PatrikE on Tue Mar 06, 2012 10:17 pm, edited 1 time in total.

babak_ea
Posts: 1
Joined: Mon Feb 20, 2012 10:26 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by babak_ea »

PatrikE wrote:Idid some tests on my crappy Belt CP.
It seems to work god.
I updated the branch with this mod.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

The Smoothing settings is placed in MultiWii. tab

/Patrik


Hi
Thanks Patrik.
I Modify Gyro Mix On your Code For SJM Helicopter( 2 Servo front and 1 servo rear)
I Tested It On SJM Helicopter, That Install On 3 DOF (Pitch ,Roll,Yaw) bench. There are two Problems:

1- when start Rotation and increase Throttle, in Special position the Helicopter Has Vibration That It Feedback To Gyro and Increase Vibration. So, the P factor should Be Very low ( 1 or 2).

But in Multirotor The Vibration Was Very low. It didn't Have important Effect On Gyro.

2- Helicopter with flybar paddle Has weak Factor For Stabilizer System And Can Not Provide Strongly Force As Multirotor.

So According 1 & 2 The Stabilizer System on Helicopter with flybar Can Not effect Very Well, Do Correct This result?
Do Any one Test It With flybarless Heli?
Sorry For My Bad English
Babak.

leadfeather
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by leadfeather »

Patrik,

The way you have written the smoothing mod is neater than my code...I'm not a programmer.

Here is a video showing the difference in servo jitter with and without smoothing.

http://www.youtube.com/watch?v=MAQVesubv-Y

Here is the first real test flight with the MultiWii, Flybarless 450 conversion.

http://www.youtube.com/watch?v=qfaKYuFnwLY

.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

Hi leadfeather,

Nice to see..
Was this tests made with the code from my branch?

/Patrik

leadfeather
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by leadfeather »

I used the code I had written, I had some help with the syntax.

For the helicopter swash servos I had to use a lot of smoothing... a factor of 60 to get it working well. Because of the large numbers involved, it was recommended that some code was added to avoid numeric overflow. If you like, I can post the smoothing code I used in a couple of day after I get home.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by crashlander »

leadfeather wrote:I used the code I had written, I had some help with the syntax.

For the helicopter swash servos I had to use a lot of smoothing... a factor of 60 to get it working well. Because of the large numbers involved, it was recommended that some code was added to avoid numeric overflow. If you like, I can post the smoothing code I used in a couple of day after I get home.


Please submit the smoothing code!
I still have not painted the wall hit by the rotor blade from my first Multiwii to HK450 flybareless test. :D

Regards
Andrej

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

The code in the branch contains the smoothing.
And can be configured in the ConfigTab.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

Leadfeathers smoothing can be found here.
http://www.rcgroups.com/forums/showpost.php?p=20769728&postcount=35

leadfeather
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by leadfeather »

Patrick,

That code of mine that you've linked isn't up to date with the changes to avoid numeric overflow. I'll be home on Thursday and I can get to the computer that has my code. I'll post then.

leadfeather
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by leadfeather »

Here is the smoothing code I'm currently using. It has some int32 (provided by timecop of rcgroups) stuff added to avoid numeric overflow. The red shows the changes I've made to the IMU tab of the code.

static int16_t gyroYawSmooth = 0;
static int16_t gyroRollSmooth = 0;
static int16_t gyroPitchSmooth = 0;


#if defined(TRI) || defined(VTOL_TAIL)

#define gyrorRollSmooth
#define gyrorPitchSmooth


// gyroData[YAW] = (gyroYawSmooth*2+gyroData[YAW]+1)/3;
gyroData[YAW] = (int16_t) ( ( (int32_t)((int32_t)gyroYawSmooth * 6)+gyroData[YAW]+1 ) / 7);
gyroYawSmooth = gyroData[YAW];
//gyroData[ROLL] = (gyroRollSmooth*59+gyroData[ROLL]+1)/60;
gyroData[ROLL] = (int16_t) ( ( (int32_t)((int32_t)gyroRollSmooth * 60)+gyroData[ROLL]+1 ) / 61);
gyroRollSmooth = gyroData[ROLL];
//gyroData[PITCH] = (gyroPitchSmooth*59+gyroData[PITCH]+1)/60;
gyroData[PITCH] = (int16_t) ( ( (int32_t)((int32_t)gyroPitchSmooth * 60)+gyroData[PITCH]+1 ) / 61);
gyroPitchSmooth = gyroData[PITCH];

#endif

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

I have made a few cahanges in the HeliMode.
The servosettings in made same way as for Airplane in config.h.
But is using Max and Min for servotravel.

caall99
Posts: 3
Joined: Thu Jun 02, 2011 10:38 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by caall99 »

is this code mature enough for me to use the MultiWii controller on a Blade 400 3D with a flybarless head conversion? I am hoping for auto level capabilities as well from the accelerometers.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

It's fully flyable.
Yaw gyro have been reported to be unprecise.
But otherwise there's no strange behaviors as i know.

Hamburger have made some testflights with a converted 450.

caall99
Posts: 3
Joined: Thu Jun 02, 2011 10:38 pm

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by caall99 »

can i expect a level of stability and features comparable to a multirotor?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by PatrikE »

There's another thread about Helickoter integration with more info.
viewtopic.php?f=8&t=1562&start=40

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Post by Hamburger »

caall99 wrote:is this code mature enough for me to use the MultiWii controller on a Blade 400 3D with a flybarless head conversion?

That is something no one can answer but you.
I am hoping for auto level capabilities as well from the accelerometers.

it works for fbl heli for my two 325mm helis and yes, it gives level cap and whatever else MWii supplies (possibly no RTH with gps yet).

Follow Patrik's advice and link

Post Reply