Creation of NASA X-57

318 views
Skip to first unread message

Bruno Marques

unread,
Feb 5, 2018, 2:11:12 PM2/5/18
to SUAVE FORUM
Hi,

I am currently trying to recreate the NASA X-57 electric aircraft on SUAVE. However, this aircraft has two types of energy networks: one with two big propellers on the tip of the wing that are used for propulsion effects and another with a number of small propellers spread across the wing that used to increase the lift of the aircraft during takeoff and landing (as they were a type of flaps). Therefore, I would like to know if I can recreate these two different types of energy networks with different propellers on SUAVE and what is the right direction that I should take?

Kind regards,

Bruno Marques

Emilio

unread,
Feb 8, 2018, 12:50:27 PM2/8/18
to SUAVE FORUM
Hi Bruno,
There are several ways you could do this. I would suggest you do this as separate configurations of a base vehicle. That way it simplifies the setup. You have one network for the distributed propellers and for the tip propellers... care must be taken that you link the battery to be the same!

One question, at any point in your simulation do you expect to be throttling both sets of propellers? For example during climb will you be running the distributed propellers as well as the tip propellers? In that case you will need to handle multiple throttles, and that's where it get's messy from an operations perspective. In that case you may need to make an all new network.

-Emilio

Bruno Marques

unread,
Feb 8, 2018, 12:55:44 PM2/8/18
to SUAVE FORUM
Hi Emilio,

Yes at same point of the flight (take-off, climb, descent and landing) both types of propellers should be running. During cruise only the tip propellers should be running and the others should be folded (which I guess from SUAVE point of view should be deleted at cruise to simulate their folded configuration).

Do you have any example of this that can help me?

Kind regards,

Bruno Marques 

Emilio

unread,
Feb 8, 2018, 6:17:37 PM2/8/18
to SUAVE FORUM
Hey,
So you have 3 options to schedule your throttles which will determine what way you model it:

A) Use the same throttle setting for both sets of propellers. In this case when the tip props are at 80% the DEP props are as well. This is easy and just requires a bit of small changes to the network.

B) Use a fixed throttle for one of the propeller sets and converge the other. This will take some trickery of the mission, but it's something we've done before.

C) Optimize the throttle setting throughout the flight. This is going to take some work, we've found that optimized segments tend to take 2 orders of magnitude more time tot converge. So if your goals is just modeling the X-57, that's probably okay because we're talking about a few minutes to run a mission. If you're going to optimize an X-57 around that, it could take a while.

Let me know what you choose and we'll help guide you more.

-Emilio


Bruno Marques

unread,
Feb 9, 2018, 12:15:10 PM2/9/18
to SUAVE FORUM
Hi Emilio,

My final objective after creating the X-57 is indeed to optimize some parameters of the aircraft as well as its flight profile. Some of the optimization variables will be, for example: wing aspect ratio, number of DEP propellers, rate of climb, rate of descent, cruise altitude, etc. This work is all included in my Master thesis.

Therefore, I guess in order to present a good work in my thesis, I think I would like to go to option C so that my final work is really an optimized DEP aircraft.

Kind regards,

Bruno Marques

Emilio

unread,
Feb 9, 2018, 2:33:26 PM2/9/18
to SUAVE FORUM
Hi Bruno,
You can do option C while optimizing a vehicle but... doing this as a "one-shot optimization" will be computationally expensive, present non-convex multi-modalities, and require a bit of coding to make happen.

It's all possible, but I suggest you try either option A or B first while optimizing on the other parameters. SUAVE is fairly robust, however problem formulation is up to the user and the way you pose a problem from a physics standpoint can drastically change how tractable a problem is.

-Emilio

Bruno Marques

unread,
Feb 10, 2018, 1:04:48 PM2/10/18
to SUAVE FORUM
Hi Emilio,

Taking that into consideration then I think I willl go to option B. Can you give me some guidelines to implent it?

Kind regards,

Bruno Marques

Bruno Marques

unread,
Feb 21, 2018, 12:06:03 PM2/21/18
to SUAVE FORUM
Hi Emilio,

Sorry to bother you again. Can you still help me with this part?

Kind regards,

Bruno

Emilio

unread,
Feb 21, 2018, 12:46:54 PM2/21/18
to SUAVE FORUM
Hi Bruno,
I apologize, things got very busy for me in the past couple of weeks.

Check out this network here:

This is a network with 2 sets of motors, the implied use case for this is VTOL aircraft. The default thrust angle is 0, which is actually what you want. There are 3 sets of unpacks and 3 sets of residuals. This allows you to throttle all motors together or turn a set off. This is done through the mission setup. However, you now need to make a 4th option: a fixed throttle setting. Basically this requires you to specify a parameter in the mission and then set it in the unpack function. There must still be an unknown on propeller power coefficient and a residual on torque however for that set of motors.

I know that probably sounds vague. Start looking at the network to see how it works. I can send code snippets to show you how that network behaves.

-Emilio

Bruno Marques

unread,
Mar 11, 2018, 9:03:50 AM3/11/18
to SUAVE FORUM
Hi Emilio,

Thank you very much for the help. I will start working on the network today and if I have any doubt I will say something.

Kind regards,

Bruno

Bruno Marques

unread,
Mar 11, 2018, 9:10:55 AM3/11/18
to SUAVE FORUM
Correct me if I am wrong but from what I am understanding of these network the parameters that have "_forward" will be for my tip propellers and the ones that have "_lift" on their names will be for the my others propellers, right?

Bruno Marques

unread,
Mar 11, 2018, 7:44:46 PM3/11/18
to SUAVE FORUM
Hi Emilio,

I already implemented the new network into my code and put all the inputs needed and you can find my code here (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py). However, there two things that I have some doubts. Firstly, I would like to know if the mass of the battery (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L484) in this network refers to the mass of just one battery or to the mass of all the batteries used in the network.

Secondly, when I tried to run the code the following error appers:


I called the network that you sent me "Lift_Forward_Propulsor_Network", put it into the "Networks" folder of SUAVE and imported it in the init file so I do not understant this error. You can find the Networks folder here https://github.com/breismarques/SUAVE/tree/develop/trunk/SUAVE/Components/Energy/Networks

Kind regards,

Bruno

Emilio

unread,
Mar 12, 2018, 1:35:03 PM3/12/18
to SUAVE FORUM
Hi Bruno,
To answer your questions:

1- This is pack level weight. We don't look at the cell level. So we assume the battery contains all internal packaging, wiring, etc.. that are internal to the pack. There is usually a difference between cell level performance and pack level performance, and that is the real level of performance that is applied to the vehicle.

2- The init file is a bit weird. Take a look at your imports:

You are importing two different networks with almost the same name. However, you are calling the name of the file, but not the class. If you call the class name it should work.

Looks like some simple fixes and you'll be on your way.

-Emilio

Bruno Marques

unread,
Mar 12, 2018, 2:32:12 PM3/12/18
to SUAVE FORUM
Hi Emilio,

Thank you very much for the support. I already solved the previous issues. However, now the following error appears: 


I know this error is because this network has the two types of propellers (forward and lift). My question is how should I correctly unpack the parameters that I need for the mission setup and how should I alter the mission stepu so that my code can do what you stated before ("Use a fixed throttle for one of the propeller sets and converge the other")? Imagining that I want, for example, one climb segment, one cruise segment and one descent segment?

Kind regards,

Bruno Marques

Emilio

unread,
Mar 12, 2018, 3:00:45 PM3/12/18
to SUAVE FORUM
Hi Bruno,
Here's a few code snippets from a previous project I worked on that shows how you can use one set of propellers or the other for an individual segment

For turning off the "forward motors":
    segment.state.unknowns.lift_throttle                    = 0.8   * ones_row(1)
    segment.state.unknowns.propeller_power_coefficient_lift = 0.01 * ones_row(1)
    segment.state.unknowns.__delitem__('propeller_power_coefficient')
    segment.process.iterate.unknowns.network            = vehicle.base.propulsors.propulsor.unpack_unknowns_no_forward
    segment.process.iterate.residuals.network           = vehicle.base.propulsors.propulsor.residuals_no_forward

For turning off the lifting motors:
    segment.process.iterate.unknowns.network  = vehicle.base.propulsors.propulsor.unpack_unknowns_no_lift
    segment.process.iterate.residuals.network = vehicle.base.propulsors.propulsor.residuals_no_lift
    segment.state.residuals.network           = 0. * ones_row(1)   

I would try one of these for cruise for now, I think the X-57 relies primarily on the tip rotors for cruise right? So turning of the DEP motors and getting this to work should be easy. Then let's do climb as I've described below.

To set the throttle specifically, you'll need to make another unpack and residual solver, say unpack_set_lift_throttle. In this case you'll make a new variable in the segment, say segment.lift_throttle = 1.0. Then set that in the unpack in your new function.

I think this is confusing since this network was made for sets of propellers pointed in different directions. But this is all really simple.

-Emilio

Bruno Marques

unread,
Mar 12, 2018, 6:19:37 PM3/12/18
to SUAVE FORUM
Hi Emilio, 

Just one question: these alterations are supposed to be done in the base segment part (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L623) or on the cruise segment (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L644)?

Emilio

unread,
Mar 12, 2018, 6:24:26 PM3/12/18
to SUAVE FORUM
It's probably best to do them in the segment itself (i.e. put the setup code in the cruise segment). The base segment is useful if all the segments are doing the same thing. In this case you'll have different strategies for each segment. This gives you more control.

-Emilio

Bruno Marques

unread,
Mar 12, 2018, 6:36:20 PM3/12/18
to SUAVE FORUM
Thanks for all the support Emilio. I am trying to create a cruise segment to start. However this error is appearing:


You can find this part of the code here (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L628). Besides I am also in doubt if I should include or not the lines 633 and 634 of my script.

Kind regards,

Bruno

Emilio

unread,
Mar 12, 2018, 7:39:42 PM3/12/18
to SUAVE FORUM
The issue is here:

You are passing the mission the vehicle, not a variety of configurations of the vehicle. So there is no base.

Bruno Marques

unread,
Mar 12, 2018, 7:58:15 PM3/12/18
to SUAVE FORUM
Thanks a lot Emilio. That solved the issue. I still have a question. Should I also include this part for the part with no lifting motors:

segment.state.unknowns.lift_throttle                    = 0.8   * ones_row(1)
    segment.state.unknowns.propeller_power_coefficient_lift = 0.01 * ones_row(1)


I am asking this because now the error that is giving says: 

File "/Users/Bruno/Documents/Delft/Courses/2016-2017/Thesis/SUAVE/SUAVE/trunk/SUAVE/Components/Energy/Networks/Lift_Forward_Propulsor_Network.py", line 354, in unpack_unknowns_no_lift
    state.conditions.propulsion.propeller_power_coefficient      = state.unknowns.propeller_power_coefficient

  File "/Users/Bruno/Documents/Delft/Courses/2016-2017/Thesis/SUAVE/SUAVE/trunk/SUAVE/Core/Data.py", line 59, in __getattribute__
    return objgetattrib(self,k)

AttributeError: 'Unknowns' object has no attribute 'propeller_power_coefficient'

Emilio

unread,
Mar 13, 2018, 3:55:21 PM3/13/18
to SUAVE FORUM
Yes you should.

You can see here what the unknowns are:

What this function is doing is simplifying the network down to the normal battery_propeller case.

-Emilio

Bruno Marques

