Thursday, September 6, 2018

Converged IoT Drone Operating Notes

Stabilization Mode Precedence

The CC3D is set to have 4 modes, manual, attitude, rate, and high rate. But, the first mode manual mode is not flyable as seen in this video,

0:01 tilt right and backward
0:02 attitude mode to rescue
0:03 tilt right and forward
0:04 to attitude mode
0:05 tilt left straight
0:06 attitude mode
0:08 tilt backward
0:09 attitude mode
0:10 tilt forward
0:11 attitude mode
0:25 landing approach too high and close to trees
0:35 backing off far and fast from the botched landing
0:40 good landing approach
0:53 touch down

So, the channel 5 mode switch should be set in the radio transmitter to skip the first mode to give stabilization mode precedence. The PWM output points should be as the following tables.
FrSky Taranis QX7
Full Transmitting PWM Range 172 - 1811
FlySky FS-i6X
Full Transmitting PWM Range 240 - 1806

SwitchC
Position
NA^-v
PWM
Percent
NA-252575
PWM

NA78611961607
PWM Mode
Assignment
172-581
Mode 1
582-991
Mode 2
992-1402
Mode 3
1402-1811
Mode 4
Mode1234

SwitchC
Position
NA^-v
PWM
Percent
NA385088
PWM

NA83510231618
PWM Mode
Assignment
172-581
Mode 1
582-991
Mode 2
992-1402
Mode 3
1402-1811
Mode 4
Mode1234


When the first mode is not skipped, pilot may forget to switch to second mode when FPV goggle is put on and attempting to reduce time to takeoff to save battery life. The result can be very bad crashes due to the high power applied for takeoff and the high speed drift of the manual mode. Video of this crash is here,


When transmitter and CC3D are out of sync with the number of the modes, the takeoff can happen in rate mode. This happens even after a small hovering test, for example, inside a car, because the rate mode hovering can be successful without pilot knowing that the modes are out of sync. Then the actual takeoff will, again, crash badly due to the high craft momentum nature of rate mode. Video of this crash is here,

, when CC3D is configured for 4 modes and radio transmitter is made to have 2 modes, and the first mode is at 1/2 of PWM output. We can be tempted to use 2-position switch for channel 5 , giving 1/2 and full PWM ouput, because it simplifies flying when goggles are on.  However, when CC3D is still having 4 modes, 1/2 PWM is equivalent of 2/4 PWM and is ambiguous between attitude mode and rate mode. And in this case, CC3D interpret 1/2 PWM as rate mode and hence the crash.

We can not remove mode 1 , manual mode, because manual mode is the fail safe mode for when radio signal is off or lost. And fail safe mode is used to check swashplate leveling before each flight, as seen in the build notes of its importance. We often needs a 4th mode to experiment some new settings. So, we consistently use 4 modes on CC3D and 3 modes on transmitter to reduce pilot error and setting errors.

CC3D has an alternative configuration to give stabilization precedence by arming the craft. But, we can not disarm the craft on-demand, and the arming status is not known when the craft is away from the pilot. Hence this alternative configuration is not used.

Indoor Hovering With RF Receiver With Proximity Cutoff

In the following video, XM+ receiver's LED starts out green, the transmitter antenna is shifted to create stronger radio coupling with the receiver at 0:01. The cutoff occurs at 0:02, the LED turns red, fail safe takes effect. The camera moves forward to zoom in to the receiver. The movement inadvertently shifts the transmitter antenna again , weakening the proximity coupling.  The cutoff is released at 0:07, and LED returns to green.

To avoid mid-air failure, the FrSky XM+ receiver requires putting transmitter on "range testing" mode before hovering in close proximity. This is not needed with R9M receiver, which does not have proximity cutff.  

Rate Mode Throttle/Pitch Curves

