2022-01-08 12:51 PM
I have a motor control application where there is phase feedback at about 170Hz from a PID but this varies in application from 165Hz to 185Hz. The outer phase loop is summed with the inner speed loop (STM FOC Library) that has a crystal based 1kHz sample time. I think I need to up-sample the 170Hz outer loop because there is inadequate phase margin in the region 10-30Hz. I was thinking that up sampling would reduce phase lag.
Since the two frequencies (~170Hz and 1khz) are not integer related can I still use up sampling?
For example can I up-sample by 7x to 1155Hz then re-sample at the 1kHz crystal base frequency?
Thanks,
Brian
2022-01-09 09:55 AM
From your description im not clean what you sample, but if you have free timer you can do interrupt sampling on any available divided freq... FYI phase isnt sample , but measured wide i mean.