Title: Issue following find_eqpt documentation · python-control/python-control · Discussion #1053 · GitHub
Open Graph Title: Issue following find_eqpt documentation · python-control/python-control · Discussion #1053
X Title: Issue following find_eqpt documentation · python-control/python-control · Discussion #1053
Description: Issue following find_eqpt documentation
Open Graph Description: I'm trying to use find_eqpt in order to trim an aircraft. I need to solve for the trim throttle input and the angle of attack. There are a couple of ways that I can't figure out how to use find_eqp...
X Description: I'm trying to use find_eqpt in order to trim an aircraft. I need to solve for the trim throttle input and the angle of attack. There are a couple of ways that I can't figure out how to use ...
Opengraph URL: https://github.com/python-control/python-control/discussions/1053
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Issue following find_eqpt documentation","text":"I'm trying to use find_eqpt in order to trim an aircraft. I need to solve for the trim throttle input and the angle of attack.
\nThere are a couple of ways that I can't figure out how to use find_eqpt, commented below. How do I specify that d/dt of only some of the states (u, w, theta, and q) matters in this calculation, given that other states are specified as fixed?
\nAlso, it doesn't seem like find_eqpt handles bounds or constraints, such that you can constrain a quaternion to norm 1 (this example just uses Euler angles).
\n# Fix output at:\nVinf = 30\nbeta = 0\ngamma = 0\n\n# Find this output:\nalpha = 0 # guess\n\n# Find this input:\nthrottle = 0.5 # guess\n\n# State guess\nx = 0\ny = 0\nz = 0\nu = Vinf\nv = 0\nw = 0\nphi = 0 # Roll angle\ntheta = 0\npsi = 0 # Yaw angle\np = 0\nq = 0\nr = 0\n\nx0 = np.array([x, y, z, u, v, w, phi, theta, psi, p, q, r])\nu0 = np.array([throttle])\n\ntrim_state, trim_input, yeq, result = ct.find_eqpt(\n aircraft_6dof_model, \n x0, \n u0=u0, \n y0=[Vinf, alpha, beta, gamma],\n iy=[0, 2, 3], \t\t\t# Constrain Vinf, beta, gamma\n ix=[4, 6, 8, 9, 10, 11], \t\t\t# Constrain v, phi, psi, p, q, r\n # dx0=[0,0,0,0,0,0,0,0,0,0,0,0],\t# How to specify that xdot, ydot, and zdot don't matter?\n idx=[3, 5, 7, 10], \t\t\t # Only care about d/dt of u, w, theta, and q\t\n return_y = True,\n return_result = True\n)
\nDepending on how I formulate the arguments, I get an input/output mismatch error, or the find_eqpt function runs infinitely.
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"The issue is that the problem I desire to solve is over-constrained. I get the intended result if I change the line in find_eqpt that calls root to result = root(rootfun, z0, method='lm'), adding the \"least squares method\" designator to the args.
\nDoes it make sense for find_eqpt to do this if num_constraints > num_freedoms?
","upvoteCount":0,"url":"https://github.com/python-control/python-control/discussions/1053#discussioncomment-11137221"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:fa238821-2348-6b9c-c97a-91001353d281 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 976E:39C164:18AC01B:231E798:697A45D8 |
| html-safe-nonce | 0de3c1c7a98afcf8d9ac3d3200c3f9fc23e4bffeb00134d203547eccb6ebebbd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzZFOjM5QzE2NDoxOEFDMDFCOjIzMUU3OTg6Njk3QTQ1RDgiLCJ2aXNpdG9yX2lkIjoiNDUyMDM0MzgyNTQzMTU0NTMwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f83e55797f8990127392baff51e8a98848c22deffad25a8644fe933c4853d30d |
| hovercard-subject-tag | discussion:7398027 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-control/python-control/1053/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/d7ea6af20c391ade7c5a0681a1be7d05f24fee2ba8c72e90652d48745dea72a2/python-control/python-control/discussions/1053 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d7ea6af20c391ade7c5a0681a1be7d05f24fee2ba8c72e90652d48745dea72a2/python-control/python-control/discussions/1053 |
| og:image:alt | I'm trying to use find_eqpt in order to trim an aircraft. I need to solve for the trim throttle input and the angle of attack. There are a couple of ways that I can't figure out how to use find_eqp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 553d32486a978372da5772d723ffbf66cac04403ab1794b7225c035f1d23252c |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8d7fdc30d680a0be278b8d9916215e64c987f09a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width