You know when I said I understood everything finally? I was wrong! But now I do! haha. Well, more or less. I found a mistake in the SVM step. I had Va, Vb, and Vc, (all of which could have been nonzero), but then I was using 2 of the component vectors as if the 3rd was zero. The very final step of the field oriented control was to find an equivalent vector, but only using 2 of the 3 unit vectors in the directions from Va, Vb, Vc. I downloaded tcc, (tiny c compiler) and have debugged each of the steps of the FOC code, with lots of printf outputs, and graphs in excel. It's all actually working! I was wondering how I was going to debug it. It would have been tough without a separate c compiler.
|