How to change the parameters in the Quadrotor Plant for a different UAV mass?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
Hi,
I have not had any success in trying to figure out what parameters to chose for a higher quadcopter mass in the quadrotor plant block. After many tries, the quadrotor simply does not take off with different parameters. I would appreciate any ideas on how to calculate the PD gains for a different mass. Thank you!
Accepted Answer
Jianxin Sun
on 7 Nov 2022
Hi,
Instead of changing the PD gains on the block, you should increase the commanded thrust to drive a heavier UAV. For example, in order to be able the take-off, the commanded thrust should be higher than the gravity force. So if your mass is 1 and gravity acceleration is 9.8 then the commanded thrust should be higher than 9.8.
Jianxin
9 Comments
Tudor-Stefan Tonca
on 8 Nov 2022
Hi, thank you so much for your reply. It makes total sense, however I still cannot manage to get rid of the issue. I have tried with different masses and different thrust values, but without succes. Even with a mass of 0.2 kg, the UAV animation shows the quadcopter's altitude is constantly decreasing (negative values..). I have tried with a mass of 1 kg and a thrust value of 10, same results. Am I working in the wrong block? Do I have to change both the Thrust from the initia state and the P Thrust from the configuration along with the mass? If yes, how? I have tried multimple combinations of values, all with the same result..
Thank you very much in advance.

Andrew Ouellette
on 10 Nov 2022
Hello,
As Jianxin mentioned, your thrust commands need to be sufficiently large to overcome gravity (from the input to this block). Within the Guidance Model block, you should change the parameter in the configuration tab to match your desired mass and you should additionally set the Thrust parameter in the initial state tab equal to mass*gravity to start with a net force of 0 acting on the UAV.
Andrew
Jianxin Sun
on 10 Nov 2022
Hi,
One more thing to clarify is that the multirotor guidance block used NED reference frame. The State output World Position is [North, East, Down], Euler Angles [Yaw, Pitch, Roll] is also rotation from NED to UAV's body frame (front, right, down). When you configure the UAV Animation block, you should select Inertial Z direction to "Down".
It is normal to see the World Position Z value go to negative, as the Z direction points down and negative value means UAV is rising.
Jianxin
Sam Chak
on 10 Nov 2022
I'm unfamiliar with the UAV Toolbox, but I take a guess.
For simplicity, the all other effects are neglected and the UAV ascending/hovering motion is given by:
where
is the altitude error, g is the gravity and T is the thrust.
If you design the thrust,
using only the PD control approach, then the Thrust force only scales with
and
, but effect of gravity is not compensated (assuming that g is uniform throughout the flight). So, the weight
keeps dragging the UAV to descend.
If
and
, then the commanded thrust should be greater than
. When the desired altitude is reached
, then
and the UAV will hover at the altitude
.
Tudor-Stefan Tonca
on 12 Nov 2022
Edited: Tudor-Stefan Tonca
on 12 Nov 2022
Hi @Andrew Ouellette, @Jianxin Sun @Sam Chak. Thank you all for your time and interest into answering my question! Since I've read your answers, I have spent a lot of time trying to configure the parameters as advised. I completely understand the formulas for calculating the thrust and it makes total sense to change the parameters as you've said (Initial Thrust = mg, mass = desired mass value). Assuming that I have no altitude error, when thrust is equal to mg, it should work. However, I have tried it countless times and got nowhere..
With the mass = 0.1 and initial thrust of 0, the simulation behaves as expected (see image below). 

After changing the mass to 1 and Initial Thrust to 9.81, the simulation behaves as seen below. The trajectory keeps going down, until the smulaton stops. In the QGC, the quadcopter does not appear to move.

I have checked the UAV animation block and can confirm that the Inertial Z direction is set to "Down".
On top of that, I have also tried the following (but with no success):
- Chaged DroneMass parameter in the uavPackageDeliveryDataDict.sldd to the same mass set in the configuration tab of the guidance model
- Changed Initial Thrust to a very high value to see behaviour - the quadcopter rises initially, then continuously goes down, moving uncontrolled.

N.B. - I have changed the following parameters of the project: uavLatLong, Initial values for the World Position changed to 0 (to eliminate the offset betwheen the Launch and Take-off points in QGC). I am trying to fly a 4-waypoint mission with a quadcopter that has a mass of 5 kg. I have tried both changing the mass to 1 and 5 kg, along with initial thrust according to the formula T = mg, same results..
Thank you once again for your time! I'm really struggling to sort this issue out, but I don't know what I'm doing wrong here, nothing seems to work as expected when it comes to changing the quadcopter's mass...
Tudor
Andrew Ouellette
on 17 Nov 2022
Hi Tudor,
In the example you are modifying, the low fidelity dynamics have saturation limits on the thrust. Have you increased that value as well?
If you continue to encounter issues with this example, please feel free to contact technical support at the following page:
https://www.mathworks.com/support/contact_us.html
Tudor-Stefan Tonca
on 19 Nov 2022
Thank you for the tip. I have tried increasing the saturation, but without success. I have spent much time trying different values for the output saturation limits, because changing only the saturation block for the thrust did not do anything. The best outcome that I've obtained was the quadcopter flying the mission, but missing checkpoints, having random altitudes and flight speeds and not reaching the landing point, but flying past it.
However, I have managed to solve the issue as it follows:
I have added a Gain to the thrust signal, right after the saturation block, calculated as follows: Gain = Desired Mass/Initial mass. For example, for a mass of 5 kg, the gain would be 50.

The same applies for changing the velocity: adding a gain equal to desired velocity/initial velocity (3 m/s) right before the velocity command output.
By adding gain to multiply the thrust as stated, I have managed to solve the issue. I have also tested the method for different mass values and it works perfectly each time.
Thank you all once again for your help. It's very appreciated.
Dennis
on 15 Apr 2023
I am also trying UAVpackageDelivery, I modified the GCS path but the path is too long, so I hope I can increase the speed from 3m/s. Should I also add Gain in thrust? Or to which part?
Thanks.
Kind Regards,
Dennis
Dennis
on 15 Apr 2023
If I increase the speed gain, the drone won't land properly at the land point.

More Answers (1)
Tudor-Stefan Tonca
on 19 Nov 2022
Dear all,
I have managed to solve the issue as it follows:
Changed the mass parameter in the configuration tab as desired mass. Set the Initial thrust as desired mass * 9.81.
Gain block added on the thrust signal, being equal to desired mass/ actual mass (0.1 kg). (or desired mass * 10)

Thank you all for your help, interest and tips.
Tudor
Categories
Find more on Guidance, Navigation, and Control in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)