In this article our summer intern Carlos describes how he modeled, analyzed and improved the design of a quadcopter with Valispace:

I was interested in modeling and calculating the performance and endurance of a quadcopter performing wind turbine blade inspections. These kind of calculations and analysis are necessary to make drone systems more mature and efficient in the future. The complete model will soon be available for anyone who wants to import it into their Valispace deployment, as well as in our online demo (sign up here!).

Drones are in many ways changing the world, for example as a help in humanitarian aid, for first responders or for safety inspections. For wind farm inspections, drones are starting to become an essential part of performing autonomous inspections of wind turbine blades. They are cheaper than helicopters and their cameras can capture and analyse defects better than the human eye can.

Now, imagine that you have a company providing inspection services using drones that you build in-house. You obviously want to constantly improve your system and have engineers working on making the drone more efficient. While improving the design, they need to redefine equations and simulations. You might make more precise analysis of the propeller thrust coefficient using CFD calculations or run a battery discharge simulation based on the current and temperature. It might be that your structures engineer changes the shape of the drone and now you have new geometric properties and mass properties. And what better software to use than Valispace to keep a consistent model of the drone which serves as a single source of truth for the simulations and analyses?

## Basic building blocks

I chose to start the modeling based on an already existing quadcopter, the Elev8-3 made by Parallax. The Elev8-3 has CAD files from which it is easy to identify the parts and components and even directly import the structure into Valispace. I started to model the components tree, which is a breakdown of the parts of the quadcopter. What parts do we need to get the drone flying?

Remember, in Valispace you can always change the tree at a later stage.

The component tree of the model was broken down into the parts shown in the figures below.

The resulting component tree in Valispace looks like this:

Once the basic structure was in place I could start adding parameters and properties to the components.

## Adding formulas, modes and simulations

For a wind turbine inspection, it’s important to know the location of the wind turbine and the distance that the quad must fly, if it’s long or short range. And we want a large battery to be able to fly as much time as possible. So the important parameters that we need Valispace to output are:

- Power consumption depending on modes;
- Efficiency of the rotors;
- Endurance of the drone in several modes.

We will choose to optimize the drone for hover mode because it’s the one that we need to inspect. The drone should inspect the wind turbine for at least 15 minutes.

The Valispace software is great because of the structure in which it organizes the important design values. As opposed to using Excel, where you would have to add and subtract between sheets, use VLOOKUP, have more files connected to that sheet and embrace all dangers that they contain, Valispace organizes all of that in One Single Source of Truth and everything is nested and can be invoked by name or ID. The key here is name, instead of using VLOOKUP(parameter) you can choose “MotArm1.Cost” and use the autocomplete functionality, so, by just typing “cost” a list of options that you can choose from appears directly and you can use this name in formulas instead of using Cell references.

The easiest way to start is inputting all mass related properties and cost. From the beginning, I added modes for ON and OFF in all the electrical components, and then added power and/or current which were depending on those modes. To build the arms, I decided to make four connected copies of the component called MotArm, which has all the properties of the moto, arm and propeller. This means that if I need to change anything in one of those components, the other ones are automatically updated as well since they are connected.

After the components tree was complete I could also import certain Valis from a spreadsheet with the built in Excel importer. I also added a Vali in the Drone component called “number_rotors” containing the number of rotors of the drone. That way we could make an analysis of what would be the optimal number of rotors of the drone.

In the software, I defined five different flight modes for the drone; OFF, HOVER, UP, FORWARD and CLIMB. These are the basic operational states that the drone can be in and these are used to define values such as current, thrust and thrust-to-weight ratio, which all have different values depending on which mode the drone is operating in.

After organizing the data by modes the formulas were added with the autocomplete functionality as described before.

I also used the Valispace simulation feature, which is a built-in feature where you can run Octave code and .m files directly in the software. The model is designed in a way that the power can be calculated with values in the components but the mathematical model of the motor is a 4th order model, so I decided to use Octave and the fzero() function for those calculations. So I just imported the Valis that I needed on the left column (as seen in the picture below), and defined the output I wanted in the right column. The calculations were written in m-code and after running the simulation it marked the Valis that were used with SIM.IN and SIM.OUT in the components interface.

From this simulation we return the rotational speed that we need for the motor in the different modes. Then that value is used for computing current and after, by dividing the charge of the battery with current we can have an estimate of the endurance.

## Analysing the results

With ValiTypes you can easily create automatic budgets to visualize the progress of your work. For example: to keep track of cost budget I used the ValiType “Cost” and added this parameter to all components. On the top level I specified the formula for Cost to be “soc()” (sum of children), which means that the total cost is summed up automatically from the values in the sub-components.

In the Valispace analysis tab, I could then make budgets with the cost and mass breakdown as seen in the pictures below.

I also compared the Valis of power and endurance in the different flight modes:

## Simulating the inspection sequence

And finally, I used the data from Valispace in Matlab simulations using the Matlab Toolbox to be able to simulate the inspection sequence.

First, the data from Valispace is pulled to a struct in Matlab.

After running the simulation you need to push the data to Valispace again. Here it was used 2 times to push single Valis with ValispacePushValue().

The simulation results were pushed back to Valispace, to a new component called SimResults:

After the values are pushed (or datasets in this case), you can see and analyse the graphs in Valispace.

The final result of the inspection sequence is shown in the figure below.

Valispace together with Matlab results in a powerful modeling and simulation framework, together with a Single Source of Truth to make sure that all data is transparent and easy to work with for all engineers.

We’re currently working on an optimizer feature in our software, which calculates the optimum parameters for your product to achieve your desired results. If you want to be notified once it is released, signup to our newsletter.

If you are interested in doing an internship with us, where you can create models of complex engineering products, feel free to apply here!