Skip to content

Commit 58ba1a6

Browse files
committed
improve doc, bump to 0.0.5
1 parent 0b3f4fa commit 58ba1a6

4 files changed

Lines changed: 32 additions & 13 deletions

File tree

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This repository acts as a hub for selected power loss models that were elaborate
1010
Feel free to use these loss models for your power converter design as a complement to your datasheet.
1111

1212
The loss models are designed such that you can request a certain frequency, temperature, material and $B$ wave (sequence), in order to be provided with a scalar power loss estimate and a corresponding $H$ wave estimate.
13-
Note that only steady-state and no varying DC-Bias is supported yet.
13+
14+
__Disclaimer__: Only steady-state and no varying DC-Bias is supported yet.
15+
Moreover, training data stemmed from measurements on toroid-shaped ferrites that had a fix size.
1416

1517
Supported materials:
1618
- ML95S
@@ -42,6 +44,13 @@ Then install through pip:
4244
pip install mag-net-hub
4345
```
4446

47+
or, alternatively, clone this repo and execute
48+
49+
```
50+
cd mag-net-hub
51+
pip install .
52+
```
53+
4554
### Matlab
4655
TBD
4756

@@ -59,15 +68,15 @@ import magnethub as mh
5968
mdl = mh.loss.LossModel(material="3C92", team="paderborn")
6069

6170
# dummy B field data (one trajectory with 1024 samples)
62-
b_wave = np.random.randn(1024)* 200e-3 # mT
71+
b_wave = np.random.randn(1024)* 200e-3 # in T
6372
freq = 124062 # Hz
6473
temp = 58 # °C
6574

66-
# get power loss and estimated H wave
75+
# get power loss in W/m³ and estimated H wave in A/m
6776
p, h = mdl(b_wave, freq, temp)
6877

6978
# batch execution for 100 trajectories
70-
b_waves = np.random.randn(100, 1024)* 200e-3 # mT
79+
b_waves = np.random.randn(100, 1024)* 200e-3 # in T
7180
freqs = np.random.randint(100e3, 750e3, size=100)
7281
temps = np.random.randint(20, 80, size=100)
7382
p, h = mdl(b_waves, freqs, temps)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mag-net-hub"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
authors = [
55
{ name = "Wilhelm Kirchgässner" },
66
]

src_py/magnethub/loss.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,17 @@ def __call__(self, b_field, frequency, temperature):
6464
6565
Args
6666
----
67-
b_field: (B, T) array_like
68-
The magnetic flux density array(s). First dimension describes the batch, the second
67+
b_field: (X, Y) array_like
68+
The magnetic flux density array(s) in T. First dimension X describes the batch size, the second Y
6969
the time length (will always be interpolated to 1024 samples)
7070
frequency: scalar or 1D array-like
71-
The frequency operation point(s)
71+
The frequency operation point(s) in Hz
7272
temperature: scalar or 1D array-like
73-
The temperature operation point(s)
73+
The temperature operation point(s) in °C
74+
75+
Return
76+
------
77+
p, h: (X,) np.array, (X, Y) np.ndarray
78+
The estimated power loss (p) in W/m³ and the estimated magnetic field strength (h) in A/m.
7479
"""
7580
return self.mdl(b_field, frequency, temperature)

src_py/magnethub/paderborn.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,18 @@ def __call__(self, b_seq, frequency, temperature):
504504
505505
Args
506506
----
507-
b_seq: (B, T) array_like
508-
The magnetic flux density array(s). First dimension describes the batch, the second
507+
b_seq: (X, Y) array_like
508+
The magnetic flux density array(s) in T. First dimension X describes the batch, the second Y
509509
the time length (will always be interpolated to 1024 samples)
510510
frequency: scalar or 1D array-like
511-
The frequency operation point(s)
511+
The frequency operation point(s) in Hz
512512
temperature: scalar or 1D array-like
513-
The temperature operation point(s)
513+
The temperature operation point(s) in °C
514+
515+
Return
516+
------
517+
p, h: (X,) np.array, (X, Y) np.ndarray
518+
The estimated power loss (p) in W/m³ and the estimated magnetic field strength (h) in A/m.
514519
"""
515520
ds = engineer_features(b_seq, frequency, temperature, self.material)
516521
# construct tensors

0 commit comments

Comments
 (0)