Skip to content
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

Battery issues #225

Closed
caguero opened this issue Jun 25, 2020 · 1 comment
Closed

Battery issues #225

caguero opened this issue Jun 25, 2020 · 1 comment
Assignees
Labels
📜 blueprint Ignition Blueprint bug Something isn't working

Comments

@caguero
Copy link
Contributor

caguero commented Jun 25, 2020

I've been testing a few different aspects of batteries and here's a list of things that don't behave as expected:

  1. Battery load: The battery drains at a higher rate than it should be (100x). Approximately, it should be:

time = (<capacity> * <voltage>)/(<power_load>)

  1. The percentage field is a bit confusing to me because is set to 1 when the battery is fully charged. Either we multiply it by 100 to be a percentage or we should rename the label.
header {
  stamp {
    sec: 147
    nsec: 644000000
  }
}
voltage: 4.2
charge: 1.25
capacity: 2.5
percentage: 1
power_supply_status: FULL
  1. Incorrect Initial state of charge when <initial_charge> is set: Let's see an example using:
<initial_charge>1.25</initial_charge>
<capacity>2.5 </capacity>

Initially, we should observe a value of 50% as state of charge, however we get 100%.

header {
  stamp {
    sec: 227
    nsec: 261000000
  }
}
voltage: 3.1944770399030378
current: 0.078866614536290638
charge: 1.2499971286507221
capacity: 2.5
percentage: 0.99992326032470913
power_supply_status: DISCHARGING

header {
  stamp {
    sec: 227
    nsec: 281000000
  }
}
  1. Charging time doesn't behave as expected: charging_time is the number of hours required to fully charged a battery. It takes way less time than the expected value to recharge the battery. It might be related to (1).

  2. If <power_load> is high enough, voltage becomes 0 before the state of charge gets to 0. Example with this sdf:

<plugin filename="libignition-gazebo-linearbatteryplugin-system.so"
        name="ignition::gazebo::systems::LinearBatteryPlugin">
        <!--Li-ion battery spec from LIR18650 datasheet-->
        <battery_name>linear_battery</battery_name>
        <voltage>4.2</voltage>
        <open_circuit_voltage_constant_coef>4.2</open_circuit_voltage_constant_coef>
        <open_circuit_voltage_linear_coef>-2.0</open_circuit_voltage_linear_coef>
        <initial_charge>0.25</initial_charge>
        <capacity>0.25 </capacity>
        <resistance>0.07</resistance>
        <smooth_current_tau>2.0</smooth_current_tau>
        <enable_recharge>true</enable_recharge>
        <charging_time>0.16</charging_time>
        <power_load>200.1</power_load>
        <start_on_motion>false</start_on_motion>
        <recharge_by_topic>true</recharge_by_topic>
      </plugin>

After a few iterations, the battery status stays at:

header {
  stamp {
    sec: 55
    nsec: 404000000
  }
}
current: 59.703274818691881
charge: 0.24093013988070575
capacity: 0.25
percentage: 96.3720559522823
power_supply_status: DISCHARGING

Battery status doesn't change because voltage is 0.

@caguero caguero added bug Something isn't working 📜 blueprint Ignition Blueprint labels Jun 25, 2020
@caguero caguero self-assigned this Jun 25, 2020
@caguero
Copy link
Contributor Author

caguero commented Jul 13, 2020

Fixed in #230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 blueprint Ignition Blueprint bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant