A cascade-structured controller was designed to control a motor under load.
(position-velocity-Torque controller)
The designed controller was implemented on the Atmega128 microcontroller to control the motor.
In Visual Studio 2017, a user interface (UI) was designed, and ODE simulations were applied.
Finally, the controller was deployed on the Atmega128, and motor control was achieved through communication between Atmel Studio and Visual Studio.
When a desired angle is input, the robotic arm moves clockwise or counterclockwise to reach the specified angle.
At this time, the angle can be entered in two modes: Joint Mode and Infinite Mode.
- In Joint Mode, the arm moves only within the range of -180° to 180°.
- In Infinite Mode, the arm rotates continuously to reach the desired angle without any range limitation.
For example:
- Joint Mode: 320° → -40°
- Infinite Mode: 400° → 400°
A current controller was designed, and based on its frequency response, a speed controller was subsequently designed.
Similarly, considering the frequency response of the speed controller, a position controller was designed.
For the position controller, PD control was employed to ensure precision and stability.
Both the speed and current controllers utilized PI control, and to prevent error accumulation, values were compensated using anti-windup gain.
Saturation limits were set for each controller to ensure the outputs did not exceed predefined thresholds.
- (position-velocity-Torque controller)
- current controller (PI Control)
- velocity controller (PI Control)
- position controller (PD Control)
- join1=90, joint2=90 (Forward) & join1=-150, joint2=90 (Forward)
- x=1.0, y=-1.0 (Inverse) & x=-1.0, y=0.8 (Inverse)
- Infinite Mode, +280 degree
- Infinite Mode, -90 degree
Due to hardware discrepancies, the system cannot precisely point to -90 degrees.
- Joint Mode, +190 degree (it moves -170 degree)
During the project, individual tuning was performed using MATLAB simulation to achieve effective control by considering the physical characteristics of the motor and the properties of the control system.
The values obtained from MATLAB were applied to the actual DC motor for control, and the control was successfully achieved.
Additionally, the PID gains can be further fine-tuned based on the desired characteristics.














