Hi all,
I am working on implementing scalar control and foc control for induction machines, so I am wondering what the recommendations are in order to carry on with the programming. After reviewing the firmware source code, my first thoughts were to copy/rename/overwrite "mcpwm_foc.h" and "mcpwm_foc.c", so the microcontroller-related code could stay and I would focus on the motor control.
Could any of you with more experience in VESC firmware suggests me the best approach, best practices?, warnings are also welcome.
Thanks.
Hi,
I created a copy of "mcpwm_foc.h" and "mcpwm_foc.c" and name them "mcpwm_vhz.c/.h", I added some code to call those when "VHZ" is chosen in Vesc tool. I was expecting to get the same old FOC running from the new above mentioned files before start working on the new control algorithm. However, in testing it, as a current value is set from Vesc tool, duty cycle goes to the max (95%) and current remains at zero. No fault is generated but FOC does not work at all.
If I switch back to FOC in Vesc tool, it works normally.
Any suggestion on how I can get started in order to add a new control strategy to the current firmware? I can provide more details of what I've done if it helps to debug it. I've been studying the code and I believe that I have a fair understanding of how is executed by the STM32/Chibios. However, I am still missing something.
Thanks.
For development you can keep using mcpwm_foc. You will be doing field oriented control after all, and all initializations and support functions would be the same.
You will have to develop a new observer algorthm for acim (thats a single function), and make some changes in the control loop. I wouldnt duplicate everything right away.
Hi,
I had to change the handler CH_IRQ_HANDLER(TIM8_CC_IRQHandler) in irq_handlers.c to make it work.
I implemented the V/Hz algorithm already and now am focus on limiting the motor current, stopping and starting the acim from standstill. Limiting current seems a bit tricky since it's sort of voltage/frequency control now rather than current control.
Hi!
Any news on the development of the control algorithm for an induction motor?