{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/comments/55374877","id":55374877,"diff_hunk":"@@ -23,20 +26,252 @@ function c2d(sys::StateSpace, Ts::Real, method::Symbol=:zoh)\n         x0map = [eye(nx) zeros(nx, nu)]\n     elseif method == :foh\n         M = expm([A*Ts B*Ts zeros(nx, nu);\n-             zeros(nu, nx + nu) eye(nu);\n-             zeros(nu, nx + 2*nu)])\n+            zeros(nu, nx + nu) eye(nu);\n+            zeros(nu, nx + 2*nu)])\n         M1 = M[1:nx, nx+1:nx+nu]\n         M2 = M[1:nx, nx+nu+1:nx+2*nu]\n         Ad = M[1:nx, 1:nx]\n         Bd = Ad*M2 + M1 - M2\n         Cd = C\n         Dd = D + C*M2\n-\t    x0map = [eye(nx) -M2]\n+        x0map = [eye(nx) -M2]\n     elseif method == :tustin || method == :matched\n         error(\"NotImplemented: Only `:zoh` and `:foh` implemented so far\")\n     else\n         error(\"Unsupported method: \", method)\n     end\n     return StateSpace(Ad, Bd, Cd, Dd, Ts, sys.statenames, sys.inputnames,\n-            sys.outputnames), x0map\n+    sys.outputnames), x0map\n+end\n+\n+\n+\n+\"\"\"\n+rstd  Polynomial synthesis in discrete time.\n+\n+`R,S,T=rstd(BPLUS,BMINUS,A,BM1,AM,AO,AR,AS)`\n+\n+`R,S,T=rstd(BPLUS,BMINUS,A,BM1,AM,AO,AR)`\n+\n+`R,S,T=rstd(BPLUS,BMINUS,A,BM1,AM,AO)`\n+\n+Polynomial synthesis according to CCS ch 10 to\n+design a controller R(q) u(k) = T(q) r(k) - S(q) y(k)\n+\n+Inputs:  BPLUS  : Part of open loop numerator\n+BMINUS : Part of open loop numerator\n+A      : Open loop denominator\n+BM1    : Additional zeros\n+AM     : Closed loop denominator\n+AO     : Observer polynomial\n+AR     : Pre-specified factor of R,\n+e.g integral part [1, -1]^k\n+AS     : Pre-specified factor of S,\n+e.g notch filter [1, 0, w^2]\n+\n+Outputs: R,S,T  : Polynomials in controller\n+\n+See function DAB how the solution to the Diophantine-\n+Aryabhatta-Bezout identity is chosen.\n+\n+Michael Lundh     LastEditDate : Wed Mar 21 14:35:36 1990","path":"src/discrete.jl","position":null,"original_position":81,"commit_id":"8dca54a3dd150dbe4329950dab3273f4cf54d440","original_commit_id":"43dbc020eefa4f2908b2a691ac7420cd77907878","user":{"login":"jcrist","id":2783717,"avatar_url":"https://avatars.githubusercontent.com/u/2783717?v=3","gravatar_id":"","url":"https://api.github.com/users/jcrist","html_url":"https://github.com/jcrist","followers_url":"https://api.github.com/users/jcrist/followers","following_url":"https://api.github.com/users/jcrist/following{/other_user}","gists_url":"https://api.github.com/users/jcrist/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrist/subscriptions","organizations_url":"https://api.github.com/users/jcrist/orgs","repos_url":"https://api.github.com/users/jcrist/repos","events_url":"https://api.github.com/users/jcrist/events{/privacy}","received_events_url":"https://api.github.com/users/jcrist/received_events","type":"User","site_admin":false},"body":"Citing the book, and removing the \"last modified\" and copyright sounds like a good solution.","created_at":"2016-03-08T15:30:15Z","updated_at":"2016-03-08T15:30:15Z","html_url":"https://github.com/JuliaControl/Control.jl/pull/10#discussion_r55374877","pull_request_url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/comments/55374877"},"html":{"href":"https://github.com/JuliaControl/Control.jl/pull/10#discussion_r55374877"},"pull_request":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10","id":61582543,"html_url":"https://github.com/JuliaControl/Control.jl/pull/10","diff_url":"https://github.com/JuliaControl/Control.jl/pull/10.diff","patch_url":"https://github.com/JuliaControl/Control.jl/pull/10.patch","issue_url":"https://api.github.com/repos/JuliaControl/Control.jl/issues/10","number":10,"state":"open","locked":false,"title":"Major implementations and bug fixes","user":{"login":"mfalt","id":3237193,"avatar_url":"https://avatars.githubusercontent.com/u/3237193?v=3","gravatar_id":"","url":"https://api.github.com/users/mfalt","html_url":"https://github.com/mfalt","followers_url":"https://api.github.com/users/mfalt/followers","following_url":"https://api.github.com/users/mfalt/following{/other_user}","gists_url":"https://api.github.com/users/mfalt/gists{/gist_id}","starred_url":"https://api.github.com/users/mfalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfalt/subscriptions","organizations_url":"https://api.github.com/users/mfalt/orgs","repos_url":"https://api.github.com/users/mfalt/repos","events_url":"https://api.github.com/users/mfalt/events{/privacy}","received_events_url":"https://api.github.com/users/mfalt/received_events","type":"User","site_admin":false},"body":"We have implemented several new function and fixed a lot of bugs and problems.\r\n**I will merge this in a few days if there are no objections.**\r\n\r\nWe have removed most of the deprecated syntax, fixed the travis build, and started a transition to the Plots.jl package for plotting, and possibly Polinomials.jl for polynomials.\r\nAmong other things, this pull request implements:\r\n`zpk` form for transfer functions,\r\n`minreal`, `ss2tf`, `place` using acker, `margin`,\r\n`gangoffour`, `gangofseven`,\r\n`gangoffourplot`, `pzmap`, `nicholsplot`,\r\n`pid`, `pidplots`, `rlocus`, `leadlink`, `laglink`, `leadlinkat`, `leadlinkcurve`.\r\n\r\nOther notable changes is the removal of the ambiguous `gain` in favor of `dcgain`.","created_at":"2016-03-03T16:11:16Z","updated_at":"2016-03-08T15:30:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"035de36056427b51ab7fed1200b6f3c2085c85fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10/commits","review_comments_url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10/comments","review_comment_url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaControl/Control.jl/issues/10/comments","statuses_url":"https://api.github.com/repos/JuliaControl/Control.jl/statuses/8dca54a3dd150dbe4329950dab3273f4cf54d440","head":{"label":"mfalt:master","ref":"master","sha":"8dca54a3dd150dbe4329950dab3273f4cf54d440","user":{"login":"mfalt","id":3237193,"avatar_url":"https://avatars.githubusercontent.com/u/3237193?v=3","gravatar_id":"","url":"https://api.github.com/users/mfalt","html_url":"https://github.com/mfalt","followers_url":"https://api.github.com/users/mfalt/followers","following_url":"https://api.github.com/users/mfalt/following{/other_user}","gists_url":"https://api.github.com/users/mfalt/gists{/gist_id}","starred_url":"https://api.github.com/users/mfalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfalt/subscriptions","organizations_url":"https://api.github.com/users/mfalt/orgs","repos_url":"https://api.github.com/users/mfalt/repos","events_url":"https://api.github.com/users/mfalt/events{/privacy}","received_events_url":"https://api.github.com/users/mfalt/received_events","type":"User","site_admin":false},"repo":{"id":41816643,"name":"Control.jl","full_name":"mfalt/Control.jl","owner":{"login":"mfalt","id":3237193,"avatar_url":"https://avatars.githubusercontent.com/u/3237193?v=3","gravatar_id":"","url":"https://api.github.com/users/mfalt","html_url":"https://github.com/mfalt","followers_url":"https://api.github.com/users/mfalt/followers","following_url":"https://api.github.com/users/mfalt/following{/other_user}","gists_url":"https://api.github.com/users/mfalt/gists{/gist_id}","starred_url":"https://api.github.com/users/mfalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfalt/subscriptions","organizations_url":"https://api.github.com/users/mfalt/orgs","repos_url":"https://api.github.com/users/mfalt/repos","events_url":"https://api.github.com/users/mfalt/events{/privacy}","received_events_url":"https://api.github.com/users/mfalt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfalt/Control.jl","description":"A Controls Toolbox for Julia","fork":true,"url":"https://api.github.com/repos/mfalt/Control.jl","forks_url":"https://api.github.com/repos/mfalt/Control.jl/forks","keys_url":"https://api.github.com/repos/mfalt/Control.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfalt/Control.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfalt/Control.jl/teams","hooks_url":"https://api.github.com/repos/mfalt/Control.jl/hooks","issue_events_url":"https://api.github.com/repos/mfalt/Control.jl/issues/events{/number}","events_url":"https://api.github.com/repos/mfalt/Control.jl/events","assignees_url":"https://api.github.com/repos/mfalt/Control.jl/assignees{/user}","branches_url":"https://api.github.com/repos/mfalt/Control.jl/branches{/branch}","tags_url":"https://api.github.com/repos/mfalt/Control.jl/tags","blobs_url":"https://api.github.com/repos/mfalt/Control.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfalt/Control.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfalt/Control.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfalt/Control.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfalt/Control.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/mfalt/Control.jl/languages","stargazers_url":"https://api.github.com/repos/mfalt/Control.jl/stargazers","contributors_url":"https://api.github.com/repos/mfalt/Control.jl/contributors","subscribers_url":"https://api.github.com/repos/mfalt/Control.jl/subscribers","subscription_url":"https://api.github.com/repos/mfalt/Control.jl/subscription","commits_url":"https://api.github.com/repos/mfalt/Control.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfalt/Control.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfalt/Control.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfalt/Control.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfalt/Control.jl/contents/{+path}","compare_url":"https://api.github.com/repos/mfalt/Control.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfalt/Control.jl/merges","archive_url":"https://api.github.com/repos/mfalt/Control.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfalt/Control.jl/downloads","issues_url":"https://api.github.com/repos/mfalt/Control.jl/issues{/number}","pulls_url":"https://api.github.com/repos/mfalt/Control.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/mfalt/Control.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/mfalt/Control.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfalt/Control.jl/labels{/name}","releases_url":"https://api.github.com/repos/mfalt/Control.jl/releases{/id}","deployments_url":"https://api.github.com/repos/mfalt/Control.jl/deployments","created_at":"2015-09-02T17:43:12Z","updated_at":"2016-02-29T01:23:07Z","pushed_at":"2016-03-08T10:38:26Z","git_url":"git://github.com/mfalt/Control.jl.git","ssh_url":"git@github.com:mfalt/Control.jl.git","clone_url":"https://github.com/mfalt/Control.jl.git","svn_url":"https://github.com/mfalt/Control.jl","homepage":null,"size":175,"stargazers_count":2,"watchers_count":2,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":2,"default_branch":"master"}},"base":{"label":"JuliaControl:master","ref":"master","sha":"fe3c810af3eed3aaf0258e35c7118b6cd049310d","user":{"login":"JuliaControl","id":10605979,"avatar_url":"https://avatars.githubusercontent.com/u/10605979?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaControl","html_url":"https://github.com/JuliaControl","followers_url":"https://api.github.com/users/JuliaControl/followers","following_url":"https://api.github.com/users/JuliaControl/following{/other_user}","gists_url":"https://api.github.com/users/JuliaControl/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaControl/subscriptions","organizations_url":"https://api.github.com/users/JuliaControl/orgs","repos_url":"https://api.github.com/users/JuliaControl/repos","events_url":"https://api.github.com/users/JuliaControl/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaControl/received_events","type":"Organization","site_admin":false},"repo":{"id":29503786,"name":"Control.jl","full_name":"JuliaControl/Control.jl","owner":{"login":"JuliaControl","id":10605979,"avatar_url":"https://avatars.githubusercontent.com/u/10605979?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaControl","html_url":"https://github.com/JuliaControl","followers_url":"https://api.github.com/users/JuliaControl/followers","following_url":"https://api.github.com/users/JuliaControl/following{/other_user}","gists_url":"https://api.github.com/users/JuliaControl/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaControl/subscriptions","organizations_url":"https://api.github.com/users/JuliaControl/orgs","repos_url":"https://api.github.com/users/JuliaControl/repos","events_url":"https://api.github.com/users/JuliaControl/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaControl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaControl/Control.jl","description":"A Controls Toolbox for Julia","fork":false,"url":"https://api.github.com/repos/JuliaControl/Control.jl","forks_url":"https://api.github.com/repos/JuliaControl/Control.jl/forks","keys_url":"https://api.github.com/repos/JuliaControl/Control.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaControl/Control.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaControl/Control.jl/teams","hooks_url":"https://api.github.com/repos/JuliaControl/Control.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaControl/Control.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaControl/Control.jl/events","assignees_url":"https://api.github.com/repos/JuliaControl/Control.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaControl/Control.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaControl/Control.jl/tags","blobs_url":"https://api.github.com/repos/JuliaControl/Control.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaControl/Control.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaControl/Control.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaControl/Control.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaControl/Control.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaControl/Control.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaControl/Control.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaControl/Control.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaControl/Control.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaControl/Control.jl/subscription","commits_url":"https://api.github.com/repos/JuliaControl/Control.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaControl/Control.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaControl/Control.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaControl/Control.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaControl/Control.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaControl/Control.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaControl/Control.jl/merges","archive_url":"https://api.github.com/repos/JuliaControl/Control.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaControl/Control.jl/downloads","issues_url":"https://api.github.com/repos/JuliaControl/Control.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaControl/Control.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaControl/Control.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaControl/Control.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaControl/Control.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaControl/Control.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaControl/Control.jl/deployments","created_at":"2015-01-20T00:30:32Z","updated_at":"2016-03-06T01:17:13Z","pushed_at":"2016-03-08T10:38:26Z","git_url":"git://github.com/JuliaControl/Control.jl.git","ssh_url":"git@github.com:JuliaControl/Control.jl.git","clone_url":"https://github.com/JuliaControl/Control.jl.git","svn_url":"https://github.com/JuliaControl/Control.jl","homepage":null,"size":287,"stargazers_count":14,"watchers_count":14,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10"},"html":{"href":"https://github.com/JuliaControl/Control.jl/pull/10"},"issue":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/issues/10"},"comments":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaControl/Control.jl/statuses/8dca54a3dd150dbe4329950dab3273f4cf54d440"}}}}