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

Check attitude control integrator resets #668

Closed
LorenzMeier opened this issue Feb 14, 2014 · 4 comments
Closed

Check attitude control integrator resets #668

LorenzMeier opened this issue Feb 14, 2014 · 4 comments

Comments

@LorenzMeier
Copy link
Member

Based on personal flight experience and user reports we might want to improve the integrator resets / anti-windup on the multicopter attitude control. Essentially we need to cover these cases:

  • If the controller output already reaches its limit based on the output of the P and D parts, the I part should not integrate (anti-windup)
  • If the output of the I controller reaches a certain absolute limit, it should stop to integrate. E.g. we don't want to have more than 0.3 (on a -1..1 scale) due to the I-term so that I cannot completely govern the P term
  • If we know the system can't be moving, we should not integrate. For a multicopter throttle < 20%-25% is a very good indicator that we can't be moving and should not be integrating.

These guards may or may not be present, but we should make sure that all three are effective.

@DrTon
Copy link
Contributor

DrTon commented Feb 14, 2014

Yes, I need to think more about AUW. Already implemented:

  • If full output is more than -1/1 don't integrate
  • If |full output| > throttle (will result saturation after mixing) don't integrate

@LorenzMeier
Copy link
Member Author

The do-not-integrate-on-low-throttle part is probably the essential one we should add as soon as possible for roll, pitch and yaw. The position controller should also not integrate in that state.

@DrTon
Copy link
Contributor

DrTon commented Feb 16, 2014

Just reviewed my code, already imlemented, but hardcoded values maybe need tuning:

It's not clear for me what can we improve here. Maybe replace full output by P+D? I can increase min throttle from 0.1 to 0.2 and decrease max integral from 0.5 to 0.3.

@DrTon
Copy link
Contributor

DrTon commented Feb 17, 2014

This commit may help:
7d80f05

PX4BuildBot pushed a commit that referenced this issue Jul 7, 2018
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase
 - PX4/NuttX@122f673

Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (dec0387)
PX4/NuttX@d5c12b2...122f673

122f673 (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt
dc6a926 [PX4: REJECTED] cstdint fix
37fc336 [PX4: REJECTED] add math.h
506547a [PX4: WIP] Jenkinsfile
078fd78 (origin/master) Merged in raiden00/nuttx (pull request #669)
8416d9a Merged in raiden00/nuttx (pull request #668)
3cd1ccf configs/viewtool-stm32f107/tcpblaster: Configuration modified to use the low-priority work queue.  Actually ALL network configuration should be modified to use the low priority work queue.  It is inappropriate to be performing network operations on the high priority work queue.
427b3b8 Squashed commit of the following:
75cc19e net/tcp: Fix a deadlock condition that can occur when (1) all network logic runs on a single work queue, (1) TCP write buffering is enabled, and (2) we run out of IOBs.  In this case, the TCP write buffering logic was blocking on iob_alloc() with the network locked.  Since the network was locked, the device driver polls that would provide take the write buffer data and release the IOBs could not execute.  This fixes the problem by unlocking the network lock while waiting for the IOBs.
23a8af2 Trivial update to some comments.

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase
 - PX4/NuttX-apps@444ee16

Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (dec0387)
PX4/NuttX-apps@36806ba...444ee16

444ee16 (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch
e66470d (origin/master) Merged in raiden00/apps (pull request #143)
db77b1e apps/examples/tcpblaster:  Fix an error in time calculation.
19b8a52 apps/examples/tcpblaster/tcpblaster_server.c:  Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time.
749eccb Squashed commit of the following:
4d8b8fa apps/netutils/dhcpc:  Activates BINDTODEVICE if available, and break up some long lines
0abe341 Merged in raiden00/apps (pull request #142)
3403b1b apps/nshlib/README.txt:  Clarify arguments to the mkrd command.
abcb66c Remove apps/interpreters/micropthon.  There are several reasons for this.  (1) the current version 1.3.8 is very old and no one is supporting it.  (2) the port only includes the core micropython logic and none of the Python libraries.  As such it is useless in any real application.  (3) There have recently been compile failures reported.  It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files.  See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error.  With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
36d6348 apps/nslib:  Try to eliminate and uninitialized variable warning.
PX4BuildBot pushed a commit that referenced this issue Jul 7, 2018
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase
 - PX4/NuttX@e61ee7d

Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (dec0387)
PX4/NuttX@d5c12b2...e61ee7d

e61ee7d (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt
5f74d4c [PX4: REJECTED] cstdint fix
79ae4c6 [PX4: REJECTED] add math.h
7aea643 [PX4: WIP] Jenkinsfile
a764e4a (origin/master)  drivers/leds/pca9635pw.c configs/stm32f4discovery/src/stm32_pca9635.c: Fix pca9635pw LED driver compilation
1450c0c arch/arm/src/stm32f7/stm32_sdmmc.c:  Fix some missing right parentheses.
6571d4f Update some comments.
078fd78 Merged in raiden00/nuttx (pull request #669)
8416d9a Merged in raiden00/nuttx (pull request #668)
3cd1ccf configs/viewtool-stm32f107/tcpblaster: Configuration modified to use the low-priority work queue.  Actually ALL network configuration should be modified to use the low priority work queue.  It is inappropriate to be performing network operations on the high priority work queue.

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase
 - PX4/NuttX-apps@444ee16

Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (dec0387)
PX4/NuttX-apps@36806ba...444ee16

444ee16 (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch
e66470d (origin/master) Merged in raiden00/apps (pull request #143)
db77b1e apps/examples/tcpblaster:  Fix an error in time calculation.
19b8a52 apps/examples/tcpblaster/tcpblaster_server.c:  Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time.
749eccb Squashed commit of the following:
4d8b8fa apps/netutils/dhcpc:  Activates BINDTODEVICE if available, and break up some long lines
0abe341 Merged in raiden00/apps (pull request #142)
3403b1b apps/nshlib/README.txt:  Clarify arguments to the mkrd command.
abcb66c Remove apps/interpreters/micropthon.  There are several reasons for this.  (1) the current version 1.3.8 is very old and no one is supporting it.  (2) the port only includes the core micropython logic and none of the Python libraries.  As such it is useless in any real application.  (3) There have recently been compile failures reported.  It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files.  See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error.  With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
36d6348 apps/nslib:  Try to eliminate and uninitialized variable warning.
PX4BuildBot added a commit that referenced this issue Mar 31, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@92eae74

Changes from PX4/NuttX (PX4/NuttX@b902d4c) in current PX4/master (3bcd8c6)
PX4/NuttX@b902d4c...92eae74

92eae74 (HEAD, origin/master) drivers/rwbuffer.c:  Back out unfinished changes
997d4fa Check return from nxsem_wait_uninterruptible This commit is only for those files under drivers/1wire, drivers/bch, drivers/can and drivers/mmcsd.
986e594 Check return from nxsem_wait_initialize()
836fef3 arch/arm: include chip.h in up_checkstack.c/up_initialize.c (#668)
5b74974 Check return from nxsem_wait_initialize()
7f510a6 tools/nxstyle.c:  Add fixedmath.h defines to white-listed prefixes
c009927 Appease nxstyle complaints
4ddb457 Fix a typo in comments
dba6f42 CI: Change the workflow name for build.yml
5e93ea5 CI: rename main.yml to build.yml

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@595c72b

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (3bcd8c6)
PX4/NuttX-apps@91b6ad6...595c72b

595c72b3 (HEAD -> master, origin/master) ping/ping6: Support the dual stack host correctly
de25bfec CI: Change the workflow name for build.yml
405efe08 CI: rename main.yml to build.yml
1bfffc73 CI: Use actions from testing repo
2884f021 main.yml: Reduce differences from other repos
e6607179 CI: Separate the workflow into a few pieces
5e245cf3 examples/tcpblaster: When a host PC is used, take its implementation of hton/ntoh functions.
b92a10ad nshlib/nsh_netcmds.c: fix nxstyle warning
8da81578 nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host
326c80db tcpblaster: Appease nxstyle complaints
PX4BuildBot added a commit that referenced this issue Apr 1, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@102ff8d

Changes from PX4/NuttX (PX4/NuttX@b902d4c) in current PX4/master (2e2b9a9)
PX4/NuttX@b902d4c...102ff8d

102ff8d (HEAD, origin/master) CI: update matrix boards accordingly since testlist updated
0371574 testbuild.sh: Add an option to show the list of configs
f26dda8 drivers/i2c: fixed nxstyle warnings
2b9bdc0 drivers/can: fixed nxstyle warnings
92eae74 drivers/rwbuffer.c:  Back out unfinished changes
997d4fa Check return from nxsem_wait_uninterruptible This commit is only for those files under drivers/1wire, drivers/bch, drivers/can and drivers/mmcsd.
986e594 Check return from nxsem_wait_initialize()
836fef3 arch/arm: include chip.h in up_checkstack.c/up_initialize.c (#668)
5b74974 Check return from nxsem_wait_initialize()
7f510a6 tools/nxstyle.c:  Add fixedmath.h defines to white-listed prefixes

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@595c72b

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (2e2b9a9)
PX4/NuttX-apps@91b6ad6...595c72b

595c72b3 (HEAD -> master, origin/master) ping/ping6: Support the dual stack host correctly
de25bfec CI: Change the workflow name for build.yml
405efe08 CI: rename main.yml to build.yml
1bfffc73 CI: Use actions from testing repo
2884f021 main.yml: Reduce differences from other repos
e6607179 CI: Separate the workflow into a few pieces
5e245cf3 examples/tcpblaster: When a host PC is used, take its implementation of hton/ntoh functions.
b92a10ad nshlib/nsh_netcmds.c: fix nxstyle warning
8da81578 nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host
326c80db tcpblaster: Appease nxstyle complaints
PX4BuildBot added a commit that referenced this issue Apr 1, 2020
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/master
 - PX4/NuttX@4dffb8c

Changes from PX4/NuttX (PX4/NuttX@b902d4c) in current PX4/master (baa50a1)
PX4/NuttX@b902d4c...4dffb8c

4dffb8c (HEAD, origin/master) Fix a typo in Kconfig help
102ff8d CI: update matrix boards accordingly since testlist updated
0371574 testbuild.sh: Add an option to show the list of configs
f26dda8 drivers/i2c: fixed nxstyle warnings
2b9bdc0 drivers/can: fixed nxstyle warnings
92eae74 drivers/rwbuffer.c:  Back out unfinished changes
997d4fa Check return from nxsem_wait_uninterruptible This commit is only for those files under drivers/1wire, drivers/bch, drivers/can and drivers/mmcsd.
986e594 Check return from nxsem_wait_initialize()
836fef3 arch/arm: include chip.h in up_checkstack.c/up_initialize.c (#668)
5b74974 Check return from nxsem_wait_initialize()

Apps:
 - https://github.com/PX4/NuttX-apps/tree/master
 - PX4/NuttX-apps@0640e07

Changes from PX4/NuttX-apps (PX4/NuttX-apps@91b6ad6) in current PX4/master (baa50a1)
PX4/NuttX-apps@91b6ad6...0640e07

0640e072 (HEAD -> master, origin/master) CI: update matrix boards accordingly since testlist updated
595c72b3 ping/ping6: Support the dual stack host correctly
de25bfec CI: Change the workflow name for build.yml
405efe08 CI: rename main.yml to build.yml
1bfffc73 CI: Use actions from testing repo
2884f021 main.yml: Reduce differences from other repos
e6607179 CI: Separate the workflow into a few pieces
5e245cf3 examples/tcpblaster: When a host PC is used, take its implementation of hton/ntoh functions.
b92a10ad nshlib/nsh_netcmds.c: fix nxstyle warning
8da81578 nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants