Skip to content

Marmikuu/STM32_Embedded_Control_Systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32_Embedded_Control_Systems

Embedded control systems library for STM32 microcontrollers. Provides modular discrete-time PID controllers, actuator drivers, and real-time examples built on STM32 using HAL and FreeRTOS

Library consist of:

  • PWM output functions
    They calculate and set given PWM duty cycle to a timer

How to use:

  • Configure timer for PWM output
  • Specify channel and PWM duty cycle in percent value [0.0 , 100.0 ] %

The function header is below;
void PWM_set_output(float U_percent, TIM_HandleTypeDef *htim,uint32_t channel)

  • PID controller

    Features:

    • Output saturation (min, max values)
    • Anti-windup "clamping" method (optional)
    • Adjustable parameters: Kp, Ti and Td value

Demo: PID controller was tested on STM32L476RG Nucleo board and industrial-grade GR63x55 DC Motor.


Figure 1. DC Motor test setup


Figure 2. PID response for Kp = 0.04, Ti = 2.5


Figure 3. PID response for Kp = 0.04, Ti = 0.7

About

Embedded control systems library for STM32 microcontrollers. Provides modular implementation of discrete-time PID controller, PWM actuator drivers, and real-time examples on STM32 using HAL and FreeRTOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages