I didn’t believe mathematical modelling was necessary / possible for a real-time system such as a quadcopter, so my approach has very much an iterative
- come up with a theory
- test & tweak it until it works.
One of the guys who has commented here, Oscar, has a lot more mathematical approach on his blog, and one piece caught my eye today: using an audio spectrometer to measure the spin rate of the blades and correlate that to motor voltage and ESC PWM.
Ultimately the blade spin rate doesn’t matter to me – the PIDs set the spin rate, and sensor feedback makes sure it does what the PID target asks of it. But it’s interesting to understand mathematical model too even if it’s not used.
In theory, the blade spin rate is proportional to the voltage applied (apparently). Using an audio spectrum analyser (many smart phone apps are available that do this), it should be possible to spot peaks in the audio spectrum corresponding to the blades spinning. There should be a very tight cluster of 4 for a quadcopter. That’ll give a nice check that all the blades are spinning at the same rate when they should be. It should also allow double checking the PWM rate (I think). I am speculating also that if I have a duff motor causing the yaw (my only theory I have whose proof has eluded me so far), it should stand out like a sore thumb in the audio spectrum.
Motors come with a Kv gain which maps between RPM and applied voltage:
rpm = Kv * V
rpm will match the frequency of the peaks in the audio spectrum from the analyser.
The ESCs will always put out full battery voltage, but only in pulses (hopefully those fed in via the PWM), such that a 1.5ms PWM pulse fed to the ESC => 50% battery power applied => ~ 5.5V (0.5 * 11.1V from my 3S LiPo) => 5400 rpm (Kv = 980 for my Tiger Motors) => 90Hz audio spectrum peak.
Given that tomorrow’s weather is poor, this sounds like an interesting little side experiment to play with. And it might just show that one of my motors is indeed duff and so prove itself useful too!
I should mention that there’s a lot more interesting stuff on Oscar‘s blog covering the math(s) and his progress – certainly worth a read if you want something more substantial than my mindless witterings!
In fact I think I’ll be heading back because there’s well defined equations for blade measurements (length / pitch) compared to power / rpm, and together that ties PWM frequency to power (= acceleration) applied. I just love it when things slot into place like this.