-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DJI F450 quadcopter alpha1 release #574
Conversation
Thanks @pbecchi this is much easier to review. Very initial comment, it looks like roughly half the files have |
Yes it could be since I work on Windows and Visual Studio , I will try to correct all those at first commit..... |
I also work with Visual Studio on Windows. Visual Studio will typically handle files with either However I think I possibly saw these |
In terms of the build failures I noticed that ======================================================================
ERROR: test_initial_conditions_v1 (__main__.TestInitialConditions)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:/a/jsbsim/jsbsim/tests/TestInitialConditions.py", line 120, in test_initial_conditions_v1
self.CheckICValues(vars, 'script %s' % (f,), fdm, IC_root)
File "D:/a/jsbsim/jsbsim/tests/TestInitialConditions.py", line 168, in CheckICValues
conv = var['unit'][var_tag.attrib['unit']]
KeyError: 'M/S' |
engine/DJI_E305.xml
Outdated
<!-- E305 Motor is a DJI 2312E - 960 --> | ||
<power unit="WATTS"> 320 </power> | ||
<velocityconstant> 960 </velocityconstant> | ||
<torqueconstant> 6.1217 </torqueconstant> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit confused about <torqueconstant>
. Is this supposed to be a user supplied value for Kq
as per - http://web.mit.edu/drela/Public/web/qprop/motor1_theory.pdf
Although this element isn't read in by FGBrushLessDCMotor::FGBrushLessDCMotor()
, instead we have the following in the header file.
constexpr double TorqueConstant = 60 / (2 * M_PI * NMtoftpound);
So what is the relationship between them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to theory Kq (torque constant) can be assumed to be 1/Kv (speed constant ) if we define speed in rad/sec torque in NewtonMeter.
Therefore since torque is in ftpound a unit conversion factor is necessary (the conversion factor is TorqueConstant
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming is confusing, nomenclature from the motor theory document:
However your variable, TorqueConstant
is a constant conversion factor. Whereas when I was initially reading the source code and comparing it to the motor model document I assumed your TorqueConstant
was referring to Kq.
Also given this:
Shouldn't we allow the user to optionally specify the torque constant Kq if they want to model the efficiency more accurately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i agree....
Let me answer your questions: |
Is this because you're working on the assumption that From First-Order DC Electric Motor Model
If so, why not allow the user to specify it optionally, and if it isn't supplied then assume
Currently you only have a single set of units for each electrical type, so at the moment it's really optional. |
Yes i agreeOn Jan 23, 2022 5:42 PM, Sean McLeod ***@***.***> wrote:
@seanmcleod commented on this pull request.
In engine/DJI_E305.xml:
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!--bldc_engine name="DJI E305"-->
+ <brushless_dc_motor name="DJI E305">
+ <!-- E305 Motor is a DJI 2312E - 960 -->
+ <power unit="WATTS"> 320 </power>
+ <velocityconstant> 960 </velocityconstant>
+ <torqueconstant> 6.1217 </torqueconstant>
The naming is confusing, nomenclature from the motor theory document:
However your variable, TorqueConstant is a constant conversion factor. Whereas when I was initially reading the source code and comparing it to the motor model document I assumed your TorqueConstant was referring to Kq.
Also given this:
Shouldn't we allow the user to optionally specify the torque constant Kq if they want to model the efficiency more accurately?
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I have fixed the conflicts by merging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. This will give a means to test the brushless DC motor model.
A bit of cleanup is needed before merging:
- Please remove the file
aircraft/F450/F450-set.xml
as it is not used by JSBSim. - Please remove unused parameters from
engine/DJI_E305.xml
(i.e. the parameterspower
anddeceleration_factor
).
PR merged. Thanks for your contribution. |
This PR contain an example for testing brushless DC motor. The example is a DJI F450 quadcopter FDM.