Page 51 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 51

30     Bu il d  Y o ur  O w n  Q u a d c o p t e r




































                             Figure 2.17  Express controls palette.




                             motors, MP2 and MP4, being simulated in this VI because it is a single-axis demonstration.
                             Figure 2.18 is a screenshot of the VI running.
                                I set the quadcopter setpoint to +10° for this simulation. After running the simulation for
                             several seconds, the virtual quadcopter settles into a 10° bank, as you can see from both the
                             diagram in the top center and the indicator to the right of the quadcopter diagram. The time-
                             response chart in the lower right shows that the quadcopter smoothly went to the commanded
                             bank in about one second without any overshoot.  This is precisely the type of control
                             behavior that you should want from a quadcopter flight-control board. Also, notice that the
                             three PID parameters, K , K , and K  may be set to experiment with different values in order
                                                   i
                                                p
                                                         d
                             to test how they affect overall performance.
                                I also ran another simulation, which is shown in Figure 2.19 but this time I increased the
                             throttle to 70% and increased the angle to 25°.
                                Take a look at the waveform chart in the lower left corner. MP2 is running at 74% while
                             MP4 is at 70%, which causes the 25° pitchover to happen. Compare this waveform to that
                             shown in Figure 2.18, where MP2 is running at approximately 52% and MP4 at 50%, and
                             which causes the shallower bank angle of 10°.
                                A much more challenging simulation that you can try is the Untethered Quadcopter.vi
                             from the same group that created the first VI discussed. Figure 2.20 is a screen shot of the
                             program running.
                                Here the challenge is to try to keep the quadcopter figure in the visible flying box by
                             using a combination of throttle and setpoint angle. Believe me, it is not easy. In fact, this
   46   47   48   49   50   51   52   53   54   55   56