Included Models#
The progpy package is distributed with a few pre-constructed models that can be used in simulation or prognostics. These models are summarized in the following sections.
Battery Model#
- class progpy.models.BatteryElectroChemEOD(**kwargs)#
Vectorized prognostics model for a battery, represented by an electrochemical equations as described in [Daigle2013]. This model predicts the end of discharge event.
The default model parameters included are for Li-ion batteries, specifically 18650-type cells. Experimental discharge curves for these cells can be downloaded from the Prognostics Center of Excellence Data Repository [DataRepo].
- Events: (1)
EOD: End of Discharge
- Inputs/Loading: (1)
i: Current draw on the battery
- States: (8)
- tb: Battery temperature (K)Vo: Voltage Drops due to Solid-Phase Ohmic ResistancesVsn: Negative Surface Voltage (V)Vsp: Positive Surface Voltage (V)qnB: Amount of Negative Ions at the Battery BulkqnS: Amount of Negative Ions at the Battery SurfaceqpB: Amount of Positive Ions at the Battery BulkqpS: Amount of Positive Ions at the Battery Surface
- Outputs: (2)
- t: Temperature of battery (°C)v: Voltage supplied by battery
- Performance Metrics: (1)
- max_i : The maximum current (amps) that can be sustained before steady-state voltage falls below VEOD. Decreases with discharge
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
qMobile (float) –
xnMax (float) – Maximum mole fraction (neg electrode)
xpMax (float) – Maximum mole fraction (pos electrode). Typically 1.
Ro (float) – for Ohmic drop (current collector resistances plus electrolyte resistance plus solid phase resistances at anode and cathode)
alpha (float) – anodic/cathodic electrochemical transfer coefficient
Sn (float) – Surface area (- electrode)
Sp (float) – Surface area (+ electrode)
kn (float) – lumped constant for BV (- electrode)
kp (float) – lumped constant for BV (+ electrode)
Vol (float) – total interior battery volume/2 (for computing concentrations)
VolSFraction (float) – fraction of total volume occupied by surface volume
tDiffusion (float) – diffusion time constant (increasing this causes decrease in diffusion rate)
to (float) – for Ohmic voltage
tsn (float) – for surface overpotential (neg)
tsp (float) – for surface overpotential (pos)
U0p (float) – Redlich-Kister parameter (+ electrode)
Ap (float) – Redlich-Kister parameter (+ electrode)
U0n (float) – Redlich-Kister parameter (- electrode)
An (float) – Redlich-Kister parameter (- electrode)
VEOD (float) – End of Discharge Voltage Threshold
References
- Daigle2013(1,2)
Daigle and C. Kulkarni, “Electrochemistry-based Battery Modeling for Prognostics,” Annual Conference of the Prognostics and Health Management Society 2013, pp. 249-261, New Orleans, LA, October 2013. https://papers.phmsociety.org/index.php/phmconf/article/view/2252
- DataRepo(1,2,3)
Prognostics Center of Excellence Data Repository https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/.
- class progpy.models.BatteryElectroChemEOL(**kwargs)#
Vectorized prognostics model for a battery degredation, represented by an electrochemical model as described in [Daigle2016]
The default model parameters included are for Li-ion batteries, specifically 18650-type cells. Experimental discharge curves for these cells can be downloaded from the Prognostics Center of Excellence Data Repository [DataRepo].
- Events: (1)
InsufficientCapacity: Insufficient battery capacity
- Inputs/Loading: (1)
i: Current draw on the battery
- States: (3)
- qMax: Maximum battery capacityRo : for Ohmic drop (current collector resistances plus electrolyte resistance plus solid phase resistances at anode and cathode)D : diffusion time constant (increasing this causes decrease in diffusion rate)
Outputs: (0)
- Keyword Arguments
process_noise (Optional, float or dict[Srt, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[Srt, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
qMaxThreshold (float) – Threshold for qMax (for threshold_met and event_state), after which the InsufficientCapacity event has occurred. Note: Battery manufacturers specify a threshold of 70-80% of qMax
wq (float) – Wear rate for qMax
wr (float) – Wear rate for Ro
wd (float) – Wear rate for D
References
- Daigle2016(1,2)
Daigle and C. Kulkarni, “End-of-discharge and End-of-life Prediction in Lithium-ion Batteries with Electrochemistry-based Aging Models,” AIAA SciTech Forum 2016, San Diego, CA. https://arc.aiaa.org/doi/pdf/10.2514/6.2016-2132
- progpy.models.BatteryElectroChem#
alias of
progpy.models.battery_electrochem.BatteryElectroChemEODEOL
- class progpy.models.BatteryElectroChemEODEOL(**kwargs)#
Prognostics model for a battery degredation and discharge, represented by an electrochemical model as described in [Daigle2013] and [Daigle2016]
The default model parameters included are for Li-ion batteries, specifically 18650-type cells. Experimental discharge curves for these cells can be downloaded from the Prognostics Center of Excellence Data Repository [DataRepo].
- Events: (2)
- EOD: End of DischargeInsufficientCapacity: Insufficient battery capacity
- Inputs/Loading: (1)
i: Current draw on the battery
- States: (11)
See BatteryElectroChemEOD, BatteryElectroChemEOL
- Outputs (2)
- t: Temperature of battery (°C)v: Voltage supplied by battery
Note
For keyword arguments, see BatteryElectroChemEOD, BatteryElectroChemEOL
- class progpy.models.BatteryCircuit(**kwargs)#
Vectorized prognostics model for a battery, represented by an equivilant circuit model as described in [DaigleSankararaman2013]
- Events: (1)
EOD: End of Discharge
- Inputs/Loading: (1)
i: Current draw on the battery
- States: (4)
- tb : Battery Temperature (K)qb : Charge stored in Capacitor Cb of the equivalent circuit modelqcp : Charge stored in Capacitor Ccp of the equivalent circuit modelqcs : Charge stored in Capacitor Ccs of the equivalent circuit model
- Outputs: (2)
- t: Temperature of battery (K)v: Voltage supplied by battery
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
V0 (float) – Nominal Battery Voltage
Rp (float) – Battery Parasitic Resistance
qMax (float) – Maximum Charge
CMax (float) – Maximum Capacity
VEOD (float) – End of Discharge Voltage Threshold
Cb0 (float) – Battery Capacity Parameter
Cbp0 (float) – Battery Capacity Parameter
Cbp1 (float) – Battery Capacity Parameter
Cbp2 (float) – Battery Capacity Parameter
Cbp3 (float) – Battery Capacity Parameter
Rs (float) – R-C Pair Parameter
Cs (float) – R-C Pair Parameter
Rcp0 (float) – R-C Pair Parameter
Rcp1 (float) – R-C Pair Parameter
Rcp2 (float) – R-C Pair Parameter
Ccp (float) – R-C Pair Parameter
Ta (float) – Ambient Temperature (K)
Jt (float) – Temperature parameter
ha (float) – Heat transfer coefficient, ambient
hcp (float) – Heat transfer coefficient parameter
hcs (float) – Heat transfer coefficient - surface
x0 (StateContianer) – Initial state
Note
This is quicker but also less accurate than the electrochemistry model (
progpy.models.BatteryElectroChemEOD
). We recommend using the electrochemistry model, when possible.References
- DaigleSankararaman2013
Daigle and S. Sankararaman, “Advanced Methods for Determining Prediction Uncertainty in Model-Based Prognostics with Application to Planetary Rovers,” Annual Conference of the Prognostics and Health Management Society 2013, pp. 262-274, New Orleans, LA, October 2013. https://papers.phmsociety.org/index.php/phmconf/article/view/2253
Pump Model#
There are two variants of the pump model based on if the wear parameters are estimated as part of the state. The models are described below
- class progpy.models.CentrifugalPumpBase(**kwargs)#
Prognostics model for a Centrifugal Pump as described in [DaiglePump2013].
- Events: (4)
- ImpellerWearFailure: Failure of the impeller due to wearPumpOilOverheat: Overheat of the pump oilRadialBearingOverheat: Overheat of the radial bearingThrustBearingOverheat: Overhead of the thrust bearing
- Inputs/Loading: (5)
- Tamb: Ambient Temperature (K)V: Voltagepdisch: Discharge Pressure (Pa)psuc: Suction Pressure (Pa)wsync: Synchronous Rotational Speed of Supply Voltage (rad/sec)
- States: (9)
- A: Impeller Area (m^2)Q: Flow Rate into Pump (m^3/s)To: Oil Temperature (K)Tr: Radial Bearing Temperature (K)Tt: Thrust Bearing Temperature (K)rRadial: Radial (thrust) Friction CoefficientrThrust: Rolling Friction Coefficientw: Rotational Velocity of Pump (rad/sec)QLeak: Leak Flow Rate (m^3/s)
- Outputs: (5)
- Qout: Discharge Flow (m^3/s)To: Oil Temperature (K)Tr: Radial Bearing Temperature (K)Tt: Thrust Bearing Temperature (K)w: Rotational Velocity of Pump (rad/sec)
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
pAtm (float) – Atmospheric pressure
a0 (float) – empirical coefficient for flow torque eqn
a1 (float) – empirical coefficient for flow torque eqn
a2 (float) – empirical coefficient for flow torque eqn
A (float) – impeller blade area
b (float) –
n (float) – Pole Phases
p (float) – Pole Pairs
I (float) – impeller/shaft/motor lumped inertia
r (float) – lumped friction parameter (minus bearing friction)
R1 (float) –
R2 (float) –
L1 (float) –
FluidI (float) – Pump fluid inertia
c (float) – Pump flow coefficient
cLeak (float) – Internal leak flow coefficient
ALeak (float) – Internal leak area
mcThrust (float) –
HThrust2 (HThrust1,) –
mcRadial (float) –
HRadial2 (HRadial1,) –
mcOil (float) –
HOil3 (HOil1, HOil2,) –
wA (float) – Wear rates. See also CentrifugalPumpWithWear
wRadial (float) – Wear rates. See also CentrifugalPumpWithWear
wThrust (float) – Wear rates. See also CentrifugalPumpWithWear
lim (dict) – Parameter limits
See also
References
- DaiglePump2013(1,2)
Daigle and K. Goebel, “Model-based Prognostics with Concurrent Damage Progression Processes,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 43, no. 4, pp. 535-546, May 2013. https://www.researchgate.net/publication/260652495_Model-Based_Prognostics_With_Concurrent_Damage_Progression_Processes
- progpy.models.CentrifugalPump#
alias of
progpy.models.centrifugal_pump.CentrifugalPumpWithWear
- class progpy.models.CentrifugalPumpWithWear(**kwargs)#
Prognostics model for a centrifugal pump with wear parameters as part of the model state. This is identical to CentrifugalPumpBase, only CentrifugalPumpBase has the wear params as parameters instead of states
This class implements a Centrifugal Pump model as described in [DaiglePump2013].
- Events: (4)
See CentrifugalPumpBase
- Inputs/Loading: (5)
See CentrifugalPumpBase
- States: (12)
- States from CentrifugalPumpBase +wA: Wear Rate for Impeller AreawRadial: Wear Rate for Radial (thrust) Friction CoefficientwRadial: Wear Rate for Rolling Friction Coefficient
- Outputs: (5)
See CentrifugalPumpBase
- Model Configuration Parameters:
See CentrifugalPumpBase
See also
Pneumatic Valve#
There are two variants of the valve model based on if the wear parameters are estimated as part of the state. The models are described below
- class progpy.models.PneumaticValveBase(**kwargs)#
Prognostics model for a Pneumatic Valve model as described in [DaigleValve2011].
- Events: (5)
- Bottom Leak: Failure due to a leak at the bottom pneumatic portTop Leak: Failure due to a leak at the top pneumatic portInternal Leak: Failure due to an internal leak at the seal surrounding the pistonSpring Failure: Failure due to spring weakening with useFriction Failure: Failure due to increase in friction along the piston with wear
- Inputs/Loading: (4)
- pL: Fluid pressure at the left side of the plug (Pa)pR: Fluid pressure at the right side of the plug (Pa)uBot: input pressure at the bottom pneumatic port (Pa)uTop: input pressure at the botton pneumatic port (Pa)
- States: (10)
- Aeb: Area of the leak at the bottom pneumatic portAet: Area of the leak at the top pneumatic portAi: Area of the internal leakk: Spring CoefficientmBot: Mass on bottom of piston (kg)mTop: Mass on top of the piston (kg)r: Friction Coefficientv: Velocity of the piston (m/s)x: Poisition of the piston (m)pDiff: Difference in pressure between the left and the right
- Outputs: 6
- Q: FlowrateiB: Is the piston at the bottom (bool)iT: Is the piston at the top (bool)pB: Pressure at the bottom (Pa)pT: Pressure at the top (Pa)x: Position of piston (m)
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise e.g., normal, uniform, triangular
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise e.g., normal, uniform, triangular
g (float) – Acceleration due to gravity (m/s^2)
pAtm (float) – Atmospheric pressure (Pa)
m (float) – Plug mass (kg)
offsetX (float) – Spring offset distance (m)
Ls (float) – Stroke Length (m)
Ap (float) – Surface area of piston for gas contact (m^2)
Vbot0 (float) – Below piston “default” volume (m^3)
Vtop0 (float) – Above piston “default” volume (m^3)
indicatorTol (float) – tolerance bound for open/close indicators
pSupply (float) – Supply Pressure (Pa)
Av (float) – Surface area of plug end (m^2)
Cv (float) – flow coefficient assuming Cv of 1300 GPM
rhoL (float) – density of LH2 in kg/m^3
gas_mass (float) – Molar mass of supply gas (kg/mol)
gas_temp (float) – Temperature of supply gas (K)
gas_R (gas_gamma, gas_z,) – Supply gas parameters
At (float) –
Ct (float) –
Ab (float) –
Cb (float) –
AbMax (float) – Max limit for state Aeb
AtMax (float) – Max limit for state Aet
AiMax (float) – Max limit for state Ai
kMin (float) – Min limit for state k
rMax (float) – Max limit for state r
wb (float) – Wear parameter for bottom leak
wi (float) – Wear parameter for internal leak
wt (float) – Wear parameter for top leak
wk (float) – Wear parameter for spring
wr (float) – Wear parameter for friction
Note
Supply gas parameters (gas_mass, gas_temp, gas_gamme, gas_z, gas_R) are for Nitrogen by default
References
- DaigleValve2014
M. Daigle and K. Goebel, “A Model-based Prognostics Approach Applied to Pneumatic Valves,” International Journal of Prognostics and Health Management, vol. 2, no. 2, August 2011. https://papers.phmsociety.org/index.php/ijphm/article/view/1359
- progpy.models.PneumaticValve#
alias of
progpy.models.pneumatic_valve.PneumaticValveWithWear
- class progpy.models.PneumaticValveWithWear(**kwargs)#
Prognostics model for a pneumatic valve with wear parameters as part of the model state. This is identical to PneumaticValveBase, only PneumaticValveBase has the wear params as parameters instead of states
This class implements a Pneumatic Valve model as described in the following paper: M. Daigle and K. Goebel, “A Model-based Prognostics Approach Applied to Pneumatic Valves,” International Journal of Prognostics and Health Management, vol. 2, no. 2, August 2011. https://www.phmsociety.org/node/602
- Events: (4)
See PneumaticValveBase
- Inputs/Loading: (5)
See PneumaticValveBase
- States: (12)
States from PneumaticValveBase + wb, wi, wk, wr, wt
- Outputs: (5)
See PneumaticValveBase
- Model Configuration Parameters:
See PneumaticValveBase
DC Motor#
- class progpy.models.DCMotorSP(**kwargs)#
New in version 1.4.0.
Model of single-phase brushless DC Motor, as defined by the following equations:
\[\dfrac{di}{dt} = \dfrac{1}{L1}*(V-E-R*i)\]\[\dfrac{d{\omega}}{dt} = \dfrac{1}{J_t} * (T_e - T_l - B * \omega)\]where:
i current, A
\(\omega\) rotor speed, \(\dfrac{rad}{s}\)
V input voltage, V
E back-emf voltage, V
R armature resistance, Ohm
\(J_t\) total inertia (rotor + propeller or load), \(kg*m^2\)
\(T_e\) driving torque (electrical), \(N*m\)
\(T_l\) load torque (mechanical), \(N*m\)
B friction coefficient, \(\dfrac{N*m}{rad/s}\)
t time, \(s\)
- Events: (0)
- None
- Inputs/Loading: (2)
- v: Voltaget_l: Torque from load
- States: (2)
- i: current (A)v_rot: Rotational velocity (rad/sec)
- Outputs: (1)
- v_rot: Rotational velocity (rad/sec)
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
L (float) – Self-inductance (H)
M (float) – Mutual inductance (H)
R (float) – Armature Resistance (Ohm)
Kt (float) – back emf constant / Torque constant (V/rad/sec)
B (float) – Friction in motor / Damping (Not a function of thrust) (Nm/(rad/s))
J (float) – Total load moment of inertia (motor shaft + load) (Kg*m^2) - alternately, you can set these separately as Js and Jl
Js (float) – Moment of inertia of motor shaft (kg*m^2) - one component of J
Jl (float) – Moment of inertia from load (kg*m^2) - one component of J. Note load is whatever the motor is attached to (e.g., propeller, valve, axil, etc.)
- class progpy.models.DCMotor(**kwargs)#
New in version 1.3.0.
Model of triple-phase brushlessDC Motor.
This model was developed by NASA’s System Wide Safety (SWS) Project. https://www.nasa.gov/aeroresearch/programs/aosp/sws/
- Events: (0)
- None
- Inputs/Loading: (4)
- v_a, v_b, v_c: Voltages at a, b, ct_l: Torque from load
- States: (5)
- i_a, i_b, i_c: Currents provided to motorv_rot: Rotational velocity (rad/sec)theta: Angle of motor (rad)
- Outputs: (2)
- v_rot: Rotational velocity (rad/sec)theta: Angle of motor (rad)
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
L (float) – Inductance (H)
M (float) – Mutual inductance (H)
R (float) – Resistance (Ohm)
K (float) – back emf constant / Torque constant (V/rad/sec)
B (float) – Friction in motor / Damping (Not a function of thrust) (Nm/(rad/s))
Po (float) – no of poles in rotor
J (float) – Load moment of inertia (neglecting motor shaft inertia) (Kg*m^2)
References
- 0
Matteo Corbetta, Chetan S. Kulkarni. An approach for uncertainty quantification and management of unmanned aerial vehicle health.
Annual Conference of the PHM Society, Scottsdale, AZ, 2019. http://papers.phmsociety.org/index.php/phmconf/article/view/847 .. [1] George E. Gorospe Jr, Chetan S. Kulkarni, Edward Hogge, Andrew Hsu, and Natalie Ownby. A Study of the Degradation of Electronic Speed Controllers forBrushless DC Motors. Asia Pacific Conference of the Prognostics and Health Management Society, 2017. https://ntrs.nasa.gov/citations/20200000579
ESC#
- class progpy.models.ESC(**kwargs)#
New in version 1.3.0.
Simple Electronic-Speed Controller (ESC) model for powertrain modeling. This model replicates the behavior of the speed controller with pulse-width modulation (PWM) and commutation matrix. Duty cycle simulated with a square wave using scipy signal.square function.
This model was developed by NASA’s System Wide Safety (SWS) Project. https://www.nasa.gov/aeroresearch/programs/aosp/sws/
- Events: (0)
- None
- Inputs/Loading: (3)
- duty : Duty cycle (unitless), percentage the input is “on” (i.e., voltage is supplied). 0 = no voltage supply (always closed), 1 = 100% voltage supply (always open).theta : rotor position (rad).v : voltage (V), voltage input from Battery (after DC converter, should be constant).
- States: (4)
- v_a : 3-phase voltage value, first phase, (V), motor inputv_b : 3-phase voltage value, second phase, (V), motor inputv_c : 3-phase voltage value, third phase (V), motor inputt : time value (s).
- Outputs: (4)
- v_a : 3-phase voltage value, first phase, (V), motor inputv_b : 3-phase voltage value, second phase, (V), motor inputv_c : 3-phase voltage value, third phase (V), motor inputt : time value (s).
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
sawtooth_freq (float) – Frequency of PWM signal [Hz], default value in default_parameters.
References
- 0
Matteo Corbetta, Chetan S. Kulkarni. An approach for uncertainty quantification and management of unmanned aerial vehicle health.
Annual Conference of the PHM Society, Scottsdale, AZ, 2019. http://papers.phmsociety.org/index.php/phmconf/article/view/847 .. [1] George E. Gorospe Jr, Chetan S. Kulkarni, Edward Hogge, Andrew Hsu, and Natalie Ownby. A Study of the Degradation of Electronic Speed Controllers forBrushless DC Motors. Asia Pacific Conference of the Prognostics and Health Management Society, 2017. https://ntrs.nasa.gov/citations/20200000579
Powertrain#
- class progpy.models.Powertrain(esc, motor, **kwargs)#
New in version 1.3.0.
Powertrain model composed of ESC and DC motor (with the option to add propeller load using parameter Cq). The powertrain model is used to simulate the motor dynamics including the effect of the speed controller and pulse-width modulation.
Parameters for a standard propeller for commercial UAV are also added to the powertrain model, so that the load torque acting on the motor can be computed. At this stage, the propeller is modeled simply as a load torque proportional to the square of the rotor speed. When simulating the full PWM signal, this model needs a very small time step size (e.g., dt=1e-5) to show the full dynamics. Faster simulations can be achieved by ignoring the PWM square wave and acting directing on the input voltage. For example, modulating the input voltage to replicate the behavior of a throttle.
References: Matteo Corbetta, Chetan S. Kulkarni. An approach for uncertainty quantification and management of unmanned aerial vehicle health. Annual Conference of the PHM Society, Scottsdale, AZ, 2019. http://papers.phmsociety.org/index.php/phmconf/article/view/847
George E. Gorospe Jr, Chetan S. Kulkarni, Edward Hogge, Andrew Hsu, and Natalie Ownby. A Study of the Degradation of Electronic Speed Controllers forBrushless DC Motors. Asia Pacific Conference of the Prognostics and Health Management Society, 2017. https://ntrs.nasa.gov/citations/20200000579
R.P. Palanisamy C. Kulkarni, M. Corbetta, P. Banerjee “Fault Detection and Performance Monitoring of Propellers in Electric UAV”, 2022 IEEE Aerospace
This model was developed by NASA’s System Wide Safety (SWS) Project. https://www.nasa.gov/aeroresearch/programs/aosp/sws/
- Events: (0)
- None
- Inputs/Loading: (2)
- duty : Duty cycle [-], percentage the input is “on” (i.e., voltage is supplied). 0 = no voltage supply (always closed), 1 = 100% voltage supply (always open).v : voltage [V], voltage input from Battery (after DC converter, should be constant).
- States: (5)
- v_a : 3-phase voltage value, first phase, [V], input to the motorv_b : 3-phase voltage value, second phase, [V], input to the motorv_c : 3-phase voltage value, third phase [V], input to the motort : time value [s].i_a : 3-phase current value, first phase [A], motor statei_b : 3-phase current value, second phase [A], motor statei_c : 3-phase current value, third phase [A], motor statev_rot : Motor angular velocity [rad/s]theta : Motor rotor position [rad]
- Outputs: (2)
- v_rot : Motor angular velocity [rad/s]theta : Motor rotor position [rad]
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform,
c_q (float) – Dimensionless coefficient of torque of the propeller [-], (APC data, derived).
rho (float) – Air density [Kg/m^3].
D (float) – Propeller diameter [m].
Note
This model is known to be sensitive to noise. The process noise and measurement noise should be set to low values.
Note
Powertrain is added on top of any noise in the underlying esc and motor models. To update the esc or motor parameters, access m.esc.parameters and m.motor.paramters, respectively.
PropellerLoad#
- class progpy.models.PropellerLoad(**kwargs)#
New in version 1.5.0.
This is a simple model of a propeller load. This model estimates load torque as a function of the rotational velocity. When the propeller is spinning faster, drag increases, and the propeller load on the torque increases.
This model is typically used with the esc and dcmotor models to simulate a motor and propeller system.
Events: (0)
- Inputs/Loading: (1):
v_rot: Rotational Velocity (rad/sec)
- States: (1)
t_l: Load Torque
- Outputs: (1):
t_l: Load Torque
Aircraft Models#
Aircraft model simulate the flight of an aircraft. All aircraft models inherit from progpy.models.aircraft_model.AircraftModel
. Included models are listed below:
- class progpy.models.aircraft_model.SmallRotorcraft(**kwargs)#
New in version 1.5.0.
Vectorized prognostics model to generate a predicted trajectory for a small rotorcraft using a n=6 degrees-of-freedom dynamic model with feedback control loop. The model follows the form:
\[ \begin{align}\begin{aligned}u = h(x, x_{ref})\\dx/dt = f(x, \theta, u)\end{aligned}\end{align} \]- where:
x is a 2n state vector containing position, attitude and corresponding derivatives \(\theta\) is a vector of model parameters including rotorcraft mass, inertia moment, aerodynamic coefficients, etc. u is the input vector: thrust along the body vertical axis, and three moments along the UAV body axis to follow the desired trajectory. \(x_{ref}\) is the desired state vector at that specific time step, with dimension 2n f(.) is growth rate function of all vehicle state h(.) is the feedback-loop control function that returns the necessary thrust and moments (u vector) to cover the error between desired state \(x_{ref}\) and current state x dx/dt is the state-increment per unit time.
Model generates cartesian positions and velocities, pitch, roll, and yaw, and angular velocities throughout time to satisfy some user-define waypoints.
See [0]_ for modeling details.
- Events: (1)
TrajectoryComplete: The final time of the reference trajectory has been reached
- Inputs/Loading: (0)
- T: thrustmx: moment in xmy: moment in ymz: moment in zmission_complete: progression throughout time to final time point in reference trajectory, where 0 is no progress and 1 is mission completed
- States: (14)
- x: first position in cartesian reference frame East-North-Up (ENU), i.e., East in fixed inertia frame, center is at first waypointy: second position in cartesian reference frame East-North-Up (ENU), i.e., North in fixed inertia frame, center is at first waypointz: third position in cartesian reference frame East-North-Up (ENU), i.e., Up in fixed inertia frame, center is at first waypointphi: Euler’s first attitude angletheta: Euler’s second attitude anglepsi: Euler’s third attitude anglevx: velocity along x-axis, i.e., velocity along East in fixed inertia framevy: velocity along y-axis, i.e., velocity along North in fixed inertia framevz: velocity along z-axis, i.e., velocity Up in fixed inertia framep: angular velocity around UAV body x-axisq: angular velocity around UAV body y-axisr: angular velocity around UAV body z-axist: timemission_complete: progression throughout time to final time point in reference trajectory, where 0 is no progress and 1 is mission completed
- Outputs: (12)
- x: first position in cartesian reference frame East-North-Up (ENU), i.e., East in fixed inertia frame, center is at first waypointy: second position in cartesian reference frame East-North-Up (ENU), i.e., North in fixed inertia frame, center is at first waypointz: third position in cartesian reference frame East-North-Up (ENU), i.e., Up in fixed inertia frame, center is at first waypointphi: Euler’s first attitude angletheta: Euler’s second attitude anglepsi: Euler’s third attitude anglevx: velocity along x-axis, i.e., velocity along East in fixed inertia framevy: velocity along y-axis, i.e., velocity along North in fixed inertia framevz: velocity along z-axis, i.e., velocity Up in fixed inertia framep: angular velocity around UAV body x-axisq: angular velocity around UAV body y-axisr: angular velocity around UAV body z-axis
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
dt (Optional, float) – Time step in seconds for trajectory generation
gravity (Optional, float) – m/s^2, gravity magnitude
air_density (Optional, float) – kg/m^3, atmospheric density
steadystate_input (Optional, float) – Input vector to maintain the vehicle in a stable position that is used to build the linearized model for the controller.
vehicle_model (Optional, str) – String to specify vehicle type. ‘tarot18’ and ‘djis1000’ are supported
vehicle_payload (Optional, float) – kg, payload mass
vehicle_max_speed (Optional, float) – m/s, maximum vehicle speed
vehicle_max_roll (Optional, float) – rad, maximum roll angle
vehicle_max_pitch (Optional, float) – rad, maximum pitch angle
References
[0] M. Corbetta et al., “Real-time UAV trajectory prediction for safely monitoring in low-altitude airspace,” AIAA Aviation 2019 Forum, 2019. https://arc.aiaa.org/doi/pdf/10.2514/6.2019-3514
ThrownObject#
- class progpy.models.ThrownObject(**kwargs)#
Simple Non-Linear model that similates an object thrown into the air with air resistance
- Events: (2)
- falling: The object is fallingimpact: The object has hit the ground
Inputs/Loading: (0)
- States: (2)
- x: Position in space (m)v: Velocity in space (m/s)
- Outputs: (1)
- x: Position in space (m)
- Keyword Arguments
process_noise (Optional, float or dict[str, float]) – Process noise (applied at dx/next_state). Can be number (e.g., .2) applied to every state, a dictionary of values for each state (e.g., {‘x1’: 0.2, ‘x2’: 0.3}), or a function (x) -> x
process_noise_dist (Optional, str) – distribution for process noise (e.g., normal, uniform, triangular)
measurement_noise (Optional, float or dict[str, float]) – Measurement noise (applied in output eqn). Can be number (e.g., .2) applied to every output, a dictionary of values for each output (e.g., {‘z1’: 0.2, ‘z2’: 0.3}), or a function (z) -> z
measurement_noise_dist (Optional, str) – distribution for measurement noise (e.g., normal, uniform, triangular)
g (Optional, float) – Acceleration due to gravity (m/s^2). Default is 9.81 m/s^2 (standard gravity)
rho (Optional, float) – Air density (kg/m^3). Default is 1.225 (air density at sea level). Used in drag calculation
A (Optional, float) – Cross sectional area of object (m^2)
m (Optional, float) – Mass of object (kg)
cd (Optional, float) – Coefficient of drag
thrower_height (Optional, float) – Height of the thrower (m). Default is 1.83 m
throwing_speed (Optional, float) – Speed at which the ball is thrown (m/s). Default is 40 m/s