{"id":369714,"date":"2024-05-21T04:09:45","date_gmt":"2024-05-21T04:09:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369714"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369714","title":{"rendered":"<span>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 MATLAB<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u043e\u0440\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \u043d\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u043d\u043e \u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u0435\u043f\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u044e \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0430\u043a\u0435\u0442\u0430 MATLAB. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/58b\/44b\/b1b\/58b44bb1baa0fa4abd5772b51f63e83d.png\" width=\"616\" height=\"487\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58b\/44b\/b1b\/58b44bb1baa0fa4abd5772b51f63e83d.png\"\/><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u044f\u0442\u043d\u0438\u043a, \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u0432\u0435\u0440\u0445&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u043b\u043e\u0439 <strong><em><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"F\" alt=\"F\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b9\/558\/578\/8b955857829d7e45f8e040af90b9465b.svg\" width=\"14\" height=\"17\"\/><\/em><\/strong>                                            . \u0412 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\theta\" alt=\"\\theta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec4\/baa\/c88\/ec4baac889913748e9ecd4457a8c74e8.svg\" width=\"9\" height=\"17\"\/> \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043b\u0435\u0436\u043a\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a41\/944\/397\/a4194439713f80c58cd9d83ce6a8a8d0.svg\" width=\"11\" height=\"12\"\/>. \u041d\u0430\u043c \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 &#171;\u0432\u0432\u0435\u0440\u0445&#187; \u043f\u0440\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 \u0438 \u043f\u0440\u0438 \u0448\u0443\u043c\u0430\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<h2>1. \u0421\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (Plant)<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438 \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0435\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438.<\/p>\n<p>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"M\" alt=\"M\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b5c\/bb7\/ee1\/b5cbb7ee10f4c636196e80bb276a8822.svg\" width=\"20\" height=\"17\"\/> &#8212; \u043c\u0430\u0441\u0441\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 (kg), <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8af\/185\/b6f\/8af185b6fea974761db5f3276ea25b2d.svg\" width=\"17\" height=\"12\"\/>&#8212; \u043c\u0430\u0441\u0441\u0430 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430    (kg), <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"d\" alt=\"d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f2\/6fe\/47d\/0f26fe47db86dd7dbd55c157bb818b14.svg\" width=\"10\" height=\"17\"\/>&#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f (s^-1), <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"l\" alt=\"l\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcc\/50e\/00f\/dcc50e00f9fc334367a3a7b752a08500.svg\" width=\"6\" height=\"17\"\/>&#8212; \u0434\u043b\u0438\u043d\u043d\u0430 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 (m), <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"g\" alt=\"g\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e36\/fbd\/f3f\/e36fbdf3f7adcf30f0d8c929789f3604.svg\" width=\"9\" height=\"15\"\/> &#8212; \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u044b \u0442\u044f\u0436\u0435\u0441\u0442\u0438 (m\/s^2).<\/p>\n<pre><code class=\"matlab\">syms t d M m h v_C v_P x(t) theta(t) l g TC = 1\/2*M*v_C^2; % \u043a\u0438\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f \u0442\u0435\u043b\u0435\u0436\u043a\u0438 TP = 1\/2*m*v_P^2; % \u043a\u0438\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 U = m*g*h; % \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f U = subs(U,h,l*cos(theta)); % \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 y \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 v_C = diff(x,t); % \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0442\u0435\u043b\u0435\u0436\u043a\u0438 v_P = sqrt(diff(x-l*sin(theta),t)^2 + diff(l*cos(theta),t)^2); % \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"T_C =\\frac{M\\,{v_C }^2 }{2}, T_P =\\frac{m\\,{v_P }^2 }{2}, U_p =g\\,l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right), V_C =\\frac{\\partial }{\\partial t}\\;x\\left(t\\right), V_P =\\sqrt{{{\\left(\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 +l^2 \\,{\\sin \\left(\\theta \\left(t\\right)\\right)}^2 \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 }\" alt=\"T_C =\\frac{M\\,{v_C }^2 }{2}, T_P =\\frac{m\\,{v_P }^2 }{2}, U_p =g\\,l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right), V_C =\\frac{\\partial }{\\partial t}\\;x\\left(t\\right), V_P =\\sqrt{{{\\left(\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 +l^2 \\,{\\sin \\left(\\theta \\left(t\\right)\\right)}^2 \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 }\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1dd\/996\/518\/1dd9965185547938782c6e2c8ee04feb.svg\" width=\"1115\" height=\"62\"\/><\/p>\n<p>\u0418\u0437 \u0437\u0430\u043a\u043e\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0438\u0430\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"L\\left(t,q,q^{\\prime } \\right)\" alt=\"L\\left(t,q,q^{\\prime } \\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d5\/575\/7a6\/9d55757a61bfd18fe16325d68aa6812a.svg\" width=\"79\" height=\"23\"\/>, \u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q=\\left(x\\left(t\\right),\\theta \\left(t\\right)\\right), q^{\\prime } =\\left(V_C \\left(t\\right),V_P \\left(t\\right)\\right) \" alt=\"q=\\left(x\\left(t\\right),\\theta \\left(t\\right)\\right), q^{\\prime } =\\left(V_C \\left(t\\right),V_P \\left(t\\right)\\right) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/332\/99a\/128\/33299a128c3346d671030b81bd964535.svg\" width=\"308\" height=\"23\"\/><\/p>\n<pre><code class=\"matlab\">syms F_ext % \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0438\u043b\u0430 L = subs(exp(d*t)*(TC + TP - U + x*F_ext)); % exp(d*t) - \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u0442\u0440\u0435\u043d\u0438\u044f<\/code><\/pre>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0435\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\frac{\\mathrm{d}}{\\mathrm{d}t}\\frac{\\mathrm{d}}{\\mathrm{d}q^{\\prime } }L\\left(t,q,q^{\\prime } \\right)-\\frac{\\mathrm{d}}{\\mathrm{d}q}L\\left(t,q,q^{\\prime } \\right)=0\" alt=\"\\frac{\\mathrm{d}}{\\mathrm{d}t}\\frac{\\mathrm{d}}{\\mathrm{d}q^{\\prime } }L\\left(t,q,q^{\\prime } \\right)-\\frac{\\mathrm{d}}{\\mathrm{d}q}L\\left(t,q,q^{\\prime } \\right)=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2dc\/229\/cf4\/2dc229cf42cc54cda2d5e1d98939490c.svg\" width=\"300\" height=\"46\"\/><\/p>\n<pre><code class=\"matlab\">eqns = functionalDerivative(-L,[x theta]) == [0;0] % \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{array}{l} \\left(\\begin{array}{c} M\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_1 -F_{\\textrm{ext}} \\,{\\mathrm{e}}^{d\\,t} +m\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_1 +M\\,d\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+l\\,m\\,\\sin \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 -l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_2 -d\\,l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)=0\\\\ m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_3 \\,\\sigma_2 +m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_4 \\,\\sigma_2 -m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\sigma_1 +d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_3 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)+d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_4 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-g\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\sin \\left(\\theta \\left(t\\right)\\right)=0 \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 =\\frac{\\partial^2 }{\\partial t^2 }\\;x\\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 =\\frac{\\partial^2 }{\\partial t^2 }\\;\\theta \\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 ={\\cos \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_4 ={\\sin \\left(\\theta \\left(t\\right)\\right)}^2  \\end{array}\" alt=\"\\begin{array}{l} \\left(\\begin{array}{c} M\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_1 -F_{\\textrm{ext}} \\,{\\mathrm{e}}^{d\\,t} +m\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_1 +M\\,d\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+l\\,m\\,\\sin \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 -l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,\\sigma_2 -d\\,l\\,m\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{d\\,t} \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)=0\\\\ m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_3 \\,\\sigma_2 +m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_4 \\,\\sigma_2 -m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\sigma_1 +d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_3 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)+d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l^2 \\,\\sigma_4 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-d\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-g\\,m\\,{\\mathrm{e}}^{d\\,t} \\,l\\,\\sin \\left(\\theta \\left(t\\right)\\right)=0 \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 =\\frac{\\partial^2 }{\\partial t^2 }\\;x\\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 =\\frac{\\partial^2 }{\\partial t^2 }\\;\\theta \\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 ={\\cos \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_4 ={\\sin \\left(\\theta \\left(t\\right)\\right)}^2  \\end{array}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd1\/9cb\/dc5\/bd19cbdc55fe812b37506ca501498fb9.svg\" width=\"1300\" height=\"375\"\/><\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c Handle \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<pre><code class=\"matlab\">[V,S] = odeToVectorField(eqns); % \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p>\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\left(\\begin{array}{c} \\theta \\\\ \\mathrm{Dtheta}\\\\ x\\\\ \\mathrm{Dx} \\end{array}\\right)\" alt=\"\\left(\\begin{array}{c} \\theta \\\\ \\mathrm{Dtheta}\\\\ x\\\\ \\mathrm{Dx} \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/833\/aa4\/31c\/833aa431c160d4c92b8ed289abe5138f.svg\" width=\"99\" height=\"103\"\/><\/p>\n<pre><code class=\"matlab\">CartPendf = matlabFunction(V,'Vars',{'t','Y','m','M','l','g','d','F_ext'}); % handle \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"M=5\\;\\mathrm{kg},\\;m=1\\;\\mathrm{kg},\\;l\\;=2\\;m,\\;g=9\\ldotp 81\\;\\frac{m}{s^2 },\\;d=0\\ldotp 1\\;\\frac{1}{s}\\ldotp\" alt=\"M=5\\;\\mathrm{kg},\\;m=1\\;\\mathrm{kg},\\;l\\;=2\\;m,\\;g=9\\ldotp 81\\;\\frac{m}{s^2 },\\;d=0\\ldotp 1\\;\\frac{1}{s}\\ldotp\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d8d\/2cf\/f8b\/d8d2cff8b88cf06a79441afff30a786a.svg\" width=\"476\" height=\"43\"\/><\/p>\n<p>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\theta_0 =180\\;\\deg\" alt=\"\\theta_0 =180\\;\\deg\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a4\/ef4\/72e\/5a4ef472e173d95682b9b423f6f2c69b.svg\" width=\"110\" height=\"20\"\/>, \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0438\u043b\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"F_{\\mathrm{ext}} =0\\ldotp 1\\;N\" alt=\"F_{\\mathrm{ext}} =0\\ldotp 1\\;N\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/77b\/6e4\/fc0\/77b6e4fc06c498aa224ddc84ce18e220.svg\" width=\"109\" height=\"20\"\/>.<\/p>\n<pre><code class=\"matlab\">init_cond % \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 F = @(t,Y) CartPendf(t,Y,m,M,l,g,d,0.1); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 handle \u0444\u0443\u043d\u043a\u0446\u0438\u044e tend = 10; % \u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f cond = [pi-deg2rad(theta0); 0; 0; 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f opts = odeset('RelTol',1e-6,'AbsTol',1e-6); % \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0430\u0442\u0435\u043b\u044f Sol = ode45(F,[0 tend],cond,opts); % \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0414\u0423:<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/368\/887\/159\/3688871593c287fa29afc285ff768458.jpg\" width=\"827\" height=\"740\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/368\/887\/159\/3688871593c287fa29afc285ff768458.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52a\/5b6\/e92\/52a5b6e92185a3ea73b859b4f8f92a68.gif\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52a\/5b6\/e92\/52a5b6e92185a3ea73b859b4f8f92a68.gif\"\/><\/figure>\n<h2>2. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 (Controller)<\/h2>\n<h3>2.1 \u041b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0414\u0423 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\dot{x} =A\\cdot x+B\\cdot u\\;\\;\\;\\left(1\\right)\" alt=\"\\dot{x} =A\\cdot x+B\\cdot u\\;\\;\\;\\left(1\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/483\/a00\/18f\/483a0018f8312234a9a2e70530c79acc.svg\" width=\"183\" height=\"22\"\/><\/p>\n<p>\u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\\left(t\\right)\\in R^n\" alt=\"x\\left(t\\right)\\in R^n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1a6\/e9e\/e33\/1a6e9ee33048bb6ff86e7240ade1d3c5.svg\" width=\"85\" height=\"22\"\/> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\\;=n\\times n\" alt=\"A\\;=n\\times n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/048\/14c\/d91\/04814cd91fcc5a94538f0b4e721ebab2.svg\" width=\"92\" height=\"17\"\/>&#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"B=n\\times p\" alt=\"B=n\\times p\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aca\/8cf\/61c\/aca8cf61c59ec9afd44314da4dc71a71.svg\" width=\"85\" height=\"20\"\/> &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\\left(t\\right)\\in R^p\" alt=\"u\\left(t\\right)\\in R^p\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87a\/224\/295\/87a224295dc1b83bf6dc5698dfb72f8a.svg\" width=\"83\" height=\"22\"\/>&#8212; \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u0414\u0423 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\dot{x} =f\\left(x,u\\right)\" alt=\"\\dot{x} =f\\left(x,u\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70b\/391\/f3d\/70b391f3d0211f8ad14c64533fdf5fb5.svg\" width=\"96\" height=\"22\"\/>, \u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0451 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\bar{x} ,\\bar{u}\" alt=\"\\bar{x} ,\\bar{u}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a98\/b80\/0b3\/a98b800b30771db6dab1f5c3ce635de1.svg\" width=\"31\" height=\"17\"\/>, \u0447\u0442\u043e\u0431\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f\\left(\\bar{x} ,\\bar{u} \\right)=0\" alt=\"f\\left(\\bar{x} ,\\bar{u} \\right)=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/271\/b10\/265\/271b102657b12a5ce59d3670b15d4e11.svg\" width=\"95\" height=\"22\"\/>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043c\u0430\u043b\u043e\u0439 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Delta x,\\Delta u\" alt=\"\\Delta x,\\Delta u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf7\/75e\/2b6\/bf775e2b64efc87e29d350aa02402d31.svg\" width=\"63\" height=\"20\"\/>, \u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Delta x=x-\\bar{x}\" alt=\"\\Delta x=x-\\bar{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1d0\/361\/955\/1d0361955f47f8d36c22ed025c41e217.svg\" width=\"98\" height=\"18\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Delta u=u-\\bar{u}\" alt=\"\\Delta u=u-\\bar{u}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ffd\/606\/487\/ffd6064870d863557e11bfbe69ab035e.svg\" width=\"98\" height=\"18\"\/>\u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0440\u044f\u0434 \u0422\u0435\u0439\u043b\u043e\u0440\u0430, \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\dot{x} =f\\left(x,u\\right)\\approx f\\left(\\bar{x} ,\\bar{u} \\right)+{\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta x+{\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta u\" alt=\"\\dot{x} =f\\left(x,u\\right)\\approx f\\left(\\bar{x} ,\\bar{u} \\right)+{\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta x+{\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5cb\/e29\/723\/5cbe297232bb2eb2a0cd124263227685.svg\" width=\"547\" height=\"46\"\/><\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\dot{x} =\\frac{\\mathrm{d}}{\\mathrm{d}t}\\left(\\bar{x} +\\Delta x\\right)=\\frac{\\mathrm{d}}{\\mathrm{d}t}\\Delta x={\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta x+{\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta u\" alt=\"\\dot{x} =\\frac{\\mathrm{d}}{\\mathrm{d}t}\\left(\\bar{x} +\\Delta x\\right)=\\frac{\\mathrm{d}}{\\mathrm{d}t}\\Delta x={\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta x+{\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)|}_{\\bar{x} ,\\bar{u} } \\cdot \\Delta u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0af\/499\/5a2\/0af4995a222f4138c1766ca8ad80b849.svg\" width=\"583\" height=\"46\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right),\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)\" alt=\"\\frac{\\mathrm{d}}{\\mathrm{d}x}f\\left(x,u\\right),\\frac{\\mathrm{d}}{\\mathrm{d}u}f\\left(x,u\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/842\/452\/1c8\/8424521c8cd061dad6fb2b1b35934328.svg\" width=\"188\" height=\"43\"\/> &#8212; \u042f\u043a\u043e\u0431\u0438\u0430\u043d\u044b.<\/p>\n<p>\u0423\u043f\u0440\u043e\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Delta \\dot{x} =A\\cdot \\Delta x+B\\cdot \\Delta u\\ldotp\" alt=\"\\Delta \\dot{x} =A\\cdot \\Delta x+B\\cdot \\Delta u\\ldotp\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/199\/af1\/62e\/199af162ec73a3e98b250ca41cac116a.svg\" width=\"193\" height=\"18\"\/><\/p>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0439 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Delta x,\\Delta u\" alt=\"\\Delta x,\\Delta u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/64a\/524\/e97\/64a524e9732f9b51558edf0c5a26dec6.svg\" width=\"63\" height=\"20\"\/>\u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u042f\u043a\u043e\u0431\u0438\u0430\u043d\u0443 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0439\u0434\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/679\/5ac\/f626795ac8878384af396615bd0dcdc8.svg\" width=\"14\" height=\"17\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"B\" alt=\"B\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4de\/483\/9f6\/4de4839f6c6b68c221d207a819008922.svg\" width=\"15\" height=\"17\"\/>\u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 &#171;\u0432\u0432\u0435\u0440\u0445&#187; \u0438 &#171;\u0432\u043d\u0438\u0437&#187;:<\/p>\n<pre><code class=\"matlab\">Vc = feval(symengine,'evalAt',V,'Y = [y1,y2,y3,y4]'); % \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445  y = sym('y',[4,1]); % \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 p1 = [0;0;0;0]; % \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0434\u0438\u043d - \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u0432\u0435\u0440\u0445\" p2 = [pi;0;0;0]; % \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0434\u0432\u0430 - \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u043d\u0438\u0437\" Df = jacobian(Vc,y); % \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u044f\u043a\u043e\u0431\u0438\u0430\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u044b A1 = subs(Df,y,p1) % \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410 \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u0432\u0435\u0440\u0445\"<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left(\\begin{array}{cccc} 0 &amp; 1 &amp; 0 &amp; 0\\\\ \\frac{M\\,g+g\\,m}{M\\,l} &amp; -d &amp; 0 &amp; 0\\\\ 0 &amp; 0 &amp; 0 &amp; 1\\\\ \\frac{g\\,m}{M} &amp; 0 &amp; 0 &amp; -d \\end{array}\\right)\" alt=\"\\left(\\begin{array}{cccc} 0 &amp; 1 &amp; 0 &amp; 0\\\\ \\frac{M\\,g+g\\,m}{M\\,l} &amp; -d &amp; 0 &amp; 0\\\\ 0 &amp; 0 &amp; 0 &amp; 1\\\\ \\frac{g\\,m}{M} &amp; 0 &amp; 0 &amp; -d \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/727\/87d\/125\/72787d12546a21850384ebfa5a0e6be8.svg\" width=\"221\" height=\"117\"\/><\/p>\n<pre><code class=\"matlab\">A2 = subs(Df,y,p2) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0410 \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u043d\u0438\u0437\"<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left(\\begin{array}{cccc} 0 &amp; 1 &amp; 0 &amp; 0\\\\ -\\frac{M\\,g+g\\,m}{M\\,l} &amp; -d &amp; 0 &amp; 0\\\\ 0 &amp; 0 &amp; 0 &amp; 1\\\\ \\frac{g\\,m}{M} &amp; 0 &amp; 0 &amp; -d \\end{array}\\right)\" alt=\"\\left(\\begin{array}{cccc} 0 &amp; 1 &amp; 0 &amp; 0\\\\ -\\frac{M\\,g+g\\,m}{M\\,l} &amp; -d &amp; 0 &amp; 0\\\\ 0 &amp; 0 &amp; 0 &amp; 1\\\\ \\frac{g\\,m}{M} &amp; 0 &amp; 0 &amp; -d \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a06\/634\/223\/a0663422366c2bed74035992e3ffb209.svg\" width=\"236\" height=\"117\"\/><\/p>\n<pre><code class=\"matlab\">B1 = subs(diff(Vc,F_ext),y,p1) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 B \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u0432\u0435\u0440\u0445\"<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left(\\begin{array}{c} 0\\\\ \\frac{1}{M\\,l}\\\\ 0\\\\ \\frac{1}{M} \\end{array}\\right)\" alt=\"\\left(\\begin{array}{c} 0\\\\ \\frac{1}{M\\,l}\\\\ 0\\\\ \\frac{1}{M} \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/880\/0ae\/eac\/8800aeeaca86e4c82735770d84dba993.svg\" width=\"68\" height=\"114\"\/><\/p>\n<pre><code class=\"matlab\">B2 = subs(diff(Vc,F_ext),y,p2) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 B \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u043d\u0438\u0437\"<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left(\\begin{array}{c} 0\\\\ -\\frac{1}{M\\,l}\\\\ 0\\\\ \\frac{1}{M} \\end{array}\\right)\" alt=\"\\left(\\begin{array}{c} 0\\\\ -\\frac{1}{M\\,l}\\\\ 0\\\\ \\frac{1}{M} \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f9\/509\/107\/1f9509107ebc39a8fd6437e1acf1ba43.svg\" width=\"83\" height=\"114\"\/><\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 (\u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u043d\u0438\u0437&#187;) \u0438 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\theta_0 =10\\;\\deg\" alt=\"\\theta_0 =10\\;\\deg\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/339\/987\/b5f\/339987b5f1bf6a84fdc7a5740b765f68.svg\" width=\"100\" height=\"20\"\/>.<\/p>\n<pre><code class=\"matlab\">eqnsL2 = A2*y+B2*F_ext % \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 (\u0432\u043d\u0438\u0437)<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left(\\begin{array}{c} y_2 \\\\ -d\\,y_2 -\\frac{F_{\\textrm{ext}} }{M\\,l}-\\frac{y_1 \\,{\\left(M\\,g+g\\,m\\right)}}{M\\,l}\\\\ y_4 \\\\ \\frac{F_{\\textrm{ext}} }{M}-d\\,y_4 +\\frac{g\\,m\\,y_1 }{M} \\end{array}\\right)\" alt=\"\\left(\\begin{array}{c} y_2 \\\\ -d\\,y_2 -\\frac{F_{\\textrm{ext}} }{M\\,l}-\\frac{y_1 \\,{\\left(M\\,g+g\\,m\\right)}}{M\\,l}\\\\ y_4 \\\\ \\frac{F_{\\textrm{ext}} }{M}-d\\,y_4 +\\frac{g\\,m\\,y_1 }{M} \\end{array}\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a6\/480\/88b\/3a648088b3ba9226cef5164be2830ee3.svg\" width=\"254\" height=\"121\"\/><\/p>\n<pre><code class=\"matlab\">syms d m M l g fL1 = matlabFunction(eqnsL2,'Vars',{y,m,M,l,g,d,F_ext}); % handle \u0444\u0443\u043d\u043a\u0446\u0438\u044f init_cond % \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 FL1 = @(~,y) fL1(y,m,M,l,g,d,0); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b FNL1 = @(~,Y) CartPendf(t,Y,m,M,l,g,d,0); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 theta0 = 10; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0433\u043e\u043b condL = [deg2rad(theta0) 0 0 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b condNL = [pi-deg2rad(theta0) 0 0 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b SolL1 = ode45(FL1,[0 tend],condL,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b SolNL1 = ode45(FNL1,[0 tend],condNL,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/30c\/085\/3b5\/30c0853b5294a070bf20abee9eb3c85c.jpg\" width=\"866\" height=\"808\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30c\/085\/3b5\/30c0853b5294a070bf20abee9eb3c85c.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442.<\/p>\n<h3>2.2 \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0414\u0423 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/h3>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\dot{x} =A\\cdot x\" alt=\"\\dot{x} =A\\cdot x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/105\/3aa\/bb3\/1053aabb3cde1e4f7aaefa8f55d3f784.svg\" width=\"76\" height=\"17\"\/>\u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0432\u0435\u0434\u044c \u0434\u043b\u044f \u043d\u0435\u0435 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\\left(t\\right)=e^{A\\cdot t} \\cdot x\\left(0\\right)\" alt=\"x\\left(t\\right)=e^{A\\cdot t} \\cdot x\\left(0\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d7b\/9e4\/cc3\/d7b9e4cc362c5fb58429953b99b7e63c.svg\" width=\"145\" height=\"25\"\/>.<\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043d\u0430\u0439\u0434\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"matlab\">SymSolL = expm(subs(A2)*t)*condL' % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{array}{l} \\left(\\begin{array}{c} \\frac{\\pi \\,{\\left(\\frac{\\sigma_1 }{2}+\\frac{\\sigma_2 }{2}+\\frac{\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{574}-\\frac{\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{574}\\right)}}{18}\\\\ -\\frac{\\pi \\,{\\left(\\frac{2943\\,\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{14350}-\\frac{2943\\,\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{14350}\\right)}}{18}\\\\ -\\frac{\\pi \\,{\\left(\\frac{\\sigma_1 }{6}+\\frac{\\sigma_2 }{6}-\\frac{1}{3}+\\frac{\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{1722}-\\frac{\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{1722}\\right)}}{18}\\\\ \\frac{\\pi \\,{\\left(\\frac{981\\,\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{14350}-\\frac{981\\,\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{14350}\\right)}}{18} \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 ={\\mathrm{e}}^{-\\frac{t}{20}-\\sigma_3 } \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 ={\\mathrm{e}}^{-\\frac{t}{20}+\\sigma_3 } \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 =\\frac{41\\,\\sqrt{35}\\,t\\,\\mathrm{i}}{100} \\end{array}\" alt=\"\\begin{array}{l} \\left(\\begin{array}{c} \\frac{\\pi \\,{\\left(\\frac{\\sigma_1 }{2}+\\frac{\\sigma_2 }{2}+\\frac{\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{574}-\\frac{\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{574}\\right)}}{18}\\\\ -\\frac{\\pi \\,{\\left(\\frac{2943\\,\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{14350}-\\frac{2943\\,\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{14350}\\right)}}{18}\\\\ -\\frac{\\pi \\,{\\left(\\frac{\\sigma_1 }{6}+\\frac{\\sigma_2 }{6}-\\frac{1}{3}+\\frac{\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{1722}-\\frac{\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{1722}\\right)}}{18}\\\\ \\frac{\\pi \\,{\\left(\\frac{981\\,\\sqrt{35}\\,\\sigma_1 \\,\\mathrm{i}}{14350}-\\frac{981\\,\\sqrt{35}\\,\\sigma_2 \\,\\mathrm{i}}{14350}\\right)}}{18} \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 ={\\mathrm{e}}^{-\\frac{t}{20}-\\sigma_3 } \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 ={\\mathrm{e}}^{-\\frac{t}{20}+\\sigma_3 } \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 =\\frac{41\\,\\sqrt{35}\\,t\\,\\mathrm{i}}{100} \\end{array}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/345\/1c7\/305\/3451c73059ac9b1c3ad3d1192a5b9ae2.svg\" width=\"280\" height=\"456\"\/><\/p>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8f4\/bae\/7da\/8f4bae7dadc07040368a43ca80bba458.jpg\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f4\/bae\/7da\/8f4bae7dadc07040368a43ca80bba458.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf1\/089\/938\/bf10899384afe8c06e05d3247929bd52.svg\" width=\"14\" height=\"17\"\/>, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b . \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u=-K\\cdot x\" alt=\"u=-K\\cdot x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b86\/aad\/717\/b86aad717b1e2bba42ef347e2de11890.svg\" width=\"94\" height=\"18\"\/>, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u0432\u0445\u043e\u0434, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c. \u0417\u0434\u0435\u0441\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e0\/354\/d96\/4e0354d9609d653e41646723de706d10.svg\" width=\"17\" height=\"17\"\/> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\" alt=\"u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/77d\/7d0\/53e\/77d7d053e2b47aaae5fec6b15ef4895b.svg\" width=\"11\" height=\"12\"\/> \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(1)\" alt=\"(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a2d\/67b\/360\/a2d67b3609e4f1109cc7dd9875e448fd.svg\" width=\"25\" height=\"22\"\/>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\dot{x} =A\\cdot x+B\\cdot \\left(-K\\cdot x\\right)=\\left(A-B\\cdot K\\right)\\cdot x\" alt=\"\\dot{x} =A\\cdot x+B\\cdot \\left(-K\\cdot x\\right)=\\left(A-B\\cdot K\\right)\\cdot x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/df9\/aca\/030\/df9aca030cf82f373661e320006b2416.svg\" width=\"350\" height=\"22\"\/><\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0431\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc0\/481\/4f5\/dc04814f55559ef750df8f6c7275df5c.svg\" width=\"17\" height=\"17\"\/>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430.<\/p>\n<h3>2.3 \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430\u0448\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u043e\u043c \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u0432\u0435\u0440\u0445&#187;.<\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u0437\u043d\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439. \u041f\u043e\u0434 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 &#8212; \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c<br \/> \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/97c\/2f0\/fb5\/97c2f0fb54c1f574953d9b17c491e9ce.svg\" width=\"14\" height=\"17\"\/>. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0445\u043e\u0442\u044c \u043e\u0434\u043d\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0cd\/5f7\/2b5\/0cd5f72b55cf700c299de48689a56309.svg\" width=\"14\" height=\"17\"\/> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"D\" alt=\"D\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/408\/d90\/722\/408d907228a36ab6c17a406260e9a0f2.svg\" width=\"16\" height=\"17\"\/> \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T\" alt=\"T\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d0\/bae\/fe4\/6d0baefe49bf9979bd8accddfedc6b19.svg\" width=\"14\" height=\"17\"\/>: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A=T\\cdot D\\cdot T^{-1}\" alt=\"A=T\\cdot D\\cdot T^{-1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/488\/3b4\/cc6\/4883b4cc64dcc8337f0e85f701888ad7.svg\" width=\"131\" height=\"21\"\/>. \u0422\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0440\u044f\u0434 \u0422\u0435\u0439\u043b\u043e\u0440\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"e^{A\\cdot t} =I+A\\cdot t+\\frac{A^2 \\cdot t^2 }{2!}+\\frac{A^3 \\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot T^{-1} +T\\cdot D\\cdot T^{-1} \\cdot t+\\frac{\\left(T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\right)\\cdot t^2 }{2!}+\\frac{\\left(T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\right)\\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot T^{-1} +T\\cdot D\\cdot T^{-1} \\cdot t+\\frac{\\left(T\\cdot D^2 \\cdot T^{-1} \\right)\\cdot t^2 }{2!}+\\frac{\\left(T\\cdot D^3 \\cdot T^{-1} \\right)\\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot \\left(I+D\\cdot t+\\frac{D^2 \\cdot t^2 }{2!}+\\frac{D^3 \\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp \\right)\\cdot T^{-1} =T\\cdot e^{D\\cdot t} \\cdot T^{-1}\" alt=\"e^{A\\cdot t} =I+A\\cdot t+\\frac{A^2 \\cdot t^2 }{2!}+\\frac{A^3 \\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot T^{-1} +T\\cdot D\\cdot T^{-1} \\cdot t+\\frac{\\left(T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\right)\\cdot t^2 }{2!}+\\frac{\\left(T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\cdot T\\cdot D\\cdot T^{-1} \\right)\\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot T^{-1} +T\\cdot D\\cdot T^{-1} \\cdot t+\\frac{\\left(T\\cdot D^2 \\cdot T^{-1} \\right)\\cdot t^2 }{2!}+\\frac{\\left(T\\cdot D^3 \\cdot T^{-1} \\right)\\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp =T\\cdot \\left(I+D\\cdot t+\\frac{D^2 \\cdot t^2 }{2!}+\\frac{D^3 \\cdot t^3 }{3!}+\\ldotp \\ldotp \\ldotp \\right)\\cdot T^{-1} =T\\cdot e^{D\\cdot t} \\cdot T^{-1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe1\/80b\/580\/fe180b580a5533545f466e86e81a3df1.svg\" width=\"2391\" height=\"54\"\/><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"D=\\left\\lbrack \\begin{array}{cccc} \\lambda_1  &amp; 0 &amp; \\cdots  &amp; 0\\\\ 0 &amp; \\lambda_2  &amp; \\cdots  &amp; 0\\\\ \\vdots  &amp; \\vdots  &amp; \\ddots  &amp; \\vdots \\\\ 0 &amp; 0 &amp; \\cdots  &amp; \\lambda_n  \\end{array}\\right\\rbrack\" alt=\"D=\\left\\lbrack \\begin{array}{cccc} \\lambda_1  &amp; 0 &amp; \\cdots  &amp; 0\\\\ 0 &amp; \\lambda_2  &amp; \\cdots  &amp; 0\\\\ \\vdots  &amp; \\vdots  &amp; \\ddots  &amp; \\vdots \\\\ 0 &amp; 0 &amp; \\cdots  &amp; \\lambda_n  \\end{array}\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a07\/365\/327\/a0736532721165d7e462fd365a74118d.svg\" width=\"217\" height=\"117\"\/>, \u0442\u043e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"e^{D\\cdot t} =\\left\\lbrack \\begin{array}{cccc} e^{\\lambda_1 \\cdot t}  &amp; 0 &amp; \\cdots  &amp; 0\\\\ 0 &amp; e^{\\lambda_2 \\cdot t}  &amp; \\cdots  &amp; 0\\\\ \\vdots  &amp; \\vdots  &amp; \\ddots  &amp; \\vdots \\\\ 0 &amp; 0 &amp; \\cdots  &amp; e^{\\lambda_n \\cdot t}  \\end{array}\\right\\rbrack\" alt=\"e^{D\\cdot t} =\\left\\lbrack \\begin{array}{cccc} e^{\\lambda_1 \\cdot t}  &amp; 0 &amp; \\cdots  &amp; 0\\\\ 0 &amp; e^{\\lambda_2 \\cdot t}  &amp; \\cdots  &amp; 0\\\\ \\vdots  &amp; \\vdots  &amp; \\ddots  &amp; \\vdots \\\\ 0 &amp; 0 &amp; \\cdots  &amp; e^{\\lambda_n \\cdot t}  \\end{array}\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/83d\/a49\/96c\/83da4996ce052ea076a8d6be962d25e2.svg\" width=\"273\" height=\"120\"\/>, \u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\lambda_1 ,\\lambda_2 ,\\ldotp \\ldotp \\ldotp ,\\lambda_n\" alt=\"\\lambda_1 ,\\lambda_2 ,\\ldotp \\ldotp \\ldotp ,\\lambda_n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/09e\/8bf\/7d0\/09e8bf7d01982aa024e423dfdd1c541e.svg\" width=\"113\" height=\"20\"\/> &#8212; \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/02e\/19d\/c84\/02e19dc84458a825996d814983e81fe0.svg\" width=\"14\" height=\"17\"\/>.<\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u043e\u0441\u0442\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"e^{\\lambda \\cdot t} =e^{\\left(a+i\\cdot b\\right)\\cdot t} =e^{a\\cdot t} \\cdot \\left(\\cos \\left(b\\cdot t\\right)+i\\cdot \\sin \\left(b\\cdot t\\right)\\right)\" alt=\"e^{\\lambda \\cdot t} =e^{\\left(a+i\\cdot b\\right)\\cdot t} =e^{a\\cdot t} \\cdot \\left(\\cos \\left(b\\cdot t\\right)+i\\cdot \\sin \\left(b\\cdot t\\right)\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/95c\/820\/f86\/95c820f8623d7b895f6f9d95a3f480a4.svg\" width=\"379\" height=\"26\"\/><\/p>\n<p>\u0415\u0441\u043b\u0438 <img class=\"formula inline\" source=\"a>0&#8243; alt=&#187;a>0&#8243; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/584\/dba\/c97\/584dbac970d889696899f7f60330a1fe.svg&#187; width=&#187;46&#8243; height=&#187;16&#8243;\/>, \u0442\u043e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0441\u0442, \u0435\u0441\u043b\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"a&lt;0\" alt=\"a&lt;0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/daa\/bdf\/06a\/daabdf06aad0103aef0fc0e5f4f217fb.svg\" width=\"46\" height=\"16\"\/>\u0442\u043e \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u041d\u0430\u0439\u0434\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e34\/aa8\/985\/e34aa8985c529fe275e9a661ea865b73.svg\" width=\"14\" height=\"17\"\/>.<\/p>\n<pre><code class=\"matlab\">A = double(subs(A1)); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b eig(A) % \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ans = 4\u00d71          0    -0.1000     2.3766    -2.4766<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0440\u043d\u0438, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e. \u0414\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\" alt=\"u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e7\/742\/36e\/3e774236ea1762c0fb653aa779398cd9.svg\" width=\"11\" height=\"12\"\/>.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043e\u0440\u0435\u043c\u043e\u0439 \u041a\u0435\u043b\u0438-\u0413\u0430\u043c\u0438\u043b\u044c\u0442\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d67\/9e4\/3fa\/d679e43fabb449e2b798232732bb2aa1.svg\" width=\"14\" height=\"17\"\/>\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\det \\left(A-\\lambda \\cdot I\\right)=0\" alt=\"\\det \\left(A-\\lambda \\cdot I\\right)=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/449\/87b\/458\/44987b458ddc7798897bdc0fb4328692.svg\" width=\"153\" height=\"22\"\/>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\lambda^n +a_{n-1} \\cdot \\lambda^{n-1} +\\ldotp \\ldotp \\ldotp +a_1 \\cdot \\lambda +a_0 =0\" alt=\"\\lambda^n +a_{n-1} \\cdot \\lambda^{n-1} +\\ldotp \\ldotp \\ldotp +a_1 \\cdot \\lambda +a_0 =0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2e\/6b6\/27b\/f2e6b627bfa53d277364b352fa938029.svg\" width=\"313\" height=\"25\"\/>&#8212; \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A^n +a_{n-1} \\cdot A^{n-1} +\\ldotp \\ldotp \\ldotp +a_1 \\cdot A+a_0 \\cdot I=0\" alt=\"A^n +a_{n-1} \\cdot A^{n-1} +\\ldotp \\ldotp \\ldotp +a_1 \\cdot A+a_0 \\cdot I=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d0\/367\/e8d\/9d0367e8dbdc32b91d0cd65264999017.svg\" width=\"346\" height=\"25\"\/> &#8212; \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0435\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a64\/b04\/617\/a64b04617a437cf41ee20a307d2f2898.svg\" width=\"14\" height=\"17\"\/>\u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A^n ={-a}_0 \\cdot I-a_1 \\cdot A-\\ldotp \\ldotp \\ldotp -a_{n-1} \\cdot A^{n-1}\" alt=\"A^n ={-a}_0 \\cdot I-a_1 \\cdot A-\\ldotp \\ldotp \\ldotp -a_{n-1} \\cdot A^{n-1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dfc\/f13\/513\/dfcf1351376efb545c103f006cf65dc3.svg\" width=\"328\" height=\"25\"\/> &#8212; \u0432\u044b\u0440\u0430\u0437\u0438\u043c \u0441\u0442\u0430\u0440\u0448\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2b6\/b99\/80c\/2b6b9980c4726e1adc2018b4dfee5ed2.svg\" width=\"14\" height=\"17\"\/>.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f\\left(A\\right)=r\\left(A\\right)=\\sum_{k=0}^{n-1} c_k \\cdot A^k\" alt=\"f\\left(A\\right)=r\\left(A\\right)=\\sum_{k=0}^{n-1} c_k \\cdot A^k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b48\/d5c\/d70\/b48d5cd707b9776854f20cf8d7337229.svg\" width=\"222\" height=\"60\"\/>\u043c\u0430\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"e^{A\\cdot t} =\\varphi_0 \\left(t\\right)\\cdot I+\\varphi_1 \\left(t\\right)\\cdot A+\\varphi_2 \\left(t\\right)\\cdot A^2 +\\ldotp \\ldotp \\ldotp +\\varphi_{n-1} \\left(t\\right)\\cdot A^{n-1} \\;\\;\\;\\left(2\\right)\" alt=\"e^{A\\cdot t} =\\varphi_0 \\left(t\\right)\\cdot I+\\varphi_1 \\left(t\\right)\\cdot A+\\varphi_2 \\left(t\\right)\\cdot A^2 +\\ldotp \\ldotp \\ldotp +\\varphi_{n-1} \\left(t\\right)\\cdot A^{n-1} \\;\\;\\;\\left(2\\right)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28d\/8f8\/afc\/28d8f8afc4bab26acb30b0a423e4298c.svg\" width=\"552\" height=\"25\"\/><\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\xi\" alt=\"\\xi\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/599\/62f\/0a1\/59962f0a1d0efc0c30e3a4ace6d039e1.svg\" width=\"9\" height=\"20\"\/>, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0432\u043d\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\xi =\\int_0^t e^{A\\cdot \\left(t-\\tau \\right)} Bu\\left(\\tau \\right)d\\tau\" alt=\"\\xi =\\int_0^t e^{A\\cdot \\left(t-\\tau \\right)} Bu\\left(\\tau \\right)d\\tau\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5d0\/a0a\/85a\/5d0a0a85a13f85aa126ecaf749430f6a.svg\" width=\"200\" height=\"50\"\/><\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(2)\" alt=\"(2)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/92a\/a6c\/b1d\/92aa6cb1df4e07ccc447ee0859bd2619.svg\" width=\"25\" height=\"22\"\/>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\xi =\\int_0^t \\left(\\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)IB+\\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)AB+\\varphi_2 \\left(t-\\tau \\right){u\\left(\\tau \\right)A}^2 B+\\ldotp \\ldotp \\ldotp +\\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)A^{n-1} B\\right)d\\tau =B\\int_0^t \\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau +AB\\int_0^t \\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau +\\ldotp \\ldotp \\ldotp +A^{n-1} B\\int_0^t \\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau\" alt=\"\\xi =\\int_0^t \\left(\\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)IB+\\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)AB+\\varphi_2 \\left(t-\\tau \\right){u\\left(\\tau \\right)A}^2 B+\\ldotp \\ldotp \\ldotp +\\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)A^{n-1} B\\right)d\\tau =B\\int_0^t \\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau +AB\\int_0^t \\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau +\\ldotp \\ldotp \\ldotp +A^{n-1} B\\int_0^t \\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/94e\/5c4\/d0e\/94e5c4d0e26ae059fcddfd8c07272485.svg\" width=\"1646\" height=\"50\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\xi =\\left\\lbrack \\begin{array}{cccc} B &amp; AB &amp; \\cdots  &amp; A^{n-1} B \\end{array}\\right\\rbrack \\left\\lbrack \\begin{array}{c} \\int_0^t \\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau \\\\ \\int_0^t \\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau \\\\ \\vdots \\\\ \\int_0^t \\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau  \\end{array}\\right\\rbrack\" alt=\"\\xi =\\left\\lbrack \\begin{array}{cccc} B &amp; AB &amp; \\cdots  &amp; A^{n-1} B \\end{array}\\right\\rbrack \\left\\lbrack \\begin{array}{c} \\int_0^t \\varphi_0 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau \\\\ \\int_0^t \\varphi_1 \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau \\\\ \\vdots \\\\ \\int_0^t \\varphi_{n-1} \\left(t-\\tau \\right)u\\left(\\tau \\right)d\\tau  \\end{array}\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/caa\/dc3\/4fe\/caadc34fe1cc555fcdc3ed29a544ec86.svg\" width=\"454\" height=\"132\"\/><\/p>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Co=\\left\\lbrack \\begin{array}{ccccc} B &amp; AB &amp; A^2 B &amp; \\cdots  &amp; A^{n-1} B \\end{array}\\right\\rbrack\" alt=\"Co=\\left\\lbrack \\begin{array}{ccccc} B &amp; AB &amp; A^2 B &amp; \\cdots  &amp; A^{n-1} B \\end{array}\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/88d\/9b4\/3c4\/88d9b43c4a65eda2832263f9f2cdf74f.svg\" width=\"304\" height=\"23\"\/>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u043d\u0433 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/319\/9a6\/709\/3199a67098aa089da79aaf487ef7ad5b.svg\" width=\"12\" height=\"12\"\/>, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\xi\" alt=\"\\xi\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a09\/7d8\/2d0\/a097d82d00d7cb55e32780502b640605.svg\" width=\"9\" height=\"20\"\/> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\" alt=\"u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42e\/235\/e1e\/42e235e1e236d70a139e7b8190d9aa41.svg\" width=\"11\" height=\"12\"\/>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<pre><code class=\"matlab\">B = double(subs(B1)); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b rank(ctrb(A,B)) % \u043d\u0430\u0439\u0434\u0435\u043c \u0440\u0430\u043d\u0433 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438 ans = 4<\/code><\/pre>\n<p>\u0420\u0430\u043d\u0433 \u0440\u0430\u0432\u0435\u043d 4, \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0432\u0435\u043d 4, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430.<\/p>\n<h3>2.4 \u0420\u0430\u0441\u0447\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044e\u0441\u043e\u0432 (\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0437)<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<p>\u0421\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441<br \/> \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d78\/f83\/13e\/d78f8313e18dd5347ee1c97267eb714e.svg\" width=\"17\" height=\"17\"\/>. \u041f\u0443\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b -1.1, -1.2, -1.3, -1.4.   <\/p>\n<pre><code class=\"matlab\">p = [-1.1; -1.2; -1.3; -1.4]; % \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f85\/9a0\/0b4\/f859a00b4fcd6a40fde90238dd831e58.svg\" width=\"17\" height=\"17\"\/> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<pre><code class=\"matlab\">K = place(A,B,p) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f K K = 1\u00d74   152.3579   61.9939   -2.4489   -6.9969<\/code><\/pre>\n<p>\u041f\u0443\u0441\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 \u0440\u0430\u0432\u043d\u043e -2, \u0430 \u043c\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 2.<\/p>\n<p>\u041f\u0440\u043e\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c<br \/> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/p>\n<pre><code class=\"matlab\">Sdes = [0;0;2;0]; % \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b cond = [0;0;-2;0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f F2 = @(t,Y) CartPendf(t,Y,m,M,l,g,d,-K*(Y-Sdes)); % \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e Sol2 = ode45(F2,[0 tend],cond,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a78\/d63\/d09\/a78d63d0985f32804503670a3c12f525.jpg\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a78\/d63\/d09\/a78d63d0985f32804503670a3c12f525.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/558\/29f\/f87\/55829ff87b2892ffd54cb48edabb55ce.gif\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/558\/29f\/f87\/55829ff87b2892ffd54cb48edabb55ce.gif\"\/><\/figure>\n<h3>2.5 \u0420\u0430\u0441\u0447\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (LQR)<\/h3>\n<p>\u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u043f\u043e\u043b\u044e\u0441\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c<br \/> \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438<br \/> \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c,<br \/> \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 (LQR). \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432<br \/> \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"J=\\int_0^{\\infty } \\left(x^T Qx+u^T Ru\\right)dt\" alt=\"J=\\int_0^{\\infty } \\left(x^T Qx+u^T Ru\\right)dt\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52a\/87d\/889\/52a87d889317392969f55cec11289818.svg\" width=\"236\" height=\"48\"\/><\/p>\n<p>\u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q=n\\times n\" alt=\"Q=n\\times n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/82d\/147\/fd0\/82d147fd0232fc1e15b4dd026881c34f.svg\" width=\"88\" height=\"20\"\/>&#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"R=p\\times p\" alt=\"R=p\\times p\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ec\/1c7\/f42\/8ec1c7f42589e46e4693b918420ed92f.svg\" width=\"83\" height=\"20\"\/> &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K\" alt=\"K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/354\/c59\/75c\/354c5975c6b9152205a58b4f18b4265a.svg\" width=\"17\" height=\"17\"\/>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u=-K\\cdot x\" alt=\"u=-K\\cdot x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef2\/b8d\/29f\/ef2b8d29f5e02457a23fffcc9a0884ca.svg\" width=\"94\" height=\"18\"\/>\u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"matlab\">Q = diag([1 0.1 2 0.1]); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 R = 0.01; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 K = lqr(A,B,Q,R) % \u0440\u0430\u0441\u0447\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f K = 1\u00d74   274.7147  116.8560  -14.1421  -23.6448<\/code><\/pre>\n<p>\u041f\u0440\u043e\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/p>\n<pre><code class=\"matlab\">F3 = @(t,Y) CartPendf(t,Y,m,M,l,g,d,-K*(Y-Sdes)); % \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e Sol3 = ode45(F3,[0 tend],cond,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/9d7\/d57\/005\/9d7d57005572da5c87bc66f2daf84d0f.jpg\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d7\/d57\/005\/9d7d57005572da5c87bc66f2daf84d0f.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u043f\u0440\u0438\u043d\u044f\u043b \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea9\/d2b\/a1c\/ea9d2ba1c9e1e0becd5af2719fcf91d1.gif\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea9\/d2b\/a1c\/ea9d2ba1c9e1e0becd5af2719fcf91d1.gif\"\/><\/figure>\n<h3>2.6 \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>\u041d\u0430\u0448 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{array}{l} \\dot{x} =A\\cdot x+B\\cdot u\\\\ y=C\\cdot x \\end{array}\" alt=\"\\begin{array}{l} \\dot{x} =A\\cdot x+B\\cdot u\\\\ y=C\\cdot x \\end{array}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/928\/21a\/2da\/92821a2da52ea407a01ba9ada6607b77.svg\" width=\"145\" height=\"50\"\/><\/p>\n<p>\u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"y\\in R^q\" alt=\"y\\in R^q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e0\/024\/49f\/3e002449fb4808528d7de422e6f65cb9.svg\" width=\"56\" height=\"20\"\/> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0432\u044b\u0445\u043e\u0434\u0430, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"C=q\\times n\" alt=\"C=q\\times n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/848\/94c\/f00\/84894cf00bfdb7737280f69782dc4713.svg\" width=\"84\" height=\"20\"\/> &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u044b\u0445\u043e\u0434\u0430.<\/p>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c\u044e, \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043c, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439. \u0417\u0434\u0435\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"Ob=\\left\\lbrack C\\;AC\\;A^2 C\\cdots A^{n-1} C\\right\\rbrack\" alt=\"Ob=\\left\\lbrack C\\;AC\\;A^2 C\\cdots A^{n-1} C\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/99b\/180\/1af\/99b1801afef447a12c1e72bc733593b7.svg\" width=\"243\" height=\"27\"\/><\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/07d\/68e\/f2d\/07d68ef2d76ba2ecc22dd901f02d0e06.svg\" width=\"11\" height=\"12\"\/>\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\theta\" alt=\"\\theta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/256\/a43\/5df\/256a435df12ce3353694ff2852dcc530.svg\" width=\"9\" height=\"17\"\/>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"C\" alt=\"C\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d0d\/4e5\/206\/d0d4e520616da914cefdf512aa8432ba.svg\" width=\"15\" height=\"17\"\/>:<\/p>\n<pre><code class=\"matlab\">C = [1 0 0 0; 0 0 1 0]; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u044b\u0445\u043e\u0434\u0430<\/code><\/pre>\n<p>\u041e\u0446\u0435\u043d\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"matlab\">rank(obsv(A,C)) % \u043d\u0430\u0439\u0434\u0435\u043c \u0440\u0430\u043d\u0433 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438  ans = 4<\/code><\/pre>\n<p>\u0420\u0430\u043d\u0433 \u0440\u0430\u0432\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u0430. \u041c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/643\/96e\/6f7\/64396e6f7f1343d8ac68689521267916.svg\" width=\"11\" height=\"12\"\/>, \u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u043e\u0449\u0435 \u0438\u043c\u0435\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/866\/6b0\/a93\/8666b0a9312e3142107a5508edffed43.svg\" width=\"11\" height=\"12\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\theta\" alt=\"\\theta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f7d\/9d1\/5c6\/f7d9d15c6a7c017f65c2c7ac00cd8115.svg\" width=\"9\" height=\"17\"\/>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u0430, \u043d\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0418 \u0442\u0443\u0442 \u0432\u0441\u0442\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044f, \u0438\u043b\u0438 \u043e\u0446\u0435\u043d\u0449\u0438\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u042d\u0442\u0438\u043c \u043e\u0446\u0435\u043d\u0449\u0438\u043a\u043e\u043c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430.<br \/> \u041f\u0440\u043e \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043c\u044b \u0436\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0438\u0434\u0435\u044e.<br \/> \u0417\u043d\u0430\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/22d\/794\/20a\/22d79420aa27efc8d4c564f322bcb027.svg\" width=\"14\" height=\"17\"\/>), \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0432\u0445\u043e\u0434\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"y\" alt=\"y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6f8\/b1a\/63c\/6f8b1a63c4a898050e19f41cb52887af.svg\" width=\"10\" height=\"15\"\/> \u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\" alt=\"u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cbc\/866\/c7b\/cbc866c7b2f05622b873fad7934fa795.svg\" width=\"11\" height=\"12\"\/>, \u0430 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\hat{x}\" alt=\"\\hat{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f50\/a55\/a66\/f50a55a665c9f717d91248971d7eb958.svg\" width=\"11\" height=\"17\"\/>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{array}{l} \\frac{\\mathrm{d}}{\\mathrm{d}t}\\hat{x} =A\\cdot \\hat{x} +B\\cdot u+K_f \\cdot \\left(y-\\hat{y} \\right)\\\\ \\hat{y} =C\\cdot \\hat{x}  \\end{array};\" alt=\"\\begin{array}{l} \\frac{\\mathrm{d}}{\\mathrm{d}t}\\hat{x} =A\\cdot \\hat{x} +B\\cdot u+K_f \\cdot \\left(y-\\hat{y} \\right)\\\\ \\hat{y} =C\\cdot \\hat{x}  \\end{array};\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c8d\/e65\/b20\/c8de65b20fc74e18de2cd918e48c77c3.svg\" width=\"293\" height=\"56\"\/><\/p>\n<p>\u0433\u0434\u0435: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\hat{x}\" alt=\"\\hat{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a4d\/2b3\/70a\/a4d2b370af5e37ee406a2cfe843c8427.svg\" width=\"11\" height=\"17\"\/> &#8212; \u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K_f\" alt=\"K_f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7d3\/33b\/d79\/7d333bd7952562c208b038c913e37d4a.svg\" width=\"26\" height=\"22\"\/> &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"y\" alt=\"y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d70\/58b\/01b\/d7058b01bf92ede9d1ef84689ff2e572.svg\" width=\"10\" height=\"15\"\/> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\hat{y}\" alt=\"\\hat{y}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a38\/6ae\/19b\/a386ae19bc7a84d8c4d0677d88308d3d.svg\" width=\"11\" height=\"20\"\/>\u0438 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430, \u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\hat{x}\" alt=\"\\hat{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de0\/81d\/c52\/de081dc5295a4bd510066a060c9de61c.svg\" width=\"11\" height=\"17\"\/> \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K_f\" alt=\"K_f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/949\/440\/1c4\/9494401c42832e56a0af8841f9503763.svg\" width=\"26\" height=\"22\"\/>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\varepsilon =x-\\hat{x}\" alt=\"\\varepsilon =x-\\hat{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/010\/610\/b2b\/010610b2be3cc14dfa7aebbbc2263eff.svg\" width=\"80\" height=\"18\"\/>, \u0442\u043e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\mathrm{d}}{\\mathrm{d}t}\\varepsilon =\\frac{\\mathrm{d}}{\\mathrm{d}t}x-\\frac{\\mathrm{d}}{\\mathrm{d}t}\\hat{x} =Ax+Bu-A\\hat{x} -K_f C\\hat{x} -K_f y-Bu=A\\left(x-\\hat{x} \\right)-K_f C\\left(x-\\hat{x} \\right)=\\left(A-K_f C\\right)\\varepsilon\" alt=\"\\frac{\\mathrm{d}}{\\mathrm{d}t}\\varepsilon =\\frac{\\mathrm{d}}{\\mathrm{d}t}x-\\frac{\\mathrm{d}}{\\mathrm{d}t}\\hat{x} =Ax+Bu-A\\hat{x} -K_f C\\hat{x} -K_f y-Bu=A\\left(x-\\hat{x} \\right)-K_f C\\left(x-\\hat{x} \\right)=\\left(A-K_f C\\right)\\varepsilon\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea3\/60f\/e9f\/ea360fe9f14874d21ca84a1ac5c36055.svg\" width=\"850\" height=\"43\"\/><\/p>\n<p>\u0438\u0437 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043e\u0446\u0435\u043d\u0435\u043d\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u043c, \u0435\u0441\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u0430. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K_f\" alt=\"K_f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/193\/9c6\/adc\/1939c6adca9e4d7ead3e96b01bf72f7b.svg\" width=\"26\" height=\"22\"\/>\u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0430\u043c, \u0433\u0434\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u043c, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<br \/> \u041d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043c\u0435\u0445\u0438 \u0438 \u0448\u0443\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K_f\" alt=\"K_f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ee\/a61\/49c\/2eea6149c8db2e3b16f2a98a339dc6b0.svg\" width=\"26\" height=\"22\"\/>, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"J=E\\left\\lbrack {\\left(x-\\hat{x} \\right)}^T \\left(x-\\hat{x} \\right)\\right\\rbrack\" alt=\"J=E\\left\\lbrack {\\left(x-\\hat{x} \\right)}^T \\left(x-\\hat{x} \\right)\\right\\rbrack\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80a\/fc4\/ae4\/80afc4ae4f3ff038fe7080b55c4289aa.svg\" width=\"210\" height=\"38\"\/>(\u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438) \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439.<br \/> \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MATLAB \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u0449\u0438\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"matlab\">Q = [0.7164; 1.2793; 0.7659; 2.3542].*eye(4); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u043c\u0435\u0445 R = [0.0125;0.7620].*eye(2); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0448\u0443\u043c\u0430<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"K_f\" alt=\"K_f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6f\/c91\/056\/a6fc910564b1eab21a561b3ebb15c56e.svg\" width=\"26\" height=\"22\"\/>:<\/p>\n<pre><code class=\"matlab\">[Kf,~,~] = lqe(A,eye(4),C,Q,R) % \u0440\u0430\u0441\u0447\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 Kf = 4\u00d72     9.5200    0.0061    16.6607    0.0267     0.3708    2.0365     2.6577    1.5723<\/code><\/pre>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043e\u0446\u0435\u043d\u0449\u0438\u043a\u0430:  <\/p>\n<pre><code class=\"matlab\">KA = A-Kf*C; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0410 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 KB = [B Kf]; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 B \u0444\u0438\u043b\u044c\u0442\u0440\u0430 KC = eye(4); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 C \u0444\u0438\u043b\u044c\u0442\u0440\u0430 KD = 0*[B Kf]; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 D \u0444\u0438\u043b\u044c\u0442\u0440\u0430<\/code><\/pre>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u043e\u043c, \u043e\u0446\u0435\u043d\u0449\u0438\u043a\u043e\u043c \u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0448\u0443\u043c \u043a \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0437 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x_0 =0\" alt=\"x_0 =0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/624\/e38\/9f9\/624e389f938ef3be7985fe82f5bda77e.svg\" width=\"55\" height=\"19\"\/>, \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u043f\u043e\u043f\u0430\u043b \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x=2\" alt=\"x=2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/033\/cfc\/7cb\/033cfc7cb6da022d57173141eff977e0.svg\" width=\"46\" height=\"16\"\/>.<\/p>\n<pre><code class=\"matlab\">syms theta_kf(t) x_kf(t) w1 w2 % \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 Sdes = [0;0;2;0]; % \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 eqns1 = subs(eqns); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u043e\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b eqns1 = subs(eqns1,F_ext,K*(Sdes-[theta_kf;diff(theta_kf);x_kf;diff(x_kf)])); % \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 eqns2 = diff([theta_kf;diff(theta_kf);x_kf;diff(x_kf)]) == KA*[theta_kf;diff(theta_kf);x_kf;diff(x_kf)] + KB*[K*(Sdes-[theta_kf;diff(theta_kf);x_kf;diff(x_kf)]);theta+w1;x+w2]; % \u043e\u0446\u0435\u043d\u0449\u0438\u043a eqnsC = vpa([eqns1;eqns2],3) % \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0421\u0414\u0423<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{array}{l} \\left(\\begin{array}{c} {\\mathrm{e}}^{0.1\\,t} \\,{\\left(275.0\\,\\theta_{\\textrm{kf}} \\left(t\\right)-14.1\\,x_{\\textrm{kf}} \\left(t\\right)+117.0\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)-23.6\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)+28.3\\right)}+6.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_4 +0.6\\,{\\mathrm{e}}^{0.1\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-0.2\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)+2.0\\,\\sin \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 -2.0\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_1 =0.0\\\\ 4.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_2 \\,\\sigma_1 -2.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\sigma_4 +4.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_3 \\,\\sigma_1 +0.4\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_2 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-0.2\\,{\\mathrm{e}}^{0.1\\,t} \\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+0.4\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_3 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-19.6\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sin \\left(\\theta \\left(t\\right)\\right)=0.0\\\\ \\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)=\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+9.52\\,w_1 +0.00608\\,w_2 +9.52\\,\\theta \\left(t\\right)-9.52\\,\\theta_{\\textrm{kf}} \\left(t\\right)+0.00608\\,x\\left(t\\right)-0.00608\\,x_{\\textrm{kf}} \\left(t\\right)\\\\ \\frac{\\partial^2 }{\\partial t^2 }\\;\\theta_{\\textrm{kf}} \\left(t\\right)=16.7\\,w_1 +0.0267\\,w_2 +16.7\\,\\theta \\left(t\\right)-38.2\\,\\theta_{\\textrm{kf}} \\left(t\\right)+0.0267\\,x\\left(t\\right)+1.39\\,x_{\\textrm{kf}} \\left(t\\right)-11.8\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+2.36\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)-2.83\\\\ \\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)=\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)+0.371\\,w_1 +2.04\\,w_2 +0.371\\,\\theta \\left(t\\right)-0.371\\,\\theta_{\\textrm{kf}} \\left(t\\right)+2.04\\,x\\left(t\\right)-2.04\\,x_{\\textrm{kf}} \\left(t\\right)\\\\ \\frac{\\partial^2 }{\\partial t^2 }\\;x_{\\textrm{kf}} \\left(t\\right)=2.66\\,w_1 +1.57\\,w_2 +2.66\\,\\theta \\left(t\\right)-55.6\\,\\theta_{\\textrm{kf}} \\left(t\\right)+1.57\\,x\\left(t\\right)+1.26\\,x_{\\textrm{kf}} \\left(t\\right)-23.4\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+4.63\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)-5.66 \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 =\\frac{\\partial^2 }{\\partial t^2 }\\;\\theta \\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 ={\\cos \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 ={\\sin \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_4 =\\frac{\\partial^2 }{\\partial t^2 }\\;x\\left(t\\right) \\end{array}\" alt=\"\\begin{array}{l} \\left(\\begin{array}{c} {\\mathrm{e}}^{0.1\\,t} \\,{\\left(275.0\\,\\theta_{\\textrm{kf}} \\left(t\\right)-14.1\\,x_{\\textrm{kf}} \\left(t\\right)+117.0\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)-23.6\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)+28.3\\right)}+6.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_4 +0.6\\,{\\mathrm{e}}^{0.1\\,t} \\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)-0.2\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)+2.0\\,\\sin \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,{{\\left(\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)\\right)}}^2 -2.0\\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_1 =0.0\\\\ 4.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_2 \\,\\sigma_1 -2.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\sigma_4 +4.0\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_3 \\,\\sigma_1 +0.4\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_2 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-0.2\\,{\\mathrm{e}}^{0.1\\,t} \\,\\cos \\left(\\theta \\left(t\\right)\\right)\\,\\frac{\\partial }{\\partial t}\\;x\\left(t\\right)+0.4\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sigma_3 \\,\\frac{\\partial }{\\partial t}\\;\\theta \\left(t\\right)-19.6\\,{\\mathrm{e}}^{0.1\\,t} \\,\\sin \\left(\\theta \\left(t\\right)\\right)=0.0\\\\ \\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)=\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+9.52\\,w_1 +0.00608\\,w_2 +9.52\\,\\theta \\left(t\\right)-9.52\\,\\theta_{\\textrm{kf}} \\left(t\\right)+0.00608\\,x\\left(t\\right)-0.00608\\,x_{\\textrm{kf}} \\left(t\\right)\\\\ \\frac{\\partial^2 }{\\partial t^2 }\\;\\theta_{\\textrm{kf}} \\left(t\\right)=16.7\\,w_1 +0.0267\\,w_2 +16.7\\,\\theta \\left(t\\right)-38.2\\,\\theta_{\\textrm{kf}} \\left(t\\right)+0.0267\\,x\\left(t\\right)+1.39\\,x_{\\textrm{kf}} \\left(t\\right)-11.8\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+2.36\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)-2.83\\\\ \\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)=\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)+0.371\\,w_1 +2.04\\,w_2 +0.371\\,\\theta \\left(t\\right)-0.371\\,\\theta_{\\textrm{kf}} \\left(t\\right)+2.04\\,x\\left(t\\right)-2.04\\,x_{\\textrm{kf}} \\left(t\\right)\\\\ \\frac{\\partial^2 }{\\partial t^2 }\\;x_{\\textrm{kf}} \\left(t\\right)=2.66\\,w_1 +1.57\\,w_2 +2.66\\,\\theta \\left(t\\right)-55.6\\,\\theta_{\\textrm{kf}} \\left(t\\right)+1.57\\,x\\left(t\\right)+1.26\\,x_{\\textrm{kf}} \\left(t\\right)-23.4\\,\\frac{\\partial }{\\partial t}\\;\\theta_{\\textrm{kf}} \\left(t\\right)+4.63\\,\\frac{\\partial }{\\partial t}\\;x_{\\textrm{kf}} \\left(t\\right)-5.66 \\end{array}\\right)\\\\ \\mathrm{}\\\\ \\textrm{where}\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_1 =\\frac{\\partial^2 }{\\partial t^2 }\\;\\theta \\left(t\\right)\\\\ \\mathrm{}\\\\ \\;\\;\\sigma_2 ={\\cos \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_3 ={\\sin \\left(\\theta \\left(t\\right)\\right)}^2 \\\\ \\mathrm{}\\\\ \\;\\;\\sigma_4 =\\frac{\\partial^2 }{\\partial t^2 }\\;x\\left(t\\right) \\end{array}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44e\/7c6\/e41\/44e7c6e41eacafc3002d993e37877b25.svg\" width=\"1647\" height=\"520\"\/><\/p>\n<pre><code class=\"matlab\">[Vkf,Skf] = odeToVectorField(eqnsC); % \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e PendControl = matlabFunction(Vkf,'Vars',{'t','Y','w1','w2'}); % \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c hendle \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0438\u043c \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/p>\n<pre><code class=\"matlab\">w1 = @(x) rand\/100; % \u0448\u0443\u043c tend = 10; % \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f cond = zeros(8,1); % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f  pfig = figure; psub1 = subplot(2,1,1); grid on; psub1.Subtitle.String = 'theta with noise'; psub2 = subplot(2,1,2); grid on; psub2.Subtitle.String = 'x with noise'; Alh1 = animatedline('Parent',psub1,'Color','r'); Alh2 = animatedline('Parent',psub2,'Color','b'); PendControlF = @(t,y) odefcnintdisp(t,y,PendControl,w1(t),w1(t),Alh1,Alh2); % \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0448\u0443\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Sol4 = ode45(PendControlF,[0 tend],cond); % \u0440\u0435\u0448\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/fa4\/639\/7c5\/fa46397c543d63359d2eb697e4dc3fb8.jpg\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fa4\/639\/7c5\/fa46397c543d63359d2eb697e4dc3fb8.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0414\u0423<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d20\/163\/18f\/d2016318f43bad1f461dfee76a4f60a6.jpg\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d20\/163\/18f\/d2016318f43bad1f461dfee76a4f60a6.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/256\/606\/b3b\/256606b3be3e2b7247708437b1ee97b3.gif\" width=\"560\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/256\/606\/b3b\/256606b3be3e2b7247708437b1ee97b3.gif\"\/><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430.<\/p>\n<p><a href=\"https:\/\/github.com\/Vitalya777\/InvertPendControl\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442<\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/playlist?list=PLMrJAkhIeNNR20Mz-VpzgfQs5zrYi085m\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043b\u0435\u043a\u0446\u0438\u0438<\/a> <a href=\"https:\/\/www.youtube.com\/@Eigensteve\" rel=\"noopener noreferrer nofollow\">Steve Brunton<\/a>, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/797475\/\"> https:\/\/habr.com\/ru\/articles\/797475\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u043e\u0440\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \u043d\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u043d\u043e \u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u0435\u043f\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u044e \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0430\u043a\u0435\u0442\u0430 MATLAB. <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u044f\u0442\u043d\u0438\u043a, \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u0432\u0435\u0440\u0445&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u043b\u043e\u0439 <strong><em><\/em><\/strong>                                            . \u0412 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0430  \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043b\u0435\u0436\u043a\u0438 . \u041d\u0430\u043c \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 &#171;\u0432\u0432\u0435\u0440\u0445&#187; \u043f\u0440\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 \u0438 \u043f\u0440\u0438 \u0448\u0443\u043c\u0430\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<h2>1. \u0421\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (Plant)<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438 \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0435\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438.<\/p>\n<p>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435:  &#8212; \u043c\u0430\u0441\u0441\u0430 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 (kg), &#8212; \u043c\u0430\u0441\u0441\u0430 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430    (kg), &#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f (s^-1), &#8212; \u0434\u043b\u0438\u043d\u043d\u0430 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 (m),  &#8212; \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u044b \u0442\u044f\u0436\u0435\u0441\u0442\u0438 (m\/s^2).<\/p>\n<pre><code class=\"matlab\">syms t d M m h v_C v_P x(t) theta(t) l g TC = 1\/2*M*v_C^2; % \u043a\u0438\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f \u0442\u0435\u043b\u0435\u0436\u043a\u0438 TP = 1\/2*m*v_P^2; % \u043a\u0438\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 U = m*g*h; % \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044f U = subs(U,h,l*cos(theta)); % \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 y \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 v_C = diff(x,t); % \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0442\u0435\u043b\u0435\u0436\u043a\u0438 v_P = sqrt(diff(x-l*sin(theta),t)^2 + diff(l*cos(theta),t)^2); % \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430<\/code><\/pre>\n<p>\u0418\u0437 \u0437\u0430\u043a\u043e\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0438\u0430\u043d\u0430 , \u0433\u0434\u0435: <\/p>\n<pre><code class=\"matlab\">syms F_ext % \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0438\u043b\u0430 L = subs(exp(d*t)*(TC + TP - U + x*F_ext)); % exp(d*t) - \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u0442\u0440\u0435\u043d\u0438\u044f<\/code><\/pre>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u041b\u0430\u0433\u0440\u0430\u043d\u0436\u0435\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438 <\/p>\n<pre><code class=\"matlab\">eqns = functionalDerivative(-L,[x theta]) == [0;0] % \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c Handle \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<pre><code class=\"matlab\">[V,S] = odeToVectorField(eqns); % \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p>\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b <\/p>\n<pre><code class=\"matlab\">CartPendf = matlabFunction(V,'Vars',{'t','Y','m','M','l','g','d','F_ext'}); % handle \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<p>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043c , \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0438\u043b\u0430 .<\/p>\n<pre><code class=\"matlab\">init_cond % \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 F = @(t,Y) CartPendf(t,Y,m,M,l,g,d,0.1); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 handle \u0444\u0443\u043d\u043a\u0446\u0438\u044e tend = 10; % \u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f cond = [pi-deg2rad(theta0); 0; 0; 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f opts = odeset('RelTol',1e-6,'AbsTol',1e-6); % \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0430\u0442\u0435\u043b\u044f Sol = ode45(F,[0 tend],cond,opts); % \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0414\u0423:<\/strong><\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>2. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 (Controller)<\/h2>\n<h3>2.1 \u041b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0414\u0423 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/p>\n<p>\u0433\u0434\u0435:  &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439,  &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, &#8212; \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u0414\u0423 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u0430 , \u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0451 \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 , \u0447\u0442\u043e\u0431\u044b .<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043c\u0430\u043b\u043e\u0439 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 , \u0433\u0434\u0435  \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0440\u044f\u0434 \u0422\u0435\u0439\u043b\u043e\u0440\u0430, \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435:<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>\u0433\u0434\u0435  &#8212; \u042f\u043a\u043e\u0431\u0438\u0430\u043d\u044b.<\/p>\n<p>\u0423\u043f\u0440\u043e\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435: <\/p>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0439 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u042f\u043a\u043e\u0431\u0438\u0430\u043d\u0443 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0439\u0434\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b  \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 &#171;\u0432\u0432\u0435\u0440\u0445&#187; \u0438 &#171;\u0432\u043d\u0438\u0437&#187;:<\/p>\n<pre><code class=\"matlab\">Vc = feval(symengine,'evalAt',V,'Y = [y1,y2,y3,y4]'); % \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445  y = sym('y',[4,1]); % \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 p1 = [0;0;0;0]; % \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0434\u0438\u043d - \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u0432\u0435\u0440\u0445\" p2 = [pi;0;0;0]; % \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0434\u0432\u0430 - \u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u043d\u0438\u0437\" Df = jacobian(Vc,y); % \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u044f\u043a\u043e\u0431\u0438\u0430\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u044b A1 = subs(Df,y,p1) % \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410 \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u0432\u0435\u0440\u0445\"<\/code><\/pre>\n<pre><code class=\"matlab\">A2 = subs(Df,y,p2) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0410 \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \"\u0432\u043d\u0438\u0437\"<\/code><\/pre>\n<pre><code class=\"matlab\">B1 = subs(diff(Vc,F_ext),y,p1) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 B \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u0432\u0435\u0440\u0445\"<\/code><\/pre>\n<pre><code class=\"matlab\">B2 = subs(diff(Vc,F_ext),y,p2) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 B \u0434\u043b\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 \"\u0432\u043d\u0438\u0437\"<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 (\u043c\u0430\u044f\u0442\u043d\u0438\u043a \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u043d\u0438\u0437&#187;) \u0438 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f .<\/p>\n<pre><code class=\"matlab\">eqnsL2 = A2*y+B2*F_ext % \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u0430 (\u0432\u043d\u0438\u0437)<\/code><\/pre>\n<pre><code class=\"matlab\">syms d m M l g fL1 = matlabFunction(eqnsL2,'Vars',{y,m,M,l,g,d,F_ext}); % handle \u0444\u0443\u043d\u043a\u0446\u0438\u044f init_cond % \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 FL1 = @(~,y) fL1(y,m,M,l,g,d,0); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b FNL1 = @(~,Y) CartPendf(t,Y,m,M,l,g,d,0); % \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 theta0 = 10; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0433\u043e\u043b condL = [deg2rad(theta0) 0 0 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b condNL = [pi-deg2rad(theta0) 0 0 0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b SolL1 = ode45(FL1,[0 tend],condL,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b SolNL1 = ode45(FNL1,[0 tend],condNL,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c<\/h4>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442.<\/p>\n<h3>2.2 \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0414\u0423 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/h3>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0432\u0435\u0434\u044c \u0434\u043b\u044f \u043d\u0435\u0435 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435: .<\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u043d\u0430\u0439\u0434\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"matlab\">SymSolL = expm(subs(A2)*t)*condL' % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/code><\/pre>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h4>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 , \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b . \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a , \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u0432\u0445\u043e\u0434, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c. \u0417\u0434\u0435\u0441\u044c  &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f  \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 , \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0431\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b , \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430.<\/p>\n<h3>2.3 \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430\u0448\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043c\u0430\u044f\u0442\u043d\u0438\u043a\u043e\u043c \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 &#171;\u0432\u0432\u0435\u0440\u0445&#187;.<\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u0437\u043d\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439. \u041f\u043e\u0434 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 &#8212; \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c<br \/> \u043c\u0430\u0442\u0440\u0438\u0446\u044b . \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0445\u043e\u0442\u044c \u043e\u0434\u043d\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043c\u0430\u0442\u0440\u0438\u0446\u0443  \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439  \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 : . \u0422\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0440\u044f\u0434 \u0422\u0435\u0439\u043b\u043e\u0440\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a , \u0442\u043e , \u0433\u0434\u0435  &#8212; \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b .<\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u043e\u0441\u0442\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a:<\/p>\n<p>\u0415\u0441\u043b\u0438 0&#8243; alt=&#187;a>0&#8243; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/584\/dba\/c97\/584dbac970d889696899f7f60330a1fe.svg&#187; width=&#187;46&#8243; height=&#187;16&#8243;\/>, \u0442\u043e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0441\u0442, \u0435\u0441\u043b\u0438 \u0442\u043e \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u041d\u0430\u0439\u0434\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b .<\/p>\n<pre><code class=\"matlab\">A = double(subs(A1)); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b eig(A) % \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ans = 4\u00d71          0    -0.1000     2.3766    -2.4766<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0440\u043d\u0438, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e. \u0414\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 .<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043e\u0440\u0435\u043c\u043e\u0439 \u041a\u0435\u043b\u0438-\u0413\u0430\u043c\u0438\u043b\u044c\u0442\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e .<\/p>\n<p>&#8212; \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/p>\n<p> &#8212; \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0435\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/p>\n<p> &#8212; \u0432\u044b\u0440\u0430\u0437\u0438\u043c \u0441\u0442\u0430\u0440\u0448\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b .<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b , \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0432\u043d\u043e:<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 :<\/p>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u043d\u0433 , \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f .<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<pre><code class=\"matlab\">B = double(subs(B1)); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b rank(ctrb(A,B)) % \u043d\u0430\u0439\u0434\u0435\u043c \u0440\u0430\u043d\u0433 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u0438 ans = 4<\/code><\/pre>\n<p>\u0420\u0430\u043d\u0433 \u0440\u0430\u0432\u0435\u043d 4, \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0432\u0435\u043d 4, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430.<\/p>\n<h3>2.4 \u0420\u0430\u0441\u0447\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044e\u0441\u043e\u0432 (\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0437)<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<p>\u0421\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441<br \/> \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f . \u041f\u0443\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b -1.1, -1.2, -1.3, -1.4.   <\/p>\n<pre><code class=\"matlab\">p = [-1.1; -1.2; -1.3; -1.4]; % \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430  \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<pre><code class=\"matlab\">K = place(A,B,p) % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f K K = 1\u00d74   152.3579   61.9939   -2.4489   -6.9969<\/code><\/pre>\n<p>\u041f\u0443\u0441\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0436\u043a\u0438 \u0440\u0430\u0432\u043d\u043e -2, \u0430 \u043c\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 2.<\/p>\n<p>\u041f\u0440\u043e\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c<br \/> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/p>\n<pre><code class=\"matlab\">Sdes = [0;0;2;0]; % \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b cond = [0;0;-2;0]; % \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f F2 = @(t,Y) CartPendf(t,Y,m,M,l,g,d,-K*(Y-Sdes)); % \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e Sol2 = ode45(F2,[0 tend],cond,opts); % \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>2.5 \u0420\u0430\u0441\u0447\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (LQR)<\/h3>\n<p>\u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u043f\u043e\u043b\u044e\u0441\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c<br \/> \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438<br \/> \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c,<br \/> \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 (LQR). \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432<br \/> \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c:<\/p>\n<p>\u0433\u0434\u0435: &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0438  &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 , \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"matlab\">Q = diag([1 0.1 2 0.1]); % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 R = 0.01; % \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 K =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-369714","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369714"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369714\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}