RigidChips
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Cyclic Control for Helicopters

2 posters

Go down

Cyclic Control for Helicopters Empty Cyclic Control for Helicopters

Post by bwansy Thu Aug 19, 2010 3:22 am

So, you've built a helicopter. You turn on the rotor, and it goes straight up. You turn off the engine, it falls back down. It doesn't tip over, nor does it spin out of control. Congratulations, you've successfully built your first helicopter! But hey, wait a minute. That's not a helicopter, it's just a bamboo-dragonfly, it's not a real helicopter that can fly around at will. What's missing? Controls.

Helicopters are very different than fixed-wing aircraft. While aeroplanes use ailerons, elevators and rudders to control roll, pitch and yaw, helicopters have none of these. Instead, they have rotor blades spinning around. To control the helicopter, we use a technique called "cyclic control".

Like wings, rotor blades are tilted at a certain angle relative to the wheel (in RC), so that it produces lift. The more they tilt, the more lift it gets. This is the fundamental principle behind cyclic control, which manipulates the lift at different positions of the "rotor disc". This is done by adjusting the blade angles rapidly according to their positions. We can know the position of each blade by knowing the orientation of the wheel, which is easily obtained by the RC's built-in function _RY(). First the wheel must be named (or labeled), e.g. "WHEEL", then the line "_RY(WHEEL,WHEEL-1)" will give you its orientation. It is an angle in radians. Then using appropriate combination of trig functions (sin, cos) and positive/negative signs, the angle of each blade can be altered accordingly. Each helicopter is slightly different, so you have to experiment with the combination.

Let's take the action of rolling to the left as an example. Intuitively, one would think that the blades have to give more lift on the right side, while giving less lift while on the left side. But there's a catch. Due to gyroscopic precession, this torque is delayed by 90 degrees. So if you design your control system as mentioned, the helicopter would pitch up when you want it to roll left. Therefore, depending on the direction of rotation, you would like to increase lift in front or behind instead.

The attached model is a model I made to demonstrate how this can be done.
Controls:
[A/Z]: Increase/decrease power
Arrow keys: pitch/roll
[V/B]: Yaw

Code:
// [RCD]
Val
{
   FAN1(default=0, min=-180, max=180)
   FAN2(default=0, min=-180, max=180)
   FAN3(default=0, min=-180, max=180)
   FAN4(default=0, min=-180, max=180)
   PITCH(default=0, min=-10, max=10, step=2)
   PWR(default=0, max=200000)
   ROLL(default=0, min=-10, max=10, step=2)
   ROT(default=0, min=-10, max=10)
   THR(default=0, min=-100000, max=100000)
   TOT(default=0, max=20)
   YAW(default=0, min=-10, max=10, step=2)
}
Key
{
   0:PITCH(step=-1)
   1:PITCH(step=1)
   2:ROLL(step=1)
   3:ROLL(step=-1)
   4:PWR(step=-5000)
   5:TOT(step=-1)
   6:ROT(step=1)
   7:PWR(step=5000)
   8:TOT(step=1)
   10:YAW(step=-1)
   11:YAW(step=1)
   14:PWR(step=20)
}
Body
{
   Core(name=COR) {
      N:Frame(angle=45, option=0, spring=0.5, damper=0.5) {
         N:TrimF(angle=90) {
            N:Wheel() { }
            N:Jet(angle=180, power=-THR) { }
         }
      }
      E:Frame(angle=45, spring=0.5, damper=0.5) {
         E:TrimF(angle=90) {
            E:Wheel() { }
            E:Jet(angle=180, power=-THR) { }
         }
      }
      W:Frame(angle=45, spring=0.5, damper=0.5) {
         W:TrimF(angle=90) {
            W:Wheel() { }
            W:Jet(angle=180, power=-THR) { }
         }
      }
      S:Frame(angle=45, spring=0.5, damper=0.5) {
         S:Trim(angle=90) {
            S:Wheel() { }
            S:Jet(angle=180, power=-THR) { }
         }
      }
      S:Frame(angle=-90) {
         S:RLW(angle=-90, power=PWR, name=WHL) {
            S:Chip(angle=5) {
               S:Trim(angle=FAN1, color=#0000FF) {
                  S:Chip() {
                     S:Chip() {
                        S:Chip() {
                           S:Chip() {
                              S:Chip() { }
                           }
                        }
                     }
                  }
               }
            }
            E:Chip(angle=5) {
               E:Trim(angle=FAN2, color=#FF0000) {
                  E:Chip() {
                     E:Chip() {
                        E:Chip() {
                           E:Chip() {
                              E:Chip() { }
                           }
                        }
                     }
                  }
               }
            }
            W:Chip(angle=5) {
               W:Trim(angle=FAN4, color=#00FF00) {
                  W:Chip() {
                     W:Chip() {
                        W:Chip() {
                           W:Chip() {
                              W:Chip() { }
                           }
                        }
                     }
                  }
               }
            }
            N:Chip(angle=5) {
               N:Trim(angle=FAN3, color=#FFFF00) {
                  N:Chip() {
                     N:Chip() {
                        N:Chip() {
                           N:Chip() {
                              N:Chip() { }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
Script
{THR = YAW*100
ROT=_RY(WHL,COR)
FAN1 = TOT+ROLL*_COS(ROT)-PITCH*_SIN(ROT)
FAN2 = TOT+ROLL*_COS(ROT+_PI()/2)-PITCH*_SIN(ROT+_PI()/2)
FAN3 = TOT+ROLL*_COS(ROT+_PI())-PITCH*_SIN(ROT+_PI())
FAN4 = TOT+ROLL*_COS(ROT+3*_PI()/2)-PITCH*_SIN(ROT+3*_PI()/2)

}

bwansy
Admin

Posts : 170
Join date : 2010-07-15

https://rigidchips.forumotion.com

Back to top Go down

Cyclic Control for Helicopters Empty Re: Cyclic Control for Helicopters

Post by freek4ever Fri Dec 02, 2011 1:44 pm

great no more just great
freek4ever
freek4ever
Tank
Tank

Posts : 97
Join date : 2011-08-26
Age : 27
Location : nederland holand

Back to top Go down

Cyclic Control for Helicopters Empty Re: Cyclic Control for Helicopters

Post by freek4ever Sat Dec 10, 2011 3:21 pm

Thank-you for the script one of my faforire models is a helycopter whit this script y use analog control
I will post it later for kaybord

10/10 for script cheers
freek4ever
freek4ever
Tank
Tank

Posts : 97
Join date : 2011-08-26
Age : 27
Location : nederland holand

Back to top Go down

Cyclic Control for Helicopters Empty Re: Cyclic Control for Helicopters

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum