Low pass filter and ramp function in PID

I have been trying to implement a position control application and I am successful to certain extent,

  • encoder is working
  • svpwm is working
  • torque control using voltage is working ( open loop )
  • Angle open loop is working

My next step is to control the motor for velocity in closed loop.

I ran into the PID implementation and the low pass filter implementation code in the git hub repo and need some clarification,

  • Could anybody provide me some insight on using low pass filter and the concept behind it
  • same with the output ramp functionality in the PID

Since I am developing the code in c language , i would like to know the existing implementation in git hub.

Thanks in advance

Hi! Welcome to the community.

There is no torque control in open-loop, i think you meant either velocity or closed loop torque voltage control.

The way output ramp works is limit the acceleration by ramping output. As you can imagine the ramping function look like ramp so its a linear function. It helps with acceleration or deacceleration.

Regarding LPF:

We have a bit about LPF in our theory corner. :slight_smile: