{"id":31922915,"url":"https://github.com/gkeiel/grid_tied_simulation","last_synced_at":"2025-10-13T23:27:04.903Z","repository":{"id":311245587,"uuid":"1043002594","full_name":"gkeiel/grid_tied_simulation","owner":"gkeiel","description":"MATLAB-PSIM simulation and control of grid-tied inverters","archived":false,"fork":false,"pushed_at":"2025-08-23T01:11:58.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-23T03:29:18.690Z","etag":null,"topics":["inverter","matlab","psim","simulation"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","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/gkeiel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-08-23T00:25:38.000Z","updated_at":"2025-08-23T01:12:01.000Z","dependencies_parsed_at":"2025-08-23T03:29:21.624Z","dependency_job_id":"9b6efa37-13a3-471a-94d4-f3ae0a5c1240","html_url":"https://github.com/gkeiel/grid_tied_simulation","commit_stats":null,"previous_names":["gkeiel/grid_tied_simulation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gkeiel/grid_tied_simulation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkeiel%2Fgrid_tied_simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkeiel%2Fgrid_tied_simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkeiel%2Fgrid_tied_simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkeiel%2Fgrid_tied_simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkeiel","download_url":"https://codeload.github.com/gkeiel/grid_tied_simulation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkeiel%2Fgrid_tied_simulation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017241,"owners_count":26086015,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["inverter","matlab","psim","simulation"],"created_at":"2025-10-13T23:26:59.041Z","updated_at":"2025-10-13T23:27:04.898Z","avatar_url":"https://github.com/gkeiel.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grid-tied inverter simulation and analysis\n\nA program for simulation and analysis of the output stage in grid-connected systems. Considering an grid-tied system consisting of a half-bridge voltage source inverter (VSI) and an output LCL filter, it allows evaluating the operation of such electronic device for high-frequency switching and under different load conditions.\n\n\u003cimg width=\"1593\" height=\"621\" alt=\"grid_tied\" src=\"https://github.com/user-attachments/assets/1dcca810-eb65-4bb0-ab22-f472c2f2aaa3\" /\u003e\n\nThe program contains the following file types:\n- **MATLAB** scripts for general settings and controller design\n- **Simulink** implementation for digital-control simulation\n- **PSIM** implementation for power-electronics simulation\n\nMain file named as 'run_grid_tied.m'.\n\n## Current regulation\n\nThe current regulator in grid-connected inverters aims to maintain the current injected to grid at quality levels accepted by standards such as IEEE 1547. One solution for designing such output-current regulators are controllers based on the internal model principle (IMP), which in case of grid-tied inverters yield to the multi-resonant and repetitive controllers.\n\nConsider a closed-loop in the form\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"841\" height=\"331\" alt=\"current_regulator_closed_loop\" src=\"https://github.com/user-attachments/assets/291c27af-4425-4eb3-9891-3c01ce1f8387\" /\u003e\n\u003c/div\u003e\n\nemploying a proportional-multiple-resonant (PMR) controller with transfer function\n\n$$C(s) = \\frac{u_v(s)}{e(s)} = k_{e} +\\sum_{i=1,3,\\dots}^{h}\\frac{k_{{2i-1}} +k_{{2i}}s}{s^{2} +2\\xi_{i}\\omega_{r_i} s +\\omega_{r_i}^{2}}$$\n\nwhere $k_{e}$, $k_{{2i-1}}$, and $k_{{2i}}$ are gains to be determined, $\\xi_{i}$ is the damping factor of the $i$-th resonant mode and $\\omega_{r_i}$ the $i$-th multiple of the fundamental frequency $\\omega_0$.\n\nAn appropriate design of $C(s)$, considering a sufficient number of resonant modes, results in grid-tied controllers allowing to perfectly follow a sinusoidal current reference and its harmonic frequencies when supplying non-linear loads.\n\nThe control law shown can be rewritten as\n\n$$u(t) = Kx_{a}(t)$$\n\nwhere $x_{a}(t) = [x'(t)\\ x_{r}'(t)]' \\in \\mathbb{R}^{3+2h}$ is the augmented state where $x(t) = [i_L(t)\\ v_c(t)\\ i_o(t)]'$, $x_r(t)$ contains the resonant states and\n\n$$K = [k_{c}\\quad k_{v}\\quad k_{g}\\quad k_{1}\\quad k_{2}\\quad \\cdots\\quad k_{2h-1}\\quad k_{2h}].$$\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkeiel%2Fgrid_tied_simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkeiel%2Fgrid_tied_simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkeiel%2Fgrid_tied_simulation/lists"}