{"id":22421908,"url":"https://github.com/auralius/matlab_dss_wrapper","last_synced_at":"2025-10-09T04:13:15.957Z","repository":{"id":148342545,"uuid":"466671891","full_name":"auralius/matlab_dss_wrapper","owner":"auralius","description":"Wrapper functions for easier dynamic optimization implementations by using direct single shooting method.","archived":false,"fork":false,"pushed_at":"2024-11-17T22:03:16.000Z","size":650,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T05:22:32.402Z","etag":null,"topics":["direct-method","direct-single-shooting","dynamic-optimization"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auralius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-03-06T07:52:51.000Z","updated_at":"2024-11-17T22:01:22.000Z","dependencies_parsed_at":"2025-02-01T10:34:38.020Z","dependency_job_id":null,"html_url":"https://github.com/auralius/matlab_dss_wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/auralius/matlab_dss_wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auralius%2Fmatlab_dss_wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auralius%2Fmatlab_dss_wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auralius%2Fmatlab_dss_wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auralius%2Fmatlab_dss_wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auralius","download_url":"https://codeload.github.com/auralius/matlab_dss_wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auralius%2Fmatlab_dss_wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000762,"owners_count":26082921,"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-09T02:00:07.460Z","response_time":59,"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":["direct-method","direct-single-shooting","dynamic-optimization"],"created_at":"2024-12-05T17:09:56.094Z","updated_at":"2025-10-09T04:13:15.942Z","avatar_url":"https://github.com/auralius.png","language":"MATLAB","readme":"# MATLAB Direct Single Shooting Wrapper\n\nWrapper functions for easier dynamic optimization implementations by using direct single shooting method.\n\nThere are two solvers applied in the dss_solve.m: SQP and pattern search. \n\nFor SQP, dss_solve.m automatically computes the derivative of the objective function by using the complex-step derivative approximation (CSDA). If we don't provide the derivative of the objective function, MATLAB actually approximates the derivative numerically. However, this process often fails when the objective function is a function of the state variables and not the decission variables. \n\nWhen the objective function is a function of the state variables, the system's solution must be calculated first. For a complex system, such as a system modeled with PDE, SQP will almost certainly fail if the derivative function is not explicitly provided by the user.\n\nCSDA signifficantly contributes to SQP's improved performances as it reduces  the number of iterations. In some cases, SQP even works for a longer time horizon when using CSDA.\n\n----------------\n\n## Moving mass\n\nThe results below is taken from ex1.m. The example is about a moving mass that moves from x = 0 to x = 0.5 within exactly 1 second. The objective is to minimize the effort. At the destination, the mass must stop moving. The solver is SQP.\n\nIn these two figures, we can see that with CSDA, SQP can handle long horizon (N=101).\n\n### Without CSDA - SQP fails \n![](https://github.com/auralius/matlab_dss_wrapper/blob/main/docs/long_horizon_no_derivative.png)\n\n### With CSDA - SQP still works \n![](https://github.com/auralius/matlab_dss_wrapper/blob/main/docs/long_horizon_with_derivative.png)\n\n----------------\n\nIn these two figures, we can see that with CSDA (N=10), SQP takes less iterations to converge.\n\n#### Without CSDA - SQP converges after 27 iterations\n\u003cimg src=\"https://github.com/auralius/matlab_dss_wrapper/blob/main/docs/no_derivative.png\" width=\"514\" height=\"493\"\u003e\n\n#### With CSDA - SQP converges after 9 iterations\n\u003cimg src=\"https://github.com/auralius/matlab_dss_wrapper/blob/main/docs/with_derivative.png\" width=\"518\" height=\"267\"\u003e\n\n----------------\n\n## Swing-up control of an inverted pendulum (see ex04.m):\n\n\n![](https://github.com/auralius/matlab_dss_wrapper/blob/main/ex04.gif)\n\n\n----------------\n\n## F-8 aircraft control problem\n\nPlease see our paper in:  \n\nhttps://ieeexplore.ieee.org/abstract/document/9828112/\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauralius%2Fmatlab_dss_wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauralius%2Fmatlab_dss_wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauralius%2Fmatlab_dss_wrapper/lists"}