Skip to content

jeongho8288/Load-Applied_Motor_Control_Through_Cascade_Controller_Design

Repository files navigation

Project conducted in Robotics Laboratory 4

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°

System Architecture

Description2

Hardware Images

Description1 Description2 Description2

Load inertia

Description1 Description

Cascade Controller

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)
Description
  • current controller (PI Control)
Description
  • velocity controller (PI Control)
Description
  • position controller (PD Control)
Description

Simulation Results

UI Interface

Description

Forward Kinematics

  • join1=90, joint2=90 (Forward) & join1=-150, joint2=90 (Forward)
Description1 Description

Inverse Kinematics

  • x=1.0, y=-1.0 (Inverse) & x=-1.0, y=0.8 (Inverse)
Description1 Description

Results

  • Infinite Mode, +280 degree
Description1 Description2

  • Infinite Mode, -90 degree
    Due to hardware discrepancies, the system cannot precisely point to -90 degrees.
Description1 Description2

  • Joint Mode, +190 degree (it moves -170 degree)
Description1 Description2

Gain Tuning

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.