It is well know that symmetric foil has no perceivable drag change between 1 to 3 degrees attack angle, and  at greater than 3 degrees, drag has hyperbolic growth. Here to maintain a fixed RPM, the throttle reduction below hovering point is half'ed at 3 degrees collective pitch, this throttle level stays constant when collective pitch goes down toward 0 degrees. On the high throttle side, the 4th point throttle is the same as in attitude mode, but the 5th point, the maximum point, has the slope doubled to achieve maximum climb all while maintaining the hyperbolic curve for constant RPM and constant cyclic PIDs.  

 The collective pitch curve for diving should not be 0 because the helicopter's body provides drag and gives down cyclic pitch for the craft equivalent of elevator down. As seen in the following video, the craft recesses its position and drifted toward's the helicopter's bottom side direction near the bottom of the dive.

Here we keep the lowest collective pitch at 6x5/28=1 degree to provide compensation using single rotor helicopter dynamics, which converts collective pitch to equivalent of elevator up at high forward speed.
Equivalent values of the throttle pointsEquivalent values of the pitch points
Taranis -31 -31 -25 -13+13
Flysky+35+35+38+44+57
Taranis 514284256
Flysky 37142128

In build notes, it was determined that Taranis QX7 throttle output should not exceed +21 points to avoid out-of-bond PWM signaling to the ESC. In build notes, it was also determined that during the second half of the flight time, there would be a throttle boost of 7 points. So, here our maximum throttle +13 with 7 point boost produces +20 points throttle output points, still not exceeding the +21 points limit. In build notes, it was determined that if the craft weighs 253.3 grams, 1 extra boost point would be needed, resulting in +20+1=+21 , still, again, not exceeding the +21 points limit.

Actual implementation has extra RPM at maximum throttle past 0 point in the -100 100 scale. So, PID suppression is needed, as the following screenshot.
In this screenshot, the GUI is actually attitude mode PIDs, with non-zero Outer Loop, but rate mode has identical PIDs except the Outer Loop. It shows -0.5 TPS scaling after the throttle mid point even though the .uav configuration file has -0.99 scaling. The TPS only takes effect in rate mode because we curve the throttle below the mid point in the attitude mode. Also in this screenshot, we have cyclic Derivative of all modes set to 0 to keep PIDs in the simplest form.

Yaw is set to a small 360 degrees/s because the direct drive system can not force the tail rotation counter-clockwise faster than the torque naturally occur in the main rotor. To reduce the misalignment between the controller expected yaw angle and the physical angle, yaw responsiveness is set to much smaller than cyclic. In actual implementation of the craft, cyclic rotation can not physically turn much faster than 360 degrees/s .

The maximum throttle in rate mode climbing/punching with the scaling should be smooth as the following video.

At 0:02 of the video, you can see a sudden blade motion change, and the changing movement seems to reverse the blade rotation and settles down at 0:06 to a high climb rate.

In summary, the difference between factory uav file for FrSky and FlySky is the 3 lines of TX PWM Max/Neutral/Min for the channel 1, 2, 3, 4, and 6, plus the 1 line difference of channel order. Example,
test@galliumos:~/Downloads$ diff ccpm-converged-drone-taranisx7.uav ccpm-converged-drone-flysky6x.uav
222,224c222,224
<             <field values="172,172,1811,172,172,172,1500,1500,1500,1500" name="ChannelMin"/>
<             <field values="192,991,991,991,991,991,1500,1500,1500,1500" name="ChannelNeutral"/>
<             <field values="1811,1811,172,1811,1811,1811,1500,1500,1500,1500" name="ChannelMax"/>
---
>             <field values="240,640,1406,240,172,640,1500,1500,1500,1500" name="ChannelMin"/>
>             <field values="260,1023,1023,1023,991,1023,1500,1500,1500,1500" name="ChannelNeutral"/>
>             <field values="1806,1406,640,1806,1811,1406,1500,1500,1500,1500" name="ChannelMax"/>
227c227
<             <field values="1,2,3,4,5,6,0,0,0,0" name="ChannelNumber"/>
---
>             <field values="3,1,2,4,5,6,0,0,0,0" name="ChannelNumber"/>


The difference between factory uav file and operating uav file is the 3 lines of 3 servo PWM range, plus 1 line difference of CC3D serial number. Example,
test@galliumos:~/Downloads$ diff ccpm-converged-drone-taranisx7.uav /home/test/actn-qx7.uav
4c4
<         <hardware serial="000000000000000000000000" type="3c" revision="a5"/>
---
>         <hardware serial="54ff6b064883545328241887" revision="2" type="4"/>
20,22c20,22
<             <field values="2000,1000,2000,1000,2000,2000,1000,1000,1000,1000,1000,1000" name="ChannelMax"/>
<             <field values="1500,1500,1500,1000,1000,1000,1000,1000,1000,1000,1000,1000" name="ChannelNeutral"/>
<             <field values="1000,2000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000" name="ChannelMin"/>
---
>             <field values="2057,1075,2000,1000,2000,2000,1000,1000,1000,1000,1000,1000" name="ChannelMax"/>
>             <field values="1565,1575,1500,1000,1000,1000,1000,1000,1000,1000,1000,1000" name="ChannelNeutral"/>
>             <field values="1057,2075,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000" name="ChannelMin"/>

Takeoff Procedure

0. Start ground station FPV goggles recording.

1. Plug in craft battery, but first prepare the craft in a position in your hand that it will be rotated clockwise slightly and then placed on a level surface.
This may sound hideously detailed. But making this happen before powering on transmitter is crucial in allowing swashplate leveling to be checked every flight.
As shown in previous topics, the transmitter needs to be ready for takeoff as soon as it is powered on, swashplate checking needs to be done while transmitter is off.

2. Rotate the craft slightly clockwise so that the tail gyro keeps the tail motor off, then place the craft on a level surface.
Wait until the fast blinking LEDs slows down the blinking. This takes about 5 seconds. Do not rotate the craft counter clockwise before the LEDs slows down the blinking because that will kick star the tail motor.

3. Check that FPV recording is in progress in the goggles. 

4. Once the LEDs blinks slows, the craft can be picked up and rotated any direction without servo or motor movements. Check zero pitch of the swashplate as seen in build note. If not level and centered, abort takeoff.

5. Position the craft on takeoff surface.

6. Put on FPV goggle. Turn on transmitter.  

7. Arm the craft by cutting throttle and turning rudder to the left and hold for 3 seconds. The craft will be armed in 3 seconds.

8. Spool up the main rotor by 1/8 stick. This a slow start so that no aerodynamics is in effect to inflict damage to the craft.

9. Now press the aileron stick to the extreme left, and the craft should have no movement. This is to reset the high integral cyclic gain so that when aerodynamic is in effect, there will be no sudden forceful PID counter movements. Then release the aileron stick and immediately throttle up the stick to 2/8 position. Aerodynamic of the rotor is in effect now.

 This characteristic is common through out nearly all helicopter flight controllers. Example of the same problem is with Blade 230, in this video,
, where the spool up is at 0:06 , and the error rolling to the right is at 0:14 .

10. Move the throttle slowly toward 3/8 position without lifting the craft off the ground. This is so that we have time to correct the craft's heading due to the small yaw PID gain that allows the heading to change nearly 90 degrees from zero torque to hovering. So, the craft should be turning to the left since the beginning of spooling up. Give the yaw stick right input to correct the left turn.

11. Throttle up. Take off. There should be not much yaw correction needed since the last step's yaw correction. So, pilot can focus on just the cyclic correction on the craft.

Landing Procedure

Rate mode landing often results in capsizing due to the drifting nature of the rate mode as seen in the last few seconds of the following video when the pseudo touch down at 1:43 has a remaining altitude, maybe 1 foot, and the drift scraped the grass at 1:45 resulting in capsizing.


Aborting landing in rate mode also often results in crash due to altitude drop with the big maneuvering nature of rate mode. Rate mode spot landing is often nearly impossible even fly line of sight. Here in the following video, the landing approach, trying to avoid the fence, is deemed to high at 0:05, and the turn-around at 0:06 results in steep increase in craft speed and altitude drop, resulting in crash.


Seemingly smooth touchdown in rate mode can still capsize due to the general high speed approaching to the target.

Forgetting about switching to attitude mode can occur during high work load situations such as combating high wind while locating a obstacle'd landing patch impromptu. Flipping SwitchC to attitude mode for final approach should be trained into the pilot's reflex because attitude mode landing is appropriate in nearly all circumstances even the most unlikely ones, such as the following example.

The trick to have near 100% success landing is to trim the aileron and elevator stick in attitude mode indoors to near zero drift. The trim for attitude mode is to compensate the imprecise/inaccurate attitude mode accelerometer leveling. In rate mode and acro+ mode, the accelerometer is not used, Outer Loop zero'd, so the trim is not appropriate. To achieve switching off the trim, the flight mode setting needs  to be as the following picture, which switches off any trimming when SwitchC is in rate mode or acro+ mode.


CC3D setting attitude mode response at 180 degrees, which is the maximum, means that full elevator stick will pitch the craft 90 degree vertical relative to the ground. Rate mode response 1000 degrees/s is the maximum in the "Insane" responsiveness region. All those mean that CC3D has full unlimited control of the craft, and the transmitter needs to scale it down or stipulate it for human piloting, like the  exponent setting in the last picture.

High wind landing is often risky. In the following landing approach, I first tilted the head of the craft down so that I could see obstacles around the landing patch on the ground. I continued to keep the head down so that the camera points toward the ground from 0:12 to 0:22 while descending. I ended up facing wind and away from the landing patch because the wind is blowing toward the fence. I flew blindly because I was facing away from the fence and landing patch from 0:22 to 0:30 during final approach. I ripped off the FPV goggles at 0:32 to try to land line-of-sight, but I didn't have the training to fly LOS when the craft flies toward me at the landing target. I was disoriented at 0:37. It crashed.


The appropriate approach planning should be exercised to reduce the risk of landing in high wind.
This is the most favorable condition. Same with landing an airplane. The head wind slows down the craft. The craft elevator tilts downward to resist the wind. At the same time, the FPV camera points toward the ground for clear view of obstacles.




With crosswind, unlike an airplane, the drone does not need to change approach heading because the drone flies side ways just as fast as flying forward. So, the craft tilts side ways and forward at the same time  FPV camera points toward the ground for clear view of obstacles.



With tailwind, without changing approach heading, the craft needs to tilt its head up, pointing FPV camera toward the sky resulting in blind landing. If the pilot heads toward the wind to tilt the FPV camera down to see the ground, he is facing away from the landing patch flying backward blindly as seen in previous crash landing video. The solution is to change heading and convert the tailwind to cross wind. The field of view of the camera only approaches 180 degrees and less, so the side way approach needs a slight forward movement, and the craft lands slightly off the landing target.


With tailwind and slight crosswind, the heading should be perpendicular to the wind and heading toward the crosswind component of the wind. The landing target is with in the field of view of the camera. The craft tilts toward the ground to resist the crosswind at the same time the FPV camera points toward the ground for clear view of obstacles.




When crosswind mixed with headwind, no heading changes needed because there is no tailwind component to force the pilot to tilt the craft and the FPV camera toward the sky. This is the first and second condition combined. And not heading change needed for either component of the wind.

In summary, the montage of full 28 screens to edit in Taranis QX7 from factory reset is here below.



Voltage Monitoring In-Flight

It can be inferred that Caddx Turtle's voltage OSD shows the voltage is floored to the nearest 0.5 volt.
The 10+ second dive starts at 3:59 , and the on-board HD video here,

.

FPV Fishbowl Optical Illusion

As an illustration, a 30-frame-per-second FPV feed in a tail-spin situation has the following 3 consecutive frames,

, and the craft appears to move from the left side of the road to the ball park on the right side of the road more than 210 feet between 2 frames of 0.033 seconds illustrated in the following satellite photo.
In the third frame to the camera failure, the camera points toward the south east corner of the park; in the second to the last frame, the camera points toward near straight north.

The apparent mach-6 hypersonic movement optical illusion needs to be re-fitted into pilot's mental picture for the craft's actual movement. Due to the near-170 degree wide angle lens of either Goqotomo or Caddx Turtle, the camera can display overlapping objects after craft turning 160 degrees. In the above first and second frame, the area at the overlap of line of sight is the actual position of the craft. In the last frame, the battery pack is seen thrown off the craft, and the craft crashed on to the right curb of the road as circle-highlighted in the satellite photo. The craft's actual position is closer to the right curb of the road on the peripheral of the thrid and second frame than it appears.

All objects in the FPV feed are "squeezed" toward the center of the screen from all angles, and the pilot needs to know that the craft is actually positioned closer to the objects on the peripheral of the screen than they appear. This is the same principle of wide angle rear mirrors where car manufacturers put the warning "Objects in mirror are closer than they appear". For the actual footage of the flight leading to the tail spin,

, the same principle applies. At exactly 1:00 mark, the craft appears to be outside of the ball park over the row of pine trees lining the south side street on the peripheral of the screen, but, the craft is actually closer to the pine trees, likely right above them. 12 seconds later, at 1:12 mark, the apparent position of the craft has moved the improbable 1000 feet to the north west side of the curved road, even though the actual position is still in the confine of the park because the view is exactly the same as the third frame to the camera failure video picture frame. Between 1:34 mark and 1:35 mark, the craft appears to move the impossible 600 feet from the south east side outside the park to the curved road side crash landing point all within 1 second. The reality is that the craft moved from near the center of the park to the curb of the road, 80 feet at most, within 1 second.

The conclusion is that the craft has been within the confine of the ball park all though out the entire flight doing very small maneuvers. The technique of tilting the camera can produce explosive high speed craft flight visual effects simply by distorting the pictures.

FPV Feed Flight Path Tracking

The raw FPV DVR recorded mp4 of the tail-spin crash with fishbowl optical illusion is saved at googledrive https://drive.google.com/file/d/1IchzErZsqhmW0qukS_ZLuJz3CpO4A27t . When viewed in Android MX Player or the EV800D set, the last 3 frames used to track down the wreckage is not available frame-by-frame. A laptop with desktop Avidemux software is needed to step in the last 3 frames. Avidemux installation for Ubuntu laptops is the 2-step procedure seen in
http://ubuntuhandbook.org/index.php/2018/01/install-latest-avidemux-2-7-0-ubuntu-17-10-18-04/ .

Distinguishing Tail Failure And Failsafe Mode Free Fall

Below is the confirmed tail failure due to prop ejection, which goes into left turn tail spin and continues.

It is distinguished from the radio disconnect Failsafe Mode free falls,

, which initially turns the craft to the right due to sudden near-zero-collective-angle-torque while tail prop momentum continues the right turn motion for a few seconds until tail prop stops, then the near-zero main torque produces left turn spin.

The corrective action for the FlySky-A8S receiver is to replace it with parts listed in build notes when the craft is ready to be taken outdoors for test/missions; the corrective action for the tail prop ejection is for pilot to check the prop loose before every flight.

High-G Pull-Up

High-G pull-ups blade stall significantly reduces RPM and lift. 
Experiments with 2 incidences confirms the theory. The first dive starts at 1:00 mark.  In either case, full throttle is applied at least 3 seconds before the touch down crash. The pull-up deceleration appears much weaker than usual.



The solution is to use zero collective pitch to decelerate the dive while angling the craft for pull-out.

And the following test verifies the fix.

No comments:

Post a Comment