{"id":20022087,"url":"https://github.com/upb-lea/mag-net-hub","last_synced_at":"2025-05-05T01:31:05.086Z","repository":{"id":226657698,"uuid":"769293381","full_name":"upb-lea/mag-net-hub","owner":"upb-lea","description":"MagNet Toolkit - Certified Models of the MagNet Challenge","archived":false,"fork":false,"pushed_at":"2024-08-27T11:12:39.000Z","size":999,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-23T00:04:27.183Z","etag":null,"topics":["machine-learning","magnetics","neural-networks","power-electronics","power-electronics-systems","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upb-lea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-08T18:40:15.000Z","updated_at":"2025-04-11T18:00:03.000Z","dependencies_parsed_at":"2024-03-30T15:44:44.750Z","dependency_job_id":"5d1332a7-9e28-4e1a-9071-5d51d42f86da","html_url":"https://github.com/upb-lea/mag-net-hub","commit_stats":null,"previous_names":["upb-lea/mag-net-hub"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upb-lea%2Fmag-net-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upb-lea%2Fmag-net-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upb-lea%2Fmag-net-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upb-lea%2Fmag-net-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upb-lea","download_url":"https://codeload.github.com/upb-lea/mag-net-hub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252423037,"owners_count":21745535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","magnetics","neural-networks","power-electronics","power-electronics-systems","transformers"],"created_at":"2024-11-13T08:39:07.966Z","updated_at":"2025-05-05T01:31:02.879Z","avatar_url":"https://github.com/upb-lea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eMagNet Toolkit\u003c/h1\u003e \n\u003ch2\u003eCertified Models of the MagNet Challenge\u003c/h2\u003e\n\u003c/div\u003e\n\n![Lint and Test](https://github.com/upb-lea/mag-net-hub/actions/workflows/python-package.yml/badge.svg)\n\nThis repository acts as a hub for selected power loss models that were elaborated by different competitors during the [MagNet Challenge 2023](https://github.com/minjiechen/magnetchallenge).\nFeel free to use these loss models for your power converter design as a complement to your datasheet.\n\nThe 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.\n\n__Disclaimer__: Only steady-state and no varying DC-Bias is supported yet. \nMoreover, training data stemmed from measurements on toroid-shaped ferrites that had a fix size.\n\nSupported materials:\n- ML95S\n- T37\n- 3C90\n- 3C92\n- 3C94\n- 3C95\n- 3E6\n- 3F4\n- 77\n- 78\n- 79\n- N27\n- N30\n- N49\n- N87\n\n\n## Installation\n\n### Python\nWe strongly recommend Python __3.10__.\nHigher versions may also work.\n\nThen install through pip:\n\n```\npip install mag-net-hub\n```\n\nor, alternatively, clone this repo and execute\n\n```\ncd mag-net-hub\npip install .\n```\n\n## Usage\nModels are provided as executable code with readily trained coefficients.\nHence, no training is conducted in this project.\n\n### Python\n```py\nimport numpy as np\nimport magnethub as mh\n\n# instantiate material-specific model\nmdl = mh.loss.LossModel(material=\"3C92\", team=\"paderborn\")\n\n# dummy B field data (one trajectory with 1024 samples)\nb_wave = np.random.randn(1024)* 200e-3  # in T\nfreq = 124062  # Hz\ntemp = 58  # °C\n\n# get power loss in W/m³ and estimated H wave in A/m\np, h = mdl(b_wave, freq, temp)\n\n# batch execution for 100 trajectories\nb_waves = np.random.randn(100, 1024)* 200e-3  # in T\nfreqs = np.random.randint(100e3, 750e3, size=100)\ntemps = np.random.randint(20, 80, size=100)\np, h = mdl(b_waves, freqs, temps)\n\n```\n\n\n## Contributing\nWhether you want to contribute your submission to the MagNet Challenge, or you are a single contributor who wants to add an awesome model to this hub -- any contribution is welcome.\n\nOpen a pull request to directly suggest small improvements to the infrastructure or to add your model (with performance statistics preferred). \nFor larger suggestions, please first open an issue or go to the discussion section to discuss your ideas. \n\nSee the below folder structure overview with annotations on how to contribute a model.\n\n```\n.\n├── src_py\n│   └── magnethub\n│       ├── __init__.py\n│       ├── loss.py\n│       ├── models\n│       │   ├── paderborn\n│       │   │   ├── changelog.md\n│       │   │   ├── cnn_3C90_experiment_1b4d8_model_f3915868_seed_0_fold_0.pt\n│       │   │   ├── cnn_3C92_experiment_ea1fe_model_72510647_seed_0_fold_0.pt\n|       |   |   └──  ...\n│       │   ├── sydney\n│       │   │   └── ...\n│       │   └── \u003cadd your contributor folder here\u003e\n│       │   │   └── \u003cadd your model coefficients here\u003e\n│       ├── paderborn.py\n|       ├── sydney.py\n|       ├── \u003cadd your model code here\u003e\n\n```\n\nAny number of models can be incorporated easily according to this code structure policy.\nIf you have added model coefficients and execution logic via code, it only requires to be hooked in\n`loss.py` and you are ready to fire this pull request (PR).\n\nIf it is possible, please also consider adding tests for your model logic under `tests/`, writing comprehensive docstrings in your code with some comments, and discuss the performance of your model in your PR. \n\nOther open ToDos are:\n - Matlab implementation\n - improve documentation\n\nThank you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupb-lea%2Fmag-net-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupb-lea%2Fmag-net-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupb-lea%2Fmag-net-hub/lists"}