Robot arm PD controller code

Hello,
I'm learning about PD controllers for robotic arms in joint space. So far I have written a script with the paths for one axe (q,q´,q´´). This is the image for my loop which I want to code:
Its my first time using matlab to write a loop, so I have no idea where to begin. I have some conditions to fill:
-Loop update rate is 4 ms
-Robot dynamics block updadte rate is 20 ms.
Please, I need a hint to begin with this.

Products

Release

R2021b

Asked:

on 18 Jan 2022

Answered:

on 17 Jan 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!