Popis: |
Prilikom izrade ovog završnog rada bilo je nužno poznavanje raznih cjelina iz područja automatskog upravljanja. Glavna ideja ovog rada je modeliranje sustava loptice na gredi, te programska implementacija PID regulatora kako bi sustav pozicionirao lopticu na referentnom zadanom položaju. Prikazana je izrada makete sustava, te su opisani drugi načini izrade makete korištenjem raznih drugih mogućih elemenata. U radu je objašnjen matematički model sustava. Matematički model sustava nije linearan, stoga je u radu objašnjena linearizacija modela, a objašnjena je i linearizacija nelinearne statičke karakteristike senzora. Objašnjeni su i svi dijelovi cjelokupnog sustava. Najvažniji dio sustava čini Arduino platforma. Arduino mikrokontroler prima informaciju o položaju loptice u obliku napona koji šalje infracrveni senzor, te ga uspoređuje s referentnim položajem. PID algoritam u programskom kodu zatim koristi razliku tih signala, kako bi na servomotor dao upravljački signal za regulaciju položaja loptice na gredi. U radu se objašnjava programski kod te utjecaj pojedinih dijelova koda na regulaciju sustava. Programski paket MATLAB korišten je za simulaciju i analizu ponašanja sustava. Na kraju rada rezultati se objašnjavaju i analiziraju, te se donosi zaključak. During the creation of this final thesis, it was necessary to know various topics in the field of automatic control. The main idea of this thesis is to model the ball and beam system, and the implementation of a PID controller through Arduino program, so that the system positions the ball at the reference set point. The creation of a physical model of the system is described, as well as other ways of making a model using various other possible elements. This thesis explains the mathematical model of the system. The mathematical model of the system is nonlinear, therefore the linearization of the model is explained. All parts of the whole system are also explained. The most important part of the system is the Arduino platform. The Arduino microcontroller receives the information about the position of the ball from the IR sensor in the form of voltage, and compares it with the reference position. The PID algorithm in the Arduino program code then uses the difference of these signals, to give the servo motor a control signal to control the position of the ball on the beam. The thesis explains the program code and the influence of individual parts of the code on the regulation of the system. The MATLAB programming environment was used for simulation and analysis of system behavior. At the end of the thesis, the results are explained and analyzed, and a conclusion is made. |