Skip to content

Consider frequency-dependent ESR, capacitor tolerance and temperature (voltage derating)#2

Merged
gituser789 merged 7 commits into
mainfrom
develop
Oct 28, 2025
Merged

Consider frequency-dependent ESR, capacitor tolerance and temperature (voltage derating)#2
gituser789 merged 7 commits into
mainfrom
develop

Conversation

@gituser789
Copy link
Copy Markdown
Contributor

Calculation improvements

  • consider freqency-dependent ESR (for every fft frequency, another ESR is taken)
  • consider capacitor tolerance in selecting the number of parallel needed capacitors
  • consider the temperature for the voltage derating

A download script is provided to download all the ESR-over-frequency data from the manufacturer

@gituser789 gituser789 self-assigned this Oct 22, 2025
Comment thread cst/esr_downloads.py Outdated
else:
print(f"Failed to download file. Status code: {response.status_code}")
except Exception as e:
print(f"Error: {e}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More information about code location is useful. Sth. like 'Error at download capacitor data: {e}'
Additionally the information about the capacitor type, which could not download, is missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread cst/esr_downloads.py Outdated
file.write(response.content)
print(f"File downloaded successfully: {save_path}")
else:
print(f"Failed to download file. Status code: {response.status_code}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information about the capacitor type, which could not download, is missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread cst/selection.py Outdated
derating_factor = get_temperature_current_derating_factor(ambient_temperature=c_requirements.temperature_ambient, df_derating=c_derating)

# check for temperature derating
delta_temperature_max = derating_factor ** 2 * 15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number '15'. Minimum explain in comment above, what is the reason for multiply it with 15

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread cst/selection.py Outdated

derating_factor = get_temperature_current_derating_factor(ambient_temperature=capacitor_requirements.temperature_ambient, df_derating=c_derating)
virtual_inner_max_temperature = c_requirements.temperature_ambient + delta_temperature_max
c_db['V_op_max_virt'] = c_db.apply(lambda x: np.interp(virtual_inner_max_temperature, [85, 105, 125],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a short comment, that explain the 'magic numbers' 85, 105 and 125 are the temperatures,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@gituser789
Copy link
Copy Markdown
Contributor Author

Fixed the above points. Two additional points:

  • fixed the pyspelling path, so pyspelling fully works now
  • added the filtering by the capacitors resonance frequency (do not use capacitor if its resonance frequency is too high)

@gituser789 gituser789 merged commit bed8237 into main Oct 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants