# [WSS2016] Controlling a chaotic system with a neural network

Posted 3 years ago
3368 Views
|
3 Replies
|
1 Total Likes
|
 For my project at WSS2016, I implemented PD control on an inverted double pendulum.The double pendulum is an intrisicall chaotic system, shown below: I then produced many data points and taught a neural network how to respond to various forces on the system.Per my expectation, the neural network performs much more quickly and smoothly for randomized initial conditions than the linearized algorithm that I use for control.The equations of motion in the simplified system are as follows: c[t_] := -\[Alpha] x1[t] - \[Beta] x1'[t]; d2x1[t_] := (m2 x2''[t] + m1 g x1[t] + c[t])/m1; d2x2[t_] := (m2 g x2[t] + c[t]/4)/m2; d2xc[t_] = c[t]; where c[t] is the acceleration of the controller.This simplification may seem gross, but since the system only works within some reasonable error of the unstable equilibrium (~4%) I used the typical first term expansions of all trigonometric terms and came to these equations.The neural network I trained on this data is exceedingly simple; this is the initialization code for it: alconet = NetChain[{DotPlusLayer, DropoutLayer[0.2], DotPlusLayer, DropoutLayer[0.2], DotPlusLayer, DropoutLayer[0.2], DotPlusLayer}, "Input" -> 4] It consists of only linear transformation layers, and works for the simple PD control system. Answer
3 Replies
Sort By:
Posted 3 years ago
 This looks amazing ! May I ask in what package these commands can be found ? Or are they built in to Mathematica somewhere ? Answer
Posted 3 years ago
 They're built in to the version I'm using, but I believe there's a Neural Network package out there for earlier versions. Answer
Posted 3 years ago
 Thank you ! Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments