karla

  • *****
  • 629
Re: Plan to start a flybarless project
« Reply #15 on: April 30, 2017, 01:04:25 pm »
Why not just continue and call it Vbar 2.0?

Re: Plan to start a flybarless project
« Reply #16 on: April 30, 2017, 05:54:10 pm »
...Not sure about the name...
OpenBar sound like "heavy drinker", is that compatible with heli pilot ? :)
Thanks, I'll read that later. Probably not gonna do that until all features implemented.
OpenBar :P didn't realize. Anyone may want to propose one?

I think it's a nice joke, but to each his own.  :)

Re: Plan to start a flybarless project
« Reply #17 on: April 30, 2017, 09:38:27 pm »
I'm having issue adding more fields to the UAVObject.
The CC3D crashes at arming when adding a certain amount.
The CC3D completely resets and USB re-emulates.
Is it the limitation of CC3D? I definitely need to add more to UAVObject.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Plan to start a flybarless project
« Reply #18 on: April 30, 2017, 11:38:18 pm »
Try increasing PIOS_STABILIZATION_STACK_SIZE to 500
https://bitbucket.org/librepilot/librepilot/src/6b09e1a9dfbe0f1c60eae577b4dcd64234b2b507/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h?at=next&fileviewer=file-view-default#pios_config.h-175

Culprit can be PIOS_SYSTEM_STACK_SIZE also.

Optimize using int8 where float are not needed also.

Re: Plan to start a flybarless project
« Reply #19 on: May 01, 2017, 07:22:52 am »
Try increasing PIOS_STABILIZATION_STACK_SIZE to 500
https://bitbucket.org/librepilot/librepilot/src/6b09e1a9dfbe0f1c60eae577b4dcd64234b2b507/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h?at=next&fileviewer=file-view-default#pios_config.h-175

Culprit can be PIOS_SYSTEM_STACK_SIZE also.

Optimize using int8 where float are not needed also.
I realized to use DIAG_TASK to enable the stacksize count. The problem is now listed here.
1. After enable DIAG_TASK, the default PIOS_SYSTEM_STACK_SIZE 760 cannot even boot the system, until I enlarge to 900.
2. The task_info doesn't show stabilization, because that is a callbackscheduler
3. No matter how large I set PIOS_STABILIZATION_STACK_SIZE to (I tried 800), after arming, it shows a stack warning. I traced to the source code. callback stack overflow is the only place trigger the stack warning.
https://bitbucket.org/librepilot/librepilot/src/6b09e1a9dfbe0f1c60eae577b4dcd64234b2b507/flight/pios/common/pios_callbackscheduler.c?at=next&fileviewer=file-view-default#pios_callbackscheduler.c-381
And line 429
Should I concern this?

Re: Plan to start a flybarless project
« Reply #20 on: May 01, 2017, 07:28:16 am »
After I disable the TxPID module, the stack warning gone.
Could it be the TxPID module not claiming enough size?

Mateusz

  • *
  • 808
Re: Plan to start a flybarless project
« Reply #21 on: May 01, 2017, 08:20:59 am »
After I disable the TxPID module, the stack warning gone.
Could it be the TxPID module not claiming enough size?

It's likely. CC3D based on F103 has quite smaller SRAM compared to newer F303 or F405 targets. It might be the case that when you enable too many modules you run out of memory. I know for example that Autotune is not build on CC3D because of the memory limitation.

Re: Plan to start a flybarless project
« Reply #22 on: May 11, 2017, 05:07:28 am »
The baseline heli works out pretty good, but still a bit different.
Actually I learnt a lot in the past two weeks from old papers, recent papers, and mostly from a labmate who has a control background. I would like to test out some of the adaptive PID algorithms in the future. But now I just want to manually tune a "perfect" 450.
On one side, I recorded some sample data that can throw to matlab to estimate the physical model and do some simulation.
On the other side, I'm still trying to understand the algorithm inside vbar. As far as I can tell now, vbar uses a 2DOF PID algorithm plus saturation detection (anti-windup) plus some feedforwards at tail axis, I'll try figure out the parameters. (I think the same algorithm applies to other axes just need to adjust the numbers).
A 2DOF PID algorithm takes {kp,ki,kd,b,c}. My current guessing is that "b" is the control loop value in vbar; "c" is the flight style (robotic = high, smooth = low).
I'm still thinking (doing research) on how to automatically decide "b".
« Last Edit: May 11, 2017, 04:38:17 pm by gongtao0607 »

karla

  • *****
  • 629
Re: Plan to start a flybarless project
« Reply #23 on: May 11, 2017, 04:53:31 pm »
On the other side, I'm still trying to understand the algorithm inside vbar. As far as I can tell now, vbar uses a 2DOF PID algorithm plus saturation detection (anti-windup) plus some feedforwards at tail axis, I'll try figure out the parameters. (I think the same algorithm applies to other axes just need to adjust the numbers).
A 2DOF PID algorithm takes {kp,ki,kd,b,c}. My current guessing is that "b" is the control loop value in vbar; "c" is the flight style (robotic = high, smooth = low).
I'm still thinking (doing research) on how to automatically decide "b".

Personally I really prefer to fly with the Vbar stab mode but there is a lot of uncertainty to as to How it actually works, so I really love the research you are doing here!

Re: Plan to start a flybarless project
« Reply #24 on: May 21, 2017, 08:46:34 pm »
Thanks everyone for supporting. I'm heading Texas for a summer internship. I don't think I will be able to do any flight there under 100F best sunshine. I'll try pack my blackbox platform there to continue do analysis, and maybe do some UI part programming.
The 450 experiment will continue after summer.

lucag

  • *
  • 1
Re: Plan to start a flybarless project
« Reply #25 on: September 14, 2018, 01:35:03 am »
Hi gongtao0607,

Are you still working on this? I looked at the github repo, and it seems the most recent code is from last year. I'd love to pick it up some time, although perhaps on a bit more powerful hardware that the Atom.

Thanks,
—L.

Re: Plan to start a flybarless project
« Reply #26 on: September 15, 2018, 07:02:15 am »
I don't have a plan to continue now. Seems not many people interested gyros for heli anymore. I think the processing speed is not the issue (for Atom to run a 3-axis control algorithm), and the sensors are already enough for flybarless or even for rescue.
I realized I need much more control background knowledge and 3D maneuver practice to make a good flybarless unit. For now I don't have anything better than a normal PID tuned to a specific helicopter
If you are interested in making a flybarless controller. The blackbox I made may be helpful for you to analyze the control performance.