Repository navigation
Defining signals as vectors #1008
corbinklett
started this conversation in
Ideas
Replies: 3 comments 3 replies
|
Another example of how vector signals would be used, in the outputs naming: forces_moments = ct.interconnect(
(aerodynamics, propulsion, gravity, sum_forces_moments),
name="forces_moments",
connections=[
# input <- output
['sum_forces_moments.u[:6]', 'aerodynamics.y'],
['sum_forces_moments.u[6:12]', 'propulsion.y'],
['sum_forces_moments.u[12:15]', 'gravity.y'],
],
inplist = ['aerodynamics.coef'],
outlist = ['sum_forces_moments.y', 'aerodynamics.y[:3]'],
outputs = ['F_total[3]', 'M_total[3]', 'F_aero[3]']
) |
0 replies
|
It would be great to get some additional processing of vector signals. A few notes on the above:
|
1 reply
|
Adding a note to also think about the case when one input to an interconnected system needs to be accessed by multiple subsystems. For example, what if each of the aerodynamics, propulsion, and gravity models needs access to the vehicle rigid body state vector? Currently, the state vector would have to be connected to the interconnected system 3 separate times (which could be a list 36+ items long) |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It seems like signals can only be defined by giving an integer count (in which case the signals are named with 'u', 'y', or 'x'), or by naming individual vector components. Is it possible to specify vector signals, like:
airplane = ct.nlsys(updfcn=dynamics, outfcn=None, inputs=('forces[3]', 'moments[3]'), outputs=...Would it be difficult for me to add this feature?
From the documentation:
inputs (int, list of str or None, optional) – Description of the system inputs. This can be given as an integer count or as a list of strings that name the individual signals. If an integer count is specified, the names of the signal will be of the form s[i] (where s is one of u, y, or x)
All reactions