Issue following find_eqpt documentation #1053
-
I'm trying to use There are a couple of ways that I can't figure out how to use Also, it doesn't seem like # 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 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
What you have looks correct. If you look inside the code at the definition of
The I did a run of your above using
and it ran OK. If you post what you are using for In terms of including bounds or constraints: that is not supported, but I'm not sure it would help. The |
Beta Was this translation helpful? Give feedback.
-
One possibility, which we do in other places, is to create a parameter If we add It still seems like setting |
Beta Was this translation helpful? Give feedback.
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 callsroot
toresult = root(rootfun, z0, method='lm')
, adding the "least squares method" designator to the args.Does it make sense for
find_eqpt
to do this ifnum_constraints > num_freedoms
?