Issue following find_eqpt documentation · python-control/python-control · Discussion #1053
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_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?
Also, 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).
# Fix output at: Vinf = 30 beta = 0 gamma = 0 # Find this output: alpha = 0 # guess # Find this input: throttle = 0.5 # guess # State guess x = 0 y = 0 z = 0 u = Vinf v = 0 w = 0 phi = 0 # Roll angle theta = 0 psi = 0 # Yaw angle p = 0 q = 0 r = 0 x0 = np.array([x, y, z, u, v, w, phi, theta, psi, p, q, r]) u0 = np.array([throttle]) trim_state, trim_input, yeq, result = ct.find_eqpt( aircraft_6dof_model, x0, u0=u0, y0=[Vinf, alpha, beta, gamma], iy=[0, 2, 3], # Constrain Vinf, beta, gamma ix=[4, 6, 8, 9, 10, 11], # Constrain v, phi, psi, p, q, r # dx0=[0,0,0,0,0,0,0,0,0,0,0,0], # How to specify that xdot, ydot, and zdot don't matter? idx=[3, 5, 7, 10], # Only care about d/dt of u, w, theta, and q return_y = True, return_result = True )
Depending on how I formulate the arguments, I get an input/output mismatch error, or the find_eqpt function runs infinitely.