Hey guys,

Not sure if anyone remembers, but Craig and I were working on the fuzzy logic attitude controller. That project's going nicely, and we've got it controlling pitch and roll in the HIL simulation environment.

 

But we've run into a pretty big SNAFU. We were flying the stock setup, trying to get a good set of baseline parameters to feed into the HIL mode (so when we switch to fuzzy control, we'll have similar flight characteristics to PID).

 

We ended up setting the stabilize yaw constant a little too high when we weren't getting the tail movement we wanted, and it started oscillating. It twitched like that for about a second, then I lost all control, and most of the throttle. The thing fell out of the sky and landed hard (no damage the first time).

 

We tried it again, and had the same result, except that the heli wasn't at a very good attitude the second time. It struck the main blades, and we were out of commission until parts came in, about $80 poorer.

 

Looking closer testing the controls on the ground, it seems to lock up when wild movements are fed into the output. The whole system locks up for 3-5 seconds, then comes back.

 

When it locks up, everything seems to go to a neutral position, and throttle cuts, but not completely to zero (or so it seems).

 

Does anyone have an insight on this? Is there a safety built into the code in newer builds or something that locks it down when it starts going into oscillations? If so, how do I get rid of it? If not, what's going on?

 

For reference, the firmware was updated about a week or two ago, and I have generally been keeping up with the latest versions.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Alrighty! good progress!

    Looking at what the controller is doing, the stability controller is basically just setting how fast the system will allow the heli to turn. I've got it set at 5.0 now, and the heli is quite snappy.

    After that, standard PID tuning using the rate controller worked like a champion. I can't remember the values I ended up with, but I can post them tomorrow if anyone wants to try them on their rig (I run a TREX 450 Pro V2 3GX, with the APM 2.0 installed on the gyro tray behind the main rotor). The response is snappy, there's almost zero movement in the heading now, and it handles like a dream.

    I'll be starting autnomous trials tomorrow, and we'll be implementing the fuzzy logic controller VERY soon after that.

  • Looks like the Rate Yaw I component is set to zero for some reason.

    Question: When the system takes in stick movements to determine its desired heading, does the APM software interpret the control signal as a desired heading, or as a desired yaw rate?

    I assume it's a desired rate, since that would explain the need for an integral component to force convergence to zero error, but I wanted to make sure for the sake of knowing what I need to tune once and for all. I've been way too impatient getting this thing flying, and I'm costing myself too much money in parts.

  • Developer

    Looks like you found the solution pretty quickly with everyone help!  I also had a lot of brown-outs when I relied on the stock ESC's BEC.  I went with the castle creations Pro CC BEC Pro and all my power problems went away.  It has two outputs as well so you can easily provide one to the apm's front and one to the rear servos.

  • What is this 5V regulator you have between the 6V BEC and the APM?

    You might solve your problem for $0 if you just put the battery input direct in to the 5V BEC, and then use that to power the APM.  You just need to make sure that the 5V BEC can handle the input voltage.

    To be complete, I would suggest you power both the Rx and the APM from the 5V BEC, and keep the 6V just for the servos. Most Rx are quite brown-out tolerant, but why take the chance?

    This is how I have always done it, and I have never had any power supply problems, brown-outs, resets, or fly-aways.

    Oh, also wanted to ask, what's the deal with this Fuzzy Logic you're talking about?

  • This one has always worked well for me, plus it's cheaper.

  • I think Roberts right.  Are you powering your board with the BEC from one ESC?  Tail servos are current hogs.  

  • Uh, are you sure you're not browning out the board?  What is your power supply?  I have an independent supply for the APM, the servos are on a completely seperate power bus with a BEC.

    I wonder, when you get these control lockups, it might be the activity of the servos is dropping the voltage and the APM resets.

    Or, I wonder if you're having a DCM blowup.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…