unread,
Mar 24, 2018, 2:32:33 PM3/24/18
to SUAVE FORUM
Hi Emilio, I implemented all the changes in the network. I had to change some parts on the parasite drag modules (for example in https://github.com/breismarques/SUAVE/blob/develop/trunk/SUAVE/Methods/Aerodynamics/Common/Fidelity_Zero/Drag/parasite_drag_propulsor.py#L66). However, the cruise segment is not converging:


Kind regards,

Bruno

Bruno Marques

unread,
Mar 24, 2018, 2:48:37 PM3/24/18
to SUAVE FORUM
Hi Emilio,

Forget my last post. I just noticied that I forgot to set all the unknows. However, now I included them (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L616) I get this error:


Do you know what this is about?

Kind regards,

Bruno

Emilio

unread,
Mar 25, 2018, 8:38:47 PM3/25/18
to SUAVE FORUM
Hey Bruno,
Look like propeller_power_coefficient isn't set, so it cannot be deleted.

If you're not sure what unknowns you've set, just put in a print statement.

-Emilio

Bruno Marques

unread,
Mar 26, 2018, 6:36:46 AM3/26/18
to SUAVE FORUM
Hi Emilio,

I put a print statement and indeed the propeller_power_coefficient did not appear in no_lift_segment.state.unknowns so I commented this line (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L619) and let the propeller_power_coefficient being defined by line 618, which I am not completely sure if it is the right way. However, if I did not defined it the following error appeared:


So I defined it with the previous definition, which I do not know if it is right (please tell me if I am on the right path). However, I still have this error appearing:


Can you help with this?

Kind regards,

Bruno

Emilio

unread,
Mar 26, 2018, 10:25:02 AM3/26/18
to SUAVE FORUM
Hi Bruno,
Ok, it looks like you've got yourself confused. I need you step back from the code for a second and have you understand why what's coded in that network does what it does.

This network was originally architected for a vehicle like this (not this specific one):

You see a motor in the back that faces forward, and then a whole bunch that lift the airplane. Sometimes you fly the airplane with the lift motors and sometimes you don't. Same with the forward facing motor.

Ok, with your code you want to also throttle your motors in a similar fashion. I think you're getting yourself confused with which case is which. You have added the unknowns for the lift motors, but are using methods that explicitly do not use the lift motors. So SUAVE is noticing an inconsistency when entering the solver.

Pick which case is which on your vehicle and maybe put in on a sticky note to remind yourself. You could also rename things so they are clear to you. You can always check which unknowns need to be added by checking the method that requires them.

Does that clarify what you're doing? Let me know if you're still confused before continuing.

-Emilio

Bruno Marques

unread,
Mar 26, 2018, 6:47:30 PM3/26/18
to SUAVE FORUM
Hi Emilio,

I think I am getting it. I just have one question. So if I have this unknows for the "unpack_unknowns_no_lift":

state.conditions.propulsion.lift_throttle                    = 0.0 * ones(1)
        state.conditions.propulsion.battery_voltage_under_load       = state.unknowns.battery_voltage_under_load
        state.conditions.propulsion.propeller_power_coefficient      = state.unknowns.propeller_power_coefficient
        state.conditions.propulsion.propeller_power_coefficient_lift = 0.0 * ones(1)
        state.conditions.propulsion.throttle                         = state.unknowns.throttle

Which of these parameters do I have to provide in the mission setup?

Kind regards,

Bruno

Emilio

unread,
Mar 26, 2018, 7:22:01 PM3/26/18
to SUAVE FORUM

Hi Bruno,

For the unpack_unknowns_no_lift, you need the following:

unknowns.battery_voltage_under_load

unknowns.propeller_power_coefficient

 
However, throttle is a default unknown in SUAVE. So you don't need to set it.

unknowns.throttle 


Notice the others are set to 0. 

-Emilio

Bruno Marques

unread,
Mar 26, 2018, 7:24:02 PM3/26/18
to SUAVE FORUM
Ok. I think I got it Emilio. Thank you very much

Bruno Marques

unread,
Mar 26, 2018, 8:40:41 PM3/26/18
to SUAVE FORUM
Hi Emilio,

Sorry to bother again. I already corrected what was wrong (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L621). Now my program is running but I the cruise segment is not converging:


I already tried to alter the parameters on the battery and motors but the segment still does not converge. I wonder if this is about the changes I made on the parasite drag. Basically I put an if statement to calculate the drag caused by both type of propellers if these are present in the code but I do not know if what I done is correct. An example of this statement is between these two lines:


and


What was previously coded is what was after this else statement: 


Kind regards,

Bruno




Emilio

unread,
Apr 5, 2018, 1:31:13 PM4/5/18
to SUAVE FORUM
Hey Bruno,
Sorry for the delay. It takes us a while to find time to look at someones code. Here's a few things I've noticed right off the bat:

1. You need to set your battery charge level before flying. If you start with 0 energy in the battery the segment cannot converge. See this tutorial:

2. The battery needs to have a voltage. Here you specify the initial conditions of the voltage. However, you never set them in the battery. Thus they are 0 in the mission, and no power is flowing.

After that it looks like your setup is mismatched. It doesn't converge after that because the propeller/motor are quickly draining the battery to extremely negative energies. The setup we've been working with does a good job at modeling aircraft with great detail, but it's not intended for optimization where the optimizer may provide garbage inputs. There should be enough details for the X-57 for you to model it in SUAVE.

Another concern I have, you've selected variable pitch propellers. However, you're not using them as such. I'm pretty sure the propellers at least on the inboard wing are fixed pitch. However, I'm not sure about the outboard ones.

Good luck and let us know if you have questions.
Emilio

Bruno Marques

unread,
Apr 11, 2018, 7:15:39 PM4/11/18
to SUAVE FORUM
Hi Emilio,

I think that I corrected the points that you pointed out but the cruise segment is still not converging:


2. I set the conditions of the voltage in the battery in this line https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L471

Besides, although the tip propellers should be variable pitch I set both of the propellers as fixed propellers for now (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors.py#L401) and turn the tip ones into variable pitch after I put this working.

Finally, I did not understand your point about my setup being mismatched and the part about the optimizer providing garbage inputs. Can you tell me if my corrections are correct or if I am doing something wrong?

Thank you in advance for the feedback.

Kind regards,

Bruno Marques

Bruno Marques

unread,
Apr 16, 2018, 9:36:51 PM4/16/18
to SUAVE FORUM
Hi Emilio,

Sorry to bother you again with this. I am just sending this because I need to know if you can help me with the topic on the previous post because I am short on time with my master thesis.

Kind regards,

Bruno Marques

Emilio

unread,
Apr 16, 2018, 10:29:24 PM4/16/18
to suave...@googlegroups.com
Hi,
I apologize, these types of questions can take a long time to diagnose and we had a new release of SUAVE (1.1.0) last week that ate much of my SUAVE time. I understand your situation as I am also short on time with my PhD thesis....

Again, I don't have the time to run your scripts (it takes a non-trivial amount of time to change my version of SUAVE to your fork and set it up). But looking at some of your inputs, what stands out is your motor. Please take a look at the settings you have:

The speed constant is set to 5800 RPM/volt. You can read up about speed constants here and here. With 461 volts in, your motor would 2,673,800 rpm unloaded... motor/propeller matching is quite tricky and very sensitive to parameters. If you set them incorrectly either the motor or propeller is operating inefficiently (or both), that is why you were seeing the battery being quickly drained. Because electric aircraft are already energy limited to begin with you must get all the efficiency you can out of the power train to make them even fly. So, I suggest you find more data about the X-57 or change levels of fidelity (see below). These inputs can be estimated, but it's not something that I would be able to do for you.

To my previous comment about optimizers. Optimization algorithms vary inputs to try to find the best combination. On the way to finding the best combination it will find plenty of bad combinations. If the analysis is finicky on inputs, like you've found by your own guessing, the optimizer will struggle to converge. The analysis that you are using can be used for optimization under specific conditions, depending on the design variables and the algorithms used.

So when optimizing a vehicle that you plan on making large topological changes, I highly suggest you lower the level of fidelity. Look at the two solar UAV tutorials: http://suave.stanford.edu/guides/solar_uav.html
The analysis tutorial uses the same level of modeling that you're using but the optimization tutorial uses an efficiency based network. The SciPy optimizers are quite poor at converging problems, so if you want to tackle something significantly more challenging I suggest you try different optimization algorithms.

One last thing, don't set your battery charge to 20% to start:

Best of luck on the thesis!

-Emilio

Bruno Marques

unread,
Apr 17, 2018, 7:35:47 PM4/17/18
to SUAVE FORUM
Hi Emilio,

I have been trying your suggestions all day and the cruise segment is still not converging. I tried to find more information about the X-57 electric motor to put my script but I did not find anything useful so I tried your approach for the low fidelity motor and propeller and created this new script (https://github.com/breismarques/TecamP2006T/blob/master/Tecnam_2_motors_Lo_Fi.py#L361). The only changes that I had to do in the script of the network was adding this two lines:



However my cruise segment is still not converging. Attached to this you can find the results that I obtained. Am I doing something wrong?

Kind regards,

Bruno Marques
aerodynamic_coefficients.png
motor_rpm.png
throttle_history.png
weight.png
aerodynamic_forces.png
altitude.png
battery_charging.png
battery_energy.png
current_draw.png
drag_components.png
electric_outputs.png
flight_conditions.png

Bruno Marques

unread,
Apr 24, 2018, 11:27:01 PM4/24/18
to SUAVE FORUM
Hi Emilio,

Do you have any idea of how I should solve the problem? I really don't know what I should do more.

Kind regards,

Bruno Marques

Bruno Marques

unread,
May 14, 2018, 11:43:02 PM5/14/18
to SUAVE FORUM
Hi Emilio,

Sorry to bother you again. Did you have time to look at my question regarding on how I can solve my problem on the x-57?

Kind regards,

Bruno Marques

ankitto...@gmail.com

unread,
Oct 20, 2020, 8:41:35 AM10/20/20
to SUAVE FORUM
Greetings Bruno,
I am Ankit Tomar, an post graduate student working on my Master Thesis which is nearly similar to yours. I am looking for some initial help over suave as you have worked on simlar topic.
Looking forward to hear from you soon.


Thanks and Regards,
Ankit Tomar 
Reply all
Reply to author
Forward
0 new messages