Electronics > Projects, Designs, and Technical Stuff
Motion control, S-curves and other stuff >> controlling lift with DC motor
capt bullshot:
At least, 28.2 is a 25% error from 37.6 - perfectly matches the 25% lesser ripple. ROFLMAO and as I said - can't be horribly wrong and doesn't really matter for an expected 0.3 to 0.8 range of 100uH. Math is an asshole 8)
krisRaba:
Oh, interesting.. there was an error in previous estimation, I think, because when you compare results for calculations of ΔIppmax with Ltot1=Lmot_eff=28,2uH and with Ltot2=9,4+Lmot_eff=9,4+28,2=37,6uH ratio is 75% as it should.
When you take Ltot1=Lmot_eff=37,6uH and Ltot2=9,4+Lmot_eff=9,4+37,6=47uH ratio is 80% ;)
capt bullshot:
I never stated whether 37.6uH is the total or motor only inductance >:D
In fact, I believe I thought of it as the total inductance.
If you have a decent current probe in your lab, you can verify the theory by a practical measurement (calculate inductance from applied voltage step and current ramp over time). Kind of real time math, I like it that way, let the physics do all the hard calculation work in real time, and observe the results by accelerated electrons based (or a modern solid state variant) visualisation.
krisRaba:
I have to limit things that are not usefull in problems solving. Estimated value sounds realistic, current ripple decreased and along with 50kHz PWM looks much better on DSO now ;) Sometimes it is good to know some details, sometimes I am just curious and I dig a little bit deeper than needed but generally I have to move forward ;)
I think that it will be good to oversample and average current for smoother readings so I will try to sample in the middle of ON and OFF states (=100kSPS) and skip every second cycle in calculations (=25kHz), as in original controller, so I will have 4 samples to average before each current control loop call :popcorn:
krisRaba:
--- Quote from: krisRaba on October 24, 2019, 07:49:17 pm ---I think that it will be good to oversample and average current for smoother readings so I will try to sample in the middle of ON and OFF states (=100kSPS) and skip every second cycle in calculations (=25kHz), as in original controller, so I will have 4 samples to average before each current control loop call :popcorn:
--- End quote ---
Done! :D Maybe except "control loop call" :P But I have finally changed edge-aligned PWM to center-aligned mode, configured additional channel in asymmetric mode to generate TRGO2 with controlled delay that compensates feedback loop lag, and some additional "magic" on ADC to get 4 samples before interrupt that will execute current control loop :) A lot of tests performed to check all that synchro on DSO :-DMM and it perfectly hits defined moments :-+
Gosh, I love flexibility of these MCUs :-*
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version